/* ============================================================
   Akshat Gada — personal portfolio ("Operator")
   Dark, cinematic. Polygon DNA (PolySans, #6700E5, cut-corner)
   reframed as a builder's console — the site is about HIM.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- DARK CINEMATIC PALETTE (overrides token defaults) ---------- */
:root {
  --bg:        #0A0910;
  --bg-2:      #110F18;
  --bg-3:      #16131F;
  --surface:   #1A1724;
  --line:      rgba(255,255,255,0.09);
  --line-2:    rgba(255,255,255,0.17);
  --fg:        #F4F2F8;
  --fg-muted:  #A6A2B6;
  --fg-faint:  #6E6A7E;
  --purple:        #6700E5;
  --purple-hover:  #7A1FFF;
  --purple-text:   #B794FF;   /* bright purple for text/links on dark (AA) */
  --purple-soft:   #CD9CEC;
  --green:     #3DDC84;
  --sky:       #34C6FF;

  --gutter: clamp(20px, 5.5vw, 88px);
  --section-y: clamp(84px, 12vw, 168px);
  --maxw: 1320px;
  --cham: 22px;            /* card chamfer */
  --cham-btn: 12px;
}

html { background: var(--bg); }
body { background: transparent; color: var(--fg); font-family: var(--font-body); }

/* site-wide ambient background (floating agents passing coins) */
.bgfx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
body { font-size: 18px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

::selection { background: var(--purple); color: #fff; }

/* ---------- film grain ---------- */
.grain {
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- scroll progress ---------- */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 201;
  background: var(--purple); transform: scaleX(0); transform-origin: 0 50%; }

/* ---------- skip link ---------- */
.skip-link { position: absolute; left: 50%; top: 10px; transform: translate(-50%,-160%); z-index: 300;
  background: #fff; color: #000; padding: 10px 18px; font-family: var(--font-mono); font-size: 13px;
  border-radius: 6px; transition: transform .2s var(--ease-out); }
.skip-link:focus { transform: translate(-50%,0); }

/* ============================================================ BUTTONS */
.btn { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 18px; padding: 15px 24px 15px 22px; white-space: nowrap;
  border-radius: 10px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cham-btn)), calc(100% - var(--cham-btn)) 100%, 0 100%);
  transition: background .18s var(--ease-std), color .18s var(--ease-std), box-shadow .18s var(--ease-std); }
.btn .tri { width: 0; height: 0; border-left: 6px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; flex-shrink: 0; }
.btn .tri.up { transform: rotate(-90deg); }
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-hover); }
.btn-ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--fg); }

/* ============================================================ NAV */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 150;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--gutter);
  background: linear-gradient(to bottom, rgba(10,9,16,0.86), rgba(10,9,16,0));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.brand { display: inline-flex; align-items: center; gap: 13px; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; background: var(--purple); color: #fff;
  font-family: var(--font-display); font-weight: 500; font-size: 15px; letter-spacing: -0.01em;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%); }
.brand-name { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.nav-menu { display: flex; align-items: center; gap: 30px; }
.nav-menu > a { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--fg-muted); transition: color .18s var(--ease-std); }
.nav-menu > a:hover { color: var(--fg); }
.nav-status { display: inline-flex; align-items: center; gap: 8px; color: var(--fg) !important;
  box-shadow: inset 0 0 0 1px var(--line-2); padding: 9px 15px; border-radius: 8px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(61,220,132,.55); animation: pulse 2.6s var(--ease-out) infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(61,220,132,.5);} 70%{box-shadow:0 0 0 7px rgba(61,220,132,0);} 100%{box-shadow:0 0 0 0 rgba(61,220,132,0);} }
.nav-toggle { display: none; }

/* ============================================================ HERO */
.hero { position: relative; min-height: 100svh; padding: 132px var(--gutter) 56px;
  display: flex; flex-direction: column; justify-content: center; overflow: clip; }
