/* ==========================================================================
   iamharnoor.com · v4 "cinematic red-team"
   Type: Instrument Serif (display) · Geist (text) · JetBrains Mono (labels)
   ========================================================================== */

/* ---------- self-hosted fonts (latin subsets, SIL OFL 1.1 — see /assets/fonts/LICENSE-OFL.txt) ---------- */
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/assets/fonts/geist-latin-wght-normal.woff2") format("woff2-variations"), url("/assets/fonts/geist-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url("/assets/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations"), url("/assets/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

@view-transition { navigation: auto; }

:root {
  color-scheme: dark;
  --bg: #0a0a09;
  --bg-elev: #10100e;
  --surface: #141412;
  --surface-2: #1b1b18;
  --ink: #f3f1ea;
  --ink-2: #c9c6bb;
  --muted: #8a8779;
  --faint: #57554c;
  --line: rgba(243, 241, 234, 0.085);
  --line-2: rgba(243, 241, 234, 0.17);
  --accent: #ff6a3d;
  --accent-2: #ffb547;
  --accent-soft: color-mix(in srgb, var(--accent) 13%, transparent);
  --hot: #ff3b3b;
  --ok: #8dffb9;
  --on-accent: #0b0b0a;
  --glass: rgba(10, 10, 9, 0.66);
  --shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.75);

  --serif: "Instrument Serif", "Iowan Old Style", "Times New Roman", serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --maxw: 1600px;
  --gutter: clamp(16px, 3.6vw, 56px);
  --header-h: 84px;
  --section-pad: clamp(104px, 13vw, 200px);
  --radius: 2px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.18, 1);
  /* fluid, spring-like motion curve used for all UI transitions */
  --ease-fluid: cubic-bezier(0.32, 0.72, 0, 1);
  /* spacing scale: only these values */
  --s-25: 2px; --s-50: 4px; --s-75: 8px; --s-100: 12px; --s-200: 16px; --s-300: 24px;
  --s-400: 32px; --s-500: 40px; --s-600: 48px; --s-700: 64px; --s-800: 80px; --s-900: 96px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f1e8;
  --bg-elev: #efebdf;
  --surface: #ebe7d9;
  --surface-2: #e1dccb;
  --ink: #14130f;
  --ink-2: #3a382f;
  --muted: #6c695a;
  --faint: #a3a08c;
  --line: rgba(20, 19, 15, 0.1);
  --line-2: rgba(20, 19, 15, 0.2);
  --accent: #e0501e;
  --accent-2: #b5701a;
  --hot: #d42a2a;
  --ok: #12804a;
  --on-accent: #f7f4ec;
  --glass: rgba(244, 241, 232, 0.72);
  --shadow: 0 40px 100px -50px rgba(40, 30, 10, 0.35);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
  scroll-padding-top: calc(var(--header-h) + 12px);
  background: var(--bg);
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  transition: background-color .5s var(--ease-out), color .5s var(--ease-out);
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
p { margin: 0; }
h1, h2, h3, .sec-title, .contact__big, .tagline__text { text-wrap: balance; }
p, li, .sec-sub, .hero__bio { text-wrap: pretty; }
kbd {
  font-family: var(--mono); font-size: .92em; line-height: 1;
  display: inline-grid; place-items: center; min-width: 1.9em; height: 1.9em; padding: 0 .4em;
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 3px; color: var(--ink-2);
}
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 12px; top: 12px; z-index: 10000; padding: 10px 14px;
  background: var(--accent); color: var(--on-accent); font-family: var(--mono); font-size: 12px;
  transform: translateY(-150%); transition: transform .3s var(--ease-out);
}
.skip:focus { transform: none; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.mono-label {
  font-family: var(--mono); font-size: 11px; font-weight: 500; line-height: 1.4;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.accent { color: var(--accent); }

/* ---------- ambient layers ---------- */
#fluid {
  position: fixed; inset: 0; width: 100vw; height: 100lvh; z-index: 0;
  pointer-events: none; opacity: 1;
}
.no-webgl #fluid { display: none; }
.gridlines {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  display: flex; justify-content: space-between;
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter);
}
.gridlines i {
  width: 1px; height: 100%;
  background: linear-gradient(to bottom, transparent, var(--line) 14%, var(--line) 86%, transparent);
  opacity: .6;
}
.grain {
  position: fixed; inset: -60%; z-index: 80; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.4s steps(6) infinite;
}
[data-theme="light"] .grain { opacity: .07; mix-blend-mode: multiply; }
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -2%); } 60% { transform: translate(-2%, -4%); }
  80% { transform: translate(4%, 2%); } 100% { transform: translate(0, 0); }
}
.progress { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 120; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

main, .footer { position: relative; z-index: 1; }

/* ---------- buttons ---------- */
.btn {
  --b: var(--line-2);
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 16px; border: 1px solid var(--b); border-radius: var(--radius);
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); overflow: hidden; isolation: isolate; white-space: nowrap;
  transition: color .7s var(--ease-fluid), border-color .7s var(--ease-fluid), transform .7s var(--ease-fluid);
}
.btn:active { transform: scale(.98); }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent);
  transform: scaleX(0); transform-origin: right center; transition: transform .7s var(--ease-fluid);
}
.btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); transform-origin: left center; }
.btn:hover, .btn:focus-visible { color: var(--on-accent); border-color: var(--accent); }
.btn--accent { --b: var(--accent); color: var(--accent); }
.btn--solid { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn--solid::before { background: var(--ink); }
.btn--solid:hover { color: var(--bg); border-color: var(--ink); }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* primary action: one per view, always "Get in touch" */
.cta {
  position: relative; display: inline-flex; align-items: center; gap: var(--s-75);
  padding: var(--s-75) var(--s-100); border-radius: 9999px;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--sans); font-size: 16px; line-height: 24px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 0 0 0 transparent;
  transition: transform .7s var(--ease-fluid), background-color .7s var(--ease-fluid), box-shadow .7s var(--ease-fluid);
}
.cta:hover { background: color-mix(in srgb, var(--accent) 84%, var(--ink)); transform: translateY(-2px); box-shadow: 0 12px 32px -12px color-mix(in srgb, var(--accent) 70%, transparent); }
.cta:active { transform: scale(.98); }
.cta__arr { display: inline-block; transition: transform .7s var(--ease-fluid); }
.cta:hover .cta__arr { transform: translateX(4px); }
.cta--sm { font-size: 14px; line-height: 20px; }

