/* ═══════════════════════════════════════════════════════════
   volobado.com — Systems & Meanings Engineer
   Design tokens → base → components → sections → responsive
   ═══════════════════════════════════════════════════════════ */

/* ── TOKENS ────────────────────────────────────────────── */
:root {
  /* surface */
  --bg:          #050506;
  --bg-2:        #0a0a0d;
  --bg-3:        #0d0d12;
  --line:        rgba(255,255,255,.09);
  --line-strong: rgba(255,255,255,.18);

  /* ink */
  --ink:         #f2f3f5;
  --ink-2:       #a8abb4;
  --ink-3:       #6b6f7a;

  /* signature duotone */
  --cyan:        #00e5ff;
  --magenta:     #ff2e97;
  --cyan-dim:    rgba(0,229,255,.14);
  --magenta-dim: rgba(255,46,151,.12);

  /* chapter accents */
  --hw:      #7dd3fc;
  --traffic: #00e5ff;
  --prod:    #ffb347;
  --ai:      #b388ff;
  --soft:    #ff2e97;

  /* type */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;

  /* scale */
  --step--1: clamp(.78rem, .76rem + .1vw, .86rem);
  --step-0:  clamp(.98rem, .94rem + .2vw, 1.09rem);
  --step-1:  clamp(1.2rem, 1.1rem + .5vw, 1.5rem);
  --step-2:  clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);
  --step-3:  clamp(2.2rem, 1.6rem + 3vw, 4rem);
  --step-4:  clamp(3rem, 1.8rem + 6vw, 8.5rem);

  /* layout */
  --gutter: clamp(1.25rem, 5vw, 6rem);
  --maxw:   1320px;
  --ease:   cubic-bezier(.22,1,.36,1);
}

/* ── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  background: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 300;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.is-loading { overflow: hidden; height: 100vh; }
body.menu-open { overflow: hidden; }

img, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; background: none; border: none; }
button { cursor: pointer; }
ul, ol { list-style: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: .95;
  letter-spacing: -.03em;
  color: var(--ink);
}
em { font-style: normal; color: var(--ink); }
.mono { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: .16em; text-transform: uppercase; }
.accent {
  background: linear-gradient(100deg, var(--cyan) 0%, #8ce9ff 38%, var(--magenta) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
::selection { background: var(--cyan); color: #001014; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── PRELOADER ─────────────────────────────────────────── */
.preloader {
  position: fixed; inset: 0; z-index: 9000;
  display: grid; place-items: center;
  background: var(--bg);
}
.preloader.is-done { pointer-events: none; }
.preloader__inner { width: min(560px, 82vw); }
.preloader__log {
  font-family: var(--font-mono);
  font-size: clamp(.66rem, 1.7vw, .8rem);
  line-height: 1.9;
  color: var(--ink-3);
  min-height: 11.4em;
  white-space: pre-wrap;
}
.preloader__log b { color: var(--cyan); font-weight: 400; }
.preloader__log i { color: var(--magenta); font-style: normal; }
.preloader__bar {
  height: 1px; margin: 1.6rem 0 .7rem;
  background: var(--line);
  overflow: hidden;
}
.preloader__bar span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  box-shadow: 0 0 14px var(--cyan);
}
.preloader__meta { display: flex; justify-content: space-between; color: var(--ink-3); }