.hero-glow { position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60% 50% at 78% 12%, rgba(103,0,229,0.30), transparent 60%),
    radial-gradient(50% 40% at 10% 90%, rgba(103,0,229,0.12), transparent 60%);
  /* faint brand grid */
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 92%); }
.hero-spot { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(300px 300px at var(--mx, 50%) var(--my, 38%), rgba(123,31,255,0.22), transparent 70%);
  transition: opacity .45s var(--ease-out); }
.hero.spot-on .hero-spot { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 130px 130px; -webkit-mask-image: radial-gradient(80% 70% at 50% 40%, #000, transparent 80%); }
.hero > * { position: relative; z-index: 1; }

.hero-status { display: flex; align-items: center; gap: 16px; font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 22px; }
.hero-status .dim { color: var(--fg-faint); }

.hero-name { font-family: var(--font-display); font-weight: 300; margin: 0; color: var(--fg);
  font-size: clamp(50px, 12vw, 184px); line-height: 0.88; letter-spacing: -0.03em; }
.hero-name .scramble { display: block; }
.scramble .dud { color: var(--purple-text); }

.hero-cols { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(30px, 5vw, 72px);
  align-items: center; margin-top: clamp(26px, 4vw, 48px); }
.hero-thesis .lede { font-size: clamp(18px, 1.7vw, 23px); line-height: 1.5; color: var(--fg); margin: 0; max-width: 32ch; }
.hero-thesis .lede strong { color: var(--purple-text); font-weight: 500; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ---- SIGNATURE: terminal ---- */
.term { background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line); border-radius: 14px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%);
  padding: 0 0 12px; overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.term-dots { display: inline-flex; gap: 7px; }
.term-dots i { width: 10px; height: 10px; border-radius: 50%; background: #2e2a3a; }
.term-title { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.04em; color: var(--fg-faint); }
.term-body { font-family: var(--font-mono); font-size: 15px; line-height: 1.65; padding: 22px 24px 18px;
  height: clamp(220px, 32vh, 280px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.term-line, .term-out { animation: termIn .26s var(--ease-out) both; }
@keyframes termIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.term-line { margin-bottom: 4px; word-break: break-word; }
.term-prompt { color: var(--purple-text); }
.term-cmd { color: var(--fg); }
.term-out { color: var(--fg-muted); margin: 2px 0 16px; }
.term-out .ok { color: var(--green); } .term-out .warn { color: var(--purple-soft); } .term-out .key { color: var(--sky); } .term-out .dir { color: var(--fg-faint); }
.term-out a { color: var(--purple-text); text-decoration: underline; text-underline-offset: 3px; }
/* blinking caret on the line currently typing */
.term-cmd.caret::after, .term-out.caret::after { content: "▋"; color: var(--purple-text); margin-left: 1px; animation: termblink 1.05s steps(1) infinite; }
@keyframes termblink { 50% { opacity: 0; } }

.scroll-cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 1;
  width: 26px; height: 42px; border: 1px solid var(--line-2); border-radius: 13px; display: grid; place-items: start center; padding-top: 7px; }
.scroll-cue span { width: 3px; height: 8px; border-radius: 2px; background: var(--fg-muted); animation: cue 1.8s var(--ease-out) infinite; }
@keyframes cue { 0%{ transform: translateY(0); opacity: 0; } 30%{ opacity: 1; } 70%{ transform: translateY(12px); opacity: 0; } 100%{ opacity: 0; } }

/* ============================================================ SECTION HEAD */
.section-head { max-width: var(--maxw); margin: 0 auto clamp(40px, 5vw, 72px);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.section-title { font-family: var(--font-display); font-weight: 300; font-size: clamp(34px, 5vw, 76px);
  line-height: 0.98; letter-spacing: -0.024em; margin: 0; color: var(--fg); }
.section-note { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--fg-muted); margin: 0; max-width: 34ch; }

/* ============================================================ WORK */
.work { padding: var(--section-y) var(--gutter); border-top: 1px solid var(--line); }
.work-grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(28px, 4vw, 64px); align-items: start; }

.work-list { counter-reset: w; }
.work-item { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px;
  padding: 26px 6px; border-bottom: 1px solid var(--line); transition: opacity .3s var(--ease-std), padding-left .35s var(--ease-out); }
.work-list li:first-child .work-item { border-top: 1px solid var(--line); }
.work-index { font-family: var(--font-mono); font-size: 12px; color: var(--fg-faint); letter-spacing: 0.04em; }
.work-name { font-family: var(--font-display); font-weight: 300; font-size: clamp(26px, 3.4vw, 48px);
  line-height: 1; letter-spacing: -0.02em; color: var(--fg); transition: color .25s var(--ease-std), transform .35s var(--ease-out); }
.work-flag { justify-self: end; opacity: 0; transform: translateX(-8px); transition: opacity .25s var(--ease-out), transform .25s var(--ease-out); }
.work-flag .tri { width: 0; height: 0; border-left: 8px solid var(--purple-text); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.work-detail { display: none; }   /* desktop: shown in preview panel */

/* group dimming + active emphasis */
.work-list:hover .work-item { opacity: 0.42; }
.work-list .work-item:hover, .work-list .work-item:focus-visible, .work-item.is-active { opacity: 1 !important; }
.work-item:hover .work-name, .work-item.is-active .work-name { color: var(--fg); }
.work-item:hover { padding-left: 16px; }
.work-item:hover .work-flag, .work-item.is-active .work-flag { opacity: 1; transform: none; }

.work-preview { position: sticky; top: 96px; }
.wp-inner { background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--cham);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cham)), calc(100% - var(--cham)) 100%, 0 100%);
  padding: 30px; min-height: 340px; transition: transform .25s var(--ease-out); transform-style: preserve-3d; }
