/* ============================================================
   Jatin Aggarwal — Portfolio
   Theme: Iridescent Void (default) · switchable via [data-theme]
   ============================================================ */

:root,
[data-theme="iridescent"] {
  --bg:        #06060a;
  --bg-2:      #0a0a12;
  --panel:     rgba(255, 255, 255, 0.035);
  --panel-2:   rgba(255, 255, 255, 0.06);
  --border:    rgba(255, 255, 255, 0.08);
  --border-2:  rgba(255, 255, 255, 0.14);
  --ink:       #f5f5f7;
  --ink-2:     rgba(245, 245, 247, 0.7);
  --ink-3:     rgba(245, 245, 247, 0.45);
  --c1:        #ff61c7;   /* pink */
  --c2:        #7c5cff;   /* violet */
  --c3:        #3affe0;   /* teal */
  --grad:      linear-gradient(120deg, var(--c1), var(--c2) 50%, var(--c3));
  --grad-soft: linear-gradient(120deg, rgba(255,97,199,0.20), rgba(124,92,255,0.18) 50%, rgba(58,255,224,0.20));
  --shadow:    0 30px 80px -30px rgba(124, 92, 255, 0.45);
}

[data-theme="aurora"] {
  --bg:        #0a0a14;
  --bg-2:      #0f0f1f;
  --c1:        #a78bfa;
  --c2:        #2dd4bf;
  --c3:        #f0abfc;
  --shadow:    0 30px 80px -30px rgba(45, 212, 191, 0.40);
}

[data-theme="mono"] {
  --bg:        #0a0a0a;
  --bg-2:      #111111;
  --panel:     rgba(255, 255, 255, 0.04);
  --panel-2:   rgba(255, 255, 255, 0.07);
  --c1:        #fafafa;
  --c2:        #a3a3a3;
  --c3:        #525252;
  --grad:      linear-gradient(120deg, #fafafa, #a3a3a3 60%, #525252);
  --grad-soft: linear-gradient(120deg, rgba(255,255,255,0.18), rgba(163,163,163,0.10));
  --shadow:    0 30px 80px -30px rgba(255, 255, 255, 0.20);
}

[data-theme="solar"] {
  --bg:        #0d0a08;
  --bg-2:      #161210;
  --c1:        #ff8a3d;
  --c2:        #ffd166;
  --c3:        #ff61c7;
  --shadow:    0 30px 80px -30px rgba(255, 138, 61, 0.40);
}

/* ───────────────────────────────────────────────────────────
   Base
   ─────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: dark; background: var(--bg); }
body {
  background: transparent;
  color: var(--ink);
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: none;
}
@media (pointer: coarse) { body { cursor: auto; } }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ambient cosmic noise + glow on the page background */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60% 50% at 20% 0%, color-mix(in oklab, var(--c1) 14%, transparent), transparent 60%),
    radial-gradient(50% 50% at 100% 30%, color-mix(in oklab, var(--c2) 10%, transparent), transparent 60%),
    radial-gradient(40% 40% at 50% 100%, color-mix(in oklab, var(--c3) 10%, transparent), transparent 60%);
  filter: blur(40px);
  opacity: .9;
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
  opacity: .035;
  mix-blend-mode: overlay;
}

/* ───────────────────────────────────────────────────────────
   Custom cursor
   ─────────────────────────────────────────────────────────── */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink);
  mix-blend-mode: difference;
}
.cursor-ring {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border-2);
  transition: width .2s ease, height .2s ease, background .2s ease, border-color .2s ease;
}
.cursor-grow .cursor-ring {
  width: 64px; height: 64px;
  background: color-mix(in oklab, var(--c2) 12%, transparent);
  border-color: color-mix(in oklab, var(--c2) 40%, transparent);
}
.cursor-text .cursor-ring {
  width: 4px; height: 28px; border-radius: 2px;
  background: var(--ink); border: none;
}

/* ───────────────────────────────────────────────────────────
   Loader
   ─────────────────────────────────────────────────────────── */
#loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: grid; place-items: center;
  transition: opacity .6s ease;
}
#loader.is-out { opacity: 0; }
.loader-inner { width: min(520px, 88vw); text-align: left; }
.loader-mark {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px; letter-spacing: .18em; color: var(--ink-3);
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.loader-num {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(56px, 12vw, 144px);
  font-weight: 500; letter-spacing: -0.04em;
  line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.loader-bar {
  height: 1px; background: var(--border); margin-top: 18px; overflow: hidden;
}
.loader-bar > i {
  display: block; height: 100%; background: var(--grad);
  transform-origin: left; transform: scaleX(0);
  transition: transform .1s linear;
}
.loader-status {
  margin-top: 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px; letter-spacing: .04em; color: var(--ink-3);
}

body:not(.booted) { overflow: hidden; }

/* ───────────────────────────────────────────────────────────
   Typography
   ─────────────────────────────────────────────────────────── */
.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c1);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--c1) 60%, transparent);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--c1) 60%, transparent); }
  50% { box-shadow: 0 0 0 8px transparent; }
}
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; font-weight: 500; }
h1 { font-size: clamp(64px, 13vw, 200px); line-height: 0.92; letter-spacing: -0.04em; }
h2 { font-size: clamp(36px, 6vw, 80px); line-height: 1; letter-spacing: -0.03em; }
h3 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; }
p  { color: var(--ink-2); text-wrap: pretty; }
.lead { font-size: clamp(18px, 1.6vw, 22px); color: var(--ink-2); max-width: 60ch; }

.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ───────────────────────────────────────────────────────────
   Layout primitives
   ─────────────────────────────────────────────────────────── */
.container {
  width: min(1280px, calc(100% - 64px));
  margin: 0 auto;
  position: relative; z-index: 2;
}
section { position: relative; padding: 140px 0; }
section + section { border-top: 1px solid var(--border); }
.section-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 80px;
  align-items: end; margin-bottom: 80px;
}
@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; }
  section { padding: 96px 0; }
}
.section-head .head-meta {
  display: flex; flex-direction: column; gap: 18px;
}
.section-head .head-title { display: flex; flex-direction: column; gap: 28px; }
.section-index {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px; color: var(--ink-3); letter-spacing: .2em;
}

/* ───────────────────────────────────────────────────────────
   Dock (floating glassmorphic nav)
   ─────────────────────────────────────────────────────────── */
.dock {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px;
  padding: 8px;
  background: color-mix(in oklab, var(--bg) 60%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--border-2);
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: transform .45s cubic-bezier(.5,.1,.2,1), opacity .3s;
}
.dock.is-hidden { transform: translateX(-50%) translateY(120%); opacity: 0; }
.dock a, .dock button {
  display: inline-flex; align-items: center; justify-content: center;
  height: 38px; padding: 0 14px;
  border: none; background: transparent;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 13px; font-weight: 500;
  cursor: none;
  transition: background .25s, color .25s;
}
.dock a:hover, .dock button:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 8%, transparent); }
.dock .dock-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.dock .dock-cta {
  background: var(--ink); color: var(--bg);
  padding: 0 16px;
}
.dock .dock-cta:hover { background: var(--ink); color: var(--bg); filter: brightness(0.92); }
.dock .dock-icon { width: 38px; height: 38px; padding: 0; }
.dock .dock-icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5; }

