/* Zakir Siddiqui portfolio. Dark blueprint system; motion lives in site.js. */
:root {
  --bg: #05070a;
  --bg-2: #0a0e13;
  --bg-3: #10161d;
  --line: rgb(255 255 255 / .08);
  --line-2: rgb(255 255 255 / .14);
  --ink: #eef1f4;
  --muted: #8d97a3;
  --accent: #4cf0c8;
  --accent-ink: #04110d;
  --blue: #5b8fff;
  --amber: #ffb84d;
  --bp: #071a33;
  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;
  --gut: clamp(16px, 5vw, 80px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #05070a; } }
:root[data-theme="dark"] { --bg: #05070a; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.55; font-weight: 400;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 16px; }
.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--gut); }
.muted { color: var(--muted); }

.eyebrow { font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; color: var(--muted); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent); }
.hero__eyebrow::before { display: none; }
.h2 { font-size: clamp(36px, 5.4vw, 84px); line-height: .98; letter-spacing: -.035em; font-weight: 600; margin-top: 18px; text-wrap: balance; }
.sec-head { margin-bottom: clamp(40px, 6vw, 80px); max-width: 1000px; }

/* split words (site.js) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.w > span { display: inline-block; will-change: transform; }

/* buttons and links */
.btn {
  --h: 52px; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--h); padding: 0 26px; border-radius: 999px; font: 600 15.5px/1 var(--font); text-decoration: none;
  transition: background .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease); isolation: isolate; overflow: hidden; white-space: nowrap;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 0 rgb(76 240 200 / .5), 0 10px 40px -10px rgb(76 240 200 / .55); }
.btn--primary:hover { box-shadow: 0 0 0 6px rgb(76 240 200 / .14), 0 14px 50px -10px rgb(76 240 200 / .75); }
.btn--ghost { color: var(--ink); background: rgb(255 255 255 / .04); box-shadow: inset 0 0 0 1px var(--line-2); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: rgb(255 255 255 / .09); }
.btn--sm { --h: 42px; padding: 0 18px; font-size: 14px; }
.btn--xl { --h: 72px; padding: 0 44px; font-size: 19px; }
.link { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; font-weight: 500; text-decoration: none; position: relative; }
.link::after { content: "→"; transition: transform .35s var(--ease); }
.link::before { content: ""; position: absolute; left: 0; right: 1.4em; bottom: 4px; height: 1px; background: currentColor; transform: scaleX(.0); transform-origin: right; transition: transform .45s var(--ease); }
.link:hover::before { transform: scaleX(1); transform-origin: left; }
.link:hover::after { transform: translateX(4px); }

