/* =========================================================
   Nikhil Kharbanda — "Night-Drive Lab"
   reset → tokens → base → components → sections → motion → media
   ========================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
img, svg, canvas, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- Tokens ---------- */
:root {
  --void: #07090C;
  --graphite: #10141A;
  --steel: #1C232D;
  --slate: #8792A3;
  --ice: #EAF2FF;
  --signal: #3DFF8C;
  --signal-dim: #1E8F4E;
  --electric: #2F7BFF;
  --electric-lt: #7FB0FF;
  --solder: #F5B83D;
  --glass: rgba(16, 20, 26, .55);
  --line: rgba(234, 242, 255, .09);
  --glow-signal: 0 0 24px rgba(61, 255, 140, .45);
  --glow-blue: 0 0 24px rgba(47, 123, 255, .45);
  --glow-gold: 0 0 24px rgba(245, 184, 61, .4);

  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --fs-mega: clamp(2.4rem, min(8.4vw, 15.5vh), 12.5rem);
  --fs-xl: clamp(2.2rem, 6.4vw, 6.8rem);
  --fs-lg: clamp(1.6rem, 3.6vw, 3.5rem);
  --fs-md: clamp(1.1rem, 1.6vw, 1.45rem);
  --fs-body: clamp(1rem, 1.05vw, 1.125rem);
  --fs-mono: clamp(.68rem, .78vw, .8rem);

  --gutter: clamp(16px, 4vw, 64px);
  --radius: 20px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --vh: 1vh;
  --bg: #07090C; /* scroll-driven mood colour, set by script.js */
}

/* ---------- Base ---------- */
body {
  background: var(--bg);
  color: var(--ice);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
::selection { background: var(--signal); color: var(--void); }

.container { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.display { font-family: var(--f-display); font-weight: 800; line-height: .9; letter-spacing: -.02em; text-transform: uppercase; }
.mono { font-family: var(--f-mono); font-size: var(--fs-mono); letter-spacing: .12em; text-transform: uppercase; }
.accent { color: var(--signal); }
.eyebrow { color: var(--signal); margin-bottom: .9rem; }
.section-title { font-size: var(--fs-xl); margin-bottom: clamp(2rem, 5vw, 4rem); }
.hud-label { color: var(--slate); margin-bottom: 1.5rem; display: flex; align-items: center; gap: .75rem; }
.hud-label::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--signal); box-shadow: var(--glow-signal); }
.glass { background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: var(--radius); }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 1000; background: var(--signal); color: var(--void); padding: .6rem 1rem; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  --c: var(--ice);
  display: inline-flex; align-items: center; gap: .6em;
  padding: 1rem 1.6rem; border-radius: 999px;
  font-weight: 700; font-size: 1rem; line-height: 1;
  border: 1.5px solid var(--c); color: var(--c);
  transition: background .35s var(--ease-out), color .35s var(--ease-out), box-shadow .35s var(--ease-out);
  will-change: transform; white-space: nowrap;
}
.btn span { transition: transform .35s var(--ease-out); }
.btn:hover span { transform: translateX(4px); }
.btn--signal { --c: var(--signal); background: var(--signal); color: var(--void); }
.btn--signal:hover { box-shadow: var(--glow-signal); }
.btn--ghost:hover { background: var(--ice); color: var(--void); }
.btn--blue { --c: var(--electric-lt); }
.btn--blue:hover { background: var(--electric); border-color: var(--electric); color: var(--ice); box-shadow: var(--glow-blue); }
.btn--gold { --c: var(--solder); }
.btn--gold:hover { background: var(--solder); color: var(--void); box-shadow: var(--glow-gold); }
.btn--small { padding: .7rem 1.15rem; font-size: .9rem; }
.btn--big { padding: 1.25rem 2.1rem; font-size: 1.1rem; }
.text-link { color: var(--slate); transition: color .3s; }
.text-link:hover { color: var(--signal); }

/* ---------- Loader ---------- */
.loader { position: fixed; inset: 0; z-index: 900; background: var(--void); display: grid; place-items: center; padding: var(--gutter); }
.loader__inner { width: min(560px, 100%); }
.loader__log { font-family: var(--f-mono); font-size: clamp(.75rem, 1.6vw, .9rem); color: var(--signal); min-height: 9.5em; white-space: pre-wrap; line-height: 1.7; }
.loader__log .dim { color: var(--slate); }
.loader__bar { height: 2px; background: var(--steel); margin-top: 1.5rem; overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 0; background: var(--signal); box-shadow: var(--glow-signal); }
.loader__pct { margin-top: .75rem; color: var(--slate); text-align: right; }
.loader.is-off { pointer-events: none; }

/* ---------- Grain ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 800; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(8) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 12% { transform: translate(-4%, 3%); } 25% { transform: translate(3%, -5%); }
  37% { transform: translate(-6%, -2%); } 50% { transform: translate(5%, 4%); } 62% { transform: translate(-3%, 6%); }
  75% { transform: translate(6%, -3%); } 87% { transform: translate(-5%, -6%); } 100% { transform: translate(0, 0); }
}

/* ---------- Cursor ---------- */
.cursor { display: none; }
@media (pointer: fine) {
  .has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
  .has-cursor input, .has-cursor textarea { cursor: text; }
  .has-cursor .cursor { display: block; }
  .cursor__dot, .cursor__ring { position: fixed; left: 0; top: 0; z-index: 950; pointer-events: none; border-radius: 50%; }
  .cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--signal); box-shadow: var(--glow-signal); }
  .cursor__ring {
    width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1px solid rgba(61, 255, 140, .55);
    display: grid; place-items: center; transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out), background .35s, border-color .35s;
  }
  .cursor__label { font-family: var(--f-mono); font-size: .6rem; font-weight: 600; letter-spacing: .1em; color: var(--void); opacity: 0; transition: opacity .2s; }
  .cursor.is-hover .cursor__ring { width: 74px; height: 74px; margin: -37px 0 0 -37px; background: var(--signal); border-color: var(--signal); }
  .cursor.is-hover .cursor__label { opacity: 1; }
  .cursor.is-hover .cursor__dot { opacity: 0; }
  .cursor.is-probe .cursor__ring { width: 56px; height: 56px; margin: -28px 0 0 -28px; border-color: var(--electric-lt); border-style: dashed; }
  .cursor.is-hidden { opacity: 0; }
}