/* Top bar (left status + right kbd hint) */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px;
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  color: var(--ink-3); letter-spacing: .14em; text-transform: uppercase;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.topbar .mark {
  display: flex; align-items: center; gap: 10px;
}
.topbar .mark-glyph {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--grad);
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2), 0 8px 20px -8px var(--c2);
}
.topbar .mark-glyph::after {
  content: ""; position: absolute; inset: 4px; border-radius: 3px;
  background: var(--bg);
}
.topbar .status { display: flex; gap: 16px; align-items: center; }
.topbar .live::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--c3); margin-right: 6px;
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--c3) 60%, transparent);
  animation: pulse 2s infinite;
}
.topbar .kbd-hint kbd {
  font-family: inherit; font-size: 10px; padding: 2px 6px; border-radius: 4px;
  background: var(--panel); border: 1px solid var(--border); color: var(--ink-2);
}

/* ───────────────────────────────────────────────────────────
   HERO
   ─────────────────────────────────────────────────────────── */
.hero { padding: 0; height: 100dvh; min-height: 640px; display: grid; place-items: center; position: relative; overflow: hidden; border-top: 0; }
.hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 1;
}
.hero-overlay {
  position: relative; z-index: 2;
  width: min(1280px, calc(100% - 64px));
  padding: 120px 0 96px;
  pointer-events: none;
}
.hero-overlay > * { pointer-events: auto; }
.hero-title {
  display: grid; gap: 6px;
  font-weight: 500;
}
.hero-title .line {
  display: block; opacity: 0;
  transform: translateY(48px);
  filter: blur(8px);
  transition: opacity 1.1s cubic-bezier(.2,.7,.2,1), transform 1.1s cubic-bezier(.2,.7,.2,1), filter 1.1s cubic-bezier(.2,.7,.2,1);
}
body.booted .hero-title .line { opacity: 1; transform: none; filter: none; }
.hero-title .line:nth-child(1) { transition-delay: 200ms; }
.hero-title .line:nth-child(2) { transition-delay: 380ms; }
.hero-title .line:nth-child(3) { transition-delay: 560ms; }
@keyframes heroIn { from { opacity: 0; transform: translateY(48px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }

.hero-foot {
  position: absolute; left: 0; right: 0; bottom: 96px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 32px;
  padding: 0 32px; z-index: 3;
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  color: var(--ink-3); letter-spacing: .2em; text-transform: uppercase;
}
.hero-foot .scroll-hint { display: flex; align-items: center; gap: 8px; justify-content: center; }
.hero-foot .scroll-hint .bar { display: inline-block; width: 28px; height: 1px; background: var(--ink-3); position: relative; overflow: hidden; }
.hero-foot .scroll-hint .bar::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform: translateX(-100%); animation: scrollHint 2s infinite; }
@keyframes scrollHint { 0% { transform: translateX(-100%); } 60% { transform: translateX(100%); } 100% { transform: translateX(100%); } }
.hero-foot .right { text-align: right; }

.hero-marquee {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg) 60%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.hero-marquee .track {
  display: flex; gap: 56px; padding: 14px 0;
  animation: marquee 50s linear infinite;
  width: max-content;
}
.hero-marquee span {
  font-family: "JetBrains Mono", monospace; font-size: 12px;
  color: var(--ink-3); letter-spacing: .18em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 14px;
}
.hero-marquee span::after { content: "✦"; color: color-mix(in oklab, var(--c1) 60%, var(--ink-3)); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* hero side ornaments */
.hero-side-l, .hero-side-r {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-family: "JetBrains Mono", monospace; font-size: 10px;
  color: var(--ink-3); letter-spacing: .3em; text-transform: uppercase;
  writing-mode: vertical-rl; z-index: 3;
}
.hero-side-l { left: 18px; }
.hero-side-r { right: 18px; transform: translateY(-50%) rotate(180deg); }

/* ───────────────────────────────────────────────────────────
   Reveal animation
   ─────────────────────────────────────────────────────────── */
[data-reveal] {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--rd, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ───────────────────────────────────────────────────────────
   Cards / panels
   ─────────────────────────────────────────────────────────── */
.panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  position: relative; overflow: hidden;
  transition: border-color .35s, transform .35s;
}
.panel::after {
  content: ""; position: absolute; inset: -1px; border-radius: 18px;
  background: var(--grad-soft); opacity: 0;
  transition: opacity .4s; pointer-events: none; mix-blend-mode: screen;
}
.panel:hover { border-color: var(--border-2); transform: translateY(-3px); }
.panel:hover::after { opacity: 1; }

/* ───────────────────────────────────────────────────────────
   ABOUT
   ─────────────────────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: start; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } }

.about-bio p { font-size: 19px; line-height: 1.55; max-width: 56ch; }
.about-bio p + p { margin-top: 18px; }
.about-bio strong { color: var(--ink); font-weight: 500; }

.about-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.stat {
  padding: 26px 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex; flex-direction: column; gap: 6px;
  position: relative; overflow: hidden;
}
.stat::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--grad);
  opacity: .5;
}
.stat b {
  font-size: clamp(36px, 4.4vw, 56px);
  font-weight: 500; letter-spacing: -0.03em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
}
.stat span {
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  color: var(--ink-3); letter-spacing: .16em; text-transform: uppercase;
}

/* timeline strip */
.timeline-mini {
  margin-top: 40px; display: grid; gap: 0;
  border-top: 1px solid var(--border);
}
.timeline-mini .row {
  display: grid; grid-template-columns: 110px 1fr auto;
  align-items: center; gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  transition: padding .25s;
}
.timeline-mini .row:hover { padding-left: 12px; }
.timeline-mini .row .y { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--ink-3); letter-spacing: .14em; }
.timeline-mini .row .e { font-size: 17px; }
.timeline-mini .row .e b { font-weight: 500; color: var(--ink); }
.timeline-mini .row .e span { color: var(--ink-3); margin-left: 10px; }
.timeline-mini .row .tag {
  font-family: "JetBrains Mono", monospace; font-size: 10px;
  padding: 4px 8px; border-radius: 4px;
  background: var(--panel); border: 1px solid var(--border); color: var(--ink-2);
  text-transform: uppercase; letter-spacing: .14em;
}

/* ───────────────────────────────────────────────────────────
   TECH STACK — orbiting categories
   ─────────────────────────────────────────────────────────── */
.stack-grid {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center;
}
@media (max-width: 900px) { .stack-grid { grid-template-columns: 1fr; } }

.stack-cats {
  display: grid; gap: 12px;
}
.stack-cat {
  display: grid; grid-template-columns: 100px 1fr;
  gap: 20px; padding: 22px 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color .3s, transform .3s;
}
.stack-cat:hover { border-color: var(--border-2); transform: translateX(6px); }
.stack-cat .ck {
  font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: .18em;
  color: var(--ink-3); text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.stack-cat .ck::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--c2);
}
.stack-cat .cv {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  font-size: 13px; color: var(--ink);
  background: color-mix(in oklab, var(--bg) 50%, transparent);
  transition: background .25s, border-color .25s, color .25s;
  cursor: none;
}
.chip:hover {
  background: var(--grad-soft);
  border-color: color-mix(in oklab, var(--c2) 40%, var(--border-2));
}
.chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c2);
}
.chip[data-w="primary"] .dot { background: var(--c1); }
.chip[data-w="rising"] .dot { background: var(--c3); }

/* orbiting visual */
.orbit {
  aspect-ratio: 1;
  position: relative;
  display: grid; place-items: center;
}
.orbit-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid var(--border);
  animation: orbitSpin 60s linear infinite;
}
.orbit-ring:nth-child(2) { inset: 14%; animation-duration: 40s; animation-direction: reverse; }
.orbit-ring:nth-child(3) { inset: 30%; animation-duration: 26s; }
.orbit-ring:nth-child(4) { inset: 46%; animation-duration: 18s; animation-direction: reverse; }
@keyframes orbitSpin { to { transform: rotate(360deg); } }