.wp-icon { width: 44px; height: 44px; margin-bottom: 26px; opacity: .9; }
.wp-meta { display: flex; gap: 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-faint); margin-bottom: 12px; }
.wp-name { font-family: var(--font-display); font-weight: 300; font-size: clamp(28px, 2.6vw, 40px); letter-spacing: -0.02em; margin: 0 0 16px; color: var(--fg); }
.wp-desc { font-size: 16px; line-height: 1.55; color: var(--fg-muted); margin: 0 0 22px; max-width: 42ch; }
.wp-tech { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 26px; }
.wp-tech li { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.03em; color: var(--fg-muted);
  padding: 5px 10px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line-2); }
.wp-open { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--purple-text); display: inline-flex; align-items: center; gap: 9px; }
.wp-open .tri { width: 0; height: 0; border-left: 6px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.wp-inner.swap { opacity: 0; transform: translateY(8px); }

/* ============================================================ FOCUS / flow */
.focus { padding: var(--section-y) var(--gutter); border-top: 1px solid var(--line); }
.econ-band { padding: clamp(8px, 2vw, 26px) var(--gutter) var(--section-y); }
.econ, .swarm { max-width: var(--maxw); margin: 0 auto; position: relative;
  background: radial-gradient(135% 120% at 50% 0%, #15121f 0%, #0b0a11 62%);
  box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--cham);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%);
  overflow: hidden; }
.econ-canvas, .swarm-canvas { display: block; width: 100%; height: clamp(380px, 50vw, 580px); }
.swarm-canvas { height: clamp(420px, 56vw, 640px); cursor: crosshair; }
.econ-cap { display: flex; align-items: baseline; justify-content: space-between; gap: 28px; flex-wrap: wrap; margin: 20px 2px 0; }
.econ-cap-line { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.55; letter-spacing: 0.01em; color: var(--fg-muted); max-width: 66ch; }
.econ-x402 { color: var(--purple-text); }
.econ-legend { display: inline-flex; gap: 20px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fg-faint); white-space: nowrap; }
.econ-legend span { display: inline-flex; align-items: center; gap: 8px; }
.econ-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.swarm-cite { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--fg-faint); white-space: nowrap; text-decoration: none; transition: color .2s var(--ease-std); }
.swarm-cite:hover, .swarm-cite:focus-visible { color: var(--purple-text); }
.swarm-cite .cite-arr { opacity: 0.7; }
.dot-agent { background: var(--purple-text); }
.dot-svc { box-shadow: inset 0 0 0 1.5px var(--fg-faint); }
.dot-fac { background: var(--purple); border-radius: 2px !important; }

