/* Arsh Kumar design system: tokens (from project/tokens.json) */
:root {
  color-scheme: dark;
  --paper: #12110f; --paper-raised: #1b1a17; --paper-sunk: #0b0a09;
  --ink: #ece8df; --ink-muted: #a39d91; --ink-faint: #6f6a61; --on-ink: #12110f;
  --rule: #2d2b27; --rule-strong: #6e695f;
  --oxide: #3ddc84; --oxide-ink: #6ee7a0; --oxide-soft: #12301e; --on-oxide: #12110f;
  --cobalt: #9aaaf0; --cobalt-soft: #1e2440; --on-cobalt: #12110f;
  --live: #6fcf97;
  --shadow-float: 0 12px 32px -12px rgba(0, 0, 0, .6);
  --font-display: "Instrument Serif", "Iowan Old Style", "Times New Roman", Georgia, serif;
  --font-sans: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px;
  --space-8: 32px; --space-12: 48px; --space-16: 64px; --space-24: 96px;
  --radius-xs: 2px; --radius-sm: 4px; --radius-pill: 999px;
  --size-content: 1120px; --size-measure: 64ch; --size-hairline: 1px; --size-focus: 2px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --paper: #f4f2ec; --paper-raised: #fbfaf7; --paper-sunk: #e9e6de;
  --ink: #191814; --ink-muted: #433f38; --ink-faint: #8b867c; --on-ink: #f4f2ec;
  --rule: #d8d4ca; --rule-strong: #8a8478;
  --oxide: #0f6b38; --oxide-ink: #0b5a2e; --oxide-soft: #b9e3c9; --on-oxide: #fbfaf7;
  --cobalt: #1d2f8a; --cobalt-soft: #c5cff0; --on-cobalt: #fbfaf7;
  --live: #2f6b45;
  --shadow-float: 0 12px 32px -12px rgba(25, 24, 20, .18);
}

/* Arsh Kumar design system: component styles. Every value comes from tokens.css. */

.ak-root, .ak-root * { box-sizing: border-box; }
.ak-root { background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 26px; -webkit-font-smoothing: antialiased; }