.orbit-node {
  position: absolute; top: -10px; left: 50%;
  transform: translateX(-50%);
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  display: grid; place-items: center;
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  font-weight: 600; color: var(--ink);
  box-shadow: var(--shadow);
}
.orbit-node-2 { top: auto; bottom: -10px; }
.orbit-node-3 { top: 50%; left: -10px; transform: translateY(-50%); }
.orbit-node-4 { top: 50%; right: -10px; left: auto; transform: translateY(-50%); }

.orbit-core {
  position: relative; z-index: 2;
  width: 32%; aspect-ratio: 1;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 30px 80px -20px var(--c2), inset 0 0 0 1px rgba(255,255,255,0.2);
  display: grid; place-items: center;
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  letter-spacing: .26em; text-transform: uppercase; color: var(--bg);
  animation: orbitBob 4s ease-in-out infinite;
}
@keyframes orbitBob { 0%,100% { transform: translateY(-4px); } 50% { transform: translateY(4px); } }

/* ───────────────────────────────────────────────────────────
   WORK / PROJECTS
   ─────────────────────────────────────────────────────────── */
.work-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.work-card {
  grid-column: span 6;
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  cursor: none;
  transition: border-color .35s, transform .35s;
}
.work-card:nth-child(1) { grid-column: span 7; }
.work-card:nth-child(2) { grid-column: span 5; }
.work-card:nth-child(3) { grid-column: span 5; }
.work-card:nth-child(4) { grid-column: span 7; }
@media (max-width: 900px) {
  .work-card, .work-card:nth-child(n) { grid-column: span 12; }
}
.work-card:hover { border-color: var(--border-2); transform: translateY(-4px); }
.work-card::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(400px 200px at var(--mx, 50%) var(--my, 50%), color-mix(in oklab, var(--c2) 16%, transparent), transparent 60%);
  opacity: 0; transition: opacity .4s; pointer-events: none;
}
.work-card:hover::after { opacity: 1; }
.work-preview {
  aspect-ratio: 16/10;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.work-body {
  padding: 24px 26px 28px;
  display: flex; flex-direction: column; gap: 12px;
}
.work-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.work-name {
  font-size: 26px; font-weight: 500; letter-spacing: -0.02em;
  display: flex; align-items: baseline; gap: 12px;
}
.work-name small {
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  color: var(--ink-3); letter-spacing: .12em;
}
.work-meta {
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  color: var(--ink-3); letter-spacing: .14em; text-transform: uppercase;
}
.work-desc { color: var(--ink-2); font-size: 15px; line-height: 1.45; max-width: 48ch; }
.work-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.work-tags .t {
  font-family: "JetBrains Mono", monospace; font-size: 10px;
  padding: 4px 8px; border: 1px solid var(--border); border-radius: 999px;
  color: var(--ink-2); letter-spacing: .1em; text-transform: uppercase;
}
.work-cta {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 10px;
  font-family: "JetBrains Mono", monospace; font-size: 12px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
}
.work-cta::after {
  content: "→"; transition: transform .3s;
}
.work-card:hover .work-cta::after { transform: translateX(4px); color: var(--ink); }

/* visual previews — pure-CSS mock screens per project */
.preview-neuron { background:
  radial-gradient(60% 60% at 30% 30%, color-mix(in oklab, var(--c1) 30%, transparent), transparent 60%),
  radial-gradient(50% 50% at 80% 70%, color-mix(in oklab, var(--c3) 30%, transparent), transparent 60%),
  linear-gradient(180deg, #0c0c14, #060610); }
.preview-pulse { background:
  conic-gradient(from 0deg at 50% 50%, color-mix(in oklab, var(--c2) 16%, var(--bg-2)), var(--bg-2) 30%, color-mix(in oklab, var(--c1) 18%, var(--bg-2)) 60%, var(--bg-2) 80%); }
.preview-echo { background:
  linear-gradient(180deg, #08080c, #0d0d18);
}
.preview-mira { background:
  linear-gradient(135deg, #08080c, #0a0a12 50%, #060610);
}
.work-preview .overlay-glyph {
  position: absolute; inset: 24px;
  display: flex; align-items: flex-end; justify-content: space-between;
  font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--ink-3);
  letter-spacing: .2em; text-transform: uppercase;
  pointer-events: none;
}
.work-preview .glyph-art {
  position: absolute; inset: 0; display: grid; place-items: center;
}

/* Neuron preview: code with two cursors */
.preview-neuron .glyph-art::before {
  content: "function pair(a, b) {\\A  return ai.merge(a, b);\\A}";
  font-family: "JetBrains Mono", monospace; font-size: 14px;
  color: rgba(255,255,255,.55); white-space: pre;
  line-height: 1.6;
}
.preview-neuron .cur {
  position: absolute; width: 2px; height: 18px;
  background: var(--c1); animation: blink 1s steps(2) infinite;
}
.preview-neuron .cur1 { left: 38%; top: 38%; }
.preview-neuron .cur2 { left: 58%; top: 56%; background: var(--c3); animation-delay: .4s; }
@keyframes blink { 50% { opacity: 0; } }

/* Pulse preview: pulsing grid of event chips */
.preview-pulse .grid-events { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 24px; width: 80%; }
.preview-pulse .grid-events i {
  display: block; height: 26px; border-radius: 6px;
  background: color-mix(in oklab, var(--c2) 24%, var(--bg-2));
  border: 1px solid var(--border);
  animation: chipPulse 2.6s ease-in-out infinite;
}
.preview-pulse .grid-events i:nth-child(2n) { background: color-mix(in oklab, var(--c1) 22%, var(--bg-2)); animation-delay: .3s; }
.preview-pulse .grid-events i:nth-child(3n) { animation-delay: .6s; }
@keyframes chipPulse { 0%, 100% { opacity: .9; transform: translateY(0); } 50% { opacity: .55; transform: translateY(-2px); } }

/* Echo preview: waveform */
.preview-echo .wave { display: flex; align-items: center; gap: 3px; height: 60%; }
.preview-echo .wave i { width: 3px; background: var(--grad); border-radius: 2px; animation: waveBars 1.4s ease-in-out infinite; }
.preview-echo .wave i:nth-child(2) { animation-delay: .1s; }
.preview-echo .wave i:nth-child(3) { animation-delay: .2s; }
.preview-echo .wave i:nth-child(4) { animation-delay: .3s; }
.preview-echo .wave i:nth-child(5) { animation-delay: .4s; }
.preview-echo .wave i:nth-child(6) { animation-delay: .5s; }
.preview-echo .wave i:nth-child(7) { animation-delay: .6s; }
.preview-echo .wave i:nth-child(8) { animation-delay: .7s; }
.preview-echo .wave i:nth-child(9) { animation-delay: .8s; }
.preview-echo .wave i:nth-child(10){ animation-delay: .9s; }
.preview-echo .wave i:nth-child(11){ animation-delay:1.0s; }
.preview-echo .wave i:nth-child(12){ animation-delay:1.1s; }
@keyframes waveBars { 0%, 100% { height: 20%; } 50% { height: 90%; } }

/* Generic preview (for newly-added projects without a custom mock) */
.preview-generic { background:
  linear-gradient(135deg, #0a0a14, #060610 50%, #0c0c18);
}
.preview-generic .glyph-art { position: absolute; inset: 0; display: grid; place-items: center; }
.preview-generic .generic-glyph {
  font-size: clamp(72px, 12vw, 140px);
  font-weight: 500; letter-spacing: -0.04em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: .9;
}

/* Mira preview: terminal prompt */
.preview-mira .term-glyph {
  font-family: "JetBrains Mono", monospace; font-size: 13px;
  color: var(--ink-2); padding: 24px; line-height: 1.7;
  width: 80%;
}
.preview-mira .term-glyph .c { color: var(--c3); }
.preview-mira .term-glyph .k { color: var(--c1); }

/* ───────────────────────────────────────────────────────────
   EXPERIENCE timeline
   ─────────────────────────────────────────────────────────── */
.xp-list {
  position: relative;
  display: grid; gap: 0;
  border-left: 1px solid var(--border);
  padding-left: 32px;
  margin-left: 8px;
}
.xp-list::before {
  content: ""; position: absolute; left: -1px; top: 0; bottom: 0;
  width: 1px; background: linear-gradient(180deg, transparent, var(--c2) 30%, var(--c1) 70%, transparent);
  opacity: .5; mask: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent);
}
.xp-item {
  position: relative;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  display: grid; grid-template-columns: 160px 1fr 1fr; gap: 32px; align-items: start;
}
.xp-item:last-child { border-bottom: none; }
.xp-item::before {
  content: ""; position: absolute; left: -39px; top: 36px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--c2);
  box-shadow: 0 0 0 4px var(--bg), 0 0 20px var(--c2);
}
.xp-item .when { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--ink-3); letter-spacing: .14em; padding-top: 4px; }
.xp-item .what h3 { margin-bottom: 6px; }
.xp-item .what .org { color: var(--ink-2); font-size: 14px; }
.xp-item .desc { color: var(--ink-2); font-size: 14.5px; line-height: 1.6; }
.xp-item .desc ul { margin: 0; padding-left: 16px; }
.xp-item .desc li { margin-bottom: 6px; }
@media (max-width: 900px) {
  .xp-item { grid-template-columns: 1fr; gap: 12px; padding-left: 0; }
}

/* ───────────────────────────────────────────────────────────
   CERTS / ACHIEVEMENTS
   ─────────────────────────────────────────────────────────── */
.cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .cert-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cert-grid { grid-template-columns: 1fr; } }
.cert {
  position: relative; padding: 28px 26px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 16px;
  display: flex; flex-direction: column; gap: 10px;
  overflow: hidden;
}
.cert .badge {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  font-family: "JetBrains Mono", monospace; font-size: 14px; font-weight: 700;
  position: relative;
}
.cert .badge::before {
  content: ""; position: absolute; inset: -1px; border-radius: 12px;
  background: var(--grad); opacity: .35; z-index: -1; filter: blur(6px);
}
.cert h4 { margin: 0; font-size: 17px; font-weight: 500; }
.cert p { font-size: 13.5px; color: var(--ink-3); margin: 0; }
.cert .when { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--ink-3); letter-spacing: .12em; }