/* ---------- Layers + section heads ---------- */
main { position: relative; z-index: 1; }
.footer { z-index: 1; }
/* particle-morph layer: fixed behind all content, above the mood background */
.morph { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
/* reserved space beside a section heading where the particle shape lives */
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) clamp(220px, 26vw, 400px); align-items: center; gap: clamp(1.5rem, 3vw, 3rem); }
.section-head .section-title { margin-bottom: 0; }
.toolkit .section-head, .work .section-head { margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.morph-slot { width: 100%; height: clamp(220px, 34vh, 360px); pointer-events: none; }
.mission .section-head { align-items: stretch; }
.mission .morph-slot { height: auto; min-height: clamp(260px, 40vh, 420px); }
.section-head--story { grid-template-columns: minmax(0, 1fr) clamp(110px, 11vw, 190px); margin-bottom: 1.4rem; }
.section-head--story .morph-slot { height: clamp(120px, 18vh, 190px); }
.story .section-head--story .section-title { margin-bottom: 0; }
@media (min-width: 1025px) { [data-fit] { white-space: nowrap; } }
@media (max-width: 1024px) {
  .section-head { grid-template-columns: 1fr; }
  .morph-slot { display: none; }
}
/* signal rail: horizontal progress bar under the nav, one node per page; rides up to the top edge when the nav hides */
.rail {
  position: fixed; left: var(--gutter); right: var(--gutter); top: calc(var(--nav-h, 72px) + 4px); height: 2px; z-index: 69;
  transition: top .5s var(--ease-out);
}
html.nav-up .rail { top: 14px; }
.rail__line, .rail__fill { position: absolute; left: 0; top: 0; width: 100%; height: 2px; border-radius: 2px; }
.rail__line { background: rgba(234, 242, 255, .1); }
.rail__fill { transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--signal), var(--electric) 60%, var(--solder)); box-shadow: 0 0 10px rgba(61, 255, 140, .45); }
.rail__head { position: absolute; top: 1px; left: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--ice); box-shadow: 0 0 0 3px rgba(61, 255, 140, .35), 0 0 18px 4px rgba(61, 255, 140, .7); pointer-events: none; z-index: 2; }
.rail__node { position: absolute; top: 1px; width: 26px; height: 26px; margin: -13px 0 0 -13px; display: grid; place-items: center; z-index: 1; cursor: pointer; }
.rail__node i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid rgba(135, 146, 163, .7); background: var(--bg); transition: transform .4s var(--ease-out), background .3s, border-color .3s, box-shadow .3s; }
.rail__node:hover i { transform: scale(1.4); border-color: var(--ice); }
.rail__node.is-past i { border-color: var(--signal-dim); background: var(--signal-dim); }
.rail__node.is-active i { transform: scale(1.5); border-color: var(--signal); background: var(--signal); box-shadow: var(--glow-signal); }
.rail__label {
  position: absolute; top: 24px; left: 50%; transform: translate(-50%, -6px); white-space: nowrap; pointer-events: none;
  color: var(--ice); background: rgba(7, 9, 12, .88); border: 1px solid var(--line); padding: .32rem .6rem; border-radius: 6px;
  opacity: 0; transition: opacity .3s, transform .35s var(--ease-out);
}
.rail__node--first .rail__label { left: 0; transform: translate(0, -6px); }
.rail__node--last .rail__label { left: auto; right: 0; transform: translate(0, -6px); }
.rail__node.is-active .rail__label { color: var(--signal); border-color: rgba(61, 255, 140, .35); }
.rail__node:hover .rail__label, .rail__node:focus-visible .rail__label, .rail__node.show-label .rail__label { opacity: 1; transform: translate(-50%, 0); }
.rail__node--first:hover .rail__label, .rail__node--first.show-label .rail__label, .rail__node--first:focus-visible .rail__label,
.rail__node--last:hover .rail__label, .rail__node--last.show-label .rail__label, .rail__node--last:focus-visible .rail__label { transform: translate(0, 0); }