/* ---------- shared ---------- */
.ak-mono { font-family: var(--font-mono); }
.ak-label { font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.ak-meta { font-family: var(--font-mono); font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.ak-focus:focus-visible, .ak-btn:focus-visible, .ak-card:focus-visible, .ak-nav a:focus-visible, .ak-link:focus-visible {
  outline: var(--size-focus) solid var(--oxide); outline-offset: 2px;
}
.ak-link { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--rule-strong); transition: color 160ms cubic-bezier(.2,.7,.2,1); }
.ak-link:hover { color: var(--oxide-ink); text-decoration-color: currentColor; }

/* ---------- Wordmark ---------- */
.ak-wordmark { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }
.ak-logo { display: block; height: 30px; width: auto; overflow: visible; }
.ak-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ak-logo .lg-t, #ak-wordmark .lg-t { fill: var(--ink); }
.ak-logo .lg-th, #ak-wordmark .lg-th { fill: var(--oxide); animation: ak-breathe 2.4s ease-in-out infinite; }
.ak-wordmark--l .ak-logo { height: 52px; }
@keyframes ak-breathe { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .ak-logo .lg-th, #ak-wordmark .lg-th { animation: none; } }

/* ---------- Button ---------- */
.ak-btn { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-radius: var(--radius-xs); border: var(--size-hairline) solid transparent;
  font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: background-color 160ms cubic-bezier(.2,.7,.2,1), color 160ms cubic-bezier(.2,.7,.2,1), border-color 160ms cubic-bezier(.2,.7,.2,1); }
.ak-btn__arrow { display: inline-block; transition: transform 240ms cubic-bezier(.2,.7,.2,1); }
.ak-btn:hover .ak-btn__arrow { transform: translateX(4px); }
.ak-btn--primary { background: var(--ink); color: var(--on-ink); }
.ak-btn--primary:hover { background: var(--oxide); color: var(--on-oxide); }
.ak-btn--accent { background: var(--oxide); color: var(--on-oxide); }
.ak-btn--accent:hover { background: var(--ink); color: var(--on-ink); }
.ak-btn--secondary { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.ak-btn--secondary:hover { border-color: var(--ink); }
.ak-btn--ghost { background: transparent; color: var(--ink); padding-left: 0; padding-right: 0; }
.ak-btn--ghost:hover { color: var(--oxide-ink); }
.ak-btn--sm { padding: var(--space-2) var(--space-3); }
.ak-card__links { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ak-cv__links { margin-top: var(--space-3); }
.ak-btn[disabled] { background: var(--paper-sunk); color: var(--ink-muted); border-color: var(--rule); cursor: not-allowed; }

/* ---------- Tag ---------- */
.ak-tag { display: inline-flex; align-items: center; gap: 6px; padding: var(--space-1) 10px; border-radius: var(--radius-pill); border: var(--size-hairline) solid var(--rule);
  font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--ink-muted); background: var(--paper-raised); white-space: nowrap; }
.ak-tag--model { background: var(--oxide-soft); border-color: transparent; color: var(--oxide-ink); }
.ak-tag--software { background: var(--cobalt-soft); border-color: transparent; color: var(--cobalt); }
.ak-tag--live { color: var(--live); }
.ak-tag--live::before, .ak-dot { content: ""; width: 6px; height: 6px; border-radius: var(--radius-pill); background: var(--live); display: inline-block; }
.ak-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ---------- Section label ---------- */
.ak-section-label { display: flex; align-items: center; gap: var(--space-4); color: var(--ink-muted); }
.ak-section-label__num { color: var(--oxide-ink); }
.ak-section-label__rule { flex: 1; height: var(--size-hairline); background: var(--rule); }
.ak-section-label__aside { color: var(--ink-muted); text-transform: none; letter-spacing: 0; font-weight: 400; }

/* ---------- Project card ---------- */
.ak-card { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); background: var(--paper-raised); border: var(--size-hairline) solid var(--rule); border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none; transition: border-color 160ms cubic-bezier(.2,.7,.2,1); }
.ak-card:hover { border-color: var(--rule-strong); }
.ak-card__top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); }
.ak-card__index { color: var(--ink-muted); }
.ak-card__title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 36px; letter-spacing: -.01em; }
.ak-card__desc { margin: 0; font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.ak-card__media { aspect-ratio: 16 / 9; border-radius: var(--radius-xs); background-color: transparent;
  background-image: radial-gradient(closest-side at 50% 52%, var(--glow, var(--oxide-soft)), transparent); display: grid; place-items: center; }
[data-accent="software"] { --glow: var(--cobalt-soft); }
.ak-card__media > * { background: var(--paper-sunk); padding: 2px var(--space-2); }
.ak-card__media > canvas, .ak-cv__media > canvas { display: block; width: 100%; height: 100%; padding: 0; background: transparent; }
.ak-cv__media { aspect-ratio: 4 / 3; border-radius: var(--radius-xs); background-color: transparent;
  background-image: radial-gradient(closest-side at 50% 52%, var(--glow, var(--oxide-soft)), transparent); align-self: start; }
.ak-card__foot { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); padding-top: var(--space-4); border-top: var(--size-hairline) solid var(--rule); }
.ak-card__cta { display: inline-flex; gap: var(--space-2); }
.ak-card__cta span { display: inline-block; transition: transform 240ms cubic-bezier(.2,.7,.2,1); }
.ak-card:hover .ak-card__cta { color: var(--oxide-ink); }
.ak-card:hover .ak-card__cta span { transform: translateX(4px); }