/* ───────────────────────────────────────────────────────────
   TESTIMONIALS
   ─────────────────────────────────────────────────────────── */
.testi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .testi-row { grid-template-columns: 1fr; } }
.testi {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 26px;
  display: flex; flex-direction: column; gap: 18px;
  position: relative; overflow: hidden;
}
.testi::before {
  content: "\\201C"; position: absolute; top: 14px; right: 22px;
  font-family: "Space Grotesk", serif; font-size: 80px; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: .5;
}
.testi q { font-size: 16px; line-height: 1.55; color: var(--ink); quotes: none; }
.testi .who { display: flex; align-items: center; gap: 12px; }
.testi .who .av {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--grad);
  display: grid; place-items: center;
  font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 700; color: var(--bg);
}
.testi .who .name { font-size: 14px; font-weight: 500; }
.testi .who .role { font-size: 12px; color: var(--ink-3); }

/* ───────────────────────────────────────────────────────────
   CONTACT
   ─────────────────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }

.contact-big h2 { margin-bottom: 28px; }
.contact-big .tagline { font-size: 20px; color: var(--ink-2); max-width: 38ch; }
.contact-cards { display: grid; gap: 12px; margin-top: 36px; }
.contact-cards .row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  transition: border-color .25s, transform .25s;
}
.contact-cards .row:hover { border-color: var(--border-2); transform: translateX(4px); }
.contact-cards .row .lbl { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--ink-3); letter-spacing: .14em; text-transform: uppercase; }
.contact-cards .row .v { font-size: 16px; }
.contact-cards .row .arrow { color: var(--ink-3); }

.contact-form {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 32px;
  display: flex; flex-direction: column; gap: 20px;
}
.field { display: flex; flex-direction: column; gap: 8px; position: relative; }
.field label {
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  color: var(--ink-3); letter-spacing: .14em; text-transform: uppercase;
}
.field input, .field textarea, .field select {
  background: transparent;
  border: none; border-bottom: 1px solid var(--border);
  padding: 12px 0;
  color: var(--ink); font-size: 16px; font-family: inherit;
  outline: none;
  transition: border-color .3s;
  cursor: none;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-bottom-color: var(--c2);
}
.field textarea { resize: vertical; min-height: 80px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--ink); color: var(--bg);
  border: none; cursor: none;
  font-family: "JetBrains Mono", monospace; font-size: 12px;
  letter-spacing: .16em; text-transform: uppercase;
  transition: transform .25s, background .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--border-2);
}
.btn-grad {
  background: var(--grad); color: var(--bg); position: relative; overflow: hidden;
}

/* ───────────────────────────────────────────────────────────
   RESUME
   ─────────────────────────────────────────────────────────── */
.resume-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.resume-card {
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  gap: 72px;
  align-items: center;
  padding: 56px 56px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 28px;
  position: relative;
  overflow: hidden;
}
.resume-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: 28px;
  background:
    radial-gradient(60% 80% at 0% 100%, color-mix(in oklab, var(--c1) 18%, transparent), transparent 60%),
    radial-gradient(50% 70% at 100% 0%, color-mix(in oklab, var(--c3) 14%, transparent), transparent 60%);
  pointer-events: none;
  mix-blend-mode: screen;
}
@media (max-width: 900px) {
  .resume-card { grid-template-columns: 1fr; padding: 32px; gap: 40px; }
}