/* sections stay "dark" until they power on */
.hud-label, .hud--tl { transition: color .5s; }
.hud-label::before { transition: background .4s, box-shadow .4s, transform .4s; }
.js main > section:not(#hero):not(.is-powered) .hud-label { color: rgba(135, 146, 163, .4); }
.js main > section:not(#hero):not(.is-powered) .hud-label::before { background: var(--steel); box-shadow: none; transform: scale(.7); }

/* iris: a dark aperture closes to a point and re-opens onto the next section (scroll-scrubbed) */
.iris {
  --r: 0px;
  position: fixed; inset: 0; z-index: 66; pointer-events: none; visibility: hidden; display: grid; place-items: center;
  background: linear-gradient(rgba(234, 242, 255, .035) 1px, transparent 1px) 0 0 / 64px 64px,
              linear-gradient(90deg, rgba(234, 242, 255, .035) 1px, transparent 1px) 0 0 / 64px 64px, #05070A;
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent var(--r), #000 calc(var(--r) + 1px));
          mask: radial-gradient(circle at 50% 50%, transparent var(--r), #000 calc(var(--r) + 1px));
}
.iris__inner { text-align: center; padding-inline: var(--gutter); }
.iris__title { font-size: clamp(2.2rem, 7vw, 6.5rem); color: var(--ice); margin: .9rem 0 1.6rem; opacity: 0; }
.iris__hint { color: var(--slate); opacity: 0; }
.iris__code { color: var(--signal); font-size: clamp(.9rem, 1.8vw, 1.3rem); letter-spacing: .24em; text-shadow: 0 0 18px rgba(61, 255, 140, .6); }
.iris-ring {
  position: fixed; left: 50%; top: 50%; z-index: 67; width: 0; height: 0; border-radius: 50%; pointer-events: none; visibility: hidden;
  transform: translate(-50%, -50%); border: 2px solid var(--signal);
  box-shadow: 0 0 28px rgba(61, 255, 140, .55), inset 0 0 22px rgba(61, 255, 140, .35);
}

/* soft-wall nudge: shown at a page edge, fills as you deliberately push through */
.nudge {
  position: fixed; left: 50%; bottom: 28px; z-index: 64; display: flex; flex-direction: column; align-items: center; gap: .55rem;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none; transition: opacity .35s, transform .45s var(--ease-out);
}
.nudge--up { bottom: auto; top: calc(var(--nav-h, 72px) + 44px); transform: translate(-50%, -12px); }
.nudge.is-on { opacity: 1; transform: translate(-50%, 0); }
.nudge__label { color: var(--ice); background: rgba(7, 9, 12, .85); border: 1px solid var(--line); padding: .42rem .85rem; border-radius: 999px; letter-spacing: .16em; }
.nudge__bar { width: 130px; height: 3px; border-radius: 3px; background: var(--steel); overflow: hidden; }
.nudge__bar i { display: block; width: 100%; height: 100%; background: var(--signal); box-shadow: var(--glow-signal); transform-origin: left; transform: scaleX(0); transition: transform .15s; }

/* warp: full-screen scan used for long nav jumps */
.warp { position: fixed; inset: 0; z-index: 860; display: grid; place-items: center; background: var(--void); clip-path: inset(0 0 100% 0); pointer-events: none; }
.warp[hidden] { display: none; }
.warp__line { position: absolute; left: 0; right: 0; top: 0; height: 2px; margin-top: -1px; background: var(--signal); box-shadow: 0 0 24px 6px rgba(61, 255, 140, .55); }
.warp__inner { text-align: center; }
.warp__sub { color: var(--slate); margin-bottom: .8rem; }
.warp__code { color: var(--signal); font-size: clamp(1rem, 2.4vw, 1.7rem); letter-spacing: .22em; text-shadow: 0 0 22px rgba(61, 255, 140, .55); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 70; display: flex; align-items: center; gap: 2rem;
  padding: 1rem var(--gutter); transition: transform .5s var(--ease-out), background .4s;
}
.nav.is-hidden { transform: translateY(-110%); }
.nav.is-solid { background: linear-gradient(rgba(7, 9, 12, .85), rgba(7, 9, 12, 0)); }
.nav__logo { display: flex; align-items: center; gap: .75rem; margin-right: auto; }
.nav__logo img { transition: transform .6s var(--ease-out); }
.nav__logo:hover img { transform: rotate(-12deg) scale(1.06); }
.nav__name { font-family: var(--f-display); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; line-height: 1.1; display: flex; flex-direction: column; }
.nav__name b { font-weight: 700; color: var(--slate); }
.nav__links { position: relative; display: flex; gap: 2rem; font-family: var(--f-mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; padding-bottom: 10px; }
.nav__links a { color: var(--slate); transition: color .3s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--ice); }
.nav__indicator { position: absolute; bottom: 0; left: 0; height: 2px; width: 0; background: var(--signal); box-shadow: var(--glow-signal); transition: transform .5s var(--ease-out), width .5s var(--ease-out), opacity .3s; opacity: 0; border-radius: 2px; }
.nav__burger { display: none; width: 44px; height: 44px; position: relative; }
.nav__burger span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--ice); transition: transform .4s var(--ease-out); }
.nav__burger span:first-child { top: 17px; } .nav__burger span:last-child { top: 25px; }
.nav__burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu { position: fixed; inset: 0; z-index: 65; background: rgba(7, 9, 12, .97); display: flex; align-items: center; padding: var(--gutter); }
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: flex; flex-direction: column; gap: .4rem; }
.mobile-menu a { font-family: var(--f-display); font-weight: 800; font-size: clamp(2rem, 10vw, 3.4rem); text-transform: uppercase; line-height: 1.1; display: flex; align-items: baseline; gap: 1rem; }
.mobile-menu a i { font-style: normal; color: var(--signal); }

/* ---------- Scene sections (sticky film) ---------- */
.scene-section { position: relative; }
.scene-section--hero { height: 260vh; }
.scene-section--pillars { height: 320vh; }
.scene-section--contact { height: 220vh; }
.sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.scene-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(7, 9, 12, .85) 100%), linear-gradient(transparent 60%, rgba(7, 9, 12, .9)); }
.scene-vignette--left { background: linear-gradient(90deg, rgba(7, 9, 12, .92) 0%, rgba(7, 9, 12, .55) 45%, transparent 75%), linear-gradient(transparent 70%, rgba(7, 9, 12, .8)); }

.hud { position: absolute; z-index: 3; color: var(--slate); display: flex; align-items: center; gap: .6rem; }
.hud--tl { top: 116px; left: var(--gutter); }
.hud--tr { top: 116px; right: var(--gutter); color: var(--ice); }
.hud--bl { bottom: 28px; left: var(--gutter); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: var(--glow-signal); animation: blink 1.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- Hero ---------- */
.hero__content { position: absolute; inset: auto 0 clamp(70px, 12vh, 130px) 0; z-index: 4; }
.hero__eyebrow { margin-bottom: 1.4rem; }
.hero__title { font-size: var(--fs-mega); margin-bottom: 1.6rem; }
.hero__title .line, .contact__title .line { display: block; overflow: hidden; padding-bottom: .04em; white-space: nowrap; }
.hero__title .line > span, .contact__title .line > span { display: inline-block; }
.hero__sub { max-width: 34ch; font-size: var(--fs-md); color: rgba(234, 242, 255, .82); margin-bottom: 2rem; }
.hero__ctas, .contact__ctas { display: flex; flex-wrap: wrap; gap: .9rem; }
.scroll-cue { position: absolute; right: var(--gutter); bottom: 28px; z-index: 4; display: flex; align-items: center; gap: .8rem; color: var(--slate); }
.scroll-cue__trace { position: relative; width: 1px; height: 60px; background: var(--line); overflow: hidden; }
.scroll-cue__trace i { position: absolute; left: -2px; width: 5px; height: 14px; border-radius: 3px; background: var(--signal); box-shadow: var(--glow-signal); animation: pulse-down 1.8s var(--ease-out) infinite; }
@keyframes pulse-down { 0% { transform: translateY(-16px); } 100% { transform: translateY(64px); } }

/* ---------- Stats ---------- */
/* Telemetry and Mission are each a full-screen page (so each gets its own iris transition) */
.stats { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--nav-h, 72px) + 2rem) 0 0; border-bottom: 1px solid var(--line); }
.stats .marquee { margin-top: clamp(2.5rem, 8vh, 5rem); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { position: relative; padding: 1rem clamp(1rem, 2vw, 2rem) 3rem; border-left: 1px solid var(--line); }
.stat::before { content: ""; position: absolute; left: -5px; top: 1.6rem; width: 9px; height: 9px; border-radius: 50%; background: var(--graphite); border: 1.5px solid var(--signal); box-shadow: var(--glow-signal); }
.stat__num { font-size: clamp(3.2rem, 8vw, 8rem); color: var(--ice); display: flex; align-items: flex-start; }
.stat__num sup { font-size: .45em; color: var(--signal); margin-left: .05em; }
.stat__label { margin-top: 1rem; max-width: 24ch; color: var(--slate); }
.marquee { overflow: hidden; border-top: 1px solid var(--line); padding: 1.1rem 0; color: var(--slate); white-space: nowrap; }
.marquee__track { display: inline-flex; will-change: transform; }

/* ---------- Mission ---------- */
.mission { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--nav-h, 72px) + 2rem) 0 clamp(3rem, 8vh, 6rem); }
.mission > .container { width: 100%; }
.mission__text { font-family: var(--f-display); font-weight: 500; font-size: var(--fs-lg); line-height: 1.2; letter-spacing: -.01em; max-width: 26ch; }
.mission__text .w { opacity: .14; transition: color .3s; }
.mission__text em { font-style: normal; }
.mission__text em .w { color: var(--signal); }
.mission__note { margin-top: 3rem; color: var(--slate); text-transform: none; letter-spacing: .02em; font-size: .9rem; }