/* ---------- Stack meter ---------- */
.ak-stack { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.ak-stack__seg { display: flex; flex-direction: column; gap: 6px; }
.ak-stack__bar { height: 6px; border-radius: 1px; border: var(--size-hairline) solid var(--rule-strong); background: transparent; }
.ak-stack__seg--model.is-on .ak-stack__bar { background: var(--oxide); border-color: var(--oxide); }
.ak-stack__seg--software.is-on .ak-stack__bar { background: var(--cobalt); border-color: var(--cobalt); }
.ak-stack__name { font-family: var(--font-mono); font-size: 11px; line-height: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.ak-stack__seg.is-on .ak-stack__name { color: var(--ink); }
.ak-stack__axis { display: flex; justify-content: space-between; margin-top: var(--space-2); font-family: var(--font-mono); font-size: 11px; line-height: 14px; color: var(--ink-muted); }

/* ---------- Spec list ---------- */
.ak-spec { margin: 0; background: var(--paper-sunk); border-radius: var(--radius-xs); padding: var(--space-2) var(--space-4); font-family: var(--font-mono); font-size: 13px; line-height: 20px; }
.ak-spec__row { display: grid; grid-template-columns: 14ch 1fr; gap: var(--space-4); padding: 10px 0; border-bottom: var(--size-hairline) solid var(--rule); }
.ak-spec__row:last-child { border-bottom: 0; }
.ak-spec dt { color: var(--ink-muted); }
.ak-spec dd { margin: 0; color: var(--ink); }

/* ---------- Code block ---------- */
.ak-code { margin: 0; background: var(--paper-sunk); border: var(--size-hairline) solid var(--rule); border-radius: var(--radius-xs); overflow: hidden; }
.ak-code__bar { display: flex; justify-content: space-between; padding: var(--space-2) var(--space-4); border-bottom: var(--size-hairline) solid var(--rule); font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.ak-code pre { margin: 0; padding: var(--space-4) 0; overflow-x: auto; font-family: var(--font-mono); font-size: 14px; line-height: 22px; color: var(--ink); counter-reset: ln; }
.ak-code .ln { display: block; padding: 0 var(--space-4) 0 0; }
.ak-code .ln::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 3ch; margin: 0 var(--space-4) 0 var(--space-4); text-align: right; color: var(--ink-faint); }
.ak-code .ln.hl { background: var(--oxide-soft); }
.ak-code .kw { color: var(--cobalt); }
.ak-code .cm { color: var(--ink-muted); font-style: italic; }
.ak-code .nu { color: var(--oxide-ink); }

/* ---------- CV entry ---------- */
.ak-cv { display: grid; grid-template-columns: 16ch 1fr 220px; gap: var(--space-6); padding: var(--space-6) 0; border-top: var(--size-hairline) solid var(--rule); }
.ak-cv__when { font-family: var(--font-mono); font-size: 13px; line-height: 20px; color: var(--ink-muted); padding-top: 8px; }
.ak-cv__role { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 36px; letter-spacing: -.01em; }
.ak-cv__org { margin: 2px 0 var(--space-3); font-size: 16px; line-height: 26px; font-weight: 500; }
.ak-cv__body { margin: 0 0 var(--space-3); font-size: 16px; line-height: 26px; color: var(--ink-muted); max-width: var(--size-measure); }
.ak-cv[hidden] { display: none; }
.ak-cv__body + .ak-cv__body { margin-top: calc(-1 * var(--space-1)); }
@media (max-width: 900px) { .ak-cv { grid-template-columns: 16ch 1fr; } .ak-cv__media { grid-column: 2; max-width: 320px; width: 100%; justify-self: center; } }
@media (max-width: 640px) { .ak-cv { grid-template-columns: 1fr; gap: var(--space-2); } .ak-cv__media { grid-column: 1; width: 100%; max-width: 320px; justify-self: center; } }

/* ---------- Nav bar ---------- */
.ak-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); padding: var(--space-3) var(--space-6); background: var(--paper-raised); border-bottom: var(--size-hairline) solid var(--rule); }
.ak-nav .ak-logo { height: 26px; }
.ak-nav__links { display: flex; align-items: center; gap: var(--space-6); list-style: none; margin: 0; padding: 0; }
.ak-nav__links a { color: var(--ink-muted); text-decoration: none; transition: color 160ms cubic-bezier(.2,.7,.2,1); }
.ak-nav__links a:hover, .ak-nav__links a[aria-current="page"] { color: var(--ink); }
.ak-nav__links a[aria-current="page"]::before { content: "/"; color: var(--oxide-ink); margin-right: 2px; }
.ak-kbd { font-family: var(--font-mono); font-size: 12px; line-height: 16px; padding: 2px 6px; border: var(--size-hairline) solid var(--rule-strong); border-radius: var(--radius-xs); color: var(--ink-muted); }