/* Faux document preview */
.resume-doc {
  aspect-ratio: 1 / 1.36;
  position: relative;
  perspective: 1200px;
  z-index: 1;
}
.resume-doc-inner {
  position: relative;
  width: 100%; height: 100%;
  background: linear-gradient(180deg, #fdfdfd, #f2f2f4);
  border-radius: 6px;
  padding: 36px 28px;
  display: flex; flex-direction: column;
  transform: rotate(-3.2deg);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 30px 80px -20px rgba(0, 0, 0, 0.6),
    0 8px 30px -10px color-mix(in oklab, var(--c2) 35%, transparent);
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.resume-card:hover .resume-doc-inner { transform: rotate(-1.4deg) translateY(-6px); }
.resume-doc-shadow {
  position: absolute;
  inset: 20% -3% -5% -3%;
  background: radial-gradient(50% 60% at 50% 100%, color-mix(in oklab, var(--c2) 30%, transparent), transparent 70%);
  filter: blur(28px);
  z-index: -1;
}
.resume-doc-corner {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 9px; color: #888; letter-spacing: .2em; text-transform: uppercase;
  border-bottom: 1px solid #e4e4e8; padding-bottom: 10px;
}
.resume-doc-corner span:first-child {
  background: linear-gradient(135deg, #ff61c7, #7c5cff, #3affe0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 700; letter-spacing: .1em; font-size: 13px;
}
.resume-doc-lines {
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 14px;
}
.resume-doc-lines .line {
  display: block; height: 6px; background: #d8d8de; border-radius: 2px;
}
.resume-doc-lines .line-head { width: 65%; height: 12px; background: #2a2a30; }
.resume-doc-lines .line-sub  { width: 40%; height: 6px; background: #9b9ba2; margin-top: 4px; }
.resume-doc-lines .line-rule { height: 1px; background: #e1e1e6; margin: 6px 0; }
.resume-doc-lines .line-h    { width: 28%; height: 4px; background: #4a4a52; margin-top: 10px; margin-bottom: 2px; }
.resume-doc-lines .line-l    { width: 96%; height: 4px; background: #d0d0d6; }
.resume-doc-lines .line-l-2  { width: 78%; height: 4px; background: #d0d0d6; }
.resume-doc-stamp {
  position: absolute; right: 18px; bottom: 18px;
  width: 76px; height: 76px;
  display: grid; place-items: center;
  color: color-mix(in oklab, var(--c2) 60%, #444); opacity: .35;
  transform: rotate(-12deg);
}
.resume-doc-stamp .ring {
  position: absolute; inset: 0;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.resume-doc-stamp .t {
  font-size: 9px; text-align: center; line-height: 1.2; letter-spacing: .14em; text-transform: uppercase; font-weight: 700;
}

/* meta / CTA side */
.resume-meta { display: flex; flex-direction: column; gap: 18px; position: relative; z-index: 2; }
.resume-meta h3 { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.1; }
.resume-tagline { font-size: 16px; color: var(--ink-2); max-width: 52ch; }
.resume-keys {
  list-style: none; margin: 8px 0 0; padding: 0;
  border-top: 1px solid var(--border);
}
.resume-keys li {
  display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: baseline;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.resume-keys .lbl { font-size: 11px; color: var(--ink-3); letter-spacing: .16em; text-transform: uppercase; }
.resume-keys .val { font-size: 14px; color: var(--ink); }
.resume-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 12px; }
.resume-hint { font-size: 11px; color: var(--ink-3); letter-spacing: .14em; text-transform: uppercase; }

/* ───────────────────────────────────────────────────────────
   RESUME VIEWER MODAL
   ─────────────────────────────────────────────────────────── */
#resume-modal {
  position: fixed; inset: 0; z-index: 220;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  display: grid; place-items: center;
  padding: 28px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
#resume-modal.is-open { opacity: 1; pointer-events: auto; }
.resume-modal-box {
  width: min(960px, 100%);
  height: min(88vh, 1100px);
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 18px;
  display: flex; flex-direction: column;
  overflow: hidden;
  transform: translateY(20px); opacity: 0;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), opacity .35s;
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.7);
}
#resume-modal.is-open .resume-modal-box { transform: none; opacity: 1; }
.resume-modal-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.resume-modal-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.resume-modal-title .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c3); flex-shrink: 0; }
.resume-modal-title b { font-size: 14px; font-weight: 500; }
.resume-modal-title .mono { font-family: "JetBrains Mono", monospace; font-size: 10.5px; color: var(--ink-3); letter-spacing: .14em; text-transform: uppercase; }
.resume-modal-actions { display: flex; gap: 8px; }
.resume-modal-actions .btn-sm {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid var(--border-2); background: var(--panel); color: var(--ink);
  cursor: none;
}
.resume-modal-actions .btn-grad-sm { background: var(--grad); color: var(--bg); border: none; }
.resume-modal-viewer {
  flex: 1; overflow: auto; background: #1a1a22;
  display: flex; flex-direction: column;
}
.resume-modal-viewer iframe {
  flex: 1; width: 100%; border: 0; background: #fff;
}
.resume-modal-viewer.is-html {
  background: #f5f5f7;
  padding: 36px;
  align-items: center;
}
.resume-html {
  width: min(720px, 100%);
  background: #fff;
  color: #1a1a1f;
  border-radius: 4px;
  padding: 52px 56px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.5);
  font-family: "Space Grotesk", system-ui, sans-serif;
}
.resume-html h1 {
  font-size: 32px; font-weight: 500; letter-spacing: -0.02em;
  margin: 0 0 4px;
  background: linear-gradient(135deg, #ff61c7, #7c5cff 50%, #3affe0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.resume-html .sub { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #6b6b73; }
.resume-html .contact { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: #444; margin-top: 14px; padding-bottom: 18px; border-bottom: 1px solid #e8e8ed; }
.resume-html h2 {
  font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  margin: 28px 0 12px; color: #6b6b73;
  display: flex; align-items: center; gap: 10px;
}
.resume-html h2::before { content: ""; width: 18px; height: 1px; background: #1a1a1f; }
.resume-html .row { display: grid; grid-template-columns: 110px 1fr; gap: 18px; margin-bottom: 14px; }
.resume-html .row .when { font-family: "JetBrains Mono", monospace; font-size: 11px; color: #888; padding-top: 2px; letter-spacing: .08em; }
.resume-html .row .what b { font-weight: 500; font-size: 15px; }
.resume-html .row .what em { font-style: normal; color: #666; font-size: 13px; display: block; margin-top: 1px; }
.resume-html .row ul { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.55; color: #2a2a30; }
.resume-html .row ul li { margin-bottom: 3px; }
.resume-html .stack-row { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.resume-html .stack-row span {
  padding: 3px 9px; border: 1px solid #e0e0e6; border-radius: 999px;
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  letter-spacing: .04em; color: #2a2a30;
}
.resume-modal-viewer.is-empty {
  align-items: center; justify-content: center; padding: 60px; background: var(--bg-2);
}
.resume-empty {
  text-align: center; max-width: 380px; color: var(--ink-2);
}
.resume-empty .ico { font-size: 32px; margin-bottom: 8px; }
.resume-empty h4 { font-size: 18px; font-weight: 500; color: var(--ink); margin: 0 0 6px; }
.resume-empty p { font-size: 14px; color: var(--ink-3); }

.foot {
  padding: 80px 0 40px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 2;
  background: var(--bg);
}
.foot::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: var(--grad); opacity: .5;
}
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; align-items: end; }
@media (max-width: 700px) { .foot-grid { grid-template-columns: 1fr; gap: 28px; } }
.foot-massive {
  font-size: clamp(80px, 14vw, 220px);
  line-height: 1; font-weight: 500; letter-spacing: -0.04em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 20px;
  overflow: visible;
  padding-bottom: 0.05em;
}
.foot-meta { display: flex; flex-direction: column; gap: 6px; font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--ink-3); letter-spacing: .14em; text-transform: uppercase; }
.foot-meta a { color: var(--ink-2); }
.foot-meta a:hover { color: var(--ink); }
.foot-bot {
  display: flex; justify-content: space-between; align-items: center; margin-top: 32px;
  padding-top: 28px; border-top: 1px solid var(--border);
  font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--ink-3);
  letter-spacing: .14em; text-transform: uppercase;
}

/* ───────────────────────────────────────────────────────────
   Palette (command palette overlay)
   ─────────────────────────────────────────────────────────── */
#palette {
  position: fixed; inset: 0; z-index: 200;
  background: color-mix(in oklab, var(--bg) 60%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  display: grid; place-items: start center;
  padding-top: 14vh;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
#palette.is-open { opacity: 1; pointer-events: auto; }
.palette-box {
  width: min(640px, 92vw);
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
  transform: translateY(-8px);
  transition: transform .25s;
}
#palette.is-open .palette-box { transform: none; }
.palette-input {
  width: 100%; padding: 18px 22px;
  background: transparent; border: none; outline: none;
  color: var(--ink); font-size: 17px; font-family: inherit;
  border-bottom: 1px solid var(--border);
}
.palette-input::placeholder { color: var(--ink-3); }
.palette-list {
  list-style: none; margin: 0; padding: 8px;
  max-height: 50vh; overflow-y: auto;
}
.palette-list li {
  display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 8px;
  font-size: 14px;
  cursor: none;
}
.palette-list li:hover, .palette-list li.is-active {
  background: var(--panel-2);
}
.palette-list .cmd-label { color: var(--ink); }
.palette-list kbd {
  font-family: "JetBrains Mono", monospace; font-size: 10px;
  padding: 2px 6px; border-radius: 4px;
  background: var(--panel); border: 1px solid var(--border); color: var(--ink-2);
}
.cmd-kind {
  font-family: "JetBrains Mono", monospace; font-size: 9.5px;
  text-transform: uppercase; letter-spacing: .14em;
  padding: 3px 7px; border-radius: 999px;
  background: color-mix(in oklab, var(--c2) 16%, transparent);
  color: var(--ink); text-align: center;
}
.cmd-kind-nav    { background: color-mix(in oklab, var(--c2) 18%, transparent); }
.cmd-kind-theme  { background: color-mix(in oklab, var(--c1) 20%, transparent); }
.cmd-kind-tool   { background: color-mix(in oklab, var(--c3) 18%, transparent); color: var(--bg); }
.cmd-kind-link   { background: var(--panel-2); }
.cmd-kind-action { background: color-mix(in oklab, var(--c1) 14%, transparent); }
.cmd-kind-easter { background: var(--grad); color: var(--bg); }
.palette-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; border-top: 1px solid var(--border);
  font-family: "JetBrains Mono", monospace; font-size: 10px;
  color: var(--ink-3); letter-spacing: .14em; text-transform: uppercase;
}
.palette-foot kbd {
  font-family: inherit; padding: 2px 5px; border-radius: 3px;
  background: var(--panel); border: 1px solid var(--border); margin-right: 4px;
}

/* ───────────────────────────────────────────────────────────
   Terminal overlay
   ─────────────────────────────────────────────────────────── */
#terminal {
  position: fixed; inset: 0; z-index: 180;
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: grid; place-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
#terminal.is-open { opacity: 1; pointer-events: auto; }
.term-box {
  width: min(820px, 92vw); height: min(560px, 80vh);
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
  transform: scale(.98);
  transition: transform .25s;
}
#terminal.is-open .term-box { transform: none; }
.term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--ink-3);
}
.term-bar .dots { display: flex; gap: 6px; }
.term-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-2); }
.term-bar .title { margin: 0 auto; letter-spacing: .14em; }
.term-bar [data-term-close] {
  border: none; background: transparent; color: var(--ink-3); cursor: none;
  font-family: inherit; font-size: 12px;
}
.term-out {
  flex: 1; padding: 16px 18px; overflow-y: auto;
  font-family: "JetBrains Mono", monospace; font-size: 13.5px;
  color: var(--ink-2); line-height: 1.6;
}
.term-line { white-space: pre-wrap; word-break: break-word; }
.term-line .term-key { color: var(--c3); }
.term-line .term-prompt { color: var(--c1); }
.term-line .term-dim { color: var(--ink-3); }
.term-line.err { color: color-mix(in oklab, var(--c1) 70%, #ffaaaa); }
.term-input-row {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  font-family: "JetBrains Mono", monospace; font-size: 13.5px;
}
.term-input-row .ps { color: var(--c1); }
.term-input-row input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--ink); font: inherit; cursor: none;
}
.term-chips {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 8px 18px 0;
}
.term-chip {
  font-family: "JetBrains Mono", monospace; font-size: 10.5px;
  letter-spacing: .08em; color: var(--ink-3);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 20px; padding: 3px 10px;
  cursor: none; transition: border-color .15s, color .15s;
}
.term-chip:hover { border-color: var(--c3); color: var(--c3); }
.term-hint {
  padding: 3px 18px 4px;
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  color: var(--ink-3); min-height: 20px; line-height: 1.4;
}

/* ───────────────────────────────────────────────────────────
   AI chat
   ─────────────────────────────────────────────────────────── */
#ai {
  position: fixed; right: 24px; bottom: 96px; z-index: 70;
  width: min(380px, calc(100vw - 32px));
  height: 540px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 18px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--shadow);
  transform: translateY(20px) scale(.98); opacity: 0; pointer-events: none;
  transition: transform .3s, opacity .3s;
}
#ai.is-open { transform: none; opacity: 1; pointer-events: auto; }
.ai-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.ai-bar .who { display: flex; align-items: center; gap: 10px; }
.ai-bar .who .av {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--grad);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: var(--bg);
}
.ai-bar .who b { font-size: 13px; font-weight: 500; }
.ai-bar .who span { font-family: "JetBrains Mono", monospace; font-size: 10px; color: var(--ink-3); letter-spacing: .14em; text-transform: uppercase; display: block; }
.ai-bar [data-ai-close] {
  background: transparent; border: none; color: var(--ink-3); cursor: none; font-size: 16px;
}
.ai-log {
  flex: 1; overflow-y: auto; padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.ai-msg { display: flex; gap: 10px; align-items: flex-start; }
.ai-msg-user { justify-content: flex-end; }
.ai-msg .ai-avatar {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--grad); color: var(--bg);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.ai-bubble {
  max-width: 78%;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13.5px; line-height: 1.5; color: var(--ink);
}
.ai-msg-user .ai-bubble { background: color-mix(in oklab, var(--c2) 18%, var(--bg-2)); border-color: color-mix(in oklab, var(--c2) 28%, var(--border)); }
.ai-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 12px; }
.ai-suggest button {
  font-family: "JetBrains Mono", monospace; font-size: 10.5px;
  padding: 5px 10px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--border); color: var(--ink-2);
  cursor: none; letter-spacing: .1em; text-transform: uppercase;
}
.ai-input {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-top: 1px solid var(--border);
}
.ai-input input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--ink); font: inherit; font-size: 14px; cursor: none;
}
.ai-input button {
  background: var(--ink); color: var(--bg);
  border: none; border-radius: 8px; padding: 6px 10px;
  font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; cursor: none;
}