/* ---------- boot intro ---------- */
#boot { display: none; }
.boot #boot {
  position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); color: var(--accent);
}
.boot body { overflow: hidden; }
.boot__slices { position: absolute; inset: 0; display: flex; flex-direction: column; z-index: -1; }
.boot__slices i { flex: 1; background: var(--bg); margin-block: -.5px; }
.boot__inner { width: min(680px, 88vw); }
.boot__log {
  margin: 0; font: inherit; font-size: 13px; line-height: 1.95; white-space: pre-wrap; min-height: 9.75em;
  text-shadow: 0 0 10px color-mix(in srgb, var(--accent) 50%, transparent);
}
.boot__log .ok { color: var(--ink-2); }
.boot__cursor {
  display: inline-block; width: 8px; height: 15px; margin-left: 2px; vertical-align: -2px;
  background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.boot__bar { height: 2px; margin-top: 18px; background: color-mix(in srgb, var(--accent) 16%, transparent); overflow: hidden; }
.boot__bar i { display: block; height: 100%; background: var(--accent); box-shadow: 0 0 16px var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.boot__grant {
  position: relative; margin-top: 22px; font-size: clamp(24px, 6vw, 68px); font-weight: 800;
  letter-spacing: .04em; line-height: 1; opacity: 0; white-space: nowrap;
}
.boot__skip { position: absolute; right: 24px; bottom: 22px; color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- glitch ---------- */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  pointer-events: none; opacity: 0;
}
.glitch.is-glitching { animation: gl-shake .32s steps(2) 2; }
.glitch.is-glitching::before { opacity: .85; color: #2ef2ff; mix-blend-mode: screen; animation: gl-a .32s steps(2) 2; }
.glitch.is-glitching::after { opacity: .9; color: var(--hot); mix-blend-mode: screen; animation: gl-b .32s steps(2) 2; }
[data-theme="light"] .glitch.is-glitching::before, [data-theme="light"] .glitch.is-glitching::after { mix-blend-mode: multiply; }
@keyframes gl-a {
  0% { clip-path: inset(8% 0 62% 0); transform: translate(-.045em, -.01em); }
  50% { clip-path: inset(46% 0 24% 0); transform: translate(.035em, .01em); }
  100% { clip-path: inset(72% 0 4% 0); transform: translate(-.02em, 0); }
}
@keyframes gl-b {
  0% { clip-path: inset(64% 0 8% 0); transform: translate(.045em, .01em); }
  50% { clip-path: inset(14% 0 58% 0); transform: translate(-.03em, 0); }
  100% { clip-path: inset(36% 0 40% 0); transform: translate(.02em, -.01em); }
}
@keyframes gl-shake {
  0% { transform: translate(0); } 25% { transform: translate(-.01em, .005em) skewX(-4deg); }
  50% { transform: translate(.012em, -.004em); } 100% { transform: translate(0); }
}

/* ---------- header: floating glass island ---------- */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: center; padding: var(--s-300) var(--s-200) 0;
  pointer-events: none; transition: transform .7s var(--ease-fluid);
}
.hud.is-hidden { transform: translateY(calc(-100% - var(--s-75))); }
.hud__pill {
  pointer-events: auto; display: flex; align-items: center; gap: var(--s-75);
  width: max-content; max-width: 100%; padding: var(--s-75); border-radius: 9999px;
  border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--bg-elev) 62%, transparent);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 16px 48px -20px rgba(0, 0, 0, .55);
  transition: background-color .7s var(--ease-fluid), box-shadow .7s var(--ease-fluid);
}
[data-theme="light"] .hud__pill { box-shadow: 0 16px 48px -24px rgba(40, 30, 10, .35); }
.hud.is-scrolled .hud__pill { background: color-mix(in srgb, var(--bg-elev) 80%, transparent); }
.hud__brand {
  display: inline-flex; align-items: center; gap: var(--s-75); padding: 0 var(--s-100) 0 var(--s-100);
  font-family: var(--mono); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; white-space: nowrap; color: var(--ink);
}
.hud__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2.4s var(--ease-out) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
.hud__nav { position: relative; display: flex; align-items: center; gap: var(--s-25); }
.hud__nav a {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: var(--s-50);
  padding: var(--s-75) var(--s-100); border-radius: 9999px;
  font-family: var(--mono); font-size: 12px; line-height: 16px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); transition: color .7s var(--ease-fluid);
}
.hud__nav a:hover, .hud__nav a.is-active { color: var(--ink); }
.hud__ind {
  position: absolute; left: 0; top: 0; bottom: 0; z-index: 0; width: 0; border-radius: 9999px;
  background: color-mix(in srgb, var(--ink) 10%, transparent); opacity: 0;
  transition: transform .7s var(--ease-fluid), width .7s var(--ease-fluid), opacity .5s var(--ease-fluid);
}
.hud__theme, .hud__menu {
  position: relative; flex: none; width: 36px; height: 36px; border-radius: 9999px;
  border: 1px solid var(--line-2); display: grid; place-items: center;
  transition: border-color .7s var(--ease-fluid), transform .7s var(--ease-fluid);
}
.hud__theme:hover, .hud__menu:hover { border-color: var(--accent); }
.hud__theme:active, .hud__menu:active { transform: scale(.94); }
.hud__theme .sm {
  width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--ink);
  background: linear-gradient(90deg, var(--ink) 50%, transparent 50%);
  transition: transform .7s var(--ease-fluid);
}
[data-theme="light"] .hud__theme .sm { transform: rotate(180deg); }
/* two lines that morph into an X, never disappearing */
.hud__menu { display: none; }
.hud__menu i { position: absolute; left: 10px; right: 10px; height: 1.5px; border-radius: 2px; background: var(--ink); transition: transform .7s var(--ease-fluid); }
.hud__menu i:first-child { top: 13px; } .hud__menu i:last-child { top: 20px; }
.menu-open .hud__menu i:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-open .hud__menu i:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* frosted full-screen menu */
.menu {
  position: fixed; inset: 0; z-index: 95;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(var(--header-h) + var(--s-300)) var(--gutter) var(--s-400);
  background: rgba(0, 0, 0, .8);
  -webkit-backdrop-filter: blur(64px) saturate(140%); backdrop-filter: blur(64px) saturate(140%);
  opacity: 0; visibility: hidden;
  transition: opacity .7s var(--ease-fluid), visibility 0s .7s;
}
[data-theme="light"] .menu { background: rgba(255, 255, 255, .8); }
.menu-open .menu { opacity: 1; visibility: visible; transition: opacity .7s var(--ease-fluid), visibility 0s; }
.menu__links { list-style: none; margin: 0; padding: 0; }
.menu__links a {
  display: flex; align-items: baseline; gap: var(--s-200); padding: var(--s-75) 0; border-bottom: 1px solid var(--line);
  font-family: var(--serif); font-size: clamp(36px, 10vw, 72px); line-height: 1.08; letter-spacing: -.02em;
}
.menu__links a .n { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: .1em; }
.menu__links li { overflow: hidden; }
.menu__links li > a { transform: translateY(48px); opacity: 0; transition: transform .7s var(--ease-fluid), opacity .7s var(--ease-fluid); }
.menu-open .menu__links li > a { transform: none; opacity: 1; }
.menu-open .menu__links li:nth-child(1) > a { transition-delay: .1s; }
.menu-open .menu__links li:nth-child(2) > a { transition-delay: .15s; }
.menu-open .menu__links li:nth-child(3) > a { transition-delay: .2s; }
.menu-open .menu__links li:nth-child(4) > a { transition-delay: .25s; }
.menu-open .menu__links li:nth-child(5) > a { transition-delay: .3s; }
.menu-open .menu__links li:nth-child(6) > a { transition-delay: .35s; }
.menu-open .menu__links li:nth-child(7) > a { transition-delay: .4s; }
.menu-open .menu__links li:nth-child(8) > a { transition-delay: .45s; }
.menu-open .menu__links li:nth-child(9) > a { transition-delay: .5s; }
.menu__foot { display: flex; flex-wrap: wrap; gap: var(--s-100) var(--s-200); margin-top: var(--s-400); }
.menu__foot a, .menu__foot button { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; isolation: isolate; overflow-x: clip;
  display: grid; grid-template-rows: auto 1fr auto;
  padding-top: calc(var(--header-h) + 18px); padding-bottom: 22px;
}
.no-webgl .hero::before, .no-webgl .contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55% 45% at 72% 38%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%),
    radial-gradient(35% 35% at 18% 82%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
}
/* soft floor so the ink recedes behind the bio + stats */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46%; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, color-mix(in srgb, var(--bg) 86%, transparent) 18%, transparent);
}
.hero__meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.meta { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; min-width: 0; }
.meta:first-child { padding-left: 0; }
.meta + .meta { border-left: 1px solid var(--line); }
.meta__v {
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); vertical-align: 1px; animation: blink 1.6s steps(2) infinite; }
.hero__body { align-self: end; padding-top: 4vh; }
.hero__kicker { display: flex; align-items: center; gap: 12px; }
.hero__kicker::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
.hero__title {
  margin: 14px 0 0; font-family: var(--serif); font-weight: 400;
  font-size: clamp(42px, 10.4vw, 204px); line-height: .9; letter-spacing: -.026em;
}
.hero__title .line { display: block; overflow: hidden; padding: .02em .1em .13em 0; margin-bottom: -.13em; }
.hero__title .line__in {
  display: inline-block; transform-origin: 0 100%;
  /* headline ink: left-to-right white to grey; the orange italics stay solid */
  background-image: linear-gradient(90deg, #ffffff, #9b9b9b);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-theme="light"] .hero__title .line__in { background-image: linear-gradient(90deg, #000000, #666666); }
.hero__title em { font-style: italic; color: var(--accent); -webkit-text-fill-color: var(--accent); }
.js:not(.reveal-fallback) .hero__title .line__in { transform: translateY(112%) rotate(3deg); }
.js:not(.reveal-fallback) .hero [data-hero-fade] { opacity: 0; }
.hero__foot {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: start;
  margin-top: var(--s-300); padding-top: var(--s-200); border-top: 1px solid var(--line);
}
.hero__lede { display: grid; gap: var(--s-300); max-width: 680px; }
.hero__bio { font-size: clamp(15px, 1.12vw, 18px); line-height: 1.62; color: var(--ink-2); max-width: 680px; }
.hero__aside { display: grid; gap: var(--s-300); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-200); }
.hero__bio b { color: var(--ink); font-weight: 500; }
.hero__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.stat__n {
  display: block; font-family: var(--serif); font-size: clamp(56px, 6.2vw, 112px); line-height: .88;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-bottom: 10px;
}
.hero__cue { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; }
.cue { display: inline-flex; align-items: center; gap: 12px; }
.cue__line { position: relative; width: 1px; height: 34px; background: var(--line-2); overflow: hidden; }
.cue__line::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 40%; background: var(--accent); animation: cue 2s var(--ease-io) infinite; }
@keyframes cue { 0% { transform: translateY(-100%); } 100% { transform: translateY(260%); } }
.cue-k { display: inline-flex; align-items: center; gap: 8px; }
.cue-k kbd { font-size: 10px; min-width: 1.8em; height: 1.8em; }