/* ── CURSOR ────────────────────────────────────────────── */
.cursor { position: fixed; inset: 0; z-index: 8000; pointer-events: none; display: none; }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } body { cursor: none; } a, button { cursor: none; } }
.cursor__dot, .cursor__ring {
  position: absolute; top: 0; left: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor__dot { width: 5px; height: 5px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.cursor__ring {
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,.35);
  display: grid; place-items: center;
  transition: width .35s var(--ease), height .35s var(--ease), background-color .35s var(--ease), border-color .35s var(--ease);
}
.cursor__label {
  font-family: var(--font-mono); font-size: .55rem; letter-spacing: .12em;
  text-transform: uppercase; color: #04121a; opacity: 0;
  transition: opacity .25s;
}
.cursor.is-link .cursor__ring { width: 56px; height: 56px; border-color: var(--cyan); background: rgba(0,229,255,.1); }
.cursor.is-view .cursor__ring { width: 78px; height: 78px; border-color: transparent; background: var(--cyan); }
.cursor.is-view .cursor__label { opacity: 1; }
.cursor.is-view .cursor__dot { opacity: 0; }

/* ── GRAIN ─────────────────────────────────────────────── */
.grain {
  position: fixed; inset: -50%; z-index: 7000; pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 6s steps(6) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-4%,3%); }
  40% { transform: translate(3%,-4%); }
  60% { transform: translate(-3%,-3%); }
  80% { transform: translate(4%,2%); }
}

/* ── NAV ───────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 6000;
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem;
  padding: 1.15rem var(--gutter);
  transition: background-color .4s, backdrop-filter .4s, transform .5s var(--ease), padding .4s;
}
.nav.is-stuck {
  background: rgba(5,5,6,.72);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  padding-block: .8rem;
}
.nav.is-hidden { transform: translateY(-110%); }

.nav__logo { display: flex; align-items: center; gap: .7rem; }
.nav__logo-mark {
  font-family: var(--font-display); font-weight: 700; font-size: .82rem; letter-spacing: .04em;
  color: var(--bg);
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  padding: .35rem .45rem; border-radius: 5px;
}
.nav__logo-text { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .1em; color: var(--ink); }
.nav__logo-text em { color: var(--ink-3); }

.nav__links { display: flex; gap: 1.9rem; }
.nav__links a {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); display: flex; gap: .45rem; align-items: baseline;
  transition: color .3s;
  position: relative;
}
.nav__links a i { font-style: normal; color: var(--cyan); opacity: .45; font-size: .62rem; transition: opacity .3s; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
  background: var(--cyan); transition: width .35s var(--ease);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }
.nav__links a:hover i, .nav__links a.is-active i { opacity: 1; }
.nav__links a.is-active::after, .nav__links a:hover::after { width: 100%; }

.nav__side { display: flex; align-items: center; gap: 1.1rem; }
.nav__sound { display: flex; align-items: center; gap: .5rem; color: var(--ink-3); transition: color .3s; }
.nav__sound:hover { color: var(--ink); }
.nav__sound-bars { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.nav__sound-bars i { width: 2px; height: 3px; background: currentColor; transition: height .2s; }
.nav__sound[aria-pressed="true"] { color: var(--cyan); }
.nav__sound[aria-pressed="true"] .nav__sound-bars i { animation: eq .9s ease-in-out infinite; }
.nav__sound-bars i:nth-child(2) { animation-delay: .15s; }
.nav__sound-bars i:nth-child(3) { animation-delay: .3s; }
.nav__sound-bars i:nth-child(4) { animation-delay: .45s; }
@keyframes eq { 0%,100% { height: 3px; } 50% { height: 12px; } }
.nav__sound-label { font-size: .6rem; }

.nav__burger { display: none; flex-direction: column; gap: 6px; padding: 6px; }
.nav__burger i { display: block; width: 24px; height: 1.5px; background: var(--ink); transition: transform .35s var(--ease), opacity .3s; }
.nav__burger[aria-expanded="true"] i:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav__burger[aria-expanded="true"] i:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* ── PROGRESS ──────────────────────────────────────────── */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 6100; background: transparent; }
.progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  box-shadow: 0 0 12px rgba(0,229,255,.6);
}