/* ───────────────────────────────────────────────────────────
   Modal (project case study)
   ─────────────────────────────────────────────────────────── */
#modal {
  position: fixed; inset: 0; z-index: 220;
  background: color-mix(in oklab, var(--bg) 75%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  display: grid; place-items: center;
  padding: 40px 24px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
#modal.is-open { opacity: 1; pointer-events: auto; }
.modal-box {
  width: min(1040px, 100%); max-height: 88vh; overflow-y: auto;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 24px;
  padding: 48px;
  position: relative;
  transform: translateY(20px); opacity: 0;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), opacity .35s;
}
#modal.is-open .modal-box { transform: none; opacity: 1; }
[data-modal-close] {
  position: absolute; top: 20px; right: 20px;
  width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid var(--border-2); background: var(--panel);
  color: var(--ink); cursor: none;
}
.modal-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 36px; }
.modal-eyebrow { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--ink-3); letter-spacing: .2em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px; }
.modal-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c1); }
.modal-head h2 { display: flex; align-items: baseline; gap: 14px; }
.modal-version { font-family: "JetBrains Mono", monospace; font-size: 14px; color: var(--ink-3); letter-spacing: .14em; }
.modal-deck { font-size: 18px; max-width: 62ch; color: var(--ink-2); }
.modal-meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  border-top: 1px solid var(--border); padding-top: 16px; margin-top: 8px;
}
.modal-meta > div { display: flex; flex-direction: column; gap: 4px; }
.modal-meta label { font-family: "JetBrains Mono", monospace; font-size: 10px; color: var(--ink-3); letter-spacing: .16em; text-transform: uppercase; }
.modal-meta span { font-size: 13.5px; color: var(--ink); }
.modal-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px;
  margin-bottom: 36px;
}
.modal-frame {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
}
.modal-frame-wide { grid-row: span 1; aspect-ratio: auto; min-height: 280px; }
.frame-mock { width: 100%; height: 100%; display: flex; flex-direction: column; }
.frame-mock-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.frame-mock-bar span { width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); }
.frame-mock-body { flex: 1; position: relative; padding: 18px 24px; font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--ink-2); }
.frame-code { line-height: 1.7; }
.frame-code .c-pink { color: var(--c1); }
.frame-code .c-teal { color: var(--c3); }
.frame-code .c-violet { color: var(--c2); }
.frame-code .c-dim { color: var(--ink-3); }
.frame-cursor { position: absolute; left: 22%; top: 40%; width: 2px; height: 22px; background: var(--c1); }
.frame-cursor .cur-label { position: absolute; left: 4px; top: -16px; background: var(--c1); color: var(--bg); padding: 1px 5px; border-radius: 3px; font-size: 9px; font-family: inherit; text-transform: lowercase; }
.frame-cursor-b { left: 52%; top: 58%; background: var(--c3); }
.frame-cursor-b .cur-label { background: var(--c3); }
.frame-cards { display: grid; gap: 8px; }
.frame-cards .fc { display: flex; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.frame-cards .fc b { font-weight: 500; font-family: "Space Grotesk", sans-serif; font-size: 14px; color: var(--ink); }
.frame-cards .fc span { font-size: 12px; color: var(--ink-3); }
.frame-stat { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 22px; }
.frame-stat b { font-size: clamp(40px, 4vw, 56px); font-weight: 500; letter-spacing: -0.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.frame-stat span { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--ink-3); letter-spacing: .14em; text-transform: uppercase; margin-top: 6px; }
.modal-write h3 { font-size: 18px; margin-top: 24px; margin-bottom: 10px; }
.modal-write p, .modal-write li { color: var(--ink-2); font-size: 15px; line-height: 1.65; }

/* ───────────────────────────────────────────────────────────
   Toast
   ─────────────────────────────────────────────────────────── */
#toast {
  position: fixed; left: 50%; bottom: 96px;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 16px;
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace; font-size: 12px;
  color: var(--ink); letter-spacing: .14em; text-transform: uppercase;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 300;
  box-shadow: var(--shadow);
}
#toast.is-in { opacity: 1; transform: translateX(-50%); }