/* ---------- marquee ---------- */
.marquee {
  position: relative; z-index: 1; overflow: hidden; padding-block: 22px 18px;
  border-block: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.marquee__row { display: flex; width: max-content; will-change: transform; }
.marquee__row > div { display: flex; flex-shrink: 0; }
.marquee__row span { white-space: nowrap; }
.marquee__row--big { font-family: var(--serif); font-style: italic; font-size: clamp(36px, 5.4vw, 88px); line-height: 1.12; color: var(--ink); }
.marquee__row--big span { padding-inline: .32em; }
.marquee__row--big .sep { color: var(--accent); font-style: normal; font-size: .5em; align-self: center; padding: 0; }
.marquee__row--small { margin-top: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.marquee__row--small span { padding-inline: 1.4em; }
.marquee__row--small .sep { color: var(--accent); padding: 0; }

/* ---------- scroll reveals (IntersectionObserver adds .is-in) ---------- */
.js:not(.reveal-fallback) [data-reveal],
.js:not(.reveal-fallback) [data-stagger] > * {
  opacity: 0; transform: translateY(64px); filter: blur(12px);
  transition: opacity .9s var(--ease-fluid), transform .9s var(--ease-fluid), filter .9s var(--ease-fluid);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js [data-reveal].is-in, .js [data-stagger] > .is-in { opacity: 1; transform: none; filter: none; }

/* ---------- tagline reveal ---------- */
.tagline { position: relative; padding-block: var(--s-900); }
.tagline__text {
  margin: 0 auto; max-width: 680px;
  font-family: var(--serif); font-weight: 400; font-size: 60px; line-height: 1; letter-spacing: -.02em;
}
.tagline__text em { font-style: italic; }
.tagline__text .w { color: color-mix(in srgb, var(--ink) 30%, transparent); transition: color .7s var(--ease-fluid); }
.tagline__text .w.is-on { color: var(--ink); }
.tagline__text em .w { color: color-mix(in srgb, var(--accent) 30%, transparent); }
.tagline__text em .w.is-on { color: var(--accent); }

/* ---------- how I work ---------- */
.method__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s-700); align-items: start; }
.method__steps { list-style: none; margin: 0; padding: 0; }
.mstep { min-height: 64vh; display: flex; align-items: center; }
.mstep__in { display: grid; gap: var(--s-200); max-width: 520px; }
.js .mstep:not(.is-active) .mstep__in.is-in { opacity: .34; }
.mstep__n { color: var(--accent); }
.mstep__title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 48px; line-height: 1; letter-spacing: -.02em; }
.mstep__title em { font-style: italic; color: var(--accent); }
.mstep__body { color: var(--ink-2); font-size: 18px; line-height: 28px; }
.mstep__chips { display: flex; flex-wrap: wrap; gap: var(--s-75); list-style: none; margin: 0; padding: 0; }
.mstep__chips li {
  padding: var(--s-50) var(--s-100); border: 1px solid var(--line-2); border-radius: 9999px;
  font-family: var(--mono); font-size: 12px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.method__viz { position: sticky; top: max(calc(var(--header-h) + var(--s-200)), calc(50vh - 280px)); align-self: start; }
.mviz {
  max-width: 560px; margin-inline: auto; padding: var(--s-300);
  border: 1px solid var(--line-2); border-radius: 24px;
  background: color-mix(in srgb, var(--bg-elev) 72%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.mviz__svg { width: 100%; height: auto; overflow: visible; }
.mviz text { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; fill: var(--ink-2); }
.mv-node rect { fill: color-mix(in srgb, var(--surface) 92%, transparent); stroke: var(--line-2); stroke-width: 1; transition: stroke .7s var(--ease-fluid), fill .7s var(--ease-fluid); }
.mv-node text { fill: var(--ink); }
.mv-edge { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 260; stroke-dashoffset: 260; transition: stroke-dashoffset 1.4s var(--ease-fluid), stroke .7s var(--ease-fluid); }
.mviz.is-drawn .mv-edge { stroke-dashoffset: 0; }
.mviz.is-drawn .mv-edge:nth-of-type(2) { transition-delay: .12s; }
.mviz.is-drawn .mv-edge:nth-of-type(3) { transition-delay: .24s; }
.mviz.is-drawn .mv-edge:nth-of-type(4) { transition-delay: .36s; }
.mviz.is-drawn .mv-edge:nth-of-type(5) { transition-delay: .48s; }
.mv-boundary { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 6 6; opacity: 0; transition: opacity .7s var(--ease-fluid), stroke .7s var(--ease-fluid); }
.mviz.is-drawn .mv-boundary { opacity: .75; }
.mviz .mv-tag { letter-spacing: .1em; text-transform: uppercase; }
.mviz .mv-tag--accent { fill: var(--accent); }
.mviz .mv-tag--hot { fill: var(--hot); }
.mviz .mv-tag--ok { fill: var(--ok); }
.mviz [data-show] { opacity: 0; transition: opacity .7s var(--ease-fluid); }
.mviz[data-state="1"] [data-show~="1"], .mviz[data-state="2"] [data-show~="2"], .mviz[data-state="3"] [data-show~="3"] { opacity: 1; }
.mv-scan { fill: none; stroke: var(--accent); stroke-width: 1; transform-box: fill-box; transform-origin: center; animation: mvScan 2.2s var(--ease-fluid) infinite; }
@keyframes mvScan { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.mv-attack path { fill: none; stroke: var(--hot); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 6 9; animation: mvDash .9s linear infinite; }
@keyframes mvDash { to { stroke-dashoffset: -30; } }
.mv-exfil rect { fill: color-mix(in srgb, var(--hot) 12%, transparent); stroke: var(--hot); stroke-width: 1; }
.mv-exfil text { fill: var(--hot); }
.mviz[data-state="3"] .mv-exfil { opacity: .38; }
.mviz[data-state="2"] .mv-boundary { stroke: var(--hot); animation: mvFlicker 1.4s steps(2) infinite; }
@keyframes mvFlicker { 50% { opacity: .3; } }
.mviz[data-state="2"] .mv-node--agent rect, .mviz[data-state="2"] .mv-node--data rect { stroke: var(--hot); fill: color-mix(in srgb, var(--hot) 14%, var(--surface)); }
.mviz[data-state="3"] .mv-edge { stroke: color-mix(in srgb, var(--ok) 70%, var(--muted)); }
.mviz[data-state="3"] .mv-node rect { stroke: color-mix(in srgb, var(--ok) 55%, var(--line-2)); }
.mv-pop { transform: scale(.3); transition: transform .7s var(--ease-fluid); }
.mviz[data-state="3"] .mv-pop { transform: scale(1); }
.mv-guard circle { fill: var(--bg); stroke: var(--ok); stroke-width: 1.5; }
.mv-guard path { fill: none; stroke: var(--ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mv-block circle { fill: var(--bg); stroke: var(--accent); stroke-width: 1.5; }
.mv-block path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.mviz__status { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: var(--s-100); margin-top: var(--s-200); color: var(--ink-2); }
.mviz__status > [data-show] { grid-area: 1 / 2; }
.mv-led { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); transition: background-color .7s var(--ease-fluid), box-shadow .7s var(--ease-fluid); }
.mviz[data-state="2"] .mv-led { background: var(--hot); box-shadow: 0 0 10px var(--hot); animation: blink 1s steps(2) infinite; }
.mviz[data-state="3"] .mv-led { background: var(--ok); box-shadow: 0 0 10px var(--ok); }

/* ---------- section scaffolding ---------- */
.section { position: relative; padding-block: var(--section-pad); }
.sec-head { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px; margin-bottom: clamp(52px, 7vw, 112px); }
.sec-kicker { display: flex; align-items: center; gap: 14px; height: max-content; padding-top: .9em; }
.sec-kicker .bar { width: 36px; height: 1px; background: var(--accent); transform-origin: 0 50%; }
.sec-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(46px, 7.2vw, 136px); line-height: .92; letter-spacing: -.024em; }
.sec-title em { font-style: italic; color: var(--accent); padding-right: .03em; }
.sec-sub { margin-top: 28px; max-width: 58ch; font-size: clamp(16px, 1.22vw, 19px); line-height: 1.62; color: var(--ink-2); }
.sec-sub em { font-family: var(--serif); font-size: 1.12em; color: var(--ink); }
.split-line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }

/* ---------- playground ---------- */
.pg__frame {
  position: relative; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden;
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent); box-shadow: var(--shadow);
}
.pg__frame::after { /* scanline sweep while probing */
  content: ""; position: absolute; left: 0; right: 0; top: -30%; height: 30%; pointer-events: none;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--accent) 10%, transparent), transparent);
  opacity: 0;
}
.pg.is-probing .pg__frame::after { opacity: 1; animation: scan 1.6s linear infinite; }
@keyframes scan { to { transform: translateY(440%); } }
.pg__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.pg__bar .dim { color: var(--faint); }
.pg__mode {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 99px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
.pg__mode i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.pg__mode[data-mode="live"] { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.pg__mode[data-mode="live"] i { background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: blink 1.6s steps(2) infinite; }
.pg__mode[data-mode="sim"] { border-color: color-mix(in srgb, var(--accent-2) 45%, transparent); }
.pg__mode[data-mode="sim"] i { background: var(--accent-2); }
.pg__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pg__pane { min-width: 0; padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.pg__pane + .pg__pane { border-left: 1px solid var(--line); }
.pg__head { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pg__state { color: var(--accent); }
.pg__system { border: 1px dashed var(--line-2); border-radius: var(--radius); }
.pg__system summary {
  list-style: none; cursor: pointer; padding: 10px 14px; display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
.pg__system summary::-webkit-details-marker { display: none; }
.pg__system summary::after { content: "−"; color: var(--accent); }
.pg__system:not([open]) summary::after { content: "+"; }
.pg__system pre {
  margin: 0; padding: 0 14px 14px; white-space: pre-wrap; font-family: var(--mono); font-size: 12px; line-height: 1.75; color: var(--muted);
}
.pg__system pre b { color: var(--ink); font-weight: 600; }
.pg__attacks { display: grid; gap: 6px; }
.pg__attacks .mono-label { margin-bottom: 4px; }
.pg__attack {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; text-align: left;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 13.5px; color: var(--ink-2); transition: border-color .3s, background .3s, color .3s, transform .4s var(--ease-out);
}
.pg__attack .code { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--accent); padding: 3px 6px; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.pg__attack .go { font-family: var(--mono); color: var(--faint); transition: transform .4s var(--ease-out), color .3s; }
.pg__attack:hover, .pg__attack.is-picked { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-soft); color: var(--ink); }
.pg__attack:hover .go, .pg__attack.is-picked .go { transform: translateX(4px); color: var(--accent); }
.pg__form { display: grid; gap: 10px; margin-top: auto; }
.pg__form textarea {
  width: 100%; min-height: 108px; resize: vertical; padding: 14px; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg) 80%, transparent); color: var(--ink);
  font-family: var(--mono); font-size: 13px; line-height: 1.6; transition: border-color .3s, box-shadow .3s;
}
.pg__form textarea::placeholder { color: var(--faint); }
.pg__form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.pg__actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pg__actions .mono-label kbd { font-size: 10px; }
.pg__target {
  position: relative; height: 240px; overflow: hidden; border-radius: var(--radius); background: #0b0906;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  box-shadow: inset 0 0 48px rgba(0, 0, 0, .8);
}
.pg__target[hidden] { display: none; }
.pg__face { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.pg__tlabel {
  position: absolute; left: var(--s-200); right: var(--s-200); top: var(--s-100);
  display: flex; justify-content: space-between; gap: var(--s-200); color: rgba(243, 241, 234, .55); pointer-events: none;
}
.pg__tlabel [data-face-state] { color: #ff8a62; transition: color .4s var(--ease-fluid); }
.pg__target[data-state="probing"] [data-face-state] { color: #ff4d4d; animation: blink .6s steps(2) infinite; }
.pg__target[data-state="held"] [data-face-state] { color: #8dffb9; }
.pg__target[data-state="breach"] [data-face-state], .pg__target[data-state="leak"] [data-face-state] { color: #ff4d4d; }
.pg__out {
  position: relative; flex: 1; min-height: 300px; max-height: 460px; overflow: auto; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--bg) 70%, transparent);
  font-family: var(--mono); font-size: 13px; line-height: 1.75; color: var(--ink); white-space: pre-wrap; word-break: break-word;
}
.pg__out .sys { color: var(--muted); }
.pg__out .acc { color: var(--accent); }
.pg__out .caret { display: inline-block; width: 8px; height: 1.1em; margin-left: 2px; vertical-align: -3px; background: var(--accent); animation: blink 1s steps(2) infinite; }
.pg__verdict {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px;
  padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--radius);
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; transition: border-color .4s, background .4s, color .4s;
}
.pg__verdict b { font-weight: 600; }
.pg__verdict[data-state="held"] { border-color: color-mix(in srgb, var(--ok) 50%, transparent); background: color-mix(in srgb, var(--ok) 8%, transparent); }
.pg__verdict[data-state="held"] b { color: var(--ok); }
.pg__verdict[data-state="breach"], .pg__verdict[data-state="leak"] { border-color: var(--hot); background: color-mix(in srgb, var(--hot) 13%, transparent); }
.pg__verdict[data-state="breach"] b, .pg__verdict[data-state="leak"] b { color: var(--hot); }
.pg__stamp {
  position: absolute; right: 22px; top: 70px; z-index: 3; pointer-events: none;
  padding: 8px 14px; border: 2px solid var(--hot); color: var(--hot);
  font-family: var(--mono); font-weight: 800; font-size: clamp(18px, 2.2vw, 30px); letter-spacing: .12em;
  transform: rotate(-8deg) scale(1.6); opacity: 0;
}
.pg__flash { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: var(--hot); opacity: 0; mix-blend-mode: overlay; }
.pg__note { margin-top: 14px; font-family: var(--mono); font-size: 11.5px; line-height: 1.7; color: var(--muted); }
.pg__note b { color: var(--ink-2); font-weight: 500; }

/* ---------- signals ---------- */
.signals { display: block; }
.signals .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-200); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.panel-head .tag { color: var(--accent); }
.feed { display: grid; gap: 12px; }
.fcard {
  position: relative; display: block; padding: 22px 24px 22px 26px; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  transition: border-color .4s, background .4s;
}
.fcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .6s var(--ease-out); }
a.fcard:hover { border-color: var(--line-2); background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
a.fcard:hover::before { transform: scaleY(1); }
.fcard__date { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.fcard__title { margin: 10px 0 8px; font-family: var(--serif); font-size: clamp(24px, 2vw, 32px); line-height: 1.12; font-weight: 400; letter-spacing: -.01em; }
.fcard__title em { color: var(--accent); }
.fcard__title .arr { display: inline-block; margin-left: .2em; font-family: var(--sans); font-size: .6em; vertical-align: .25em; color: var(--muted); transition: transform .5s var(--ease-out), color .3s; }
a.fcard:hover .arr { transform: translate(3px, -3px); color: var(--accent); }
.fcard__desc { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); max-width: 64ch; }

/* ---------- work (horizontal reel) ---------- */
.work { position: relative; padding-block: var(--section-pad); }
.work__pin { position: relative; }
.work__track { display: flex; flex-direction: column; gap: 16px; padding-inline: var(--gutter); max-width: var(--maxw); margin-inline: auto; }
.work__intro { padding-bottom: clamp(32px, 5vw, 64px); }
.work__intro .sec-kicker { padding-top: 0; margin-bottom: 26px; }
.work__hint { display: none; margin-top: 34px; align-items: center; gap: 12px; }
.work__hint .ln { width: 56px; height: 1px; background: var(--line-2); position: relative; overflow: hidden; }
.work__hint .ln::after { content: ""; position: absolute; inset: 0; background: var(--accent); animation: hint 1.8s var(--ease-io) infinite; }
@keyframes hint { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.work__progress { display: none; }

.wcard {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden;
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
  transform-style: preserve-3d; transition: border-color .4s;
}
.wcard:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.wcard__shine { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .5s; background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 14%, transparent), transparent 55%); }
.wcard:hover .wcard__shine { opacity: 1; }
.wcard__top { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.wcard__num { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.wcard__metric { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--accent); white-space: nowrap; }
.wcard__art { position: relative; aspect-ratio: 400 / 210; color: var(--accent); border-bottom: 1px solid var(--line); background:
  linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 25%,
  linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 10% 100%; }
.wcard__art svg { width: 100%; height: 100%; overflow: visible; }
.wcard__art .s { fill: none; stroke: currentColor; stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.wcard__art .s2 { fill: none; stroke: var(--ink-2); stroke-opacity: .45; stroke-width: 1; vector-effect: non-scaling-stroke; }
.wcard__art .f { fill: currentColor; }
.wcard__art .fb { fill: var(--bg-elev); stroke: currentColor; stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.wcard__art .flow { stroke-dasharray: 3 7; animation: flow 1.6s linear infinite; }
.wcard__art .t { font-family: var(--mono); font-size: 8.5px; letter-spacing: .1em; fill: var(--muted); text-transform: uppercase; }
.wcard__art .spin { transform-box: fill-box; transform-origin: 50% 50%; animation: spin 6s linear infinite; }
.wcard__art .blip { transform-box: fill-box; transform-origin: 50% 50%; animation: blip 2.4s var(--ease-out) infinite; }
@keyframes flow { to { stroke-dashoffset: -20; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blip { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(2.6); opacity: 0; } }
.wcard__body { display: flex; flex-direction: column; gap: 12px; padding: 22px 20px 20px; flex: 1; }
.wcard__title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 2.5vw, 42px); line-height: 1; letter-spacing: -.015em; }
.wcard__desc { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.tag-chip { padding: 5px 9px; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.work__outro { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 32px 0; }
.work__outro p { font-family: var(--serif); font-size: clamp(34px, 3.4vw, 60px); line-height: 1; letter-spacing: -.02em; max-width: 12ch; }
.work__outro p em { color: var(--accent); }

/* vertical mode on wider screens (tablets, reduced motion): two-column grid */
@media (min-width: 760px) {
  html:not(.has-hscroll) .work__track { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  html:not(.has-hscroll) .work__intro, html:not(.has-hscroll) .work__outro { grid-column: 1 / -1; }
}

/* horizontal mode (added by JS on wide screens) */
.has-hscroll .work { padding-block: 0; }
.has-hscroll .work__pin { height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.has-hscroll .work__track { flex-direction: row; align-items: stretch; gap: clamp(16px, 1.8vw, 28px); width: max-content; max-width: none; margin: 0; padding-inline: var(--gutter) 12vw; }
.has-hscroll .work__intro { width: min(600px, 42vw); flex-shrink: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 3vw 0 0; }
.has-hscroll .work__hint { display: inline-flex; }
.has-hscroll .wcard { width: clamp(340px, 30vw, 480px); height: min(70vh, 620px); flex-shrink: 0; }
.has-hscroll .wcard__art { aspect-ratio: auto; flex: 0 0 44%; }
.has-hscroll .work__outro { width: min(460px, 34vw); flex-shrink: 0; padding: 0 0 0 3vw; }
.has-hscroll .work__progress { position: absolute; left: 0; right: 0; bottom: 26px; display: flex; align-items: center; gap: 16px; }
.work__bar { flex: 1; height: 1px; background: var(--line-2); position: relative; overflow: hidden; }
.work__bar i { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- experience ---------- */
.exp__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 96px); }
.exp__aside { position: sticky; top: calc(var(--header-h) + 36px); align-self: start; }
.odo {
  display: flex; align-items: flex-start; height: 1em; overflow: hidden; font-family: var(--serif); font-size: clamp(96px, 14.5vw, 260px);
  line-height: 1; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1px var(--line-2);
  font-variant-numeric: tabular-nums;
}
.odo__d { display: flex; flex-direction: column; }
.odo__d span { display: block; height: 1em; }
.odo__d:last-child { color: color-mix(in srgb, var(--accent) 90%, transparent); -webkit-text-stroke: 0; }
.exp__now { margin-top: 18px; display: flex; gap: 10px; align-items: center; }
.exp__now b { color: var(--accent); font-weight: 500; }
.exp__tl { position: relative; padding-left: 34px; }
.exp__list { position: relative; list-style: none; margin: 0; padding: 0; }
.exp__track, .exp__fill { position: absolute; left: 4px; top: 10px; bottom: 0; width: 1px; }
.exp__track { background: var(--line-2); }
.exp__fill { background: var(--accent); transform-origin: 50% 0; transform: scaleY(0); box-shadow: 0 0 12px var(--accent); }
.role { position: relative; padding-bottom: clamp(52px, 7vw, 100px); }
.role:last-child { padding-bottom: 0; }
.role__dot {
  position: absolute; left: -34px; top: 8px; width: 9px; height: 9px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--bg); transition: background .4s, border-color .4s, box-shadow .6s var(--ease-out);
}
.role.is-active .role__dot, .role.is-past .role__dot { background: var(--accent); border-color: var(--accent); }
.role.is-active .role__dot { box-shadow: 0 0 0 7px var(--accent-soft); }
.role__period { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.role__period .cur { color: var(--ok); }
.role__title { margin: 12px 0 6px; font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.4vw, 56px); line-height: 1; letter-spacing: -.018em; }
.role__co { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.role__bullets { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 9px; }
.role__bullets li { position: relative; padding-left: 24px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.role__bullets li::before { content: "→"; position: absolute; left: 0; top: 0; color: var(--accent); font-family: var(--mono); font-size: 13px; }

/* ---------- stack ---------- */
.stack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-2); border-left: 1px solid var(--line-2); }
.scell { position: relative; padding: clamp(22px, 2.4vw, 36px); min-height: 250px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); overflow: hidden; isolation: isolate; }
.scell::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .5s; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), var(--accent-soft), transparent 62%); }
.scell:hover::before { opacity: 1; }
.scell__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.scell__name { font-family: var(--serif); font-style: italic; font-size: clamp(26px, 2.2vw, 36px); line-height: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 10px; border: 1px solid var(--line-2); border-radius: var(--radius);
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-2);
  transition: color .25s, background .25s, border-color .25s, transform .4s var(--ease-out);
}
.chip:hover { color: var(--on-accent); background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

/* ---------- certs ---------- */
.certs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; perspective: 1400px; }
.cert {
  position: relative; display: flex; flex-direction: column; gap: 14px; min-height: 196px; padding: 22px 22px 20px;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; isolation: isolate;
  background: color-mix(in srgb, var(--surface) 70%, transparent); transform-style: preserve-3d;
  transition: border-color .4s;
}
.cert::after {
  content: ""; position: absolute; inset: -1px; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .5s;
  background:
    radial-gradient(300px circle at var(--px, 50%) var(--py, 50%), rgba(255, 255, 255, .14), transparent 55%),
    conic-gradient(from 210deg at var(--px, 50%) var(--py, 50%), transparent, color-mix(in srgb, var(--accent) 35%, transparent) 70deg, rgba(255, 210, 120, .22) 130deg, rgba(110, 255, 200, .16) 200deg, rgba(120, 150, 255, .2) 270deg, transparent 340deg);
  mix-blend-mode: overlay;
}
.cert:hover { border-color: var(--line-2); }
.cert:hover::after { opacity: 1; }
.cert__code { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--accent); }
.cert__name { font-family: var(--serif); font-size: clamp(22px, 1.75vw, 28px); line-height: 1.1; letter-spacing: -.008em; }
.cert__iss { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- contact ---------- */
.contact { position: relative; isolation: isolate; display: flex; flex-direction: column; }
.contact__stage {
  position: relative; isolation: isolate; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center; padding: calc(var(--header-h) + 10vh) 0 var(--s-900);
}
.contact__void { position: absolute; inset: 0; z-index: -1; display: none; width: 100%; height: 100%; }
/* with the black hole running: space fades in from the section above, the copy sits on a scrim */
.contact.has-void .contact__stage { background: linear-gradient(to bottom, transparent, #060606 14%, #060606 calc(100% - 64px), transparent); }
.contact.has-void .contact__void {
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, transparent 3%, #000 24%, #000 calc(100% - 96px), transparent);
  mask-image: linear-gradient(to bottom, transparent 3%, #000 24%, #000 calc(100% - 96px), transparent);
}
.contact.has-void .contact__big, .contact.has-void .sec-kicker { text-shadow: 0 2px 28px rgba(0, 0, 0, .7), 0 0 2px rgba(0, 0, 0, .45); }
.contact.has-void .contact__stage::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(6, 6, 6, .8) 0%, rgba(6, 6, 6, .45) 46%, transparent 72%);
}
/* in space the copy is light on dark, whatever the page theme */
:root[data-theme="light"] .contact.has-void .contact__stage {
  color-scheme: dark; color: var(--ink);
  --bg: #0a0a09; --bg-elev: #10100e; --surface: #141412; --surface-2: #1b1b18;
  --ink: #f3f1ea; --ink-2: #c9c6bb; --muted: #8a8779; --faint: #57554c;
  --line: rgba(243, 241, 234, 0.085); --line-2: rgba(243, 241, 234, 0.17);
  --accent: #ff6a3d; --accent-2: #ffb547; --hot: #ff3b3b; --ok: #8dffb9; --on-accent: #0b0b0a;
  --accent-soft: color-mix(in srgb, var(--accent) 13%, transparent);
}
:root[data-theme="light"][data-accent="acid"] .contact.has-void .contact__stage { --accent: #e7ff52; }
:root[data-theme="light"][data-accent="plasma"] .contact.has-void .contact__stage { --accent: #ff2e7e; }
:root[data-theme="light"][data-accent="phosphor"] .contact.has-void .contact__stage { --accent: #3dff9b; }
:root[data-theme="light"][data-accent="cyan"] .contact.has-void .contact__stage { --accent: #4ee9f5; }
.contact .sec-kicker { padding-top: 0; }
.contact__big { margin: 26px 0 0; font-family: var(--serif); font-weight: 400; font-size: clamp(60px, 13.2vw, 256px); line-height: .86; letter-spacing: -.032em; }
.contact__big em { color: var(--accent); }
.clinks { margin-top: clamp(40px, 8vh, 96px); border-top: 1px solid var(--line-2); }
.clink {
  position: relative; display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr) auto; align-items: center; gap: 20px;
  padding: 20px 4px; border-bottom: 1px solid var(--line-2); overflow: hidden; isolation: isolate;
  transition: color .5s var(--ease-out), padding .6s var(--ease-out);
}
.clink::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .6s var(--ease-out); }
.clink:hover, .clink:focus-visible { color: var(--on-accent); padding-inline: 20px; }
.clink:hover::before, .clink:focus-visible::before { transform: scaleY(1); }
.clink:hover .mono-label, .clink:focus-visible .mono-label { color: var(--on-accent); }
.clink__v { font-family: var(--serif); font-size: clamp(26px, 3.5vw, 56px); line-height: 1.05; letter-spacing: -.015em; overflow-wrap: anywhere; }
.clink__arr { font-size: clamp(20px, 2.2vw, 34px); transition: transform .6s var(--ease-out); }
.clink:hover .clink__arr { transform: translate(4px, -4px) rotate(0deg); }
.contact__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 26px; }

/* ---------- reel frame: brackets, scene, timecode ---------- */
.reel { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
/* the slate rolls in once the visitor starts scrolling; a soft letterbox keeps it legible over content */
.reel::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 64px; opacity: 0;
  background: linear-gradient(to top, color-mix(in srgb, var(--bg) 86%, transparent), transparent);
  transition: opacity .7s var(--ease-fluid);
}
.reel.is-rolling::before { opacity: 1; }
.reel__c { position: absolute; width: 18px; height: 18px; border: 0 solid var(--line-2); }
.reel__c--tl { left: 12px; top: 12px; border-left-width: 1px; border-top-width: 1px; }
.reel__c--tr { right: 12px; top: 12px; border-right-width: 1px; border-top-width: 1px; }
.reel__c--bl { left: 12px; bottom: 12px; border-left-width: 1px; border-bottom-width: 1px; }
.reel__c--br { right: 12px; bottom: 12px; border-right-width: 1px; border-bottom-width: 1px; }
.reel__bar {
  position: absolute; left: 40px; right: 40px; bottom: 14px;
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-200);
  color: var(--muted); font-variant-numeric: tabular-nums;
  opacity: 0; transform: translateY(8px); transition: opacity .7s var(--ease-fluid), transform .7s var(--ease-fluid);
}
.reel.is-rolling .reel__bar { opacity: 1; transform: none; }
.reel__l { display: inline-flex; align-items: center; gap: var(--s-200); }
.reel__rec { display: inline-flex; align-items: center; gap: var(--s-75); color: var(--hot); }
.reel__rec i { width: 6px; height: 6px; border-radius: 50%; background: var(--hot); box-shadow: 0 0 8px var(--hot); animation: blink 1.2s steps(2) infinite; }

/* ---------- receipts: the models I broke (static list; a pinned kinetic reel with JS) ---------- */
.receipts { position: relative; margin-bottom: var(--s-900); }
.receipts__stage { position: relative; }
.receipts__hud { display: flex; justify-content: space-between; gap: var(--s-200); padding-bottom: var(--s-200); color: var(--muted); font-variant-numeric: tabular-nums; }
.receipts__hud b { color: var(--accent); font-weight: 500; }
.receipts__list { list-style: none; margin: 0; padding-block: 0; }
.rc { display: grid; gap: var(--s-75); padding-block: var(--s-300); border-top: 1px solid var(--line); }
.rc__line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-100) var(--s-300); }
.rc__name { position: relative; display: inline-block; font-family: var(--serif); font-size: 48px; line-height: 1; letter-spacing: -.02em; }
.rc__name::after { /* the strike: drawn by the reel, already there in the static list */
  content: ""; position: absolute; left: -2%; right: -2%; top: 54%; height: max(2px, .055em); background: var(--hot);
  transform: scaleX(var(--strike, 1)) rotate(-2deg); transform-origin: 0 50%;
}
.rc__how { color: var(--ink-2); }
.rc__stamp {
  padding: var(--s-50) var(--s-100); border: 2px solid var(--hot); border-radius: 4px; color: var(--hot);
  font-family: var(--mono); font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  transform: rotate(-4deg);
}
.rc-final, .receipts__flash { display: none; }