/* ============================================================ MARQUEE */
.marquee-wrap { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 30px 0; overflow: hidden; }
.marquee { display: flex; gap: 0; width: max-content; animation: marq 32s linear infinite; }
.marquee-row { display: flex; align-items: center; gap: 0; }
.marquee-row li { font-family: var(--font-display); font-weight: 300; font-size: clamp(28px, 4vw, 60px); letter-spacing: -0.02em;
  color: var(--fg-faint); padding: 0 36px; display: inline-flex; align-items: center; }
.marquee-row li::after { content: "✳"; font-size: 0.4em; color: var(--purple-text); margin-left: 72px; }
@keyframes marq { to { transform: translateX(-50%); } }
.marquee-wrap:hover .marquee { animation-play-state: paused; }

/* ============================================================ EXPERIMENTS */
.experiments { padding: var(--section-y) var(--gutter); border-top: 1px solid var(--line); }
.exp-list { max-width: var(--maxw); margin: 0 auto; border-top: 1px solid var(--line); }
.exp { display: grid; grid-template-columns: 0.95fr 1.35fr; gap: clamp(16px, 4vw, 64px); align-items: baseline;
  padding: 24px 0; border-bottom: 1px solid var(--line); transition: padding-left .35s var(--ease-out); }
.exp:hover { padding-left: 12px; }
.exp-name { font-family: var(--font-display); font-weight: 400; font-size: clamp(20px, 2vw, 27px); letter-spacing: -0.01em; color: var(--fg); }
a.exp-name { display: inline-flex; align-items: center; gap: 10px; }
a.exp-name .tri { width: 0; height: 0; border-left: 7px solid var(--purple-text); border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.exp-desc { font-size: 15.5px; line-height: 1.55; color: var(--fg-muted); }
.exp-role { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--purple-text); margin-bottom: 6px; }
.count { color: var(--purple-text); font-variant-numeric: tabular-nums; }

/* ============================================================ ABOUT */
.about { padding: var(--section-y) var(--gutter); border-top: 1px solid var(--line); }
.about-grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.25fr 0.75fr; gap: clamp(48px, 8vw, 150px); align-items: center; }
.journey { width: min(100%, 520px); margin: 0; }
.journey-canvas { display: block; width: 100%; aspect-ratio: 1; background: #14111d;
  box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--cham); image-rendering: pixelated;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 42px), calc(100% - 42px) 100%, 0 100%);
  transition: transform .25s var(--ease-out); transform-style: preserve-3d; }
.journey-cap { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 18px 2px 0; min-height: 16px; }
.journey-dots { display: inline-flex; gap: 5px; flex-shrink: 0; }
.journey-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); display: inline-block; transition: background .3s var(--ease-std); }
.journey-dots i.on { background: var(--purple-text); }
.about-body { max-width: 46ch; justify-self: end; }
.about-body .section-title { margin-bottom: 26px; }
.about-body p { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.55; color: var(--fg); margin: 0 0 20px; }
.about-aside { color: var(--fg-muted) !important; }

/* ============================================================ CONTACT */
.contact { position: relative; padding: clamp(110px, 16vw, 220px) var(--gutter); border-top: 1px solid var(--line); overflow: clip; text-align: left; }
.contact-glow { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 70% at 30% 30%, rgba(103,0,229,0.34), transparent 62%); }
.contact > * { position: relative; }
.contact-title { font-family: var(--font-display); font-weight: 300; font-size: clamp(40px, 8vw, 118px);
  line-height: 0.94; letter-spacing: -0.03em; margin: 0; color: var(--fg); text-wrap: balance; }
.contact-sub { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; color: var(--fg-muted); margin: clamp(22px,2.5vw,34px) 0 0; max-width: 44ch; }
.contact-email { margin-top: clamp(30px, 3.5vw, 44px); }
.email-copy { display: inline-flex; align-items: center; gap: 18px; font-family: var(--font-mono);
  font-size: clamp(17px, 2.4vw, 30px); letter-spacing: -0.01em; color: var(--fg);
  padding: 14px 16px 14px 20px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line-2);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: box-shadow .18s var(--ease-std); }