/* ───────────────────────────────────────────────────────────
   Easter mode
   ─────────────────────────────────────────────────────────── */
body.konami {
  animation: konami 10s linear infinite;
}
/* Counter-rotate canvases so WebGL backgrounds don't flip */
body.konami canvas {
  animation: konami-counter 10s linear infinite;
}
@keyframes konami {
  0%   { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}
@keyframes konami-counter {
  0%   { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(-360deg); }
}

/* ───────────────────────────────────────────────────────────
   Misc
   ─────────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 0; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--panel-2); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--border-2); }

/* selection */
::selection { background: color-mix(in oklab, var(--c2) 40%, transparent); color: var(--ink); }


/* ───────────────────────────────────────────────────────────
   GAME · "Decode Jatin"
   ─────────────────────────────────────────────────────────── */
#game {
  position: fixed; inset: 0; z-index: 240;
  background: color-mix(in oklab, var(--bg) 84%, transparent);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  opacity: 0; pointer-events: none;
  display: grid; place-items: center;
  padding: 32px;
  transition: opacity .3s ease;
}
#game.is-open { opacity: 1; pointer-events: auto; }
.game-shell {
  width: min(1080px, 100%);
  max-height: 92vh;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 24px;
  display: flex; flex-direction: column;
  overflow: hidden;
  position: relative;
  transform: translateY(16px); opacity: 0;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), opacity .35s;
  box-shadow: 0 40px 100px -20px rgba(0,0,0,0.7);
}
#game.is-open .game-shell { transform: none; opacity: 1; }
.game-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
}
.game-title { display: flex; align-items: center; gap: 10px; }
.game-title .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c1); animation: pulse 2.2s infinite; }
.game-title b { font-weight: 500; font-size: 15px; letter-spacing: -0.01em; }
.game-title .mono { font-family: "JetBrains Mono", monospace; font-size: 10.5px; color: var(--ink-3); letter-spacing: .14em; text-transform: uppercase; }
.game-stats { display: flex; gap: 12px; align-items: center; }
.game-stats .mono {
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  color: var(--ink-2);
  padding: 4px 10px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--border);
  letter-spacing: .12em; text-transform: uppercase;
}
.game-stats [data-game-timer].is-warn {
  color: color-mix(in oklab, var(--c1) 80%, #ffe);
  border-color: color-mix(in oklab, var(--c1) 50%, var(--border));
  animation: timerPulse 1s ease-in-out infinite;
}
@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}
.game-stats [data-game-close] {
  font-family: "JetBrains Mono", monospace; font-size: 10.5px;
  padding: 6px 10px; border-radius: 6px;
  background: var(--panel); border: 1px solid var(--border-2); color: var(--ink);
  cursor: none; letter-spacing: .14em; text-transform: uppercase;
}

.game-bar-progress {
  height: 2px; background: var(--border); overflow: hidden;
}
.game-bar-progress > i {
  display: block; height: 100%;
  background: var(--grad);
  transform-origin: left; transform: scaleX(1);
}