.receipts.is-kinetic { margin-bottom: 0; }
.is-kinetic .receipts__stage {
  height: 100vh; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden;
  padding-block: calc(var(--header-h) + var(--s-300)) var(--s-900);
}
.is-kinetic .receipts__list, .is-kinetic .rc-final { grid-row: 2; grid-column: 1; }
.is-kinetic .receipts__list { position: relative; }
.is-kinetic .rc {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s-300); padding: 0 var(--gutter); border: 0; text-align: center;
}
.is-kinetic .rc__how { order: -1; opacity: 0; font-size: clamp(11px, .9vw, 14px); letter-spacing: .18em; }
.is-kinetic .rc__line { /* JS fits each name to the frame width; this is the fallback size */
  position: relative; display: inline-block; font-size: clamp(44px, 13vw, 232px); line-height: .92;
}
.is-kinetic .rc__name {
  font-size: 1em; line-height: inherit; letter-spacing: -.035em; white-space: nowrap;
  transform-origin: 50% 100%; opacity: 0; will-change: transform, filter;
}
.is-kinetic .rc__stamp { /* sized from the name, so it lands like a rubber stamp at any scale */
  position: absolute; right: 2%; bottom: -16%; padding: .35em .85em; border-width: clamp(2px, .11em, 4px); border-radius: .3em;
  font-size: max(12px, .12em); line-height: 1.1; white-space: nowrap;
  background: color-mix(in srgb, var(--bg) 40%, transparent);
  box-shadow: 0 0 40px -8px color-mix(in srgb, var(--hot) 70%, transparent); opacity: 0;
}
.is-kinetic .rc-final {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0;
  font-family: var(--serif); font-size: clamp(72px, 14vw, 240px); line-height: .9; letter-spacing: -.035em; pointer-events: none;
}
.rc-final__safe { position: relative; display: inline-block; opacity: 0; color: color-mix(in srgb, var(--ink) calc(100% - var(--dim, 0) * 72%), transparent); }
.rc-final__safe i { position: absolute; left: -6%; right: -6%; top: 56%; height: .07em; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
.rc-final__tested { display: inline-block; font-style: italic; color: var(--accent); opacity: 0; transform-origin: 50% 100%; }
.rc-final__tested b { font-weight: inherit; font-style: normal; color: var(--ink); }
.is-kinetic .receipts__flash { display: block; position: absolute; inset: 0; background: var(--hot); opacity: 0; mix-blend-mode: overlay; pointer-events: none; }

/* ---------- oscilloscope: the career ladder drawn as a square wave ---------- */
.scope { display: grid; gap: var(--s-200); }
.scope__screen {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 16px; background: #0b0906;
  border: 1px solid color-mix(in srgb, var(--phosphor, var(--accent)) 30%, transparent);
  box-shadow: inset 0 0 64px rgba(0, 0, 0, .85), 0 24px 64px -32px color-mix(in srgb, var(--phosphor, var(--accent)) 45%, transparent);
}
.scope__cv { position: absolute; inset: 0; width: 100%; height: 100%; }
.scope__readout { position: absolute; left: var(--s-300); top: var(--s-500); }
.scope .odo {
  font-size: 72px; color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--phosphor, var(--accent)) 70%, transparent);
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--phosphor, var(--accent)) 55%, transparent));
}
.scope .odo__d:last-child { color: var(--phosphor, var(--accent)); -webkit-text-stroke: 0; }
.scope__hud { position: absolute; left: var(--s-300); right: var(--s-300); display: flex; justify-content: space-between; color: color-mix(in srgb, var(--phosphor, var(--accent)) 80%, transparent); }
.scope__hud--t { top: var(--s-200); }
.scope__hud--b { bottom: var(--s-200); }

