:root {
  --bg: #030507;
  --panel: rgba(5, 13, 16, .72);
  --panel-border: rgba(114, 255, 205, .18);
  --text: #f4fff9;
  --muted: rgba(232, 255, 247, .68);
  --green: #55ffbd;
  --cyan: #00d8ff;
  --pink: #ff3f7f;
  --yellow: #ffe27a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  isolation: isolate;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 70% 18%, rgba(0, 216, 255, .15), transparent 34%),
    radial-gradient(circle at 16% 64%, rgba(255, 63, 127, .12), transparent 34%),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.82), transparent 78%);
}

#space-canvas,
#code-rain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#space-canvas {
  opacity: .9;
}

#code-rain {
  opacity: .46;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(3, 5, 7, .72);
  backdrop-filter: blur(18px);
}

main {
  position: relative;
  z-index: 2;
}

.navbar {
  min-height: 72px;
  padding: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-sigil {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(85,255,189,.35);
  color: var(--green);
  background: rgba(85,255,189,.08);
  box-shadow: 0 0 26px rgba(85,255,189,.18);
  font: 700 13px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link-lite {
  color: rgba(244,255,249,.72);
  padding: 9px 12px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 14px;
}

.nav-link-lite:hover {
  color: var(--text);
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
}

.hero {
  min-height: calc(88svh - 72px);
  display: grid;
  align-items: center;
  padding-top: clamp(54px, 8vw, 108px);
  padding-bottom: clamp(44px, 8vw, 88px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: clamp(28px, 7vw, 96px);
  align-items: center;
}

.terminal-kicker {
  margin: 0 0 18px;
  color: rgba(190, 255, 230, .78);
  font: 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.terminal-kicker span {
  color: var(--pink);
}

h1 {
  max-width: none;
  margin: 0;
  color: #f8fffc;
  font-size: clamp(56px, 8.2vw, 112px);
  font-weight: 950;
  line-height: .96;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow:
    3px 0 var(--cyan),
    -3px 0 var(--pink),
    0 0 44px rgba(85,255,189,.24);
  animation: title-glitch 3.4s steps(1, end) infinite;
}

.hero-text {
  max-width: 620px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.hero-text span {
  display: block;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 12px 18px;
  font-weight: 750;
}

.btn-chaos {
  border: 1px solid rgba(85,255,189,.55);
  color: #04100d;
  background: linear-gradient(135deg, var(--green), #caffea);
  box-shadow: 0 0 34px rgba(85,255,189,.25);
}

.btn-chaos:hover {
  color: #04100d;
  filter: brightness(1.05);
}

.btn-ghost {
  border: 1px solid rgba(255,255,255,.16);
  color: var(--text);
  background: rgba(255,255,255,.05);
}

.btn-ghost:hover {
  border-color: rgba(255,255,255,.28);
  color: var(--text);
  background: rgba(255,255,255,.08);
}

.portal-panel {
  border: 1px solid var(--panel-border);
  background:
    linear-gradient(145deg, rgba(0,216,255,.11), rgba(85,255,189,.05)),
    var(--panel);
  padding: 22px;
  box-shadow:
    0 30px 90px rgba(0,0,0,.32),
    inset 0 0 40px rgba(85,255,189,.05);
}

.panel-topline {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: rgba(210,255,239,.7);
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  box-shadow: 0 0 16px var(--green);
}

.qr-code {
  display: block;
  width: min(100%, 270px);
  margin: 0 auto;
  padding: 14px;
  background: white;
  border: 1px solid rgba(255,255,255,.3);
}

.qr-title {
  margin: 18px 0 6px;
  color: var(--text);
  text-align: center;
  font-weight: 800;
}

.qr-url {
  margin: 0;
  color: rgba(220,250,255,.76);
  text-align: center;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}

.launchpad {
  padding-top: 26px;
  padding-bottom: clamp(64px, 9vw, 120px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  min-height: 210px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.055);
  padding: 22px;
}

.project-tag {
  display: inline-flex;
  margin-bottom: 34px;
  color: var(--yellow);
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.project-card h3 {
  margin: 0 0 10px;
  color: var(--text);
  font: 700 24px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.registry-page h1 {
  white-space: normal;
}

.registry-main {
  min-height: calc(100svh - 72px);
  padding-top: clamp(48px, 7vw, 88px);
  padding-bottom: clamp(64px, 8vw, 112px);
}

.registry-hero {
  max-width: 980px;
  margin-bottom: 28px;
}

.registry-hero.compact {
  max-width: 860px;
}

.registry-lede {
  max-width: 780px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.8vw, 22px);
  line-height: 1.7;
}

.install-prompt {
  max-width: 100%;
  margin: 28px 0 0;
  border: 1px solid rgba(85,255,189,.18);
  background: rgba(0,0,0,.35);
  color: rgba(228,255,246,.9);
  padding: 18px;
  overflow-x: auto;
  font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.install-prompt code {
  color: inherit;
  white-space: pre-wrap;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 16px;
}

.skill-card,
.registry-panel {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.055);
  padding: 22px;
}

.skill-card {
  display: grid;
  gap: 20px;
}

.skill-card h2,
.registry-panel h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 900;
}

.skill-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.registry-panel {
  margin-top: 16px;
}

.registry-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.skill-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.65;
}

.skill-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.skill-meta.wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.skill-meta div {
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.18);
  padding: 12px;
}

.skill-meta dt {
  margin-bottom: 6px;
  color: rgba(190,255,230,.68);
  font: 11px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}

.skill-meta dd {
  margin: 0;
  color: var(--text);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.skill-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@keyframes title-glitch {
  0%, 91%, 100% {
    transform: translate(0, 0) skewX(0);
  }
  92% {
    transform: translate(6px, -1px) skewX(5deg);
  }
  93% {
    transform: translate(-4px, 1px) skewX(-3deg);
  }
  94% {
    transform: translate(0, 0) skewX(0);
  }
}

@media (max-width: 991.98px) {
  .hero {
    min-height: auto;
    padding-top: 52px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .portal-panel {
    width: min(100%, 420px);
    max-width: 420px;
    margin-inline: auto;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .skill-meta,
  .skill-meta.wide {
    grid-template-columns: 1fr 1fr;
  }

  .section-heading {
    display: block;
  }
}

@media (max-width: 575.98px) {
  .nav-actions {
    display: none;
  }

  h1 {
    font-size: clamp(42px, 13vw, 62px);
  }

  .hero-actions {
    display: grid;
  }

  .skill-actions {
    display: grid;
  }

  .skill-meta,
  .skill-meta.wide {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }

  #space-canvas,
  #code-rain {
    display: none;
  }
}