.game-body {
  display: grid; grid-template-columns: 1fr 1.4fr;
  gap: 0; flex: 1;
}
@media (max-width: 800px) {
  .game-body { grid-template-columns: 1fr; }
}
.game-fact {
  padding: 32px 28px;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 16px;
  background: linear-gradient(180deg, transparent, color-mix(in oklab, var(--c2) 5%, transparent));
}
.game-fact .eyebrow { color: var(--ink-3); }
.game-fact p { font-size: 18px; line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.game-hint {
  margin-top: auto;
  font-size: 10.5px; color: var(--ink-3); letter-spacing: .14em; text-transform: uppercase;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.game-play {
  padding: 32px 28px;
  display: flex; flex-direction: column; gap: 18px;
  position: relative;
}
.game-prompt-label {
  font-size: 10.5px; color: var(--ink-3); letter-spacing: .18em; text-transform: uppercase;
}
.game-code {
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.35;
  letter-spacing: .04em;
  padding: 22px 24px;
  background: var(--panel);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  position: relative; overflow: hidden;
  min-height: 96px;
  color: var(--ink);
}
.game-code .letter {
  display: inline-block;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.game-code .punct { color: var(--ink-3); }
.game-input {
  background: transparent;
  border: none; border-bottom: 1px solid var(--border-2);
  padding: 14px 0 12px;
  color: var(--ink); font-family: "JetBrains Mono", monospace; font-size: 18px;
  outline: none;
  cursor: none;
  transition: border-color .3s;
}
.game-input:focus { border-bottom-color: var(--c2); }
.game-diff {
  font-family: "JetBrains Mono", monospace; font-size: 14px;
  min-height: 22px; line-height: 1.5;
  letter-spacing: .02em;
}
.game-diff .ok    { color: var(--c3); }
.game-diff .bad   { color: color-mix(in oklab, var(--c1) 75%, #ffaaaa); text-decoration: underline; }
.game-diff .extra { color: var(--ink-3); }
.game-diff .ghost { color: var(--ink-3); opacity: .5; }
.game-foot {
  display: flex; justify-content: space-between;
  font-size: 10.5px; color: var(--ink-3);
  letter-spacing: .14em; text-transform: uppercase;
  margin-top: auto;
}

.game-flash {
  position: absolute; top: 8px; right: 14px;
  font-family: "JetBrains Mono", monospace; font-size: 14px; font-weight: 700;
  letter-spacing: .04em;
  animation: flashRise .9s cubic-bezier(.2,.7,.2,1) forwards;
  pointer-events: none;
}
.game-flash.positive { color: var(--c3); }
.game-flash.negative { color: color-mix(in oklab, var(--c1) 70%, #fff); }
@keyframes flashRise {
  0%   { opacity: 0; transform: translateY(0); }
  20%  { opacity: 1; transform: translateY(-2px); }
  100% { opacity: 0; transform: translateY(-30px); }
}

/* Game over overlay */
.game-over {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 40px;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; pointer-events: none;
  transition: opacity .35s;
}
.game-over.show { opacity: 1; pointer-events: auto; }
.game-over-card {
  width: min(560px, 100%);
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 20px;
  padding: 36px;
  display: flex; flex-direction: column; gap: 16px;
  text-align: left;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
}
.game-over-card h2 { font-size: clamp(32px, 4.4vw, 52px); }
.game-over-card p { color: var(--ink-2); }
.game-over-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin-top: 6px;
}
.game-over-stats > div {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  display: flex; flex-direction: column; gap: 6px;
}
.game-over-stats label {
  font-family: "JetBrains Mono", monospace; font-size: 10px;
  color: var(--ink-3); letter-spacing: .14em; text-transform: uppercase;
}
.game-over-stats b {
  font-size: 28px; font-weight: 500; letter-spacing: -0.02em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.game-over-actions { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }

/* bg3d canvas sits behind everything */
#bg3d { pointer-events: none; }
.container { position: relative; z-index: 2; }
section { position: relative; z-index: 1; }

/* ── SIGNAL game overlay ────────────────────────── */
#game-signal {
  position: fixed; inset: 0; z-index: 9000;
  display: none;
}
#game-signal.sig-open { display: flex; flex-direction: column; }
.sig-backdrop {
  position: absolute; inset: 0;
  background: rgba(4, 6, 14, 0.96);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.sig-shell {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  width: 100%; height: 100%;
}
.sig-hud {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(58,255,224,0.15);
  flex-shrink: 0;
}
.sig-brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: .22em; color: #3affe0;
  text-transform: uppercase;
}
.sig-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #3affe0;
  animation: sig-pulse 1.6s ease-in-out infinite;
}
@keyframes sig-pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.sig-stats {
  display: flex; align-items: center; gap: 18px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(58,255,224,0.7);
}
.sig-close { font-family: "JetBrains Mono", monospace; font-size: 11px; }
.sig-timer-bar {
  height: 2px; background: rgba(58,255,224,0.12); flex-shrink: 0;
}
#sig-timer-fill {
  display: block; height: 100%;
  background: linear-gradient(90deg, #3affe0, #7c5cff);
  transform-origin: left; transition: transform 0.1s linear;
}
.sig-scene {
  flex: 1; overflow: hidden; position: relative;
  /* Blueprint grid background */
  background-color: #030810;
  background-image:
    linear-gradient(rgba(58,255,224,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58,255,224,0.06) 1px, transparent 1px),
    linear-gradient(rgba(58,255,224,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58,255,224,0.025) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 20px 20px, 20px 20px;
}
.sig-scene canvas { display: block; width: 100% !important; height: 100% !important; }
.sig-legend {
  display: flex; align-items: center; gap: 20px;
  padding: 10px 20px;
  border-top: 1px solid rgba(58,255,224,0.1);
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(58,255,224,0.5); flex-shrink: 0;
  flex-wrap: wrap;
}
.sig-pip {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; margin-right: 4px; vertical-align: middle;
}
/* ── Fact toast ── */
.sig-fact {
  position: absolute; bottom: 64px; left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: rgba(10,14,28,0.88);
  border: 1px solid rgba(124,92,255,0.5);
  border-radius: 10px; padding: 10px 18px;
  max-width: 340px; width: 90%; text-align: center;
  opacity: 0; pointer-events: none; z-index: 8;
  transition: opacity .3s ease, transform .3s ease;
  display: flex; flex-direction: column; gap: 4px;
}
.sig-fact.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.sig-fact-label {
  font-size: 9px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(124,92,255,0.7);
}
.sig-fact #sig-fact-text {
  font-size: 12px; color: rgba(255,255,255,0.85); line-height: 1.5;
}
/* ── Rank badge ── */
.sig-rank-badge {
  display: none; flex-direction: column; align-items: center;
  gap: 2px; margin: 14px 0 8px;
}
.sig-rank-badge b {
  font-size: 52px; font-weight: 800; line-height: 1;
  letter-spacing: -.02em;
}
.sig-rank-badge span {
  font-size: 9px; letter-spacing: .22em; text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.sig-over {
  position: absolute; inset: 0;
  display: none; align-items: center; justify-content: center;
  background: rgba(4,6,14,0.85);
  backdrop-filter: blur(12px);
}
.sig-over.sig-show { display: flex; }
.sig-over-card {
  max-width: 420px; padding: 40px;
  background: rgba(10,14,28,0.95);
  border: 1px solid rgba(58,255,224,0.2);
  border-radius: 20px;
  text-align: center;
  animation: sig-rise .4s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes sig-rise {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.sig-over-stats {
  display: flex; justify-content: center; gap: 32px; margin: 20px 0 0;
}
.sig-over-stats div { display: flex; flex-direction: column; gap: 4px; }
.sig-over-stats label { font-family: "JetBrains Mono",monospace; font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: rgba(58,255,224,0.5); }
.sig-over-stats b { font-size: 24px; font-weight: 700; color: #3affe0; }
.sig-intro {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4,6,14,0.9);
  backdrop-filter: blur(12px);
}
.sig-intro-card {
  max-width: 480px; padding: 48px;
  background: rgba(10,14,28,0.95);
  border: 1px solid rgba(58,255,224,0.2);
  border-radius: 20px; text-align: center;
  animation: sig-rise .5s cubic-bezier(.2,.8,.2,1) both;
}
.sig-brand-lg {
  font-size: 32px; letter-spacing: .3em; color: #3affe0;
  text-transform: uppercase; margin-bottom: 16px;
}
.sig-intro-sub {
  color: rgba(245,245,247,0.65); font-size: 14px; line-height: 1.7;
  margin-bottom: 24px;
}
.sig-intro-keys {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  flex-wrap: wrap; margin-bottom: 28px;
  font-size: 11px; color: rgba(58,255,224,0.6);
}
.sig-intro-keys kbd {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 5px;
  border: 1px solid rgba(58,255,224,0.3);
  background: rgba(58,255,224,0.08); font-family: inherit;
  font-size: 11px; color: #3affe0;
}