.email-copy:hover { box-shadow: inset 0 0 0 1px var(--fg); }
.email-state { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-faint); padding: 6px 11px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line-2); white-space: nowrap; }
.email-copy.copied .email-state { color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(28px, 3vw, 40px); }

/* ============================================================ FOOTER */
.footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 30px var(--gutter); border-top: 1px solid var(--line); }
.footer-row { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.footer-name { font-family: var(--font-display); font-weight: 400; font-size: 18px; }
.footer-meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-faint); }
.footer-top { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-muted); display: inline-flex; align-items: center; gap: 9px; }
.footer-top:hover { color: var(--fg); }
.footer-top .tri { width: 0; height: 0; border-left: 6px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }

/* ============================================================ REVEAL (JS-gated) */
.reveal-ready .reveal { opacity: 0; transform: translateY(26px); }
.reveal-ready .reveal.in { opacity: 1; transform: none; transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal-ready .reveal[data-delay="1"].in { transition-delay: 90ms; }
.reveal-ready .reveal[data-delay="2"].in { transition-delay: 180ms; }
.reveal-ready .reveal[data-delay="3"].in { transition-delay: 270ms; }

/* hero name entrance (only when JS marks ready) */
.reveal-ready .hero-name .scramble { opacity: 0; transform: translateY(30px); }
.reveal-ready.loaded .hero-name .scramble { opacity: 1; transform: none; transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal-ready.loaded .hero-name .scramble:nth-child(2) { transition-delay: 90ms; }

/* ============================================================ FOCUS RING */
:focus-visible { outline: 2px solid var(--purple-text); outline-offset: 3px; border-radius: 3px; }

/* ============================================================ RESPONSIVE */
@media (max-width: 1040px) {
  .hero-cols { grid-template-columns: 1fr; align-items: start; gap: 36px; }
  .work-grid { grid-template-columns: 1fr; }
  .work-preview { display: none; }
  .work-detail { display: block; }
  .work-item { grid-template-columns: auto 1fr auto; align-items: start; }
  .work-name { padding-top: 0; }
  .work-detail { grid-column: 1 / -1; margin-top: 14px; padding-left: 38px; }
  .work-desc { display: block; font-size: 15.5px; line-height: 1.55; color: var(--fg-muted); max-width: 60ch; }
  .work-tech { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
  .work-tech i { font-family: var(--font-mono); font-style: normal; font-size: 11px; color: var(--fg-muted); padding: 4px 9px; box-shadow: inset 0 0 0 1px var(--line-2); border-radius: 6px; }
  .work-list:hover .work-item { opacity: 1; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .econ-canvas { height: clamp(360px, 64vw, 460px); }
  .swarm-canvas { height: clamp(380px, 78vw, 520px); }
}
@media (max-width: 640px) {
  .econ-cap { gap: 14px; }
  .exp { grid-template-columns: 1fr; gap: 7px; }
  .hero-name { font-size: clamp(48px, 17vw, 96px); }
  .work-item { grid-template-columns: auto 1fr auto; gap: 14px; }
  .work-detail { padding-left: 0; }
  /* mobile nav */
  .nav-toggle { display: inline-flex; flex-direction: column; gap: 5px; justify-content: center; width: 42px; height: 38px; }
  .nav-toggle span { display: block; width: 22px; height: 2px; background: var(--fg); transition: transform .25s var(--ease-out), opacity .15s; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .nav-menu { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 20px;
    padding: 24px var(--gutter) 30px; background: var(--bg-2); border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: transform .25s var(--ease-out), opacity .25s var(--ease-out); }
  .nav-menu.open { transform: none; opacity: 1; pointer-events: auto; }
}

/* ============================================================ REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-name .scramble { opacity: 1 !important; transform: none !important; }
  .marquee { animation: none; flex-wrap: wrap; }
  .scroll-cue span, .pulse { animation: none; }
  .manifesto-line .word { color: var(--fg) !important; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