/* ---------- Pillars ---------- */
.pillars__stage { display: grid; grid-template-columns: 55% 45%; }
.pillars__visual { position: relative; border-right: 1px solid var(--line); }
.pillars__visual .hud--tl { top: 116px; }
.pillars__progress { position: absolute; left: var(--gutter); bottom: 32px; display: flex; gap: 1.4rem; color: var(--slate); z-index: 3; }
.pillars__progress span { position: relative; padding-top: 10px; transition: color .4s; }
.pillars__progress span::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--steel); }
.pillars__progress span.is-active { color: var(--signal); }
.pillars__progress span.is-active::before { background: var(--signal); box-shadow: var(--glow-signal); }
.pillars__panels { position: relative; }
.pillar { position: absolute; inset: 0; padding: clamp(6rem, 14vh, 9rem) var(--gutter) 3rem; display: flex; flex-direction: column; justify-content: center; opacity: 0; visibility: hidden; }
.pillar.is-active { opacity: 1; visibility: visible; }
.pillar__num { font-size: clamp(5rem, 11vw, 11rem); color: transparent; -webkit-text-stroke: 1.5px var(--steel); position: relative; line-height: 1; margin-bottom: 1rem;
  background: linear-gradient(0deg, var(--signal) 50%, transparent 50%) 0 0 / 100% 200% no-repeat; -webkit-background-clip: text; background-clip: text; transition: background-position 1.2s var(--ease-out), -webkit-text-stroke-color .6s; }
.pillar.is-active .pillar__num { background-position: 0 100%; -webkit-text-stroke-color: var(--signal); }
.pillar__title { font-size: clamp(1.8rem, 3.6vw, 3.6rem); margin-bottom: 1.4rem; }
.pillar > p:not(.eyebrow) { color: rgba(234, 242, 255, .8); max-width: 46ch; margin-bottom: 1.8rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .06em; padding: .45rem .8rem; border: 1px solid var(--line); border-radius: 999px; color: var(--electric-lt); background: rgba(47, 123, 255, .06); }

/* ---------- Story ---------- */
.story { position: relative; }
.story__sticky { display: flex; flex-direction: column; justify-content: center; }
.story__head { padding-top: 80px; }
.story__head .section-title { margin-bottom: 2rem; }
.story__track { position: relative; display: flex; align-items: stretch; gap: clamp(1.5rem, 3vw, 3rem); padding: 2.5rem var(--gutter) 2rem; width: max-content; will-change: transform; }
.story__trace { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.story__trace path { fill: none; stroke: var(--signal); stroke-width: 2; filter: drop-shadow(0 0 6px rgba(61, 255, 140, .6)); }
.node { position: relative; width: clamp(260px, 26vw, 360px); flex-shrink: 0; padding: 2.4rem 1.6rem 1.6rem; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.js .node { opacity: .2; transform: translateY(28px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.js .node.is-in { opacity: 1; transform: none; }
.node__pad { position: absolute; top: -25px; left: 1.6rem; width: 14px; height: 14px; border-radius: 50%; background: var(--void); border: 2px solid var(--signal); box-shadow: var(--glow-signal); }
/* stub from the pad on the signal bus down to its card */
.node__pad::after { content: ""; position: absolute; left: 50%; top: 12px; width: 1.5px; height: 13px; margin-left: -.75px; background: linear-gradient(var(--signal), rgba(61, 255, 140, .25)); }
.node__year { color: var(--signal); margin-bottom: .8rem; }
.node h3 { font-family: var(--f-display); font-size: 1.15rem; font-weight: 700; line-height: 1.2; margin-bottom: .8rem; text-transform: uppercase; }
.node p { color: rgba(234, 242, 255, .78); font-size: .97rem; }
.node b { color: var(--ice); }
.node__certs { margin-top: .8rem; display: grid; gap: .45rem; }
.node__certs a { font-size: .88rem; color: var(--electric-lt); border-bottom: 1px dashed rgba(127, 176, 255, .35); transition: color .3s, border-color .3s; }
.node__certs a:hover { color: var(--signal); border-color: var(--signal); }
.node--intro { padding: 0; overflow: hidden; width: clamp(240px, 22vw, 320px); background: none; }
.node__portrait { height: 100%; min-height: 380px; position: relative; }
.node__portrait img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) contrast(1.05); }
.node__portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(7, 9, 12, .7)), linear-gradient(135deg, rgba(47, 123, 255, .18), transparent 50%, rgba(245, 184, 61, .15)); }
.node--next { border-color: rgba(245, 184, 61, .45); box-shadow: 0 0 60px rgba(245, 184, 61, .08); }
.node--next .node__pad { border-color: var(--solder); box-shadow: var(--glow-gold); animation: pad-pulse 1.8s ease-in-out infinite; }
.node--next .node__year { color: var(--solder); }
.node--next .btn { margin-top: 1.4rem; }
@keyframes pad-pulse { 50% { transform: scale(1.5); } }