/* ---------- finale: the name rises out of the page ---------- */
.finale { position: relative; overflow: hidden; padding-top: .06em; text-align: center; font-size: 32vw; line-height: .8; background: var(--bg); }
.finale__glass { position: absolute; inset: 0; z-index: 1; display: none; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: darken; }
.finale.has-glass .finale__glass { display: block; }
:root[data-theme="light"] .finale__glass { mix-blend-mode: lighten; }
.finale__word { position: relative; display: inline-block; font-family: var(--serif); font-size: 1em; line-height: .8; letter-spacing: -.045em; color: var(--ink); white-space: nowrap; }
.finale__word i { font-style: normal; color: var(--accent); }

/* ---------- footer ---------- */
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-block: 26px 56px; border-top: 1px solid var(--line); }
.footer, .footer a { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.footer a:hover { color: var(--accent); }
.footer .grp { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ---------- cursor ---------- */
.cursor { display: none; }
.has-cursor .cursor { display: block; position: fixed; left: 0; top: 0; z-index: 9990; pointer-events: none; }
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor summary, .has-cursor label { cursor: none; }
.has-cursor textarea, .has-cursor input { cursor: text; }
.cursor__dot, .cursor__ring { position: fixed; left: 0; top: 0; will-change: transform; }
.cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--accent); }
.cursor__ring { width: 0; height: 0; }
.cursor__ring i {
  position: absolute; left: -20px; top: -20px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ink) 40%, transparent);
  display: grid; place-items: center; transition: transform .5s var(--ease-out), background-color .35s, border-color .35s, opacity .3s;
}
.cursor__label {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--on-accent); white-space: nowrap; opacity: 0; transition: opacity .25s;
}
.cursor.is-hover .cursor__ring i { transform: scale(1.55); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.cursor.has-label .cursor__ring i { transform: scale(2.3); border-color: var(--accent); background: var(--accent); }
.cursor.has-label .cursor__label { opacity: 1; }
.cursor.has-label .cursor__dot { opacity: 0; }
.cursor.is-text .cursor__ring i { transform: scale(.4); opacity: .4; }
.cursor.is-down .cursor__ring i { transform: scale(.8); }
.cursor.is-off { opacity: 0; }

/* ---------- command palette ---------- */
.palette { position: fixed; inset: 0; z-index: 3000; display: grid; justify-items: center; align-items: start; padding: 16vh 16px 16px; }
.palette[hidden] { display: none; }
.palette__scrim { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 62%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.palette__box {
  position: relative; width: min(640px, 100%); border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden;
  background: color-mix(in srgb, var(--bg-elev) 96%, transparent); box-shadow: var(--shadow);
}
.palette__in { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.palette__in span { font-family: var(--mono); color: var(--accent); }
.palette__in input { flex: 1; height: 56px; border: 0; background: none; color: var(--ink); font-family: var(--mono); font-size: 14px; outline: none; }
.palette__list { max-height: min(56vh, 460px); overflow: auto; padding: 8px; }
.palette__grp { padding: 10px 10px 6px; }
.palette__item {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; padding: 11px 12px; border-radius: 4px; text-align: left;
  font-size: 14px; color: var(--ink-2);
}
.palette__item kbd { font-size: 10px; }
.palette__item[aria-selected="true"] { background: var(--accent-soft); color: var(--ink); box-shadow: inset 2px 0 0 var(--accent); }
.palette__empty { padding: 18px 12px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.palette__foot { display: flex; gap: 18px; padding: 10px 16px; border-top: 1px solid var(--line); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 3500; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 11px 16px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--bg-elev); box-shadow: var(--shadow);
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--ink); max-width: calc(100vw - 32px);
  transition: opacity .4s var(--ease-out), transform .5s var(--ease-out);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast b { color: var(--accent); font-weight: 600; }

/* ---------- view-transition: theme wipe ---------- */
html.vt-theme::view-transition-old(root), html.vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.vt-theme::view-transition-new(root) { z-index: 2; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .hud__nav, .hud__cta { display: none; }
  .hud__menu { display: grid; }
  .certs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .sec-head { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .sec-kicker { padding-top: 0; }
  .signals .feed { grid-template-columns: minmax(0, 1fr); }
  .pg__grid { grid-template-columns: minmax(0, 1fr); }
  .pg__pane + .pg__pane { border-left: 0; border-top: 1px solid var(--line); }
  .pg__out { min-height: 220px; }
  .exp__grid { grid-template-columns: minmax(0, 1fr); }
  .exp__aside { position: relative; top: 0; margin-bottom: var(--s-400); }
  .pg__target { height: 200px; }
  .contact.has-void .contact__stage::after { background: linear-gradient(to bottom, transparent 16%, rgba(6, 6, 6, .66) 42%, rgba(6, 6, 6, .8)); }
  .scope .odo { font-size: 48px; }
  .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__foot { grid-template-columns: minmax(0, 1fr); }
  .method__grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-300); }
  .method__viz { order: -1; z-index: 2; top: calc(var(--header-h) + var(--s-75)); }
  .mviz { padding: var(--s-200); background: color-mix(in srgb, var(--bg) 96%, transparent); }
  .mstep { min-height: 72vh; align-items: flex-end; padding-bottom: 8vh; }
  .mstep__title { font-size: 36px; line-height: 40px; }
  .mstep__body { font-size: 16px; line-height: 24px; }
}
@media (max-width: 720px) {
  :root { --header-h: 76px; }
  .reel { display: none; }
  .is-kinetic .rc__stamp { right: 0; bottom: -62%; }
  .hud { padding-top: var(--s-200); }
  .tagline__text { font-size: 36px; line-height: 40px; }
  .hero__meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meta { padding: 12px 12px 12px 0; }
  .meta:nth-child(3) { padding-left: 0; border-left: 0; }
  .meta:nth-child(n+3) { border-top: 1px solid var(--line); }
  .meta + .meta:nth-child(2), .meta:nth-child(4) { padding-left: 12px; }
  .meta__v { font-size: 11px; white-space: normal; }
  .hero__body { padding-top: 5vh; }
  .hero__title { font-size: clamp(40px, 13.6vw, 96px); }
  .hero__stats { gap: 16px; }
  .cue-k { display: none; }
  .stack { grid-template-columns: minmax(0, 1fr); }
  .certs { grid-template-columns: minmax(0, 1fr); }
  .cert { min-height: 0; }
  .clink { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; }
  .clink .mono-label { grid-column: 1 / -1; }
  .gridlines i:nth-child(2), .gridlines i:nth-child(4) { display: none; }
  .pg__pane { padding: 16px; }
  .pg__bar { padding: 12px 16px; }
  .pg__stamp { top: 56px; right: 14px; }
  .footer { flex-direction: column; padding-bottom: 30px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .grain { animation: none; }
  .js .hero__title .line__in { transform: none !important; }
  .js .hero [data-hero-fade] { opacity: 1 !important; }
  .js [data-reveal], .js [data-stagger] > * { opacity: 1 !important; transform: none !important; filter: none !important; }
  .mv-attack path, .mv-scan { animation: none !important; }
}

/* ---------- SplitText masks: keep descenders + italic overhang visible ---------- */
.split-line-mask { padding: 0 .06em .14em 0; margin: 0 -.06em -.14em 0; }

/* ---------- alternate accents (⌘K → "Cycle accent colour") ---------- */
:root[data-accent="acid"] { --accent: #e7ff52; --on-accent: #0b0b0a; }
:root[data-accent="plasma"] { --accent: #ff2e7e; --on-accent: #0b0b0a; }
:root[data-accent="phosphor"] { --accent: #3dff9b; --on-accent: #0b0b0a; }
:root[data-accent="cyan"] { --accent: #4ee9f5; --on-accent: #0b0b0a; }
:root[data-theme="light"][data-accent="acid"] { --accent: #667800; --on-accent: #f7f4ec; }
:root[data-theme="light"][data-accent="plasma"] { --accent: #c8135a; --on-accent: #f7f4ec; }
:root[data-theme="light"][data-accent="phosphor"] { --accent: #0b8048; --on-accent: #f7f4ec; }
:root[data-theme="light"][data-accent="cyan"] { --accent: #0a7480; --on-accent: #f7f4ec; }

/* keep the headline crisp over bright ink (dark theme only) */
:root:not([data-theme="light"]) .hero__title { filter: drop-shadow(0 2px 24px rgba(10, 10, 9, 0.5)); }

/* ---------- build agents (build-swarm.js): the page builds itself on first visit ---------- */
.sw-ch { visibility: hidden; }
.sw-ch.on { visibility: visible; }
.sw-ch.del { display: none; }
.sw-ch.flash { color: var(--ok); -webkit-text-fill-color: var(--ok); }
.sw-pending .sw-ch:not(.on) { visibility: hidden; }
.sw-wd { opacity: 0; transition: opacity .22s ease-out; }
.sw-wd.on { opacity: 1; }
.hero__title em.sw-plain, .sec-title em.sw-plain { font-style: normal; color: inherit; -webkit-text-fill-color: inherit; }
.hero__title em:not(.sw-plain), .sec-title em:not(.sw-plain) { transition: none; }
.sw-host { position: relative; }
/* section layers span the screen and clip sideways (a cursor off the edge must not widen the page);
   the stage inside is shifted back so everything is placed in host coordinates */
.sw-layer { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 20; pointer-events: none; overflow-x: clip; overflow-y: visible; }
.sw-stage { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.sw-layer--page { width: 100%; overflow: hidden; z-index: 150; }
/* while text is split, screen readers read a hidden copy instead of single letters */
.sw-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.sw-ag { position: absolute; left: 0; top: 0; will-change: transform; }
.sw-ag__in { position: relative; animation: sw-bob 2.6s ease-in-out infinite alternate; }
@keyframes sw-bob { from { transform: translate(0, 0); } to { transform: translate(2px, -3px); } }
.sw-g { display: none; position: absolute; overflow: visible; max-width: none; max-height: none; flex: none; filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .55)); }
.sw-ag[data-g="arrow"] .sw-g--arrow, .sw-ag[data-g="dup"] .sw-g--arrow, .sw-ag[data-g="ibeam"] .sw-g--ibeam, .sw-ag[data-g="cross"] .sw-g--cross { display: block; }
.sw-ag[data-g="dup"] .sw-ag__in::after { content: "+"; position: absolute; left: 13px; top: 2px; width: 12px; height: 12px; border-radius: 3px; background: #fff; color: #0b0b0a; font: 700 11px/12px var(--mono); text-align: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.sw-ag--mini { opacity: .85; }
.sw-ag--mini .sw-ag__in { scale: .78; transform-origin: 0 0; }
/* cursor chat: a bubble hangs off the name tag; near the right edge both flip to the left of the cursor */
.sw-bubble {
  position: absolute; left: 12px; top: 37px; max-width: 240px; padding: 5px 9px 6px; border-radius: 3px 11px 11px 11px;
  background: var(--c); color: #0b0b0a; font: 500 12.5px/1.3 var(--sans, system-ui, sans-serif); letter-spacing: 0; text-transform: none; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .55);
  opacity: 0; transform: translateY(-4px) scale(.94); transform-origin: 0 0; transition: opacity .16s ease-out, transform .24s var(--ease-out);
}
.sw-ag.is-chat .sw-bubble { opacity: 1; transform: none; }
.sw-ag.sw-flip .sw-ag__tag { left: auto; right: 4px; }
.sw-ag.sw-flip .sw-bubble { left: auto; right: 4px; border-radius: 11px 3px 11px 11px; transform-origin: 100% 0; }
/* ⌥-duplicate: the ghost copy and the measured gap */
.sw-ghost { position: absolute; border: 1px solid #2f9bff; background: rgba(47, 155, 255, .1); box-shadow: 0 12px 32px -14px rgba(0, 0, 0, .55); }
.sw-gap { position: absolute; height: 1px; background: #f24822; }
.sw-gap::before, .sw-gap::after { content: ""; position: absolute; top: -4px; width: 1px; height: 9px; background: #f24822; }
.sw-gap::before { left: 0; } .sw-gap::after { right: 0; }
.sw-gap--v { width: 1px; }
.sw-gap--v::before, .sw-gap--v::after { top: auto; left: -4px; width: 9px; height: 1px; }
.sw-gap--v::before { top: 0; } .sw-gap--v::after { bottom: 0; }
.sw-gap span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -150%); padding: 2px 4px; border-radius: 3px; background: #f24822; color: #fff; font: 600 10px/1 var(--mono); letter-spacing: 0; white-space: nowrap; }
.sw-gap--v span { transform: translate(6px, -50%); }
.sw-g--arrow { left: -2px; top: -1.5px; } .sw-g--ibeam { left: -6px; top: -12px; } .sw-g--cross { left: -11px; top: -11px; }
.sw-ag__tag { position: absolute; left: 12px; top: 16px; padding: 2px 6px; border-radius: 4px; background: var(--c); color: #0b0b0a; font: 600 10.5px/1.35 var(--mono); letter-spacing: .02em; text-transform: none; white-space: nowrap; box-shadow: 0 2px 10px rgba(0, 0, 0, .45); }
.sw-caret { position: absolute; left: 0; top: 0; width: 2px; display: none; border-radius: 1px; }
.sw-seed { position: absolute; left: 0; top: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 18px var(--accent); }
.sw-sel { position: absolute; border: 1px solid #2f9bff; background: rgba(47, 155, 255, .07); }
.sw-sel i { position: absolute; width: 7px; height: 7px; background: #fff; border: 1px solid #2f9bff; }
.sw-sel i:nth-child(1) { left: -4px; top: -4px; } .sw-sel i:nth-child(2) { right: -4px; top: -4px; }
.sw-sel i:nth-child(3) { left: -4px; bottom: -4px; } .sw-sel i:nth-child(4) { right: -4px; bottom: -4px; }
.sw-sel__wh { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 7px); padding: 3px 5px; border-radius: 3px; background: #2f9bff; color: #fff; font: 600 10.5px/1 var(--mono); letter-spacing: 0; white-space: nowrap; }
.sw-hl { position: absolute; background: rgba(47, 155, 255, .34); border-radius: 2px; }
.sw-guard { position: absolute; border: 1.5px solid var(--ok); border-radius: 6px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 14%, transparent), 0 0 24px color-mix(in srgb, var(--ok) 25%, transparent); }
.sw-chip { position: absolute; padding: 4px 7px; border-radius: 4px; color: #0b0b0a; font: 600 10.5px/1 var(--mono); letter-spacing: .06em; white-space: nowrap; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .6); }
/* the trace pill: a dot per agent (the one talking grows), the latest action, and Skip */
.sw-trace {
  position: fixed; left: 50%; bottom: 46px; z-index: 160; max-width: calc(100vw - 24px);
  display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 13px; border-radius: 9999px;
  border: 1px solid var(--line-2); background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  font: 500 11px/1.4 var(--mono); letter-spacing: .03em; color: var(--ink-2);
  pointer-events: none; opacity: 0; visibility: hidden; transform: translate(-50%, 8px);
  transition: opacity .3s ease-out, transform .4s var(--ease-out), visibility 0s linear .4s;
}
.sw-trace.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .3s ease-out, transform .4s var(--ease-out), visibility 0s; }
.sw-trace__crew { display: flex; align-items: center; gap: 5px; flex: none; }
.sw-trace__crew i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); opacity: .45; transition: opacity .2s ease-out, transform .25s var(--ease-out); }
.sw-trace__crew i.is-active { opacity: 1; transform: scale(1.5); }
.sw-trace__msg { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-trace__msg.is-new { animation: sw-ln .26s var(--ease-out); }
.sw-trace b { color: var(--c); font-weight: 600; }
[data-theme="light"] .sw-trace b, [data-theme="light"] .sw-trace__crew i { filter: brightness(.62) saturate(1.4); }
.sw-trace__sep { color: var(--muted); margin: 0 .55em; }
@keyframes sw-ln { from { opacity: 0; transform: translateY(4px); } }
.sw-trace__skip {
  flex: none; min-height: 32px; padding: 0 13px; border: 0; border-radius: 9999px; cursor: pointer; pointer-events: auto;
  background: color-mix(in srgb, currentColor 13%, transparent); color: var(--ink); font: 600 11px/1 var(--mono); letter-spacing: .03em;
  transition: background-color .15s ease-out;
}
.sw-trace__skip:hover { background: color-mix(in srgb, currentColor 22%, transparent); }
.sw-trace__skip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (pointer: coarse) { .sw-trace__skip { min-height: 40px; padding: 0 16px; } }
/* the visitor's own cursor gets a tag while the crew works */
.sw-you { position: fixed; left: 0; top: 0; z-index: 161; pointer-events: none; opacity: 0; transition: opacity .25s ease-out; }
.sw-you.is-on.has-pos { opacity: 1; }
.sw-you span { position: absolute; left: 12px; top: 16px; padding: 2px 6px; border-radius: 4px; background: var(--ink); color: var(--bg); font: 600 10.5px/1.35 var(--mono); letter-spacing: .02em; white-space: nowrap; box-shadow: 0 2px 10px rgba(0, 0, 0, .45); }
.cue-credit { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); }
.cue-credit[hidden] { display: none; }
.cue-credit__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); flex: none; }
@media (max-width: 720px) { .sw-trace { bottom: 16px; } .cue-credit { letter-spacing: .08em; } }
@media (prefers-reduced-motion: reduce) { .sw-layer, .sw-trace, .sw-you { display: none; } }