/* ---------- page ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--paper); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.skip { position: absolute; left: var(--space-4); top: -48px; z-index: 20; padding: var(--space-2) var(--space-3); background: var(--ink); color: var(--on-ink); }
.skip:focus { top: var(--space-2); }

.wrap { width: 100%; max-width: calc(var(--size-content) + 2 * var(--space-12)); margin: 0 auto; padding: 0 var(--space-12); }
@media (max-width: 720px) { .wrap { padding: 0 var(--space-4); } }

.site-nav { position: sticky; top: 0; z-index: 10; }
.site-nav .ak-nav { padding-left: max(var(--space-6), calc((100vw - var(--size-content)) / 2)); padding-right: max(var(--space-6), calc((100vw - var(--size-content)) / 2)); }
/* light/dark switch: sun and moon either side of a sliding knob */
.theme-switch { position: relative; display: inline-flex; align-items: center; justify-content: space-between; width: 52px; height: 26px; padding: 0 5px; background: var(--paper-sunk); border: var(--size-hairline) solid var(--rule-strong); border-radius: var(--radius-pill); color: var(--ink-faint); cursor: pointer; vertical-align: middle; }
.theme-switch svg { position: relative; z-index: 1; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: color .2s; }
.theme-switch__knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--oxide); transition: transform .22s cubic-bezier(.4, 0, .2, 1); }
.theme-switch[aria-checked="true"] .theme-switch__knob { transform: translateX(26px); }
.theme-switch[aria-checked="false"] .theme-switch__sun, .theme-switch[aria-checked="true"] .theme-switch__moon { color: var(--on-oxide); }
.theme-switch:hover { border-color: var(--ink); }
.theme-switch:focus-visible { outline: var(--size-focus) solid var(--oxide); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .theme-switch__knob, .theme-switch svg { transition: none; } }
@media (max-width: 720px) { .ak-nav__links li:not(:last-child) { display: none; } }

/* hero */
.hero { position: relative; min-height: min(860px, calc(100svh - 53px)); display: grid; align-items: center; overflow: hidden; border-bottom: var(--size-hairline) solid var(--rule); }
.stage { position: absolute; inset: 0; touch-action: pan-y; }
:root[data-theme="light"] .stage { background-image: radial-gradient(closest-side at 66% 50%, var(--oxide-soft), transparent 90%); }
#stage { width: 100%; height: 100%; display: block; }
.hero__copy { position: relative; padding-top: var(--space-16); padding-bottom: var(--space-16); max-width: 600px; pointer-events: none; }
.hero__copy a, .hero__copy button { pointer-events: auto; }
.hero__eyebrow { color: var(--ink-muted); margin: 0 0 var(--space-6); }
.hero__eyebrow b { color: var(--oxide-ink); font-weight: 500; }
.hero h1 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(56px, 8.4vw, 96px); line-height: .92; letter-spacing: -.025em; text-wrap: balance; }
.hero h1 em { font-style: italic; }
.hero h1 .clause { display: block; margin-top: var(--space-6); font-style: italic; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -.01em; color: var(--ink-muted); }
.hero__lede { margin: var(--space-8) 0 0; font-size: 18px; line-height: 30px; max-width: var(--size-measure); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-8); align-items: center; }
@media (max-width: 900px) {
  .hero { min-height: 0; display: flex; flex-direction: column; }
  .hero > .wrap { order: 1; }
  .hero__hint { order: 3; }
  .stage { position: relative; height: 420px; order: 2; }
  .hero__copy { padding-top: var(--space-12); padding-bottom: var(--space-6); max-width: none; }
}