/* loader */
.loader { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: grid; place-items: center; }
html:not(.js) .loader { display: none; }
.loader__grid { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(circle at 50% 50%, #000 0, transparent 65%); }
.loader__inner { position: relative; width: min(420px, 80vw); }
.loader__label { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.loader__label .arrow { color: var(--accent); }
.loader__count { font-size: clamp(80px, 16vw, 160px); font-weight: 600; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; margin: 10px 0 18px; }
.loader__pct { color: var(--accent); font-size: .4em; vertical-align: top; margin-left: 6px; }
.loader__bar { height: 2px; background: var(--line); overflow: hidden; }
.loader__bar i { display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }

/* cursor, grain, progress */
.cursor { position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none; display: none; opacity: 0; transition: opacity .3s; }
.cursor.is-on { opacity: 1; }
@media (pointer: fine) { html.js .cursor { display: block; } }
.cursor__dot, .cursor__ring { position: fixed; left: 0; top: 0; border-radius: 50%; transform: translate(-50%, -50%); }
.cursor__dot { width: 6px; height: 6px; background: var(--accent); }
.cursor__ring { width: 38px; height: 38px; border: 1px solid rgb(76 240 200 / .5); display: grid; place-items: center; transition: width .35s var(--ease), height .35s var(--ease), background .35s, border-color .35s; }
.cursor.is-link .cursor__ring { width: 64px; height: 64px; background: rgb(76 240 200 / .1); border-color: var(--accent); }
.cursor.is-view .cursor__ring { width: 92px; height: 92px; background: var(--accent); border-color: var(--accent); }
.cursor__label { font: 600 12px var(--font); color: var(--accent-ink); opacity: 0; transition: opacity .2s; }
.cursor.is-view .cursor__label { opacity: 1; }
.grain { position: fixed; inset: -50%; z-index: 80; pointer-events: none; opacity: .055; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }
.progress { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 70; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--accent), var(--amber)); transform: scaleX(0); transform-origin: left; }

/* nav */
.nav { position: fixed; z-index: 60; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 24px; padding: 16px var(--gut); transition: transform .5s var(--ease), background .4s; }
.nav.is-scrolled { background: rgb(5 7 10 / .72); backdrop-filter: blur(14px) saturate(140%); box-shadow: 0 1px 0 var(--line); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; min-height: 44px; }
.nav__links { display: flex; gap: 4px; margin-left: auto; padding: 4px; border-radius: 999px; background: rgb(255 255 255 / .04); box-shadow: inset 0 0 0 1px var(--line); }
.nav__links a { padding: 0 16px; min-height: 36px; display: inline-flex; align-items: center; border-radius: 999px; text-decoration: none; font-size: 14.5px; color: var(--muted); transition: color .25s, background .25s; }
.nav__links a:hover, .nav__links a.is-current { color: var(--ink); background: rgb(255 255 255 / .07); }
.nav__menu-btn { display: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgb(255 255 255 / .06); color: var(--ink); position: relative; cursor: pointer; }
.nav__menu-btn span:not(.sr-only) { position: absolute; left: 13px; right: 13px; height: 1.5px; background: currentColor; transition: transform .35s var(--ease); }
.nav__menu-btn span:nth-child(1) { top: 18px; } .nav__menu-btn span:nth-child(2) { top: 25px; }
.nav__menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav__menu-btn[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }
.menu { position: fixed; inset: 0; z-index: 55; background: rgb(5 7 10 / .96); backdrop-filter: blur(10px); display: grid; align-content: center; padding: 0 var(--gut); }
.menu[hidden] { display: none; }
.menu nav { display: grid; gap: 4px; }
.menu a { font-size: clamp(36px, 11vw, 64px); font-weight: 600; letter-spacing: -.035em; text-decoration: none; line-height: 1.15; }
@media (max-width: 1180px) {
  .nav__links { display: none; }
  .nav > .btn { margin-left: auto; }
  .nav__menu-btn { display: block; }
}
@media (max-width: 420px) { .nav__brand span { display: none; } }

/* hero */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 600px; overflow: hidden; display: flex; align-items: flex-end; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__fallback { position: absolute; inset: 0; display: none; background: radial-gradient(60% 60% at 70% 40%, #12305a 0, transparent 60%), radial-gradient(40% 40% at 30% 70%, #0d3b33 0, transparent 70%), var(--bg); }
.no-webgl .hero__fallback { display: block; }
.hero__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgb(5 7 10 / .55) 0, transparent 22%, transparent 45%, rgb(5 7 10 / .9) 88%), radial-gradient(80% 60% at 10% 90%, rgb(5 7 10 / .8), transparent 70%); }
.hero__inner { position: relative; z-index: 2; padding-bottom: clamp(36px, 7vh, 80px); }
.hero__eyebrow { padding: 8px 14px; border-radius: 999px; background: rgb(255 255 255 / .05); box-shadow: inset 0 0 0 1px var(--line-2); backdrop-filter: blur(8px); color: var(--ink); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgb(76 240 200 / .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgb(76 240 200 / 0); } 100% { box-shadow: 0 0 0 0 rgb(76 240 200 / 0); } }
.hero__title { font-size: clamp(64px, 14.5vw, 232px); line-height: .84; letter-spacing: -.055em; font-weight: 700; margin: 22px 0 28px -0.04em; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero__title .line__in { display: inline-block; }
.line__in--outline { color: transparent; -webkit-text-stroke: 1.5px var(--ink); background: linear-gradient(90deg, var(--accent), var(--blue) 50%, var(--amber)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero__bottom { display: grid; grid-template-columns: 1fr minmax(0, 420px) auto; gap: 32px; align-items: end; }
.hero__role { font-size: clamp(20px, 2.2vw, 30px); letter-spacing: -.02em; font-weight: 500; line-height: 1.15; }
.hero__role-k { color: var(--muted); display: block; font-size: .62em; font-family: var(--mono); letter-spacing: 0; margin-bottom: 6px; }
.rotator { display: inline-block; height: 1.15em; overflow: hidden; vertical-align: top; }
.rotator__list { display: flex; flex-direction: column; }
.rotator__list span { height: 1.15em; color: var(--accent); }
.hero__lead { color: #c3cad2; font-size: 16px; }
.hero__lead strong { color: var(--ink); font-weight: 600; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hud { position: absolute; z-index: 2; font-family: var(--mono); font-size: 11px; color: rgb(238 241 244 / .55); display: grid; gap: 2px; pointer-events: none; }
.hud b { color: var(--accent); font-weight: 400; }
.hud--tl { top: 96px; left: var(--gut); }
.hud--br { top: 96px; right: var(--gut); text-align: right; }
.hero__caption { position: absolute; z-index: 2; inset: 0; display: grid; align-content: center; pointer-events: none; }
.hero__caption p { text-shadow: 0 6px 60px rgb(5 7 10 / .9), 0 2px 12px rgb(5 7 10 / .6); font-size: clamp(38px, 6.4vw, 104px); font-weight: 600; letter-spacing: -.045em; line-height: 1; opacity: 0; }
.hero__caption-b { text-align: right; margin-top: .2em; }
.hero__caption em { font-style: normal; color: var(--amber); }
.hero__caption-b em { color: var(--accent); }
@media (max-width: 1100px) { .hero__bottom { grid-template-columns: 1fr 1fr; } .hero__cta { grid-column: 1 / -1; } }
@media (max-width: 700px) {
  .hero__bottom { grid-template-columns: 1fr; gap: 20px; }
  .hero__lead { font-size: 15px; }
  .hero__cta .btn { flex: 1 1 auto; }
  .hud--br { display: none; }
  .hud--tl { top: 84px; }
  .hero__caption-b { text-align: left; }
}

/* stats */
.stats { padding: clamp(80px, 12vw, 160px) 0; border-bottom: 1px solid var(--line); }
.stats__grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.stats__grid li { padding: 36px 28px 36px 0; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.stats__grid li:not(:nth-child(3n + 1)) { padding-left: 28px; border-left: 1px solid var(--line); }
.stat__v { font-size: clamp(48px, 6.4vw, 104px); font-weight: 600; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, var(--ink) 30%, #7d8894); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__arrow { color: var(--accent); -webkit-text-fill-color: var(--accent); font-weight: 400; margin: 0 .06em; }
.stat__k { color: var(--muted); font-size: 15px; max-width: 26ch; }
@media (max-width: 860px) {
  .stats__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stat__v { font-size: clamp(34px, 10.5vw, 64px); }
  .stats__grid li, .stats__grid li:not(:nth-child(3n + 1)) { padding: 28px 16px 28px 0; border-left: 0; }
  .stats__grid li:nth-child(2n) { padding-left: 16px; border-left: 1px solid var(--line); }
}

/* story: blueprint */
.story { position: relative; }
.story__pin { position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-items: center; overflow: hidden; padding: 110px 0 60px; }
.story__bg { position: absolute; inset: 0; background:
  linear-gradient(rgb(91 143 255 / .07) 1px, transparent 1px) 0 0 / 24px 24px,
  linear-gradient(90deg, rgb(91 143 255 / .07) 1px, transparent 1px) 0 0 / 24px 24px,
  linear-gradient(rgb(91 143 255 / .12) 1px, transparent 1px) 0 0 / 120px 120px,
  linear-gradient(90deg, rgb(91 143 255 / .12) 1px, transparent 1px) 0 0 / 120px 120px,
  radial-gradient(70% 80% at 70% 50%, #0b2547, var(--bg) 75%); }
.story__grid { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 72px); align-items: center; }
.story__steps { position: relative; margin-top: 40px; min-height: 230px; }
.step { position: absolute; inset: 0 0 auto 0; opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.step.is-active { opacity: 1; transform: none; }
.step__n { font-family: var(--mono); font-size: 13px; color: var(--amber); }
.step h3 { font-size: clamp(24px, 2.4vw, 34px); letter-spacing: -.025em; font-weight: 600; margin: 10px 0 12px; line-height: 1.1; }
.step p { color: #b9c2cc; max-width: 44ch; }
.story__fig { margin: 0; position: relative; }
.bp { width: 100%; height: auto; color: #8db4ff; overflow: visible; }
.bp .d { stroke: currentColor; stroke-width: 1.6; stroke-linecap: butt; stroke-linejoin: round; }
.bp .dim { stroke: var(--amber); stroke-width: 1; }
.bp .axis { stroke-dasharray: 10 6 2 6; stroke-width: 1; opacity: .5; }
.bp .fill-hatch { color: #8db4ff; opacity: .7; }
.bp .t text { fill: #8db4ff; font: 12px var(--mono); }
.bp .ph3 .t text { fill: var(--amber); }
.bp .t--data text { fill: var(--accent); font-size: 11.5px; }
.bp .bars rect { transform-box: fill-box; transform-origin: bottom; }
.bp .trend { stroke: var(--accent); stroke-width: 2.2; }
.bp .nodes circle { fill: var(--bg); stroke: var(--accent); stroke-width: 2; }
.bp__cap { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; font: 12px var(--mono); color: var(--muted); border-top: 1px dashed rgb(141 180 255 / .3); padding-top: 10px; }
.bp__phase { color: var(--amber); }
@media (max-width: 900px) {
  .story__pin { padding: 90px 0 40px; align-items: start; }
  .story__grid { grid-template-columns: 1fr; gap: 8px; }
  .story__fig { order: -1; max-width: 520px; width: 100%; margin: 0 auto; }
  .story .h2 { font-size: clamp(30px, 8vw, 48px); margin-top: 10px; }
  .story__steps { margin-top: 18px; min-height: 190px; }
  .step p { font-size: 15.5px; }
}
@media (max-width: 900px) and (max-height: 760px) { .story__fig { max-width: 380px; } }

/* work cards */
.work { padding: clamp(100px, 14vw, 180px) 0; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; perspective: 1200px; }
.card { position: relative; padding: 28px; border-radius: 22px; background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; transform-style: preserve-3d; will-change: transform; }
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgb(76 240 200 / .12), transparent 45%); opacity: 0; transition: opacity .4s; }
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1px; background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 0%), rgb(76 240 200 / .6), transparent 60%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .4s; }
.card:hover::before, .card:hover::after { opacity: 1; }
.card__viz { height: 210px; margin: -4px -4px 28px; border-radius: 14px; background: #070a0e; box-shadow: inset 0 0 0 1px var(--line); position: relative; overflow: hidden; display: grid; align-content: center; padding: 18px; }
.card__viz svg { width: 100%; height: auto; max-height: 150px; }
.card__n { font: 12px var(--mono); color: var(--accent); }
.card h3 { font-size: clamp(26px, 2.6vw, 38px); letter-spacing: -.03em; font-weight: 600; margin: 8px 0 12px; line-height: 1.05; }
.card p { color: #aeb7c1; max-width: 52ch; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tags li { font: 12.5px var(--mono); padding: 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); color: #c6cdd5; }
.viz-code { position: absolute; left: 16px; right: 16px; bottom: 12px; font: 11.5px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viz-code b { color: var(--accent); font-weight: 400; } .viz-code i { color: var(--amber); font-style: normal; }
.va-grid line { stroke: var(--line); }
.va-bars rect { fill: rgb(91 143 255 / .35); transform-box: fill-box; transform-origin: bottom; animation: bar 3.6s var(--ease) infinite alternate; }
.va-bars rect:nth-child(2n) { animation-delay: -.6s; } .va-bars rect:nth-child(3n) { animation-delay: -1.3s; }
@keyframes bar { 0% { transform: scaleY(.55); } 100% { transform: scaleY(1); } }
.va-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 4s var(--ease) infinite; filter: drop-shadow(0 0 6px rgb(76 240 200 / .6)); }
@keyframes draw { 0% { stroke-dashoffset: 400; } 55%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -400; } }
.viz-science canvas { width: 100%; height: 100%; position: absolute; inset: 0; }
.vb-pipe { fill: none; stroke: rgb(91 143 255 / .45); stroke-width: 1.5; stroke-dasharray: 5 5; animation: dash 1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -10; } }
.vb-nodes rect { fill: #0d1520; stroke: rgb(91 143 255 / .6); }
.vb-labels text { fill: #c6d4ea; font: 11px var(--mono); text-anchor: middle; }
.vb-pkt { fill: var(--accent); filter: drop-shadow(0 0 5px var(--accent)); }
.term { border-radius: 10px; background: #0b1016; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; height: 100%; }
.term__bar { display: flex; gap: 6px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); font: 11px var(--mono); color: var(--muted); }
.term__bar i { width: 9px; height: 9px; border-radius: 50%; background: #2a323c; } .term__bar span { margin-left: 8px; }
.term__code { margin: 0; padding: 12px 14px; font: 12.5px/1.65 var(--mono); color: #c9d2dc; white-space: pre; }
.term__code .k { color: var(--accent); } .term__code .s { color: var(--amber); }
.term__code .caret { display: inline-block; width: 7px; height: 14px; background: var(--accent); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.viz-web { padding: 14px; align-content: stretch; }
@media (max-width: 820px) { .cards { grid-template-columns: 1fr; } .card { padding: 20px; } .card__viz { height: 180px; margin-bottom: 22px; } }

/* projects: horizontal */
.projects { position: relative; border-top: 1px solid var(--line); }
.projects__pin { height: 100vh; height: 100svh; display: flex; align-items: center; overflow: hidden; }
.projects__track { display: flex; gap: 24px; padding: 0 var(--gut); align-items: stretch; will-change: transform; }
.projects__intro { flex: 0 0 min(460px, 84vw); display: grid; align-content: center; gap: 18px; padding-right: 32px; }
.projects__intro .h2 { font-size: clamp(36px, 4.6vw, 72px); }
.proj { flex: 0 0 min(480px, 84vw); position: relative; display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: 22px; background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.proj::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgb(76 240 200 / .1), transparent 45%); opacity: 0; transition: opacity .4s; }
.proj:hover::before { opacity: 1; }
.proj__head { display: flex; justify-content: space-between; gap: 12px; font: 12px var(--mono); color: var(--muted); }
.proj__n { color: var(--accent); }
.proj h3 { font-size: clamp(26px, 2.4vw, 34px); letter-spacing: -.03em; font-weight: 600; line-height: 1.05; }
.proj p { color: #aeb7c1; font-size: 15.5px; }
.proj > .link { margin-top: auto; }
.proj__m { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding-top: 14px; border-top: 1px solid var(--line); }
.proj__m dt { font: 11px var(--mono); color: var(--muted); }
.proj__m dd { margin: 4px 0 0; font-size: 18px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.chart { border-radius: 14px; background: #070a0e; box-shadow: inset 0 0 0 1px var(--line); padding: 16px; min-height: 176px; display: grid; align-content: center; gap: 12px; }
.chart__t { font: 11.5px var(--mono); color: var(--muted); }
.chart__row { display: grid; grid-template-columns: 112px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.chart__row span { color: #aeb7c1; font: 11.5px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart__bar { height: 22px; border-radius: 5px; background: rgb(255 255 255 / .04); overflow: hidden; }
.chart__bar i { display: block; height: 100%; width: calc(var(--v) * 100%); border-radius: 5px; background: linear-gradient(90deg, rgb(91 143 255 / .35), rgb(91 143 255 / .7)); transform-origin: left; }
.chart__row.is-hi .chart__bar i { background: linear-gradient(90deg, rgb(76 240 200 / .4), var(--accent)); box-shadow: 0 0 20px rgb(76 240 200 / .4); }
.chart__row b { font: 500 13px var(--mono); min-width: 66px; text-align: right; font-variant-numeric: tabular-nums; }
.chart__row.is-hi b { color: var(--accent); }
.chart--star svg { width: 100%; height: auto; }
.star-l line { stroke: rgb(91 143 255 / .5); stroke-dasharray: 4 4; animation: dash 1s linear infinite; }
.star-n rect { fill: #0d1520; stroke: rgb(91 143 255 / .6); }
.star-n .star-fact { stroke: var(--accent); fill: rgb(76 240 200 / .08); }
.star-t text { fill: #c6d4ea; font: 10.5px var(--mono); text-anchor: middle; }
.chart--ring { grid-template-columns: 120px 1fr; align-items: center; gap: 20px; }
.chart--ring svg { width: 120px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgb(255 255 255 / .06); stroke-width: 10; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p, .954)); filter: drop-shadow(0 0 8px rgb(76 240 200 / .5)); }
.ring-v b { display: block; font-size: 44px; letter-spacing: -.04em; font-weight: 600; line-height: 1; }
.ring-v span { font: 11.5px var(--mono); color: var(--muted); }
.reduce .projects__pin, .no-pin .projects__pin { height: auto; overflow-x: auto; padding: 100px 0; scroll-snap-type: x mandatory; }
.reduce .proj, .no-pin .proj { scroll-snap-align: start; }
@media (max-width: 700px) { .proj { padding: 20px; } .chart__row { grid-template-columns: 92px 1fr auto; } .chart__row b { min-width: 56px; } }

/* experience */
.exp { padding: clamp(100px, 14vw, 180px) 0; border-top: 1px solid var(--line); }
.exp__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 120px); }
.exp__side { align-self: start; position: sticky; top: 110px; }
.ba { margin-top: 40px; display: grid; gap: 22px; }
.ba li { display: grid; gap: 6px; }
.ba__k { font-size: 15px; font-weight: 500; }
.ba__row { display: grid; grid-template-columns: 1fr 72px; gap: 12px; align-items: center; }
.ba__b { display: block; height: 8px; border-radius: 99px; background: #3a4552; width: calc(var(--w) * 100%); transform-origin: left; }
.ba__row--a .ba__b { background: var(--accent); box-shadow: 0 0 16px rgb(76 240 200 / .45); }
.ba__row em { font: normal 12.5px var(--mono); color: var(--muted); text-align: right; }
.ba__row--a em { color: var(--accent); }
.ba__legend { display: flex; gap: 20px; margin-top: 22px; font: 12px var(--mono); color: var(--muted); }
.ba__legend i { display: inline-block; width: 14px; height: 6px; border-radius: 9px; background: #3a4552; margin-right: 8px; vertical-align: 1px; } .ba__legend i.a { background: var(--accent); }
.tl { position: relative; padding-left: 40px; }
.tl__line { position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--line-2); }
.tl__line i { position: absolute; inset: 0; background: linear-gradient(var(--accent), var(--blue) 70%, var(--amber)); transform-origin: top; transform: scaleY(var(--p, 1)); }
.tl__item { position: relative; padding: 0 0 44px; }
.tl__item::before { content: ""; position: absolute; left: -40px; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px var(--accent); }
.tl__item--civil::before { box-shadow: inset 0 0 0 2px var(--amber); }
.tl__y { font: 12.5px var(--mono); color: var(--accent); }
.tl__item--civil .tl__y { color: var(--amber); }
.tl__item h3 { font-size: clamp(21px, 2vw, 28px); letter-spacing: -.025em; font-weight: 600; margin: 6px 0 6px; line-height: 1.15; }
.tl__item p { color: #aeb7c1; }
@media (max-width: 900px) { .exp__grid { grid-template-columns: 1fr; } .exp__side { position: static; } }

/* skills */
.skills { padding: clamp(100px, 14vw, 180px) 0; border-top: 1px solid var(--line); overflow: hidden; }
.marquee { display: grid; gap: 8px; margin-bottom: clamp(56px, 8vw, 100px); transform: rotate(-2deg); }
.marquee__row { display: flex; gap: 16px; width: max-content; animation: marq 40s linear infinite; }
.marquee__row--rev { animation-direction: reverse; }
.marquee__row span { font-size: clamp(44px, 7vw, 112px); font-weight: 600; letter-spacing: -.045em; line-height: 1.1; white-space: nowrap; padding-right: 16px; }
.marquee__row span:nth-child(odd) { color: transparent; -webkit-text-stroke: 1px rgb(238 241 244 / .35); }
.marquee__row span::after { content: "✦"; font-size: .4em; color: var(--accent); -webkit-text-stroke: 0; vertical-align: middle; margin-left: 32px; }
@keyframes marq { to { transform: translateX(-50%); } }
.lv { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 64px; }
.lv li { display: grid; grid-template-columns: 1fr 90px 130px; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.lv span { font-weight: 500; }
.lv em { font: normal 12.5px var(--mono); color: var(--muted); text-align: right; }
.lv__m { height: 6px; border-radius: 9px; background: rgb(255 255 255 / .07); position: relative; overflow: hidden; }
.lv__m::after { content: ""; position: absolute; inset: 0; width: calc(var(--l) / 3 * 100%); border-radius: 9px; background: linear-gradient(90deg, var(--blue), var(--accent)); transform: scaleX(var(--s, 1)); transform-origin: left; transition: transform 1.2s var(--ease); }
.lv__m[data-l="3"] { --l: 3; } .lv__m[data-l="2"] { --l: 2; } .lv__m[data-l="1"] { --l: 1; }
.edu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 72px; }
.edu > div { padding: 24px; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line); background: var(--bg-2); }
.edu__y { font: 12.5px var(--mono); color: var(--amber); }
.edu h3 { font-size: 21px; letter-spacing: -.02em; font-weight: 600; margin: 8px 0 6px; line-height: 1.2; }
.edu p { color: var(--muted); font-size: 15px; }
@media (max-width: 900px) { .lv { grid-template-columns: 1fr; } .edu { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .lv li { grid-template-columns: 1fr 64px; } .lv em { grid-column: 1 / -1; text-align: left; margin-top: -10px; } }

/* contact and footer */
.contact { padding: clamp(110px, 16vw, 220px) 0 clamp(60px, 8vw, 100px); border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.contact::before { content: ""; position: absolute; left: 50%; top: 30%; width: 900px; height: 900px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgb(76 240 200 / .12), transparent); pointer-events: none; }
.contact__h { position: relative; font-size: clamp(44px, 8.4vw, 148px); line-height: .94; letter-spacing: -.055em; font-weight: 600; margin: 24px 0 56px; max-width: 14ch; }
.contact__row { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 28px 40px; }
.contact__links { display: flex; gap: 28px; font-size: 18px; }
.foot { border-top: 1px solid var(--line); overflow: hidden; }
.foot__big { font-size: 21.5vw; line-height: .8; font-weight: 700; letter-spacing: -.06em; text-align: center; color: transparent; -webkit-text-stroke: 1px rgb(238 241 244 / .14); padding-top: 4vw; user-select: none; white-space: nowrap; }
.foot__big span { display: inline-block; background: linear-gradient(180deg, rgb(76 240 200 / .25), transparent 80%); -webkit-background-clip: text; background-clip: text; }
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding-top: 28px; padding-bottom: 28px; font: 12.5px var(--mono); color: var(--muted); }
@media (max-width: 600px) { .btn--xl { width: 100%; } }

/* reduced motion: everything visible, nothing pinned */
html.reduce *, html.reduce *::before, html.reduce *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
html.reduce .grain { display: none; }
html.reduce .va-line { stroke-dashoffset: 0; }
html.reduce .vb-pkt { display: none; }

/* back to top, motion switch */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 65; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 12px 30px -10px rgb(76 240 200 / .7); opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { transform: translateY(-2px); }
.is-exploring .to-top { display: none; }
.motion-toggle { appearance: none; border: 0; background: none; cursor: pointer; color: var(--muted); font: 12.5px var(--mono); min-height: 32px; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.motion-toggle:hover { color: var(--ink); }
.motion-note { position: fixed; left: 16px; bottom: 16px; z-index: 66; max-width: min(460px, calc(100% - 96px)); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; border-radius: 14px; background: rgb(10 14 19 / .95); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px var(--line-2), 0 20px 40px -20px #000; font-size: 14px; color: #c6cdd5; }
.motion-note[hidden] { display: none; }
.motion-note button { appearance: none; border: 0; cursor: pointer; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 600 13.5px var(--font); }
.motion-note .motion-note__x { background: transparent; color: var(--muted); padding: 0 8px; font-size: 20px; margin-left: auto; }
.reduce .story__steps { min-height: 0; display: grid; gap: 28px; }
.reduce .step { position: static; opacity: 1; transform: none; }
.reduce .hero__caption { display: none; }

/* ================= interactive parts ================= */
/* segmented buttons */
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgb(255 255 255 / .04); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg--wrap { flex-wrap: wrap; border-radius: 18px; }
.seg__b { appearance: none; border: 0; cursor: pointer; min-height: 40px; padding: 0 16px; border-radius: 999px; background: transparent; color: var(--muted); font: 500 14px var(--font); transition: background .3s var(--ease), color .3s var(--ease), box-shadow .3s; }
.seg__b:hover { color: var(--ink); background: rgb(255 255 255 / .06); }
.seg__b[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 24px -8px rgb(76 240 200 / .7); }
.seg--sm .seg__b { min-height: 34px; padding: 0 14px; font-size: 13px; }

/* hero controls and inspector */
.hero.is-dragging { cursor: grabbing; }
.hero__ctrl { position: absolute; z-index: 3; top: 92px; right: var(--gut); display: grid; justify-items: end; gap: 8px; }
.hero__ctrl .seg { background: rgb(5 7 10 / .55); backdrop-filter: blur(10px); }
.hero__hint { font: 11px var(--mono); color: rgb(238 241 244 / .6); }
.hud--br { top: 178px; }
.hero__tip { position: absolute; z-index: 4; left: 0; top: 0; pointer-events: none; display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: rgb(5 7 10 / .82); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgb(76 240 200 / .4), 0 12px 30px -10px #000; font: 11.5px var(--mono); color: var(--muted); white-space: nowrap; transition: transform .12s linear; }
.hero__tip[hidden] { display: none; }
.hero__tip b { color: var(--accent); font-weight: 500; font-size: 12.5px; }
.cursor.is-view .cursor__label { text-transform: lowercase; }
@media (pointer: coarse) { .hint-fine { display: none; } }
@media (max-width: 700px) { .hero__ctrl { top: 80px; } .hud--tl { display: none; } }

/* story phase buttons */
.story__nav { display: flex; gap: 8px; margin-top: 24px; }
.story__nav button { appearance: none; cursor: pointer; min-width: 52px; min-height: 40px; border-radius: 10px; border: 0; background: rgb(255 255 255 / .04); box-shadow: inset 0 0 0 1px rgb(141 180 255 / .25); color: #8db4ff; font: 12.5px var(--mono); transition: background .3s, color .3s, box-shadow .3s; }
.story__nav button:hover { background: rgb(141 180 255 / .1); }
.story__nav button[aria-pressed="true"] { background: var(--amber); color: #1a1205; box-shadow: none; }
.reduce .story__nav { display: none; }
@media (max-width: 900px) { .story__nav { margin-top: 8px; } .story__nav button { min-height: 34px; min-width: 44px; } }

/* neural card click */
.card.is-clickable { cursor: pointer; }
.card.is-clickable .card__viz::after { content: "click to fire"; position: absolute; right: 12px; top: 10px; font: 11px var(--mono); color: var(--muted); }

/* lab */
.lab { padding: clamp(100px, 14vw, 180px) 0; border-top: 1px solid var(--line); }
.lab__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; align-items: start; }
.panel { position: relative; padding: 24px; border-radius: 22px; background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 18px; }
.panel__head { display: flex; justify-content: space-between; gap: 12px; font: 12px var(--mono); color: var(--muted); }
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
.dots { display: grid; grid-template-columns: repeat(34, 1fr); gap: 4px; padding: 16px; border-radius: 14px; background: #070a0e; box-shadow: inset 0 0 0 1px var(--line); }
.dots i { aspect-ratio: 1; border-radius: 50%; background: rgb(255 255 255 / .08); transition: background .5s var(--ease) var(--d), box-shadow .5s var(--ease) var(--d), transform .5s var(--ease) var(--d); transform: scale(.7); }
.dots i.on { background: var(--accent); box-shadow: 0 0 8px rgb(76 240 200 / .6); transform: scale(1); }
.lab__m { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.lab__m > div { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: rgb(255 255 255 / .03); box-shadow: inset 0 0 0 1px var(--line); }
.lab__m > div > span { font: 11px var(--mono); color: var(--muted); }
.lab__m b { font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -.03em; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.lab__m b small { font-size: .55em; color: var(--muted); font-weight: 500; }
.lab__m > div:first-child b, .m-net { color: var(--accent); }
.lab__note { color: var(--muted); font-size: 14.5px; }
.lab__code { margin: 0; padding: 16px; border-radius: 12px; background: #070a0e; box-shadow: inset 0 0 0 1px var(--line); font: 13px/1.7 var(--mono); color: #c9d2dc; overflow-x: auto; }
.lab__code .k { color: var(--accent); }
.lab__run { justify-self: start; }
.lab__run:disabled { opacity: .6; cursor: progress; }
.run-ic { color: var(--accent); font-size: 11px; }
.cbars { display: grid; gap: 10px; }
.cbar { display: grid; grid-template-columns: 124px 1fr 58px; gap: 12px; align-items: center; min-height: 36px; padding: 0 8px; margin: 0 -8px; border-radius: 8px; cursor: pointer; transition: background .25s; }
.cbar:hover, .cbar.is-hi { background: rgb(255 255 255 / .05); }
.cbar span { font: 12.5px var(--mono); color: #c6cdd5; }
.cbar i { height: 14px; border-radius: 4px; background: linear-gradient(90deg, rgb(91 143 255 / .4), rgb(91 143 255 / .8)); width: calc(var(--v) / .427 * 100%); transform-origin: left; transition: transform 1.1s var(--ease); }
.cbar:first-child i, .cbar.is-hi i { background: linear-gradient(90deg, rgb(76 240 200 / .4), var(--accent)); }
.cbar.is-empty i { transform: scaleX(0); }
.cbar b { font: 500 13px var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.lab__status { font: 12px var(--mono); color: var(--muted); min-height: 2.6em; }
@media (max-width: 1000px) { .lab__grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .panel { padding: 18px; } .dots { grid-template-columns: repeat(22, 1fr); gap: 3px; padding: 12px; } .lab__m { grid-template-columns: 1fr 1fr; } .cbar { grid-template-columns: 104px 1fr 52px; } }

/* skills graph */
.graph { position: relative; height: clamp(440px, 52vw, 600px); margin-bottom: 64px; border-radius: 22px; background: radial-gradient(70% 70% at 50% 50%, #0b141d, var(--bg-2)); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.graph__cv { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.graph__ui { position: absolute; left: 16px; right: 16px; bottom: 16px; display: grid; justify-items: start; gap: 10px; pointer-events: none; }
.graph__ui .seg { pointer-events: auto; background: rgb(5 7 10 / .7); backdrop-filter: blur(8px); }
.graph__hint { font: 12px var(--mono); color: var(--muted); }
@media (max-width: 640px) { .graph { height: 560px; } .graph__ui .seg__b { min-height: 34px; padding: 0 12px; font-size: 13px; } }

/* terminal */
.query { padding: clamp(100px, 14vw, 180px) 0 0; border-top: 1px solid var(--line); }
.tty { border-radius: 18px; overflow: hidden; background: #070a0e; box-shadow: inset 0 0 0 1px var(--line-2), 0 40px 80px -40px rgb(76 240 200 / .25); }
.tty__bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); font: 12px var(--mono); color: var(--muted); }
.tty__bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; } .tty__bar i:nth-child(2) { background: #febc2e; } .tty__bar i:nth-child(3) { background: #28c840; }
.tty__bar span { margin-left: 10px; }
.tty__out { height: clamp(300px, 40vh, 420px); overflow: auto; padding: 18px 20px 6px; font: 13px/1.65 var(--mono); color: #c9d2dc; overscroll-behavior: contain; }
.tty__out:focus-visible { outline-offset: -3px; }
.tty__out > div { margin-bottom: 10px; }
.tty__out a { color: var(--accent); }
.tl-cmd { color: var(--ink); } .tl-cmd .p, .tty__prompt { color: var(--accent); }
.tl-err { color: #ff8a8a; } .tl-dim, .tl-dim b { color: var(--muted); } .tl-ok { color: var(--accent); }
.tl-pre { white-space: pre-wrap; }
.tl-txt b, .tl-pre b, .tl-dim b { color: var(--ink); font-weight: 500; }
.tl-table { overflow-x: auto; }
.tl-table table { border-collapse: collapse; min-width: 100%; font-size: 12.5px; }
.tl-table th, .tl-table td { text-align: left; padding: 5px 16px 5px 0; border-bottom: 1px dashed rgb(255 255 255 / .08); white-space: nowrap; }
.tl-table th { color: var(--amber); font-weight: 500; }
.tl-meta { color: var(--muted); margin-top: 4px; font-size: 12px; }
.tty__in { display: flex; align-items: center; gap: 10px; padding: 12px 16px 14px 20px; border-top: 1px solid var(--line); }
.tty__prompt { font: 13px var(--mono); }
.tty__in input { flex: 1; min-width: 0; min-height: 36px; background: transparent; border: 0; color: var(--ink); font: 14px var(--mono); caret-color: var(--accent); }
.tty__in input:focus { outline: none; }
.tty__in:focus-within { box-shadow: inset 0 2px 0 var(--accent); }
.tty__go { appearance: none; border: 0; cursor: pointer; width: 40px; height: 36px; border-radius: 8px; background: rgb(76 240 200 / .12); color: var(--accent); font-size: 16px; }
.tty__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tty__chips button { appearance: none; border: 0; cursor: pointer; min-height: 36px; padding: 0 14px; border-radius: 999px; background: rgb(255 255 255 / .04); box-shadow: inset 0 0 0 1px var(--line-2); color: #c6cdd5; font: 12.5px var(--mono); transition: background .25s, color .25s; }
.tty__chips button:hover { background: rgb(76 240 200 / .1); color: var(--accent); }

/* ================= survey mode ================= */
.btn--survey { --h: 40px; color: #1a1205; background: var(--amber); box-shadow: 0 10px 30px -10px rgb(255 184 77 / .7); gap: 8px; pointer-events: auto; }
.btn--survey:hover { box-shadow: 0 0 0 5px rgb(255 184 77 / .18), 0 12px 36px -10px rgb(255 184 77 / .8); }
.is-exploring .nav { transform: translateY(-110%); }
.is-exploring .hero__inner, .is-exploring .hud, .is-exploring .hero__caption, .is-exploring .hero__ctrl, .is-exploring .hero__tip, .is-exploring .progress { opacity: 0 !important; visibility: hidden; }
.is-exploring .hero__shade { opacity: .45; }
.is-exploring .cursor { display: none !important; }
.survey { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.survey[hidden] { display: none; }
.survey > * { pointer-events: auto; }
.survey__top { position: absolute; left: var(--gut); right: var(--gut); top: 20px; display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap; }
.survey__title { font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.survey__title span { color: var(--muted); font-weight: 400; }
.survey__count { margin-left: auto; font: 13px var(--mono); color: var(--muted); padding: 8px 14px; border-radius: 999px; background: rgb(5 7 10 / .7); box-shadow: inset 0 0 0 1px var(--line-2); }
.survey__count b { color: var(--accent); font-weight: 500; font-size: 15px; }
.survey__exit { appearance: none; border: 0; cursor: pointer; min-height: 40px; padding: 0 14px; border-radius: 999px; background: rgb(255 255 255 / .08); color: var(--ink); font: 500 14px var(--font); display: inline-flex; align-items: center; gap: 8px; }
.survey__exit:hover { background: rgb(255 255 255 / .14); }
kbd { font: 11px var(--mono); padding: 2px 6px; border-radius: 5px; background: rgb(255 255 255 / .1); box-shadow: inset 0 -1px 0 rgb(255 255 255 / .12); color: var(--ink); }
.survey__labels { position: absolute; inset: 0; pointer-events: none; }
.lm { position: absolute; left: 0; top: 0; white-space: nowrap; font: 12px var(--mono); color: var(--ink); padding: 6px 10px; border-radius: 8px; background: rgb(5 7 10 / .72); box-shadow: inset 0 0 0 1px rgb(76 240 200 / .35); transition: opacity .2s, background .3s, box-shadow .3s; }
.lm b { color: var(--accent); font-weight: 500; }
.lm em { font-style: normal; color: var(--muted); }
.lm.is-seen { box-shadow: inset 0 0 0 1px rgb(255 184 77 / .5); }
.lm.is-seen b::after { content: " ✓"; color: var(--amber); }
.lm.is-near { background: var(--accent); color: var(--accent-ink); }
.lm.is-near b, .lm.is-near em { color: var(--accent-ink); }
.survey__keys { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); font: 12px var(--mono); color: var(--muted); display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.survey__clock { position: absolute; left: var(--gut); bottom: 22px; font: 11px var(--mono); color: rgb(238 241 244 / .45); }
.survey__card { position: absolute; right: var(--gut); top: 84px; width: min(340px, calc(100% - 32px)); padding: 20px; border-radius: 18px; background: rgb(8 12 16 / .9); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px rgb(76 240 200 / .45), 0 30px 60px -30px #000; display: grid; gap: 10px; animation: cardIn .45s var(--ease); }
.survey__card[hidden] { display: none; }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.sc__n { font: 11.5px var(--mono); color: var(--accent); }
.survey__card h3 { font-size: 26px; letter-spacing: -.03em; font-weight: 600; line-height: 1.05; }
.survey__card p { color: #aeb7c1; font-size: 14.5px; }
.survey__card dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.survey__card dt { font: 10.5px var(--mono); color: var(--muted); }
.survey__card dd { margin: 3px 0 0; font-weight: 600; font-size: 17px; letter-spacing: -.02em; }
.survey__done { position: absolute; left: 50%; top: 76px; transform: translateX(-50%); padding: 12px 18px; border-radius: 999px; background: var(--amber); color: #1a1205; font-size: 14.5px; white-space: nowrap; box-shadow: 0 16px 40px -14px rgb(255 184 77 / .8); }
.survey__done[hidden] { display: none; }
.survey__done a { color: inherit; font-weight: 600; }
.joy { display: none; position: absolute; left: 24px; bottom: 28px; width: 128px; height: 128px; border-radius: 50%; background: rgb(5 7 10 / .55); box-shadow: inset 0 0 0 1px var(--line-2); touch-action: none; backdrop-filter: blur(6px); }
.joy i { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 24px rgb(76 240 200 / .6); }
@media (pointer: coarse) { .joy { display: block; } .survey__keys { display: none; } .survey__clock { left: auto; right: var(--gut); } }
@media (max-width: 700px) {
  .survey__title span { display: none; }
  .survey__top { top: 14px; gap: 10px; }
  .survey__card { top: auto; bottom: 176px; right: 16px; left: 16px; width: auto; padding: 16px; }
  .survey__card h3 { font-size: 22px; }
  .survey__done { top: 64px; white-space: normal; width: calc(100% - 32px); border-radius: 16px; text-align: center; }
  .hero__ctrl .btn--survey { --h: 38px; }
}
.lm.is-edge { font-size: 11px; padding: 4px 8px; }
/* the game is a daylight town: give the HUD solid chips so it reads over a bright sky */
.survey__title, .survey__keys, .survey__clock { padding: 8px 14px; border-radius: 999px; background: rgb(5 7 10 / .72); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px var(--line-2); }
.survey__clock { color: #c6cdd5; }
.survey__exit { background: rgb(5 7 10 / .72); box-shadow: inset 0 0 0 1px var(--line-2); }
.survey__exit:hover { background: rgb(5 7 10 / .9); }
.lm { background: rgb(5 7 10 / .82); }
.lm.is-near { background: var(--accent); }
@media (pointer: coarse) { .survey__clock { display: none; } }

/* ================= agentic AI ================= */
.agents { padding: clamp(100px, 14vw, 180px) 0; border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.agents::before { content: ""; position: absolute; right: -200px; top: 10%; width: 800px; height: 800px; background: radial-gradient(closest-side, rgb(127 212 255 / .08), transparent); pointer-events: none; }
.agents__grid { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.agents__lead { font-size: clamp(18px, 1.5vw, 21px); color: #c3cad2; line-height: 1.5; }
.caps { margin-top: 32px; display: grid; }
.caps li { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.caps li:last-child { border-bottom: 1px solid var(--line); }
.caps__i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgb(127 212 255 / .1); color: #7fd4ff; font-size: 18px; box-shadow: inset 0 0 0 1px rgb(127 212 255 / .25); }
.caps h3 { font-size: 18px; font-weight: 600; letter-spacing: -.015em; margin-bottom: 4px; }
.caps p { color: #aeb7c1; font-size: 15px; }
.agent { gap: 16px; }
.agent__graph { width: 100%; height: auto; overflow: visible; }
.ag-edges path { fill: none; stroke: rgb(127 212 255 / .25); stroke-width: 1.5; stroke-dasharray: 4 5; transition: stroke .3s; }
.ag-edges path.is-hot { stroke: var(--accent); stroke-dasharray: none; filter: drop-shadow(0 0 4px rgb(76 240 200 / .7)); }
.ag-nodes rect { fill: #0b1219; stroke: rgb(127 212 255 / .45); stroke-width: 1.3; transition: fill .3s, stroke .3s; }
.ag-nodes .tool rect { stroke: rgb(255 184 77 / .45); }
.ag-nodes text { fill: #d6dde5; font: 500 13px var(--mono); text-anchor: middle; transition: fill .3s; }
.ag-nodes text.sub { fill: var(--muted); font-size: 10px; font-weight: 400; }
.ag-nodes .is-on rect { fill: var(--accent); stroke: var(--accent); filter: drop-shadow(0 0 12px rgb(76 240 200 / .55)); }
.ag-nodes .is-on text { fill: var(--accent-ink); }
.ag-pkt { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
.agent__tasks { display: flex; flex-wrap: wrap; gap: 8px; }
.agent__tasks button { appearance: none; border: 0; cursor: pointer; text-align: left; min-height: 38px; padding: 8px 14px; border-radius: 12px; background: rgb(255 255 255 / .04); box-shadow: inset 0 0 0 1px var(--line-2); color: #d6dde5; font: 500 14px/1.3 var(--font); transition: background .25s, color .25s; }
.agent__tasks button:hover:not(:disabled) { background: rgb(76 240 200 / .1); color: var(--accent); }
.agent button:disabled { opacity: .5; cursor: progress; }
.agent__ask { display: flex; gap: 8px; }
.agent__ask input { flex: 1; min-width: 0; min-height: 42px; padding: 0 14px; border-radius: 12px; border: 0; background: #070a0e; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); font: 14px var(--font); }
.agent__ask input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--accent); }
.agent__trace { max-height: 230px; overflow: auto; display: grid; gap: 6px; padding: 0; font: 12.5px/1.5 var(--mono); overscroll-behavior: contain; }
.agent__trace:empty { display: none; }
.agent__trace li { display: grid; grid-template-columns: 74px 1fr; gap: 10px; animation: cardIn .35s var(--ease); }
.tr__k { font-size: 10.5px; letter-spacing: .04em; padding: 2px 6px; border-radius: 5px; height: fit-content; text-align: center; background: rgb(255 255 255 / .06); color: var(--muted); }
.tr__k--plan { color: #7fd4ff; background: rgb(127 212 255 / .1); }
.tr__k--act { color: var(--amber); background: rgb(255 184 77 / .1); }
.tr__k--observe { color: #c6cdd5; }
.tr__k--check, .tr__k--done { color: var(--accent); background: rgb(76 240 200 / .1); }
.tr__v { color: #c6cdd5; word-break: break-word; }
.tr__v code { color: var(--amber); font: inherit; }
.agent__answer { padding: 16px 18px; border-radius: 14px; background: rgb(76 240 200 / .07); box-shadow: inset 0 0 0 1px rgb(76 240 200 / .35); font-size: 15.5px; line-height: 1.55; animation: cardIn .45s var(--ease); }
.agent__answer[hidden] { display: none; }
.agent__answer b { color: var(--accent); font-weight: 600; }
.agent__answer .unsure { color: var(--amber); font-style: normal; }
.agent__note { font: 11.5px/1.5 var(--mono); color: var(--muted); }
@media (max-width: 1000px) { .agents__grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .agent__trace li { grid-template-columns: 64px 1fr; } .ag-nodes text { font-size: 15px; } .ag-nodes text.sub { display: none; } }