/* ---------- Toolkit ---------- */
.toolkit { padding: clamp(7rem, 14vw, 12rem) 0; }
.toolkit__grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(1.5rem, 3vw, 3rem); align-items: start; }
.spec { padding: 1.4rem clamp(1rem, 2.4vw, 2rem) 1.6rem; font-family: var(--f-mono); font-size: clamp(.78rem, .95vw, .9rem); }
.spec__head { display: flex; justify-content: space-between; color: var(--signal); padding-bottom: 1rem; margin-bottom: .6rem; border-bottom: 1px dashed var(--line); }
.spec__row { display: grid; grid-template-columns: 9.5em 1fr; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid rgba(234, 242, 255, .04); }
.spec__row > span:first-child { color: var(--slate); letter-spacing: .08em; }
.spec__bar { display: inline-block; vertical-align: middle; width: 110px; height: 8px; border: 1px solid var(--signal-dim); margin-inline: .4rem; position: relative; }
.spec__bar i { position: absolute; inset: 1px auto 1px 1px; width: 0; background: var(--signal); box-shadow: var(--glow-signal); }
.spec__pct { color: var(--signal); font-weight: 600; }
.spec__eta { color: var(--slate); margin-left: .4rem; }
.gets { display: grid; gap: 1rem; }
.get { padding: 1.6rem 1.6rem 1.5rem; transform-style: preserve-3d; }
.get__num { color: var(--solder); }
.get h3 { font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; text-transform: uppercase; margin: .7rem 0 .5rem; }
.get p { color: rgba(234, 242, 255, .75); font-size: .97rem; }

/* ---------- Work ---------- */
.work { padding: clamp(7rem, 14vw, 12rem) 0; }
.work__intro { color: var(--slate); max-width: 56ch; margin: 1.4rem 0 0; }
.work__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(1rem, 2vw, 1.6rem); }
.card { grid-column: span 2; text-align: left; border-radius: var(--radius); border: 1px solid var(--line); background: var(--graphite); overflow: hidden; position: relative; transform-style: preserve-3d; transition: border-color .4s; display: flex; flex-direction: column; }
.card:nth-child(4), .card:nth-child(5) { grid-column: span 3; }
.card:hover { border-color: rgba(61, 255, 140, .35); }
.card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(61, 255, 140, .1), transparent 45%); opacity: 0; transition: opacity .4s; }
.card:hover::after { opacity: 1; }
.card__visual { position: relative; aspect-ratio: 16 / 10; background: radial-gradient(circle at 50% 120%, rgba(47, 123, 255, .25), transparent 60%), var(--void); border-bottom: 1px solid var(--line); overflow: hidden; }
.card__visual--img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out), filter .6s; filter: saturate(.85); }
.card:hover .card__visual--img img { transform: scale(1.06); filter: saturate(1.05); }
.card__body { padding: 1.5rem 1.5rem 1.7rem; }
.card h3 { font-family: var(--f-display); font-size: clamp(1.05rem, 1.5vw, 1.35rem); font-weight: 700; text-transform: uppercase; line-height: 1.15; margin-bottom: .7rem; }
.card__body > p:last-child { color: rgba(234, 242, 255, .72); font-size: .95rem; }