/* sections */
.sec { padding-top: var(--space-16); padding-bottom: var(--space-24); }
.sec h2 { margin: var(--space-8) 0 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(36px, 5vw, 44px); line-height: 1.09; letter-spacing: -.015em; max-width: 18em; text-wrap: balance; }
.sec h2 em { font-style: italic; }
.sec__body { margin-top: var(--space-8); }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
@media (max-width: 800px) { .grid2 { grid-template-columns: 1fr; } }
.grid2 .ak-card { height: 100%; }
.ak-card__stack { margin-top: auto; }
.ak-card__desc { flex: 1; }

.stack-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-12); align-items: start; }
@media (max-width: 800px) { .stack-grid { grid-template-columns: 1fr; gap: var(--space-8); } }
.stack-grid .lede { margin: 0 0 var(--space-8); font-size: 18px; line-height: 30px; max-width: var(--size-measure); }
.aside-code { margin: var(--space-6) 0 0; color: var(--ink-muted); }

.cv-list { border-bottom: var(--size-hairline) solid var(--rule); }

.contact { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-8); }
.foot { border-top: var(--size-hairline) solid var(--rule); padding: var(--space-6) 0 var(--space-12); color: var(--ink-muted); }
.foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4); }

/* keep reveal subtle: no motion under reduced-motion */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 240ms cubic-bezier(.2,.7,.2,1), transform 240ms cubic-bezier(.2,.7,.2,1); }
  .js .reveal.in { opacity: 1; transform: none; }
}
.hero > .wrap { pointer-events: none; }

/* hero backdrop: hairline grid fading out, crop-mark corners */
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .8;
  background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 72px 72px; background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 55% 75% at 68% 50%, #000 0, transparent 100%); mask-image: radial-gradient(ellipse 55% 75% at 68% 50%, #000 0, transparent 100%); }
.hero::after { content: ""; position: absolute; inset: var(--space-4); pointer-events: none;
  background:
    linear-gradient(var(--ink-muted), var(--ink-muted)) left top / 14px 1px no-repeat, linear-gradient(var(--ink-muted), var(--ink-muted)) left top / 1px 14px no-repeat,
    linear-gradient(var(--ink-muted), var(--ink-muted)) right top / 14px 1px no-repeat, linear-gradient(var(--ink-muted), var(--ink-muted)) right top / 1px 14px no-repeat,
    linear-gradient(var(--ink-muted), var(--ink-muted)) left bottom / 14px 1px no-repeat, linear-gradient(var(--ink-muted), var(--ink-muted)) left bottom / 1px 14px no-repeat,
    linear-gradient(var(--ink-muted), var(--ink-muted)) right bottom / 14px 1px no-repeat, linear-gradient(var(--ink-muted), var(--ink-muted)) right bottom / 1px 14px no-repeat; }
.hero__hint { position: absolute; right: var(--space-12); bottom: var(--space-6); color: var(--ink-muted); pointer-events: none; }