/* ── BUTTONS ───────────────────────────────────────────── */
.btn {
  --pad: .85rem 1.7rem;
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: var(--pad);
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  border-radius: 100px; overflow: hidden; isolation: isolate;
  transition: color .35s, border-color .35s, box-shadow .45s;
  will-change: transform;
}
.btn span { position: relative; z-index: 2; }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  transform: translateY(101%);
  transition: transform .5s var(--ease);
}
.btn:hover::before { transform: translateY(0); }
.btn--solid {
  color: #03151b;
  background: linear-gradient(100deg, var(--cyan), #66eeff);
  box-shadow: 0 0 0 rgba(0,229,255,0);
}
.btn--solid::before { background: linear-gradient(100deg, var(--magenta), #ff7ac0); }
.btn--solid:hover { color: #1a0011; box-shadow: 0 10px 40px rgba(255,46,151,.28); }
.btn--ghost { color: var(--ink); border: 1px solid var(--line-strong); }
.btn--ghost::before { background: var(--ink); }
.btn--ghost:hover { color: var(--bg); border-color: var(--ink); }
.btn--full { width: 100%; }
.nav__cta { --pad: .6rem 1.15rem; font-size: .66rem; }

/* ── HERO ──────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding: 8rem var(--gutter) 5rem;
  overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__vignette {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5,5,6,.94) 0%, rgba(5,5,6,.82) 34%, rgba(5,5,6,.25) 52%, transparent 66%),
    radial-gradient(120% 80% at 72% 45%, transparent 30%, rgba(5,5,6,.7) 76%, var(--bg) 100%),
    linear-gradient(180deg, rgba(5,5,6,.9) 0%, transparent 22%, transparent 72%, var(--bg) 100%);
}
.hero__content { position: relative; z-index: 2; width: 100%; max-width: var(--maxw); margin-inline: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 1.8rem;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(0,229,255,.6); animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0,229,255,.55); }
  70% { box-shadow: 0 0 0 12px rgba(0,229,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,229,255,0); }
}

.hero__title { font-size: var(--step-4); letter-spacing: -.045em; margin-bottom: 1.4rem; }
.hero__role { color: var(--cyan); margin-bottom: 1.5rem; }
.hero__lede { max-width: 46ch; font-size: var(--step-1); font-weight: 300; line-height: 1.55; }
.hero__lede em { color: var(--ink); font-weight: 400; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.6rem; }

.hero__stats { display: flex; flex-wrap: wrap; gap: 2.6rem; margin-top: 3.6rem; }
.hero__stats li { display: flex; flex-direction: column; gap: .15rem; }
.hero__stats b {
  font-family: var(--font-display); font-size: 1.9rem; font-weight: 500; line-height: 1;
  color: var(--ink);
}
.hero__stats span {
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-3); max-width: 15ch;
}

.hero__scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: .7rem;
  color: var(--ink-3);
}
.hero__scroll .mono { font-size: .58rem; }
.hero__scroll i { display: block; width: 1px; height: 46px; background: linear-gradient(var(--cyan), transparent); }
.hero__morph-label {
  position: absolute; right: var(--gutter); bottom: 2.6rem; z-index: 2;
  color: var(--ink-3); font-size: .6rem;
}
.hero__morph-label::before { content: "▸ shape: "; color: var(--cyan); }

/* ── CHAPTER SHELL ─────────────────────────────────────── */
.chapter { position: relative; padding: clamp(6rem, 14vh, 11rem) 0; overflow: hidden; }
.chapter__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.chapter__inner { position: relative; z-index: 2; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.chapter__head { margin-bottom: 3.4rem; }
.chapter__num {
  display: inline-block; color: var(--cyan); margin-bottom: 1.2rem;
  padding-left: 2.4rem; position: relative;
}
.chapter__num::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 1.7rem; height: 1px; background: var(--cyan);
}
.chapter__title { font-size: var(--step-3); margin-bottom: 1.1rem; }
.chapter__kicker { font-size: var(--step-1); color: var(--ink-2); max-width: 40ch; font-weight: 300; }
.chapter__head--wide .chapter__kicker { max-width: 52ch; }

.chapter__body { max-width: 62ch; display: flex; flex-direction: column; gap: 1.3rem; }
.chapter__body--split {
  max-width: none; display: grid; gap: 3rem;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: start;
}
.chapter__body--split > div { display: flex; flex-direction: column; gap: 1.3rem; max-width: 60ch; }
.lead { font-size: var(--step-1); color: var(--ink); font-weight: 300; line-height: 1.55; }

.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.tags li {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-2);
  padding: .45rem .85rem;
  border: 1px solid var(--line); border-radius: 100px;
  background: rgba(255,255,255,.02);
  transition: border-color .3s, color .3s, background-color .3s;
}
.tags li:hover { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-dim); }

.timeline { margin-top: 1.6rem; border-top: 1px solid var(--line); }
.timeline li {
  display: grid; grid-template-columns: 9.5rem 1fr; gap: .2rem 1.4rem;
  padding: 1.1rem 0; border-bottom: 1px solid var(--line);
  transition: padding-left .35s var(--ease), background-color .35s;
}
.timeline li:hover { padding-left: .8rem; background: rgba(255,255,255,.02); }
.timeline span { color: var(--ink-3); font-size: .62rem; padding-top: .35em; }
.timeline b { font-family: var(--font-display); font-weight: 500; color: var(--ink); font-size: 1.02rem; }
.timeline i { grid-column: 2; font-style: normal; color: var(--ink-3); font-size: .86rem; }

.metrics { display: flex; flex-wrap: wrap; gap: 2.8rem; margin-top: 2.2rem; }
.metric { display: flex; flex-direction: column; gap: .2rem; }
.metric b {
  font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 500; line-height: 1;
  color: var(--cyan); text-shadow: 0 0 30px rgba(0,229,255,.35);
}
.metric span {
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); max-width: 18ch;
}

/* ── CH.01 · HARDWARE ──────────────────────────────────── */
.chapter--hw { background: linear-gradient(180deg, var(--bg) 0%, #060a0c 50%, var(--bg) 100%); }
/* PCB artwork — traces, pads and vias, only visible under the beam */
.hw__traces {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cg fill='none' stroke='%237dd3fc' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 40h60l24 24h72l24-24h80'/%3E%3Cpath d='M0 120h30l30-30v-50'/%3E%3Cpath d='M40 260v-60l40-40h60'/%3E%3Cpath d='M260 90h-50l-30 30v60l-26 26'/%3E%3Cpath d='M120 0v46l28 28h52'/%3E%3Cpath d='M200 260v-40l-40-40'/%3E%3Cpath d='M0 200h70l30 30v30'/%3E%3Cpath d='M180 130h80'/%3E%3C/g%3E%3Cg fill='%237dd3fc'%3E%3Ccircle cx='60' cy='40' r='4'/%3E%3Ccircle cx='156' cy='64' r='4'/%3E%3Ccircle cx='120' cy='46' r='3'/%3E%3Ccircle cx='180' cy='130' r='4.5'/%3E%3Ccircle cx='100' cy='230' r='4'/%3E%3Ccircle cx='140' cy='160' r='3.5'/%3E%3Ccircle cx='210' cy='90' r='3'/%3E%3C/g%3E%3Cg fill='none' stroke='%237dd3fc' stroke-width='1.2'%3E%3Crect x='196' y='176' width='44' height='30' rx='2'/%3E%3Crect x='16' y='84' width='34' height='22' rx='2'/%3E%3Ccircle cx='60' cy='40' r='8'/%3E%3Ccircle cx='180' cy='130' r='9'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 260px 260px;
  opacity: .5;
}
.hw__flashlight {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle 300px at var(--mx, 50%) var(--my, 50%),
      rgba(125,211,252,.05) 0%, transparent 40%),
    radial-gradient(circle 300px at var(--mx, 50%) var(--my, 50%),
      transparent 0%, rgba(5,5,6,.6) 48%, var(--bg) 74%);
}
.chapter--hw .chapter__inner { mix-blend-mode: normal; }

/* ── CH.02 · TRAFFIC ───────────────────────────────────── */
.chapter--traffic { background: linear-gradient(180deg, var(--bg) 0%, #04080c 55%, var(--bg) 100%); }
.traffic__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .8; }
.chapter--traffic .chapter__inner { max-width: var(--maxw); }
.chapter--traffic .chapter__body { background: linear-gradient(90deg, rgba(5,5,6,.86) 60%, transparent); padding-right: 2rem; }

/* ── CH.03 · PRODUCTION ────────────────────────────────── */
.chapter--prod { background: #060505; }
.prod__softbox { position: absolute; border-radius: 50%; filter: blur(70px); }
.prod__softbox--key {
  width: 46vw; height: 46vw; max-width: 720px; max-height: 720px;
  top: -8%; right: -6%;
  background: radial-gradient(circle, rgba(255,179,71,.30), transparent 68%);
  animation: breathe 7s ease-in-out infinite;
}
.prod__softbox--rim {
  width: 34vw; height: 34vw; max-width: 520px; max-height: 520px;
  bottom: -10%; left: -6%;
  background: radial-gradient(circle, rgba(0,229,255,.20), transparent 68%);
  animation: breathe 9s ease-in-out infinite reverse;
}
@keyframes breathe { 0%,100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.09); } }
.prod__letterbox {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.85) 0 4.5%, transparent 4.5% 95.5%, rgba(0,0,0,.85) 95.5% 100%);
}