/* card visualisations */
.viz { display: flex; align-items: center; justify-content: center; }
.viz--tasks { flex-direction: column; gap: 9px; padding: 0 18%; align-items: stretch; justify-content: center; }
.viz--tasks i { display: block; height: 12px; border-radius: 3px; background: var(--electric); opacity: .8; transform-origin: left; animation: task 4.8s var(--ease-out) infinite; }
.viz--tasks i:nth-child(1) { --w: 92%; --x: 30%; } .viz--tasks i:nth-child(2) { --w: 78%; --x: -12%; animation-delay: .1s; }
.viz--tasks i:nth-child(3) { --w: 64%; --x: 22%; animation-delay: .2s; } .viz--tasks i:nth-child(4) { --w: 50%; --x: -26%; animation-delay: .3s; }
.viz--tasks i:nth-child(5) { --w: 36%; --x: 12%; animation-delay: .4s; } .viz--tasks i:nth-child(6) { --w: 22%; --x: -8%; animation-delay: .5s; }
@keyframes task {
  0%, 18% { width: 40%; transform: translateX(var(--x)) rotate(4deg); background: #2b3646; }
  45%, 85% { width: var(--w); transform: none; background: var(--signal); box-shadow: var(--glow-signal); }
  100% { width: 40%; transform: translateX(var(--x)) rotate(4deg); background: #2b3646; }
}
.viz--fan { position: relative; }
.viz--fan b { position: absolute; left: 14%; top: 50%; width: 46px; height: 46px; margin-top: -23px; border-radius: 12px; background: var(--signal); box-shadow: var(--glow-signal); }
.viz--fan i { position: absolute; left: calc(14% + 46px); top: 50%; height: 2px; width: 52%; background: linear-gradient(90deg, var(--signal), var(--electric)); transform-origin: left center; animation: fan 3.6s var(--ease-out) infinite; }
.viz--fan i::after { content: "✓"; position: absolute; right: -26px; top: -11px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; color: var(--void); background: var(--signal); }
.viz--fan i:nth-child(2) { --r: -28deg; } .viz--fan i:nth-child(3) { --r: -14deg; animation-delay: .12s; } .viz--fan i:nth-child(4) { --r: 0deg; animation-delay: .24s; }
.viz--fan i:nth-child(5) { --r: 14deg; animation-delay: .36s; } .viz--fan i:nth-child(6) { --r: 28deg; animation-delay: .48s; }
@keyframes fan { 0% { transform: rotate(var(--r)) scaleX(0); } 35%, 85% { transform: rotate(var(--r)) scaleX(1); } 100% { transform: rotate(var(--r)) scaleX(0); opacity: 0; } }
.viz--pins { display: grid; grid-template-columns: repeat(12, 1fr); gap: 7px; padding: 12% 10%; }
.viz--pins i { aspect-ratio: 1; border-radius: 3px; background: var(--steel); animation: pin 3.2s steps(1) infinite; animation-delay: var(--d); }
@keyframes pin { 0%, 100% { background: var(--steel); box-shadow: none; } 30% { background: var(--signal); box-shadow: 0 0 10px rgba(61, 255, 140, .7); } 60% { background: var(--electric); box-shadow: none; } }

.viz svg { width: 100%; height: 100%; }
.m-label { font-family: var(--f-mono); font-size: 8px; letter-spacing: .14em; fill: var(--slate); }

/* MirrAI: scan the outfit, light up suggestions */
.m-frame { fill: rgba(47, 123, 255, .05); stroke: var(--solder); stroke-width: 2.5; }
.m-person { fill: var(--steel); stroke: var(--electric-lt); stroke-width: 1.5; }
.m-scan { fill: var(--signal); filter: drop-shadow(0 0 6px rgba(61, 255, 140, .9)); animation: m-scan 2.4s ease-in-out infinite alternate; }
@keyframes m-scan { to { transform: translateY(148px); } }
.m-tile rect { fill: rgba(16, 20, 26, .9); stroke: var(--steel); stroke-width: 1.5; animation: m-tile 4.8s var(--ease-out) infinite; animation-delay: calc(var(--i) * .45s + 1.2s); }
.m-tile path { fill: var(--steel); animation: m-shirt 4.8s var(--ease-out) infinite; animation-delay: calc(var(--i) * .45s + 1.2s); }
@keyframes m-tile { 0%, 8% { stroke: var(--steel); } 18%, 70% { stroke: var(--signal); filter: drop-shadow(0 0 6px rgba(61, 255, 140, .55)); } 90%, 100% { stroke: var(--steel); } }
@keyframes m-shirt { 0%, 8% { fill: var(--steel); } 18%, 70% { fill: var(--electric); } 90%, 100% { fill: var(--steel); } }

/* RC car (8s loop): sense the oncoming car and swerve → battery runs low →
   park in the charging bay → servo arm lowers and recharges → back to the road */
.r-road { fill: rgba(28, 35, 45, .55); }
.r-edge { stroke: rgba(234, 242, 255, .18); stroke-width: 1.5; }
.r-dash { stroke: var(--solder); stroke-width: 2; stroke-dasharray: 18 14; animation: r-dash 8s linear infinite; }
@keyframes r-dash { 0% { stroke-dashoffset: 0; } 54%, 100% { stroke-dashoffset: 320; } }
.r-oncoming rect { fill: var(--electric); filter: drop-shadow(0 0 8px rgba(47, 123, 255, .7)); }
.r-oncoming { animation: r-oncoming 8s linear infinite; }
@keyframes r-oncoming { 0% { transform: translateX(340px); } 45%, 100% { transform: translateX(-60px); } }
.r-car { animation: r-route 8s ease-in-out infinite; }
@keyframes r-route {
  0%, 18% { transform: none; }
  23%, 38% { transform: translateY(-48px); }
  44%, 54% { transform: none; }
  66%, 88% { transform: translate(159px, 56px); }
  97%, 100% { transform: none; }
}
.r-sonar { animation: r-sonar 8s linear infinite; }
@keyframes r-sonar { 0%, 52% { opacity: 1; } 56%, 95% { opacity: 0; } 100% { opacity: 1; } }
.r-bay { fill: rgba(245, 184, 61, .05); stroke: var(--solder); stroke-width: 1.5; stroke-dasharray: 5 4; }
.r-bolt { font-size: 15px; fill: var(--solder); opacity: .35; animation: r-bolt 8s linear infinite; }
@keyframes r-bolt { 0%, 70% { opacity: .35; } 74%, 86% { opacity: 1; filter: drop-shadow(0 0 6px rgba(245, 184, 61, .9)); } 90%, 100% { opacity: .35; } }
.r-post { fill: var(--steel); stroke: var(--solder); stroke-width: 1.2; }
.r-arm { stroke: var(--solder); stroke-width: 4; stroke-linecap: round; transform-box: view-box; transform-origin: 288px 132px; animation: r-arm 8s ease-in-out infinite; }
@keyframes r-arm { 0%, 66% { transform: rotate(30deg); } 72%, 86% { transform: rotate(-14deg); } 92%, 100% { transform: rotate(30deg); } }
.r-batt__shell { fill: none; stroke: rgba(234, 242, 255, .5); stroke-width: 1.2; }
.r-batt__cap { fill: rgba(234, 242, 255, .5); }
.r-batt__fill { transform-box: fill-box; transform-origin: left center; animation: r-batt 8s linear infinite; }
@keyframes r-batt {
  0% { transform: scaleX(.7); fill: var(--signal); }
  45% { fill: var(--solder); }
  54%, 72% { transform: scaleX(.14); fill: #FF5D5D; }
  86%, 88% { transform: scaleX(1); fill: var(--signal); }
  100% { transform: scaleX(.7); fill: var(--signal); }
}
.r-body { fill: var(--signal); filter: drop-shadow(0 0 8px rgba(61, 255, 140, .7)); }
.r-chip { fill: var(--void); }
.r-wave { fill: none; stroke: var(--signal); stroke-width: 2; stroke-linecap: round; animation: r-wave 1.2s ease-out infinite; }
.r-wave--2 { animation-delay: .4s; } .r-wave--3 { animation-delay: .8s; }
@keyframes r-wave { from { transform: translateX(0); opacity: 1; } to { transform: translateX(46px); opacity: 0; } }

/* Web lab */
.weblab { margin-top: clamp(5rem, 9vw, 8rem); }
.weblab__head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.weblab__title { font-size: clamp(1.6rem, 3.4vw, 3.2rem); }
.weblab__group + .weblab__group { margin-top: clamp(2.5rem, 5vw, 4rem); }
.weblab__label { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem 1rem; margin-bottom: 1.2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.weblab__label p { color: var(--slate); font-size: .95rem; }
.weblab__tag { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .8rem; border-radius: 999px; font-weight: 600; }
.weblab__tag--live { color: var(--void); background: var(--signal); box-shadow: var(--glow-signal); }
.weblab__tag--live i { width: 7px; height: 7px; border-radius: 50%; background: var(--void); animation: blink 1.6s steps(2) infinite; }
.weblab__tag--src { color: var(--electric-lt); border: 1px solid rgba(127, 176, 255, .4); }
.weblab__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 1.6vw, 1.4rem); }
.lab--front .lab__glyph { color: var(--electric-lt); text-shadow: 0 0 18px rgba(127, 176, 255, .5); }
.lab--front .lab__dots i:first-child { background: var(--electric); }
/* whole card opens the site (stretched link); the Code link sits above it */
.lab { position: relative; }
.lab__main::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.lab__main:focus-visible { outline: none; }
.lab:has(.lab__main:focus-visible) { outline: 2px solid var(--signal); outline-offset: 3px; }
.lab__links { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding-inline: .3rem; margin-top: .3rem; }
.lab__links .lab__cta { padding: 0; margin: 0; color: var(--signal); }
.lab__code { position: relative; z-index: 1; color: var(--electric-lt); padding: .35rem .7rem; border: 1px solid rgba(127, 176, 255, .35); border-radius: 999px; transition: background .3s, color .3s; }
.lab__code:hover { background: var(--electric-lt); color: var(--void); }
.lab { display: flex; flex-direction: column; gap: .55rem; padding: 1rem 1rem 1.3rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--graphite); transition: border-color .3s, box-shadow .4s; }
.lab:hover { border-color: var(--electric); box-shadow: 0 18px 40px -20px rgba(47, 123, 255, .55); }
.lab__screen { position: relative; aspect-ratio: 16 / 9; margin-bottom: .6rem; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 130%, rgba(47, 123, 255, .3), transparent 60%), linear-gradient(rgba(234, 242, 255, .03) 1px, transparent 1px) 0 0 / 100% 14px, var(--void); }
.lab__dots { position: absolute; top: 10px; left: 12px; display: flex; gap: 5px; }
.lab__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--steel); }
.lab__dots i:first-child { background: var(--signal); }
.lab__num { position: absolute; right: 12px; top: 6px; font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; color: transparent; -webkit-text-stroke: 1px rgba(234, 242, 255, .18); }
.lab__glyph { font-family: var(--f-mono); font-size: clamp(1.1rem, 1.7vw, 1.5rem); font-weight: 600; color: var(--signal); text-shadow: 0 0 18px rgba(61, 255, 140, .55); transition: transform .6s var(--ease-out), color .3s; }
.lab:hover .lab__glyph { transform: scale(1.12); color: var(--electric-lt); }
.lab b { font-family: var(--f-display); font-size: 1.02rem; text-transform: uppercase; padding-inline: .3rem; }
.lab > span { color: var(--slate); font-size: .93rem; line-height: 1.45; flex: 1; padding-inline: .3rem; }
.lab em { font-style: normal; color: var(--electric-lt); font-size: .66rem; letter-spacing: .06em; padding-inline: .3rem; }
.lab__cta { font-style: normal; color: var(--ice); padding-inline: .3rem; margin-top: .3rem; transition: color .3s; }
.lab:hover .lab__cta { color: var(--signal); }