/* layer labels, positioned from JS to follow each plate */
.layers { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.layer { position: absolute; right: var(--space-12); width: 168px; top: 0; display: flex; align-items: center; gap: var(--space-2); color: var(--ink-muted); transition: color 160ms cubic-bezier(.2,.7,.2,1); will-change: transform; }
.layer::before { content: ""; width: 24px; height: 1px; background: var(--rule-strong); transition: background-color 160ms; }
.layer i { width: 6px; height: 6px; border-radius: var(--radius-pill); background: var(--oxide); }
.layer:nth-child(-n+2) i { background: var(--cobalt); }
.layer__t { display: flex; flex-direction: column; }
.layer.on { color: var(--ink); }
.layer.on::before { background: var(--ink); }
@media (max-width: 900px) { .layer { right: var(--space-4); width: 132px; } .layer .ak-meta { display: none; } .layer::before { width: 12px; } .hero__hint { position: static; padding: 0 var(--space-4) var(--space-6); order: 3; }
  .hero::before { -webkit-mask-image: radial-gradient(ellipse 80% 40% at 50% 80%, #000 0, transparent 100%); mask-image: radial-gradient(ellipse 80% 40% at 50% 80%, #000 0, transparent 100%); } }

/* welcome screen: shown once per session */
.intro { display: none; position: fixed; inset: 0; z-index: 100; background: var(--paper); align-items: center; justify-content: center; padding: var(--space-6); transition: opacity 240ms cubic-bezier(.2,.7,.2,1), visibility 0s linear 240ms; }
.intro-on .intro { display: flex; align-items: safe center; overflow-y: auto; }
.intro-on body { overflow: hidden; }
.intro.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }
.intro::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .8;
  background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px); background-size: 72px 72px; background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 50% 60% at 50% 50%, #000 0, transparent 100%); mask-image: radial-gradient(ellipse 50% 60% at 50% 50%, #000 0, transparent 100%); }
.intro__inner { position: relative; max-width: 640px; display: flex; flex-direction: column; align-items: flex-start; }
.intro__eyebrow { margin: var(--space-12) 0 var(--space-4); color: var(--oxide-ink); }
.intro__title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(48px, 9vw, 96px); line-height: .94; letter-spacing: -.025em; }
.intro__title em { font-style: italic; }
.intro__body { margin: var(--space-6) 0 var(--space-8); font-size: 18px; line-height: 30px; color: var(--ink-muted); max-width: var(--size-measure); }
.intro__hint { margin: var(--space-4) 0 0; }
@media (prefers-reduced-motion: no-preference) {
  .intro__inner > * { opacity: 0; transform: translateY(10px); animation: intro-in 500ms cubic-bezier(.2,.7,.2,1) forwards; }
  .intro__inner > :nth-child(2) { animation-delay: 120ms; } .intro__inner > :nth-child(3) { animation-delay: 240ms; }
  .intro__inner > :nth-child(4) { animation-delay: 420ms; } .intro__inner > :nth-child(5) { animation-delay: 600ms; } .intro__inner > :nth-child(6) { animation-delay: 700ms; }
}
@keyframes intro-in { to { opacity: 1; transform: none; } }

/* Projects: try it live */
.live-label { margin: var(--space-6) 0 var(--space-3); color: var(--ink-muted); }
.live-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.live-list li { display: grid; grid-template-columns: 22ch 1fr; align-items: center; gap: var(--space-4); }
.live-list .ak-btn { justify-content: space-between; }
.live-list p { margin: 0; color: var(--ink-muted); }
@media (max-width: 640px) { .live-list li { grid-template-columns: 1fr; gap: var(--space-2); } .live-list .ak-btn { justify-self: start; } }

/* Latent Lab (play.arshkumar.com) */
.lab__h { margin: var(--space-8) 0 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(36px, 6vw, 56px); line-height: 1.05; letter-spacing: -.015em; text-wrap: balance; }
.lab__lede { margin: var(--space-6) 0 0; font-size: 18px; line-height: 30px; max-width: var(--size-measure); color: var(--ink-muted); }
.lab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 512px); gap: var(--space-8) var(--space-12); align-items: start; margin-top: var(--space-12); }
.lab__form { display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }
.lab__fields { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); max-width: 420px; }
.lab__field { display: flex; flex-direction: column; gap: var(--space-2); color: var(--ink-muted); }
.lab__field input { width: 100%; box-sizing: border-box; padding: var(--space-3) var(--space-4); font-family: var(--font-mono); font-size: 22px; line-height: 30px; color: var(--ink); background: var(--paper-sunk); border: var(--size-hairline) solid var(--rule-strong); border-radius: var(--radius-xs); }
.lab__field input:focus-visible { outline: var(--size-focus) solid var(--oxide); outline-offset: 2px; }
.lab__btns { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.lab__caption { margin: 0; font-family: var(--font-display); font-size: 30px; line-height: 36px; letter-spacing: -.01em; min-height: 72px; }
.lab__z, .lab__form p:empty { margin: 0; }
.lab__form > p { margin: 0; }
.lab__art canvas { display: block; width: 100%; aspect-ratio: 1; background: var(--paper-sunk); border: var(--size-hairline) solid var(--rule); border-radius: var(--radius-sm); }
.lab__foot { margin: var(--space-12) 0 0; }
.foot a { color: inherit; }
@media (max-width: 900px) { .lab { grid-template-columns: 1fr; } .lab__art { max-width: 512px; } .lab__caption { min-height: 0; } }

/* ==========================================================================
   Motion layer (pairs with /motion.js). Self-contained: copy this block and
   motion.js to reuse on other subdomains. Only transform/opacity animate,
   and every hidden start state lives behind prefers-reduced-motion.
   ========================================================================== */

/* nav: progress hairline + glass once scrolled */
.site-nav .ak-nav { transition: background-color 240ms cubic-bezier(.2,.7,.2,1); }
.site-nav.is-scrolled .ak-nav { background: color-mix(in srgb, var(--paper-raised) 80%, transparent); -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2); }
.scroll-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--oxide); transform: scaleX(0); transform-origin: left; pointer-events: none; }
.ak-nav__links a[aria-current="location"] { color: var(--ink); }
.ak-nav__links a[aria-current="location"]::before { content: "/"; color: var(--oxide-ink); margin-right: 2px; }