.ticker { position: relative; z-index: 2; margin-top: 4.5rem; padding: 1.1rem 0; border-block: 1px solid var(--line); overflow: hidden; }
.ticker__track { display: flex; gap: 2.4rem; align-items: center; width: max-content; animation: ticker 26s linear infinite; }
.ticker__track span {
  font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.8rem); font-weight: 500;
  letter-spacing: -.02em; color: transparent; -webkit-text-stroke: 1px var(--ink-3);
}
.ticker__track i { color: var(--prod); font-style: normal; font-size: 1.4rem; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ── CH.04 · AI & TRUST ────────────────────────────────── */
.chapter--ai { background: linear-gradient(180deg, var(--bg) 0%, #08060e 50%, var(--bg) 100%); }
.ai__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }

.terminal {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: rgba(6,6,10,.86); backdrop-filter: blur(8px);
  box-shadow: 0 30px 90px rgba(0,0,0,.6), 0 0 0 1px rgba(179,136,255,.08);
}
.terminal__bar {
  display: flex; align-items: center; gap: .45rem;
  padding: .7rem .9rem; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.025);
}
.terminal__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); opacity: .5; }
.terminal__bar i:first-child { background: #ff5f57; opacity: .8; }
.terminal__bar i:nth-child(2) { background: #febc2e; opacity: .8; }
.terminal__bar i:nth-child(3) { background: #28c840; opacity: .8; }
.terminal__bar span { margin-left: auto; font-size: .58rem; color: var(--ink-3); letter-spacing: .1em; }
.terminal__body {
  font-family: var(--font-mono); font-size: clamp(.66rem, 1.4vw, .78rem); line-height: 1.95;
  padding: 1.1rem 1.2rem; min-height: 19em; color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word;
}
.terminal__body b { color: var(--ai); font-weight: 400; }
.terminal__body u { color: var(--cyan); text-decoration: none; }
.terminal__body s { color: #28c840; text-decoration: none; }
.terminal__body .caret { color: var(--cyan); animation: blink 1.05s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ── BUILD LOG ─────────────────────────────────────────── */
.work { position: relative; padding: clamp(6rem, 14vh, 11rem) 0; background: var(--bg-2); border-block: 1px solid var(--line); }
.work__grid {
  display: grid; gap: 1px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  background: var(--line);
  border: 1px solid var(--line);
}
.card {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; gap: .8rem;
  padding: 2rem 1.8rem 1.6rem;
  background: var(--bg-2);
  transition: background-color .45s var(--ease), transform .45s var(--ease);
  will-change: transform;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: radial-gradient(420px circle at var(--cx,50%) var(--cy,50%), rgba(0,229,255,.10), transparent 62%);
  transition: opacity .45s;
}
.card:hover { background: var(--bg-3); }
.card:hover::before { opacity: 1; }
.card::after {
  content: ""; position: absolute; left: 0; top: 0; width: 2px; height: 100%;
  background: linear-gradient(180deg, var(--cyan), var(--magenta));
  transform: scaleY(0); transform-origin: top;
  transition: transform .5s var(--ease);
}
.card:hover::after { transform: scaleY(1); }
.card--wide { grid-column: span 2; }
.card__top { display: flex; justify-content: space-between; align-items: center; }
.card__year { color: var(--ink-3); font-size: .6rem; }
.card__status {
  font-size: .56rem; padding: .25rem .6rem; border-radius: 100px;
  border: 1px solid var(--line-strong); color: var(--ink-3);
}
.card__status--live { color: #28c840; border-color: rgba(40,200,64,.35); background: rgba(40,200,64,.07); }
.card h3 { font-size: 1.4rem; letter-spacing: -.02em; }
.card p { font-size: .92rem; color: var(--ink-2); flex: 1; }
.card__tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.card__tags li {
  font-family: var(--font-mono); font-size: .58rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); padding: .22rem .55rem; border: 1px solid var(--line); border-radius: 4px;
}
.card__link {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em;
  color: var(--cyan); margin-top: .3rem;
  display: inline-flex; gap: .4rem; align-items: center; width: fit-content;
  border-bottom: 1px solid transparent; transition: border-color .3s, gap .3s;
}
.card__link:hover { border-color: var(--cyan); gap: .7rem; }

.card--cta { justify-content: center; background: var(--bg-3); }
.card--cta h3 { max-width: 18ch; }
.card--cta p { flex: none; max-width: 46ch; }
.card--cta:hover { background: #101018; }

/* ── SKILLS ────────────────────────────────────────────── */
.skills { position: relative; padding: clamp(6rem, 14vh, 10rem) 0 0; }
.skills__canvas { width: 100%; height: min(78vh, 720px); display: block; }
.skills__legend {
  display: flex; flex-wrap: wrap; gap: 1.4rem; justify-content: center;
  padding: 0 var(--gutter) 5rem; font-size: .62rem; color: var(--ink-3);
}
.skills__legend li { display: flex; align-items: center; gap: .45rem; }
.skills__legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.skills__fallback { text-align: center; padding: 2rem var(--gutter); }

/* ── CONTACT ───────────────────────────────────────────── */
.contact { position: relative; padding: clamp(6rem, 14vh, 11rem) 0; background: var(--bg-2); border-top: 1px solid var(--line); overflow: hidden; }
.contact__glow {
  position: absolute; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  left: 50%; top: 50%; transform: translate(-50%,-50%);
  background: radial-gradient(circle, rgba(0,229,255,.10), rgba(255,46,151,.05) 45%, transparent 68%);
  filter: blur(50px); pointer-events: none;
  transition: transform .6s var(--ease);
}
.contact__inner { display: grid; gap: 4rem; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); align-items: start; }
.contact__title { font-size: var(--step-3); margin: 0 0 1.3rem; }
.contact__lede { font-size: var(--step-1); font-weight: 300; max-width: 40ch; }

.contact__links { margin-top: 2.6rem; border-top: 1px solid var(--line); }
.contact__links li {
  display: grid; grid-template-columns: 7rem 1fr; align-items: baseline; gap: 1rem;
  padding: 1.05rem 0; border-bottom: 1px solid var(--line);
  transition: padding-left .35s var(--ease);
}
.contact__links li:hover { padding-left: .7rem; }
.contact__links span { color: var(--ink-3); font-size: .6rem; }
.contact__links a { color: var(--ink); font-size: 1.02rem; transition: color .3s; width: fit-content; }
.contact__links a:hover { color: var(--cyan); }
.contact__links a.is-static { pointer-events: none; color: var(--ink-2); }
.contact__links b { color: var(--cyan); font-weight: 400; }

.contact__form { display: flex; flex-direction: column; gap: 1.1rem; padding: 2.2rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.015); }
.hp { display: none !important; }
.field { position: relative; }
.field input, .field textarea {
  width: 100%; padding: 1.35rem .9rem .55rem;
  border: 1px solid var(--line); border-radius: 8px;
  background: rgba(0,0,0,.25); color: var(--ink);
  transition: border-color .3s, background-color .3s;
  resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--cyan); background: rgba(0,229,255,.04); outline: none; }
.field label {
  position: absolute; left: .95rem; top: .95rem;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; color: var(--ink-3);
  pointer-events: none; transition: transform .25s var(--ease), font-size .25s var(--ease), color .25s;
  transform-origin: left top;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  transform: translateY(-.62rem) scale(.78); color: var(--cyan);
}
.form__status { min-height: 1.4em; font-size: .62rem; color: var(--ink-3); }
.form__status.is-ok { color: #28c840; }
.form__status.is-err { color: var(--magenta); }

/* ── FOOTER ────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); background: var(--bg); }
.footer__inner {
  max-width: var(--maxw); margin-inline: auto; padding: 3rem var(--gutter);
  display: flex; flex-wrap: wrap; gap: 1.6rem; align-items: center; justify-content: space-between;
}
.footer__sign { font-size: .92rem; color: var(--ink-2); line-height: 1.7; }
.footer__sign em { color: var(--cyan); font-style: normal; }
.footer__meta { display: flex; flex-wrap: wrap; gap: .55rem; font-size: .6rem; color: var(--ink-3); }
.footer__top { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .14em; color: var(--ink-3); transition: color .3s; }
.footer__top:hover { color: var(--cyan); }

/* ── REVEAL BASE ───────────────────────────────────────── */
.reveal-up { opacity: 0; transform: translateY(28px); }
.no-js .reveal-up, .is-revealed { opacity: 1; transform: none; }
.split-line { display: block; overflow: hidden; }

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 1080px) {
  .chapter__body--split { grid-template-columns: 1fr; }
  .contact__inner { grid-template-columns: 1fr; gap: 3rem; }
  .work__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chapter--traffic .chapter__body { background: none; padding-right: 0; }
}

@media (max-width: 860px) {
  .nav__links {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; gap: 1.8rem;
    padding: 0 var(--gutter);
    background: rgba(5,5,6,.97); backdrop-filter: blur(20px);
    opacity: 0; pointer-events: none; transition: opacity .4s var(--ease);
  }
  .nav__links.is-open { opacity: 1; pointer-events: auto; }
  .nav__links a { font-size: 1.1rem; letter-spacing: .06em; }
  .nav__links a i { font-size: .8rem; }
  .nav__burger { display: flex; z-index: 2; }
  .nav__cta, .nav__sound-label { display: none; }
  .hero { padding-top: 7rem; }
  .hero__stats { gap: 1.6rem 2rem; }
  .hero__morph-label { display: none; }
  .timeline li { grid-template-columns: 1fr; }
  .timeline i, .timeline b { grid-column: 1; }
  .contact__links li { grid-template-columns: 1fr; gap: .3rem; }
  .contact__form { padding: 1.5rem; }
  .work__grid { grid-template-columns: 1fr; }
  .card--wide { grid-column: span 1; }
  .skills__canvas { height: 60vh; }
  .hero__scroll { display: none; }
}

@media (max-width: 520px) {
  .hero__actions .btn { flex: 1 1 100%; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

/* ── MOTION / DATA SAVING ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .grain, .prod__softbox, .ticker__track { animation: none !important; }
  .reveal-up { opacity: 1; transform: none; }
  .hero__canvas, .traffic__canvas, .ai__canvas { display: none; }
  .hero { background: radial-gradient(90% 70% at 70% 40%, rgba(0,229,255,.09), transparent 70%), var(--bg); }
}
body.is-lite .hero__canvas,
body.is-lite .traffic__canvas,
body.is-lite .ai__canvas { display: none; }
body.is-lite .hero { background: radial-gradient(90% 70% at 70% 40%, rgba(0,229,255,.10), rgba(255,46,151,.05) 55%, transparent 75%), var(--bg); }
body.is-lite .grain { display: none; }