/* ---------- Life ---------- */
.life { padding: clamp(7rem, 14vw, 12rem) 0 clamp(5rem, 9vw, 8rem); overflow: hidden; }
.life .section-title { margin-bottom: 2rem; }
.chips { display: flex; flex-wrap: wrap; gap: .7rem; }
.chip { padding: .6rem 1.1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--steel); font-weight: 600; transition: transform .5s cubic-bezier(.34, 1.8, .64, 1), border-color .3s; cursor: default; }
.chip:hover { transform: translateY(-6px) rotate(-3deg); border-color: var(--solder); }
.chips__caption { margin-top: 2.4rem; color: var(--slate); text-transform: none; letter-spacing: .02em; }
.reel { margin-top: clamp(3rem, 6vw, 5rem); }
.reel__track { display: flex; gap: clamp(1rem, 2vw, 1.6rem); padding-inline: var(--gutter); width: max-content; will-change: transform; }
.photo { width: clamp(220px, 24vw, 340px); flex-shrink: 0; }
.photo:nth-child(even) { margin-top: 3rem; }
.photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 16px; filter: grayscale(1) contrast(1.05) brightness(.85); transition: filter .9s var(--ease-out), transform .9s var(--ease-out); background: var(--steel); }
.photo.is-warm img, .photo:hover img { filter: none; }
.photo:hover img { transform: scale(1.02) rotate(-.6deg); }
.photo figcaption { margin-top: .8rem; color: var(--slate); text-transform: none; letter-spacing: .02em; font-size: .78rem; }

/* ---------- Contact ---------- */
.contact__content { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; justify-content: center; }
.contact__title { font-size: clamp(2.2rem, min(6.4vw, 13vh), 9rem); margin-bottom: 1.6rem; }
.contact__body { max-width: 44ch; font-size: var(--fs-md); color: rgba(234, 242, 255, .85); margin-bottom: 2.2rem; }
.contact__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem; margin-top: 1.6rem; }
.copy-chip { text-transform: none; letter-spacing: .02em; font-size: .85rem; padding: .6rem 1rem; border-radius: 999px; border: 1px dashed var(--line); color: var(--ice); background: rgba(7, 9, 12, .5); transition: border-color .3s, color .3s; }
.copy-chip:hover { border-color: var(--signal); color: var(--signal); }

/* ---------- Footer ---------- */
.footer { position: relative; padding: 5rem 0 0; border-top: 1px solid var(--line); overflow: hidden; }
.footer__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; }
.footer__brand { display: flex; align-items: center; gap: 1rem; font-family: var(--f-display); text-transform: uppercase; font-size: .9rem; line-height: 1.3; }
.footer__brand small { color: var(--slate); font-family: var(--f-mono); }
.footer__links { display: flex; flex-wrap: wrap; gap: 1.6rem; font-weight: 600; }
.footer__links a { position: relative; }
.footer__links a::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 1.5px; background: var(--signal); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease-out); }
.footer__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.footer__top-link { color: var(--slate); transition: color .3s; }
.footer__top-link:hover { color: var(--signal); }
.footer__eof { margin-top: 3rem; color: rgba(135, 146, 163, .65); text-transform: none; letter-spacing: .04em; }
.footer__mark { font-size: 16.5vw; line-height: 1; text-align: center; margin-top: 2.5rem; padding-bottom: 2.5vw; white-space: nowrap; user-select: none; }
.footer__mark span { display: inline-block; color: transparent; background: linear-gradient(0deg, var(--signal) var(--fill, 0%), var(--steel) var(--fill, 0%)); -webkit-background-clip: text; background-clip: text; }