/* buttons: a 1px press */
.ak-btn { transition-property: background-color, color, border-color, transform; }
.ak-btn:active { transform: translateY(1px); }

/* cursor spotlight: a faint glow follows the pointer, the border lights up near it */
.ak-card, .ak-cv__media, .lab__art { position: relative; }
.ak-card > *, .ak-cv__media > *, .lab__art > * { position: relative; }
.ak-card::before, .ak-cv__media::before, .lab__art::before,
.ak-card::after, .ak-cv__media::after, .lab__art::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 240ms cubic-bezier(.2,.7,.2,1); }
.ak-card::before, .ak-cv__media::before, .lab__art::before {
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--oxide) 9%, transparent), transparent 70%); }
.ak-card::after, .ak-cv__media::after, .lab__art::after {
  inset: -1px; padding: 1px; z-index: 2;
  background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--oxide) 70%, transparent), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
@media (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .ak-card:hover::before, .ak-cv__media:hover::before, .lab__art:hover::before,
  .ak-card:hover::after, .ak-cv__media:hover::after, .lab__art:hover::after { opacity: 1; }
}

/* custom cursor: white arrow, black outline, a green light running round it */
.has-cursor, .has-cursor * { cursor: none !important; }
.has-cursor input:not([type="submit"]):not([type="button"]), .has-cursor textarea, .has-cursor [contenteditable="true"] { cursor: text !important; }
.cursor { position: fixed; top: 0; left: 0; z-index: 2147483647; width: 24px; height: 24px; pointer-events: none; opacity: 0; will-change: transform; }
.has-cursor .cursor { opacity: 1; }
.cursor.is-out, .cursor.is-text { opacity: 0 !important; }
.cursor svg { display: block; overflow: visible; transition: transform 120ms cubic-bezier(.2,.7,.2,1); transform-origin: 3px 2px; }
.cursor.is-down svg { transform: scale(.88); }
.cursor__body { fill: #fff; stroke: #111; stroke-width: 1.5; stroke-linejoin: round; }
.cursor__trace { fill: none; stroke: #3ddc84; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 14 86; filter: drop-shadow(0 0 2px #3ddc84); animation: cursor-trace 1.8s linear infinite; }
.cursor.is-link .cursor__trace { stroke-dasharray: 12 38; animation-duration: .9s; }
@keyframes cursor-trace { to { stroke-dashoffset: -100; } }

/* welcome screen: any-key hint, exit lifts away */
.intro { transition: opacity 280ms cubic-bezier(.2,.7,.2,1), transform 280ms cubic-bezier(.2,.7,.2,1), visibility 0s linear 280ms; }
.intro.is-leaving { transform: translateY(-16px); }
.intro__hint .ak-kbd { margin: 0 2px; }
@media (prefers-reduced-motion: no-preference) {
  .intro__hint .ak-kbd { animation: kbd-pulse 2.4s ease-in-out 1.2s infinite; }
}
@keyframes kbd-pulse { 50% { border-color: var(--oxide); color: var(--oxide-ink); } }

/* toast */
.toast { position: fixed; left: 50%; bottom: var(--space-6); z-index: 200; padding: var(--space-2) var(--space-4); background: var(--ink); color: var(--on-ink); border-radius: var(--radius-xs); box-shadow: var(--shadow-float);
  opacity: 0; transform: translate(-50%, 8px); pointer-events: none; transition: opacity 200ms cubic-bezier(.2,.7,.2,1), transform 200ms cubic-bezier(.2,.7,.2,1); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* live clock in the footer */
.foot__clock { display: inline-flex; align-items: center; gap: var(--space-2); }
.foot__clock .ak-dot { animation: ak-breathe 2.4s ease-in-out infinite; }

/* easter egg: the θ spins once */
.ak-logo .lg-th, #ak-wordmark .lg-th { transform-box: fill-box; transform-origin: center; }
.ak-logo .lg-th.spin, #ak-wordmark .lg-th.spin { animation: ak-breathe 2.4s ease-in-out infinite, th-spin 900ms cubic-bezier(.2,.7,.2,1); }
@keyframes th-spin { to { transform: rotate(360deg); } }

/* Latent Lab: scan line while the decoder wakes, and once after each drawing */
.lab__art { overflow: hidden; border-radius: var(--radius-sm); }
.lab__art::after { inset: 0; }
.lab__scan { position: absolute !important; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transform: translateY(-100%);
  background: linear-gradient(to bottom, transparent 75%, color-mix(in srgb, var(--oxide) 10%, transparent) 97%, var(--oxide) calc(100% - 1px), var(--oxide)); }
@media (prefers-reduced-motion: no-preference) {
  .lab__art.is-loading .lab__scan { animation: lab-scan 1.6s cubic-bezier(.4,0,.6,1) infinite; }
  .lab__art.is-drawn .lab__scan { animation: lab-scan 460ms cubic-bezier(.2,.7,.2,1) 1; }
}
@keyframes lab-scan { 0% { opacity: 0; transform: translateY(-100%); } 15% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(0); } }

@media (prefers-reduced-motion: no-preference) {
  /* staggered reveal (delay set per item by motion.js) */
  .js .reveal { transition: opacity 420ms cubic-bezier(.2,.7,.2,1), transform 520ms cubic-bezier(.2,.7,.2,1), border-color 160ms cubic-bezier(.2,.7,.2,1);
    transition-delay: var(--d, 0ms), var(--d, 0ms), 0ms; }

  /* section label: the rule draws itself */
  .js .ak-section-label__rule { transform: scaleX(0); transform-origin: left; transition: transform 900ms cubic-bezier(.2,.7,.2,1) 120ms; }
  .js .ak-section-label.in .ak-section-label__rule { transform: none; }

  /* headlines: words rise out of a soft blur */
  .sec h2.split .w { display: inline-block; opacity: 0; transform: translateY(.35em); filter: blur(6px);
    transition: opacity 600ms cubic-bezier(.2,.7,.2,1), transform 700ms cubic-bezier(.2,.7,.2,1), filter 600ms cubic-bezier(.2,.7,.2,1);
    transition-delay: calc(var(--wi) * 35ms); }
  .sec h2.split.in .w { opacity: 1; transform: none; filter: none; }

  /* stack meters fill left to right */
  .js .ak-stack .is-on .ak-stack__bar { transform: scaleX(0); transform-origin: left; transition: transform 520ms cubic-bezier(.2,.7,.2,1); }
  .js .ak-stack.in .is-on .ak-stack__bar { transform: none; }
  .ak-stack__seg:nth-child(2) .ak-stack__bar { transition-delay: 70ms; }
  .ak-stack__seg:nth-child(3) .ak-stack__bar { transition-delay: 140ms; }
  .ak-stack__seg:nth-child(4) .ak-stack__bar { transition-delay: 210ms; }
  .ak-stack__seg:nth-child(5) .ak-stack__bar { transition-delay: 280ms; }

  /* hero canvas fades in once the welcome screen has gone */
  #stage { animation: stage-in 900ms cubic-bezier(.2,.7,.2,1) both; }
  .intro-on #stage { animation: none; opacity: 0; }
}
@keyframes stage-in { from { opacity: 0; } to { opacity: 1; } }