/* ---------- Case overlay ---------- */
.case { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: var(--gutter); }
.case[hidden] { display: none; }
.case__backdrop { position: absolute; inset: 0; background: rgba(7, 9, 12, .8); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.case__panel { position: relative; width: min(980px, 100%); max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; padding: clamp(1.6rem, 4vw, 3.2rem); background: rgba(16, 20, 26, .92); }
.case__panel h2 { font-size: clamp(1.7rem, 4vw, 3.2rem); margin-bottom: 1.8rem; padding-right: 4rem; }
.case__close { position: absolute; top: 1.2rem; right: 1.2rem; color: var(--slate); padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 999px; transition: color .3s, border-color .3s; }
.case__close:hover { color: var(--signal); border-color: var(--signal); }
.case__media { margin-bottom: 1.8rem; border-radius: 14px; overflow: hidden; }
.case__media:empty { display: none; }
.case__media iframe, .case__media .yt { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; }
.case__media .yt { position: relative; background: var(--void) center / cover no-repeat; display: grid; place-items: center; }
.case__media .yt span { padding: 1rem 1.6rem; border-radius: 999px; background: var(--signal); color: var(--void); font-weight: 700; box-shadow: var(--glow-signal); }
.case__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.case__cols h3 { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .14em; color: var(--signal); margin-bottom: .6rem; }
.case__cols p { color: rgba(234, 242, 255, .8); font-size: .97rem; }
.case__photo { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: 1.2rem; align-items: end; }
.case__photo img { width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.case__photo figcaption { color: var(--slate); text-transform: none; letter-spacing: .02em; }
.case__cols .case__links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- Toast & pill ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 600; transform: translate(-50%, 30px); opacity: 0; padding: .8rem 1.3rem; border-radius: 999px; background: var(--signal); color: var(--void); font-weight: 600; pointer-events: none; transition: transform .5s var(--ease-out), opacity .4s; }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.say-hi-pill { display: none; }

/* ---------- Motion helpers ---------- */
.reveal { opacity: 0; transform: translateY(40px); }
.scan { clip-path: inset(0 100% 0 0); }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .nav__links { display: none; }
  .nav__burger { display: block; }
  .nav .btn--small { display: none; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .toolkit__grid { grid-template-columns: 1fr; }
  .work__grid { grid-template-columns: 1fr 1fr; }
  .card, .card:nth-child(4), .card:nth-child(5) { grid-column: span 1; }
  .card:first-child { grid-column: span 2; }
  .weblab__grid { grid-template-columns: 1fr 1fr; }
  .case__cols, .case__photo { grid-template-columns: 1fr; }
}

/* ---------- Phone ---------- */
@media (max-width: 600px) {
  .scene-section--hero { height: 180vh; }
  .scene-section--contact { height: 150vh; }
  .hud--tr { top: auto; bottom: 28px; right: auto; left: var(--gutter); font-size: .62rem; }
  .hud--bl, .scroll-cue { display: none; }
  .hud--tl { top: 84px; }
  .hero__content { bottom: 70px; }
  .hero__title { font-size: 12.5vw; }
  .hero__title .line, .contact__title .line { white-space: normal; }
  .hero__sub { font-size: 1.05rem; }
  .btn { padding: .95rem 1.3rem; font-size: .95rem; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .stat { padding-bottom: 2.4rem; }
  .stat__label { font-size: .88rem; }

  /* pillars: sticky canvas on top, cards scroll past */
  .scene-section--pillars { height: auto; }
  .pillars__stage { position: relative; display: block; height: auto; overflow: visible; }
  .pillars__visual { position: sticky; top: 0; height: 44svh; border-right: 0; border-bottom: 1px solid var(--line); z-index: 3; background: var(--bg); }
  .pillars__visual .hud--tl { top: 76px; }
  .pillars__progress { bottom: 16px; }
  .pillars__panels { position: relative; z-index: 2; }
  .pillar { position: relative; inset: auto; opacity: 1; visibility: visible; padding: 3.5rem var(--gutter); min-height: 64svh; }
  .pillar__num { font-size: 5rem; }

  /* story: vertical */
  .story__sticky { position: relative; height: auto; overflow: visible; }
  .story__head { padding-top: 6rem; }
  .story__track { flex-direction: column; width: 100%; padding: 1rem var(--gutter) 6rem 3rem; gap: 1.6rem; }
  .story__trace { display: none; }
  .story__track::before { content: ""; position: absolute; left: calc(1.5rem - 1px); top: 0; bottom: 6rem; width: 2px; background: linear-gradient(var(--signal), var(--electric), var(--solder)); box-shadow: var(--glow-signal); }
  .node, .node--intro { width: 100%; }
  .node__pad { left: -1.95rem; top: 2.5rem; }
  .node__pad::after { display: none; }
  .node__portrait { min-height: 0; aspect-ratio: 4 / 5; }

  .work__grid { grid-template-columns: 1fr; }
  .weblab__grid { grid-template-columns: 1fr; }
  .card:first-child { grid-column: span 1; }
  .reel { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .reel::-webkit-scrollbar { display: none; }
  .photo { width: 72vw; scroll-snap-align: center; }
  .photo:nth-child(even) { margin-top: 0; }
  .photo img { filter: none; }
  .contact__title { font-size: clamp(2.3rem, 12vw, 4rem); }
  .contact__ctas .btn { flex: 1 1 100%; justify-content: center; }
  .footer__top { flex-direction: column; align-items: flex-start; }

  .rail { display: none; }
  .say-hi-pill { display: block; position: fixed; right: 16px; bottom: 16px; z-index: 75; padding: .85rem 1.2rem; border-radius: 999px; background: var(--signal); color: var(--void); font-weight: 700; box-shadow: var(--glow-signal); transform: translateY(120px); transition: transform .5s var(--ease-out); }
  .say-hi-pill.is-on { transform: none; }
  .tap-flash { animation: tap .4s; }
}
@keyframes tap { 0% { box-shadow: 0 0 0 0 rgba(61, 255, 140, .7); } 100% { box-shadow: 0 0 0 14px rgba(61, 255, 140, 0); } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .grain { animation: none; }
  .scene-section--hero, .scene-section--contact { height: auto; }
  .scene-section--hero .sticky, .scene-section--contact .sticky { position: relative; height: 100svh; }
  .reveal, .scan { opacity: 1; transform: none; clip-path: none; }
  .mission__text .w { opacity: 1; }
}
