/* =========================================================
   Dhruv Sharma — portfolio
   Monochrome, cinematic. A particle film runs behind the page.
   ========================================================= */
@font-face { font-family: "Display"; src: url("fonts/display-black.woff") format("woff"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Display"; src: url("fonts/display-bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Text"; src: url("fonts/text-medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Text"; src: url("fonts/text-semibold.woff") format("woff"); font-weight: 600; font-display: swap; }

:root {
  --ink: #fff; --ink-2: #b5b5b5; --ink-3: #7a7a7a;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --m: clamp(20px, 3.2vw, 52px);
  --gap: clamp(140px, 18vw, 260px);
  --t-h2: clamp(3rem, 8vw, 8rem);
  --t-big: clamp(1.25rem, 1.9vw, 1.75rem);
  --t-body: clamp(1.0625rem, 1.1vw, 1.1875rem);
  --c1: #6ee7ff; --c2: #a78bfa; --c3: #ff7ab6;
  --accent: linear-gradient(90deg, var(--c1), var(--c2) 50%, var(--c3));
}
@keyframes flow { to { background-position: 200% 0; } }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: #000; scrollbar-color: #2a2a2a #000; }
html.motion { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: transparent; font: 500 var(--t-body)/1.55 "Text", "Inter", system-ui, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-tap-highlight-color: transparent; overflow-x: clip; }
::selection { background: var(--c2); color: #000; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
p, h1, h2, h3, figure, dl, dd { margin: 0; }
h1, h2, h3 { font-family: "Display", "Inter", sans-serif; font-weight: 900; text-wrap: balance; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg, video, canvas, img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.skip { position: fixed; left: var(--m); top: -100px; z-index: 200; background: #fff; color: #000; padding: 12px 18px; font-weight: 600; }
.skip:focus { top: 12px; }
main, .footer { position: relative; z-index: 2; }
.h2 { font-size: var(--t-h2); line-height: 0.9; letter-spacing: -0.05em; }
.sub { font-size: var(--t-big); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; color: var(--ink-2); max-width: 28ch; }
.fine-only, .fine-only-inline { display: none; }
.touch-only-inline { display: inline; }
@media (hover: hover) and (pointer: fine) { .fine-only { display: block; } .fine-only-inline { display: inline; } .touch-only-inline { display: none; } }

/* ---------- Particle film + vignette */
.bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0,0,0,.65)); }
.progress { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 90; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }

/* ---------- Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 28px; border-radius: 999px; font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; white-space: nowrap; user-select: none; touch-action: manipulation; transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease; }
.btn:active { transform: scale(0.97); }
.btn-light { background: #fff; color: #000; }
.btn-dark { background: rgba(255,255,255,.08); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.btn-small { min-height: 42px; padding: 0 20px; font-size: 0.9375rem; }
.btn-light { transition: transform 160ms var(--ease-out), box-shadow 300ms ease, background-color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .btn-light:hover { box-shadow: 0 0 0 4px rgba(167,139,250,.35), 0 0 32px rgba(110,231,255,.35); } .btn-dark:hover { background: rgba(167,139,250,.18); } }
.i-play { width: 14px; height: 14px; fill: currentColor; }

/* ---------- Nav */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 80; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: max(16px, env(safe-area-inset-top)) var(--m) 16px; transition: transform 420ms var(--ease-out), background-color 300ms ease; }
.nav.solid { background: rgba(0,0,0,.75); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.nav.hide { transform: translateY(-110%); }
.wordmark { font-family: "Display"; font-weight: 900; font-size: 1.25rem; letter-spacing: -0.03em; }
.nav ul { display: flex; gap: clamp(18px, 2.6vw, 40px); }
.nav ul a { font-weight: 600; font-size: 1rem; position: relative; padding: 6px 0; color: var(--ink-2); transition: color 200ms ease; }
.nav ul a[aria-current="page"] { color: #fff; }
.nav ul a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform 300ms var(--ease-out); }
.nav ul a[aria-current="page"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .nav ul a:hover { color: #fff; } .nav ul a:hover::after { transform: scaleX(1); transform-origin: left; } }
@media (max-width: 760px) { .nav ul li:not(:last-child) { display: none; } }

/* ---------- Cursor */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .motion .cursor { display: grid; place-items: center; position: fixed; left: 0; top: 0; z-index: 150; pointer-events: none; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff; mix-blend-mode: difference; opacity: 0; transition: opacity 200ms ease, width 300ms var(--ease-out), height 300ms var(--ease-out), margin 300ms var(--ease-out); }
  .motion .cursor.on { opacity: 1; }
  .motion .cursor.big { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  .motion .cursor.label { width: 88px; height: 88px; margin: -44px 0 0 -44px; mix-blend-mode: normal; }
  .cursor-label { font: 600 0.875rem "Text"; color: #000; opacity: 0; transition: opacity 200ms ease; }
  .cursor.label .cursor-label { opacity: 1; }
}

/* ---------- Intro */
.intro { display: none; }
.motion.intro-on .intro { display: block; position: fixed; inset: 0; z-index: 190; pointer-events: none; }
.intro::before { content: ""; position: absolute; inset: 0; background: #000; transition: opacity 900ms var(--ease-out); }
.intro-line { position: absolute; left: var(--m); right: var(--m); bottom: calc(var(--m) + 4.5rem); height: 2px; background: #fff; transform: scaleX(0); transform-origin: left; transition: transform 2200ms cubic-bezier(.6,.05,.3,1), opacity 400ms ease; z-index: 2; }
.intro-count { position: absolute; right: var(--m); bottom: var(--m); z-index: 2; font: 900 clamp(3rem, 7vw, 6rem)/1 "Display"; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; transition: opacity 400ms ease; }
.intro-name { position: absolute; left: var(--m); bottom: var(--m); z-index: 2; font-weight: 600; color: var(--ink-2); transition: opacity 400ms ease; }
.intro.s1 .intro-line { transform: scaleX(1); }
.intro.s1::before { opacity: 0.35; transition-duration: 1600ms; }
.intro.s2::before, .intro.s2 .intro-line, .intro.s2 .intro-count, .intro.s2 .intro-name { opacity: 0; }

/* ---------- Page curtain */
.curtain { position: fixed; inset: 0; z-index: 185; pointer-events: none; visibility: hidden; overflow: hidden; }
.curtain-panel { position: absolute; inset: 0; background: #000; clip-path: polygon(0 0, 0 0, -20% 100%, -20% 100%); }
.curtain-edge { position: absolute; top: -20vh; bottom: -20vh; left: 0; width: 2px; background: #fff; box-shadow: 0 0 30px 4px rgba(255,255,255,.55); transform: translateX(-10vw) skewX(-10deg); }
.curtain.run { visibility: visible; pointer-events: auto; }
.motion.arriving .curtain { visibility: visible; }
.motion.arriving .curtain-panel { clip-path: polygon(-20% 0, 120% 0, 120% 100%, -40% 100%); }

/* ---------- Chapter HUD (right edge, vertical) */
.hud { position: fixed; right: 14px; top: 50%; z-index: 70; display: none; align-items: center; gap: 14px; writing-mode: vertical-rl; transform: translateY(-50%) rotate(180deg); font: 600 0.8125rem "Text"; color: var(--ink-2); pointer-events: none; opacity: 0; transition: opacity 400ms ease; }
@media (min-width: 900px) { .motion .hud { display: flex; } }
.hud.show { opacity: 1; }
.hud-no { color: #fff; font-variant-numeric: tabular-nums; }
.hud-bar { width: 2px; height: 90px; background: rgba(255,255,255,.18); }
.hud-bar i { display: block; width: 100%; height: 100%; background: linear-gradient(0deg, var(--c1), var(--c2), var(--c3)); transform-origin: bottom; transform: scaleY(0); }
.hud.swap .hud-name { animation: hudswap 600ms var(--ease-out); }
@keyframes hudswap { from { opacity: 0; filter: blur(4px); } to { opacity: 1; filter: none; } }

/* ---------- Hero */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; }
.hero-inner { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: clamp(18px, 3vh, 40px); padding: calc(88px + env(safe-area-inset-top)) var(--m) clamp(48px, 7vh, 88px); }
.hero-title { font-size: clamp(4.75rem, min(16.5vw, 24svh), 21rem); line-height: 0.8; letter-spacing: -0.06em; margin-left: -0.045em; }
.hero-title .line { display: block; overflow: hidden; padding: 0.04em 0 0.06em; margin: -0.04em 0 -0.06em; }
.hero-title .line:last-child { text-align: right; margin-right: -0.02em; }
.ch { display: inline-block; white-space: pre; }
.film .hero-title { color: transparent; }            /* the particles draw the name */
.hero-hint { font-weight: 600; font-size: 0.9375rem; color: var(--ink-3); margin-top: -8px; }
.hero-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px clamp(32px, 5vw, 80px); align-items: end; }
.hero-copy { display: grid; gap: 16px; max-width: 34rem; }
.hero-role { font: 900 clamp(1.5rem, 2.4vw, 2.25rem)/1 "Display"; letter-spacing: -0.03em; background: var(--accent); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .08em; }
.motion .hero-role { animation: flow 8s linear infinite; }
.hero-lede { font-size: var(--t-big); font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; color: var(--ink-2); max-width: 26ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.reel-thumb { position: relative; display: block; width: 100%; max-width: min(560px, 40svh * 16 / 9); justify-self: end; aspect-ratio: 16 / 9; overflow: hidden; background: #050505; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); transition: transform 500ms var(--ease-out); }
.reel-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: transform 900ms var(--ease-out), opacity 300ms ease; }
.thumb-hud { position: absolute; left: 16px; top: 14px; z-index: 2; font: 600 0.875rem "Text"; color: #fff; }
.thumb-hud .tc { color: var(--ink-2); margin-left: 6px; }
.thumb-play { position: absolute; left: 50%; top: 50%; z-index: 2; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #000; transition: transform 300ms var(--ease-out); }
.thumb-play svg { width: 20px; height: 20px; fill: currentColor; margin-left: 4px; }
.thumb-play::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--c2); }
.motion .thumb-play::after { animation: ping 2.4s var(--ease-out) infinite; }
@keyframes ping { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@media (hover: hover) and (pointer: fine) { .reel-thumb:hover img { transform: scale(1.05); opacity: 1; } .reel-thumb:hover .thumb-play { transform: scale(1.1); } }
.reel-thumb:active { transform: scale(0.985); }
.scroll-cue { position: absolute; left: 50%; bottom: 20px; z-index: 2; transform: translateX(-50%); display: grid; justify-items: center; gap: 8px; font: 600 0.8125rem "Text"; color: var(--ink-3); }
.scroll-cue i { width: 2px; height: 34px; background: linear-gradient(#fff, transparent); }
.motion .scroll-cue i { animation: cue 1.8s var(--ease-in-out) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@media (min-width: 900px) and (max-height: 820px) { .hero-title { font-size: min(16.5vw, 22svh); } .hero-lede { font-size: 1.125rem; } .hero-copy { gap: 12px; } }
@media (max-width: 899px) {
  .hero-row { grid-template-columns: 1fr; }
  .reel-thumb { justify-self: stretch; max-width: none; order: -1; }
  .hero-title { font-size: 25vw; }
  .hero-title .line:last-child { text-align: left; }
  .scroll-cue { display: none; }
}

/* ---------- Statement */
.statement { position: relative; height: 260vh; }
.statement-pin { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: clamp(24px, 4vw, 48px); padding: 0 var(--m); }
.kicker-h { font: 600 var(--t-big) "Text"; letter-spacing: -0.02em; color: var(--ink-2); }
.statement-text { font: 900 clamp(2rem, 4.6vw, 4.75rem)/1.04 "Display"; letter-spacing: -0.045em; max-width: 19em; }
.statement-text .w { display: inline-block; transition: filter 200ms linear; }
.stat-row { display: flex; flex-wrap: wrap; gap: 12px 56px; font-weight: 600; color: var(--ink-2); }
.stat-row b { display: block; font: 900 clamp(2.75rem, 5vw, 4.5rem)/1 "Display"; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; background: var(--accent); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: flow 6s linear infinite; }

/* ---------- Kinetic titles */
.kw { display: inline-block; white-space: nowrap; }
.kl { display: inline-block; }
.motion [data-kinetic] { perspective: 800px; }
.motion [data-kinetic] .kl { opacity: 0; transform: translateY(0.5em) rotateX(-80deg) scale(.9); filter: blur(10px); transform-origin: 50% 100%; }
.motion [data-kinetic] .kl { color: hsl(calc(190 + var(--n) * 11) 95% 72%); }
.motion [data-kinetic].in .kl { opacity: 1; transform: none; filter: none; color: #fff; transition: opacity 700ms var(--ease-out), transform 1000ms var(--ease-out), filter 700ms var(--ease-out), color 1200ms ease; transition-delay: calc(var(--n) * 32ms), calc(var(--n) * 32ms), calc(var(--n) * 32ms), calc(var(--n) * 32ms + 700ms); }
.motion .contact-title.in .kl { color: hsl(calc(190 + var(--n) * 7) 92% 74%); }
.contact-title { background: none; }

/* ---------- Work */
.work { margin-top: calc(var(--gap) * 0.4); }
.work-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; padding: 0 var(--m); margin-bottom: clamp(48px, 7vw, 96px); }
.card { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; padding: 76px var(--m) 36px; }
.card-inner { position: relative; width: 100%; height: 100%; max-height: 820px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 72px); align-items: center; padding: clamp(28px, 4vw, 64px); background: #070707; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); border-radius: 8px; overflow: hidden; transform-origin: 50% 0%; will-change: transform; }
.card-inner::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--c1), var(--c2), var(--c3), transparent); background-size: 200% 100%; z-index: 1; }
.motion .card-inner::before { animation: flow 5s linear infinite; }
.card-inner::after { content: ""; position: absolute; inset: 0; background: #000; opacity: var(--dim, 0); pointer-events: none; }
.card-text { display: grid; gap: 16px; align-content: center; max-width: 34rem; }
.card-no { font: 600 0.9375rem "Text"; color: var(--ink-3); letter-spacing: 0.02em; }
.card-title { font-size: clamp(2.75rem, 6vw, 6.5rem); line-height: 0.9; letter-spacing: -0.055em; }
.tags { font-weight: 600; color: var(--c1); }
.card-text p:not(.card-no):not(.tags) { color: var(--ink-2); }
.link-btn { justify-self: start; display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; font-weight: 600; padding: 10px 0; border-bottom: 2px solid rgba(255,255,255,.2); transition: border-color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .link-btn:hover { border-image: var(--accent) 1; } }
.card-viz { position: relative; perspective: 1400px; }
.viz-frame { background: #0b0b0b; padding: clamp(10px, 1.6vw, 22px); border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 700ms var(--ease-out); }
.viz-frame svg { max-height: 58svh; }
.card-viz figcaption { margin-top: 12px; font: 600 0.8125rem "Text"; color: var(--ink-3); }
@media (max-width: 899px) { .card { position: relative; height: auto; padding: 12px var(--m); } .card-inner { grid-template-columns: 1fr; max-height: none; } .card-viz { order: -1; } }
/* project illustration styling */
.viz-frame svg { width: 100%; height: auto; overflow: visible; }
.vl { fill: #fff; font: 600 15px "Text", sans-serif; }
.vl.small { font-size: 14px; } .vl.tiny { font-size: 11px; fill: #9a9a9a; } .vl.light { fill: #9a9a9a; font-weight: 500; }
.vl.big { font: 900 44px "Display"; letter-spacing: -2px; } .vl.strong { font-size: 18px; } .vl.dark { fill: #000; }
.pcb { fill: #141414; stroke: #2a2a2a; stroke-width: 2; } .pcb2 { fill: #121212; stroke: #262626; stroke-width: 1.5; }
.pin { fill: #9b9b9b; } .shield { fill: #3a3a3a; } .shield-hi { fill: #4a4a4a; }
.ant { fill: none; stroke: #8a8a8a; stroke-width: 2; } .usb { fill: #bdbdbd; } .btn-hw { fill: #2c2c2c; stroke: #555; }
.ic { fill: #0a0a0a; stroke: #333; } .led { fill: #fff; } .chip-label { fill: #d9d9d9; font: 700 13px "Text"; letter-spacing: .5px; }
.bezel { fill: #0d0d0d; stroke: #2e2e2e; stroke-width: 2; } .screen { fill: #000; } .notch { fill: #0d0d0d; }
.bar-top { fill: #161616; } .dot { fill: #333; } .url { fill: #0a0a0a; }
.panel { fill: #111; } .search { fill: #141414; stroke: #2a2a2a; } .avatar { fill: #2a2a2a; } .line-w { fill: #d6d6d6; } .line-g { fill: #3a3a3a; }
.cta { fill: #fff; } .plot { fill: #e8e8e8; } .beaker { fill: none; stroke: #8a8a8a; stroke-width: 3; } .water { fill: #1b2a33; }
.probe { fill: #cfcfcf; } .wire { fill: none; stroke: #555; stroke-width: 2; } .wire.accentw { stroke: url(#spec); stroke-width: 3; }
.sig { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.sig.accent { stroke: url(#spec); }
.bar { fill: #fff; } .bar.soft { fill: #5a5a5a; } .bar.tone, .tone { fill: #262626; } .mark, .hbar { fill: url(#spec); }
.gtrack { fill: none; stroke: #222; stroke-width: 30; stroke-linecap: round; } .gauge { fill: none; stroke: url(#spec); stroke-width: 30; stroke-linecap: round; stroke-dasharray: var(--to) 1; }

/* ---------- Experience */
.experience { margin-top: var(--gap); padding: 0 var(--m); }
.timeline { position: relative; margin-top: clamp(48px, 6vw, 88px); display: grid; gap: clamp(64px, 8vw, 120px); padding-left: clamp(36px, 6vw, 96px); max-width: 1100px; }
.tl-rail { position: absolute; left: 0; top: 8px; bottom: 0; width: 2px; background: rgba(255,255,255,.12); }
.tl-rail i { display: block; height: 100%; background: linear-gradient(var(--c1), var(--c2), var(--c3)); transform-origin: top; transform: scaleY(var(--fill, 0)); box-shadow: 0 0 18px rgba(167,139,250,.6); }
.role { position: relative; display: grid; gap: 10px; }
.role::before { content: ""; position: absolute; left: calc(clamp(36px, 6vw, 96px) * -1 - 6px); top: 8px; width: 14px; height: 14px; border-radius: 50%; background: #000; box-shadow: inset 0 0 0 2px var(--c1), 0 0 14px rgba(110,231,255,.6); }
.when { font-weight: 600; color: var(--c1); }
.role-title { font-size: clamp(2.25rem, 4.6vw, 4.5rem); line-height: 0.95; letter-spacing: -0.045em; }
.where { font-weight: 600; font-size: var(--t-big); letter-spacing: -0.02em; }
.role-body { color: var(--ink-2); max-width: 62ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chips li { padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 0.9375rem; background: rgba(167,139,250,.1); box-shadow: inset 0 0 0 1px rgba(167,139,250,.35); }

/* ---------- Tech stack */
.toolkit { margin-top: var(--gap); padding: 0 var(--m); }
.tk-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(40px, 5vw, 72px); }
.stack-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(36px, 4vw, 64px) clamp(24px, 3vw, 56px); }
.cat { display: grid; gap: 14px; align-content: start; padding-top: 18px; box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.cat-name { font: 600 1rem "Text"; color: var(--ink-3); }
.cat ul { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.skill { font: 900 clamp(1.75rem, 2.8vw, 2.75rem)/1.12 "Display"; letter-spacing: -0.04em; color: #fff; transition: opacity 250ms ease, transform 250ms var(--ease-out); }
.skill[data-used=""] { cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .stack-grid:has(.skill:hover) .skill { opacity: .28; }
  .stack-grid .skill:hover { opacity: 1; transform: translateY(-3px); }
}
.skill.on { opacity: 1 !important; text-decoration: underline; text-decoration-color: var(--c2); text-decoration-thickness: 3px; text-underline-offset: 6px; }
@media (hover: hover) and (pointer: fine) { .stack-grid .skill:hover { background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent; } }
.used b { background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.used { margin-top: 40px; min-height: 2.4em; font-size: var(--t-big); font-weight: 600; letter-spacing: -0.02em; color: var(--ink-2); }

.motion .cat .skill { opacity: 0; transform: translateY(18px); filter: blur(6px); }
.motion .cat.in .skill { opacity: 1; transform: none; filter: none; transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out), filter 600ms var(--ease-out); transition-delay: calc(var(--n) * 25ms); }
@media (max-width: 1099px) { .stack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .stack-grid { grid-template-columns: 1fr; } }

/* ---------- Contact */
.contact { padding: var(--gap) var(--m) clamp(80px, 10vw, 140px); display: grid; gap: clamp(24px, 3vw, 40px); }
.contact-title { font-size: clamp(3.25rem, 10vw, 11rem); line-height: 0.88; letter-spacing: -0.06em; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.mail { font: 900 clamp(1.25rem, 3.6vw, 3.25rem)/1.1 "Display"; letter-spacing: -0.04em; overflow-wrap: anywhere; background: var(--accent) left bottom / 0% 3px no-repeat; padding-bottom: 6px; transition: background-size 500ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .mail:hover { background-size: 100% 3px; } }
.contact-list { display: flex; flex-wrap: wrap; gap: 12px 40px; font-weight: 600; font-size: 1.125rem; }
.contact-list a { border-bottom: 2px solid rgba(255,255,255,.2); padding-bottom: 2px; transition: border-color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .contact-list a:hover { border-color: #fff; } }

/* ---------- Footer */
.footer { padding: 0 var(--m) max(24px, env(safe-area-inset-bottom)); overflow: hidden; }
.foot-name { font: 900 14.2vw/0.8 "Display"; letter-spacing: -0.065em; margin-left: -0.05em; white-space: nowrap; overflow: hidden; padding-bottom: 0.05em; }
.foot-row { display: flex; justify-content: space-between; gap: 16px; margin-top: 24px; font-weight: 600; font-size: 0.9375rem; color: var(--ink-2); }

/* ---------- Toast */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 160; transform: translate(-50%, 140%); padding: 14px 22px; border-radius: 999px; background: #fff; color: #000; font-weight: 600; opacity: 0; transition: transform 400ms var(--ease-out), opacity 300ms ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Player */
.player { position: fixed; inset: 0; z-index: 170; background: #000; display: grid; grid-template-rows: 1fr auto; }
.player[hidden] { display: none; }
.player-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: clamp(12px, 3vw, 40px) clamp(12px, 3vw, 40px) 0; }
.player video { width: 100%; height: 100%; max-height: calc(100svh - 110px); object-fit: contain; }
.player-bar { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 20px; padding: 22px clamp(16px, 3vw, 40px) max(22px, env(safe-area-inset-bottom)); }
.pbtn { min-height: 48px; min-width: 48px; display: inline-grid; place-items: center; border-radius: 999px; background: #161616; padding: 0 16px; font-weight: 600; transition: transform 160ms var(--ease-out), background-color 200ms ease; }
.pbtn:active { transform: scale(0.95); }
.pbtn svg { width: 16px; height: 16px; fill: #fff; }
.pbtn .ico-play { display: none; } .player.paused .pbtn .ico-play { display: block; } .player.paused .pbtn .ico-pause { display: none; }
.pclose { display: inline-flex; gap: 10px; }
.pclose kbd { font: 600 0.75rem "Text"; color: var(--ink-3); }
@media (hover: hover) and (pointer: fine) { .pbtn:hover { background: #262626; } }
.ptime { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.ptrack { position: relative; height: 32px; cursor: pointer; touch-action: none; }
.ptrack::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; background: #222; border-radius: 2px; }
.ptrack i { position: absolute; left: 0; top: 50%; height: 4px; margin-top: -2px; width: 100%; background: #fff; border-radius: 2px; transform-origin: left; transform: scaleX(var(--p, 0)); }
.ptrack b { position: absolute; top: 50%; left: 0; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #fff; transform: translateX(calc(var(--p, 0) * var(--w, 0px))); }
@media (max-width: 640px) { .ptime { display: none; } .player-bar { grid-template-columns: auto 1fr auto; } .pclose kbd { display: none; } }

/* ---------- About page */
.about-hero { min-height: 92svh; }
.about-hero .hero-inner { justify-content: flex-end; gap: clamp(32px, 5vh, 56px); }
.page-about .hero-title { font-size: clamp(5rem, 26vw, 26rem); }
.about-lead { font: 700 clamp(1.5rem, 3vw, 2.75rem)/1.15 "Display"; letter-spacing: -0.035em; max-width: 26em; }
.about-block { margin-top: var(--gap); padding: 0 var(--m); }
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px clamp(32px, 5vw, 96px); align-items: start; }
.about-body { display: grid; gap: 18px; }
.about-big { font: 900 clamp(2rem, 4.2vw, 4.25rem)/0.98 "Display"; letter-spacing: -0.045em; }
.about-mid { font-size: var(--t-big); font-weight: 600; letter-spacing: -0.02em; }
.about-p { color: var(--ink-2); max-width: 58ch; }
.facts { display: flex; gap: clamp(32px, 6vw, 96px); margin: 16px 0 8px; }
.facts dt { font-weight: 600; color: var(--ink-2); }
.facts dd { font: 900 clamp(4rem, 10vw, 9rem)/0.9 "Display"; letter-spacing: -0.055em; font-variant-numeric: tabular-nums; }
.traits { display: grid; gap: 4px; }
.traits li { font: 900 clamp(2rem, 4.6vw, 4.5rem)/1.05 "Display"; letter-spacing: -0.045em; transition: opacity 250ms ease, transform 300ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .traits:hover li { opacity: .3; } .traits li:hover { opacity: 1; transform: translateX(12px); } }
.page-about .contact { margin-top: 0; }
.contact-wrap { display: grid; gap: clamp(24px, 3vw, 40px); }
@media (max-width: 899px) { .about-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Motion states (only with .motion on <html>)
   ========================================================= */
.measuring .hero-title .ch { transform: none !important; transition: none !important; }
.motion .hero-title .ch { transform: translateY(105%); }
.motion.go .hero-title .ch { transform: none; transition: transform 1300ms var(--ease-out); transition-delay: calc(60ms + var(--i) * 55ms); }
.motion [data-rise] { opacity: 0; transform: translateY(30px); }
.motion [data-rise].in { opacity: 1; transform: none; transition: opacity 900ms var(--ease-out), transform 1000ms var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
.motion.go .hero [data-rise] { opacity: 1; transform: none; transition: opacity 900ms var(--ease-out), transform 1000ms var(--ease-out); transition-delay: calc(900ms + var(--i, 0) * 110ms); }
.motion .reel-thumb[data-rise] { clip-path: inset(0 0 100% 0); transform: none; opacity: 1; }
.motion.go .reel-thumb[data-rise] { clip-path: inset(0 0 0 0 round 6px); transition: clip-path 1300ms var(--ease-in-out) 1000ms; }

/* illustrations */
.motion .viz-frame .draw { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.motion .viz-frame .gauge { stroke-dasharray: var(--to) 1; stroke-dashoffset: var(--to); }
.motion .on .viz-frame .draw, .motion .on .viz-frame .gauge { stroke-dashoffset: 0; transition: stroke-dashoffset 1800ms var(--ease-out) calc(var(--d, 0s) + 300ms); }
.motion .viz-frame .bar, .motion .viz-frame .mark:not(.static) { transform-box: fill-box; transform-origin: bottom; transform: scaleY(0); }
.motion .on .viz-frame .bar, .motion .on .viz-frame .mark:not(.static) { transform: none; transition: transform 900ms var(--ease-out) calc(var(--i) * 40ms + 400ms); }
.motion .viz-frame .hbar { transform-box: fill-box; transform-origin: left; transform: scaleX(0); }
.motion .on .viz-frame .hbar { transform: none; transition: transform 1100ms var(--ease-out) calc(var(--i) * 110ms + 500ms); }
.motion .viz-frame .blk { opacity: 0; transform: translateY(16px); }
.motion .on .viz-frame .blk { opacity: 1; transform: none; transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out); transition-delay: calc(var(--i) * 120ms + 150ms); }
.motion .viz-frame .plot { transform-box: fill-box; transform-origin: center; transform: scale(0); }
.motion .on .viz-frame .plot { transform: none; transition: transform 600ms var(--ease-out) calc(var(--i) * 18ms + 300ms); }
.motion .viz-frame .led { animation: led 1.4s steps(1) infinite; }
@keyframes led { 50% { opacity: .2; } }
.motion .card-text > * { opacity: 0; transform: translateY(26px); }
.motion .card.on .card-text > * { opacity: 1; transform: none; transition: opacity 800ms var(--ease-out), transform 900ms var(--ease-out); }
.motion .card.on .card-text > :nth-child(2) { transition-delay: 70ms; } .motion .card.on .card-text > :nth-child(3) { transition-delay: 140ms; }
.motion .card.on .card-text > :nth-child(4) { transition-delay: 210ms; } .motion .card.on .card-text > :nth-child(5) { transition-delay: 280ms; }
.motion .card.on .card-text > :nth-child(6) { transition-delay: 350ms; }
.motion .card-title { clip-path: inset(0 100% 0 0); }
.motion .card.on .card-title { clip-path: inset(0 -5% 0 0); transition: clip-path 1100ms var(--ease-in-out), opacity 1ms, transform 1ms; }
.motion .card-viz { opacity: 0; transform: translateY(40px) scale(.96); }
.motion .card.on .card-viz { opacity: 1; transform: none; transition: opacity 900ms var(--ease-out), transform 1100ms var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  .statement { height: auto; }
  .statement-pin { position: static; height: auto; padding: var(--gap) var(--m) 0; }
  .card { position: relative; height: auto; }
}

/* ---------- Prism ripple ring */
.prism { position: fixed; z-index: 3; width: 520px; height: 520px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, #ff5f8f, #ffb057, #ffe66b, #5effa8, #5ee8ff, #7d8bff, #d07bff, #ff5f8f);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); filter: blur(.4px); }

/* ---------- Footer links, 404 */
.foot-row { flex-wrap: wrap; align-items: center; }
.foot-links { display: flex; gap: 22px; }
.foot-links a, .foot-row > a { transition: color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .foot-links a:hover, .foot-row > a:hover { color: #fff; } }
.page-404 .hero-title { font-size: clamp(8rem, 34vw, 30rem); }
.lost .hero-inner { justify-content: center; }
.lost-copy { display: grid; gap: 24px; }
.page-404 .scroll-cue, .page-404 .hud { display: none !important; }
.page-404 .hero-title .line:last-child { text-align: left; }
.leaf { fill: #1d3b28; } .vein { fill: none; stroke: #4c7a5c; stroke-width: 3; } .spot { fill: #c58a3a; }
.det { fill: none; stroke: url(#spec); stroke-width: 3; stroke-dasharray: 10 6; } .vl.accentt { fill: #5effa8; font-weight: 600; }
.mist { fill: none; stroke: rgba(158, 230, 255, .55); stroke-width: 2; stroke-dasharray: 3 7; } .band { fill: rgba(255, 106, 125, .14); }
.prop { fill: rgba(255,255,255,.05); stroke: #555; stroke-width: 2; } .hub { fill: #9b9b9b; }

/* =========================================================
   Work by domain — glass cards over the live particle field
   ========================================================= */
.domain-nav { position: sticky; top: 74px; z-index: 40; margin: 0 var(--m) clamp(40px, 6vw, 80px); display: flex; justify-content: center; pointer-events: none; }
.domain-nav ul { pointer-events: auto; display: flex; gap: 6px; padding: 6px; border-radius: 999px; overflow-x: auto; scrollbar-width: none; max-width: 100%;
  background: rgba(20, 20, 26, .45); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), inset 0 1px 0 rgba(255,255,255,.18), 0 10px 40px rgba(0,0,0,.45); }
.domain-nav ul::-webkit-scrollbar { display: none; }
.domain-nav a { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: .9375rem; color: var(--ink-2); transition: background-color 250ms ease, color 250ms ease; }
.domain-nav a i { width: 8px; height: 8px; border-radius: 50%; background: var(--tint); box-shadow: 0 0 10px var(--tint); }
.domain-nav a b { font-size: .75rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.domain-nav a.on { background: rgba(255,255,255,.12); color: #fff; }
@media (hover: hover) and (pointer: fine) { .domain-nav a:hover { color: #fff; } }

.domain { position: relative; padding: 0 var(--m); margin-bottom: clamp(96px, 12vw, 180px); scroll-margin-top: 150px; }
.domain::before { content: ""; position: absolute; left: 10%; right: 10%; top: 10%; height: 60%; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, color-mix(in srgb, var(--tint) 22%, transparent), transparent 70%); filter: blur(40px); opacity: .7; }
.domain-head { display: flex; justify-content: space-between; align-items: end; gap: 16px 40px; flex-wrap: wrap; margin-bottom: clamp(28px, 3.5vw, 48px); }
.domain-title { font-size: clamp(2.5rem, 5.6vw, 5.5rem); line-height: .92; letter-spacing: -0.05em; }
.domain-title::before { content: ""; display: block; width: 56px; height: 4px; border-radius: 2px; margin-bottom: 18px; background: var(--tint); box-shadow: 0 0 18px var(--tint); }
.domain-sub { font-size: var(--t-big); font-weight: 600; letter-spacing: -.02em; line-height: 1.25; color: var(--ink-2); max-width: 30ch; }
.domain-sub span { display: block; margin-top: 6px; font-size: .9375rem; color: var(--tint); }

.glass-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.glass-grid.one { grid-template-columns: 1fr; }
.glass { position: relative; display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: 22px; isolation: isolate;
  background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.03) 45%, rgba(255,255,255,.05));
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), inset 0 1px 0 rgba(255,255,255,.28), 0 24px 60px -20px rgba(0,0,0,.6);
  transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px)); transition: transform 600ms var(--ease-out), box-shadow 400ms ease; }
.glass::before { /* specular highlight that follows the pointer */
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: var(--glow, 0); transition: opacity 400ms ease;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 0%), rgba(255,255,255,.16), transparent 45%); }
.glass::after { /* tinted rim */
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, color-mix(in srgb, var(--tint) 70%, transparent), transparent 35%, transparent 70%, rgba(255,255,255,.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
@media (hover: hover) and (pointer: fine) { .glass:hover { --glow: 1; --ty: -6px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2), inset 0 1px 0 rgba(255,255,255,.35), 0 40px 80px -24px rgba(0,0,0,.7), 0 0 60px -20px var(--tint); } }
.glass-grid.one .glass { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: none; }
.g-media { position: relative; margin: 12px 12px 0; border-radius: 14px; overflow: hidden; background: rgba(0,0,0,.35); aspect-ratio: 16 / 10; }
.glass-grid.one .g-media { margin: 12px 0 12px 12px; aspect-ratio: auto; min-height: 340px; }
.g-media.art { display: grid; place-items: center; padding: 14px; }
.g-media.art svg { width: 100%; height: 100%; max-height: 100%; }
.g-media.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 900ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .glass:hover .g-media.shot img { transform: scale(1.04); } }
.g-body { display: grid; gap: 12px; align-content: start; padding: clamp(18px, 2vw, 28px); }
.glass-grid.one .g-body { align-content: center; padding: clamp(24px, 3vw, 44px); }
.g-status { justify-self: start; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .8125rem; color: var(--ink-2); padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.g-status.is-live { color: #fff; }
.g-status.is-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3dff8f; box-shadow: 0 0 10px #3dff8f; }
.motion .g-status.is-live::before { animation: blink 1.6s steps(1) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.g-title { font-size: clamp(1.75rem, 2.8vw, 2.75rem); line-height: .98; letter-spacing: -0.045em; }
.g-line { color: var(--ink-2); }
.g-stack { font-weight: 600; font-size: .9375rem; color: var(--tint); }
.g-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.g-link { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: .9375rem; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); transition: background-color 200ms ease, transform 160ms var(--ease-out), color 200ms ease; }
.g-link.primary { background: #fff; color: #000; box-shadow: none; }
.g-link:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .g-link:hover { background: rgba(255,255,255,.16); } .g-link.primary:hover { background: color-mix(in srgb, var(--tint) 35%, #fff); } }
@media (max-width: 899px) {
  .glass-grid, .glass-grid.one { grid-template-columns: 1fr; }
  .glass-grid.one .glass { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .glass-grid.one .g-media { margin: 12px 12px 0; aspect-ratio: 16 / 10; min-height: 0; }
  .domain-nav { top: 66px; justify-content: flex-start; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass, .domain-nav ul { background: rgba(18,18,22,.92); } }

/* entrance: cards rise and sharpen, staggered; media draws in */
.motion .glass { opacity: 0; --ty: 40px; filter: blur(8px); }
.motion .glass.on { opacity: 1; --ty: 0px; filter: none; transition: opacity 900ms var(--ease-out), transform 1000ms var(--ease-out), filter 800ms var(--ease-out), box-shadow 400ms ease; transition-delay: calc(var(--i) * 120ms); }
.motion .glass.on:hover { transition-delay: 0ms; }
@media (prefers-reduced-motion: reduce) { .glass { transition: none; } }

.motion .g-media .draw { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.motion .g-media .gauge { stroke-dasharray: var(--to) 1; stroke-dashoffset: var(--to); }
.motion .on .g-media .draw, .motion .on .g-media .gauge { stroke-dashoffset: 0; transition: stroke-dashoffset 1800ms var(--ease-out) calc(var(--d, 0s) + 400ms); }
.motion .g-media .bar, .motion .g-media .mark:not(.static) { transform-box: fill-box; transform-origin: bottom; transform: scaleY(0); }
.motion .on .g-media .bar, .motion .on .g-media .mark:not(.static) { transform: none; transition: transform 900ms var(--ease-out) calc(var(--i) * 40ms + 500ms); }
.motion .g-media .hbar { transform-box: fill-box; transform-origin: left; transform: scaleX(0); }
.motion .on .g-media .hbar { transform: none; transition: transform 1100ms var(--ease-out) calc(var(--i) * 110ms + 600ms); }
.motion .g-media .blk { opacity: 0; transform: translateY(16px); }
.motion .on .g-media .blk { opacity: 1; transform: none; transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out); transition-delay: calc(var(--i) * 120ms + 300ms); }
.motion .g-media .plot { transform-box: fill-box; transform-origin: center; transform: scale(0); }
.motion .on .g-media .plot { transform: none; transition: transform 600ms var(--ease-out) calc(var(--i) * 18ms + 400ms); }
.motion .g-media .led { animation: led 1.4s steps(1) infinite; }
.orbit { fill: none; stroke: rgba(110,231,255,.35); stroke-width: 1.5; } .sat { fill: #6ee7ff; } .deb { fill: #ff9a5e; }
.ping { fill: none; stroke: #ff5f8f; stroke-width: 3; } .motion .ping { animation: ping2 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ping2 { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
.risk { fill: #ff5f8f; } .cell { fill: #ffc24a; opacity: .85; } .eol { stroke: #ff6a7d; stroke-dasharray: 6 6; stroke-width: 2; }
.sm { fill: #3a3a46; stroke: #5d5d73; } .cache { fill: #a78bfa; } .mem { fill: #9b9b9b; }
.motion .g-media .cell, .motion .g-media .sm { transform-box: fill-box; transform-origin: center; transform: scale(0); }
.motion .on .g-media .cell, .motion .on .g-media .sm { transform: none; transition: transform 500ms var(--ease-out) calc(var(--i) * 20ms + 400ms); }

/* ---------- Photo */
.avatar { position: relative; flex: none; display: grid; place-items: center; border-radius: 50%; overflow: hidden; isolation: isolate;
  background: linear-gradient(140deg, rgba(110,231,255,.25), rgba(167,139,250,.25), rgba(255,122,182,.25));
  box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 0 0 5px rgba(255,255,255,.05), 0 0 40px -6px rgba(167,139,250,.6); }
.avatar::after { content: ""; position: absolute; inset: 0; border-radius: 50%; padding: 2px; background: conic-gradient(from var(--spin, 0deg), var(--c1), var(--c2), var(--c3), var(--c1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.motion .avatar::after { animation: spin 6s linear infinite; }
@keyframes spin { to { --spin: 360deg; } }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.avatar .mono { font: 900 1em/1 "Display"; letter-spacing: -0.04em; color: #fff; }
.me { display: flex; align-items: center; gap: 16px; }
.av-hero { width: 64px; height: 64px; font-size: 1.25rem; }
.contact-me { display: flex; align-items: center; gap: 22px; }
.av-contact { width: 92px; height: 92px; font-size: 1.75rem; }
.about-me { display: flex; align-items: center; gap: clamp(24px, 4vw, 56px); }
.av-about { width: clamp(140px, 16vw, 240px); height: clamp(140px, 16vw, 240px); font-size: clamp(2.5rem, 4vw, 4rem); }
@media (max-width: 640px) { .about-me { flex-direction: column; align-items: flex-start; } .contact-me { align-items: flex-start; } }


/* =========================================================
   Illustrations v2: crisp, alive while visible
   ========================================================= */
.g-media svg, .viz-frame svg { stroke: none; fill: currentColor; color: #fff; shape-rendering: geometricPrecision; text-rendering: geometricPrecision; }
.g-media .vl { paint-order: normal; }
.g-media { background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--tint) 14%, #0b0b0f), #050507 70%); }
.g-grid { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 28px 28px; -webkit-mask: radial-gradient(80% 70% at 50% 40%, #000, transparent); mask: radial-gradient(80% 70% at 50% 40%, #000, transparent); }
.g-scan { position: absolute; top: 0; bottom: 0; left: 0; width: 34%; z-index: 2; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--tint) 18%, transparent), transparent); }
.g-media svg { position: relative; z-index: 1; }
.flow { fill: none; stroke: var(--tint); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 2 16; opacity: 0; }
.spin-slow, .spin-fast { transform-box: view-box; }

/* everything below only runs while the card is on screen */
.motion .glass.vis .g-scan { animation: scan 4.5s cubic-bezier(.77,0,.175,1) infinite; }
@keyframes scan { 0% { transform: translateX(-100%); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(300%); opacity: 0; } }
.motion .glass.vis .flow { opacity: .9; animation: flow 1.2s linear infinite; animation-delay: calc(var(--i, 0) * -.3s); }
@keyframes flow { to { stroke-dashoffset: -36; } }
.motion .glass.vis .spin-slow { animation: spin360 40s linear infinite; }
.motion .glass.vis .spin-fast { animation: spin360 .5s linear infinite; }
@keyframes spin360 { to { transform: rotate(360deg); } }
.motion .glass.vis .hbar { animation: breathe 3.2s ease-in-out infinite alternate; animation-delay: calc(1.6s + var(--i) * .4s); transform-origin: left; transform-box: fill-box; }
@keyframes breathe { from { transform: scaleX(1); } to { transform: scaleX(.86); } }
.motion .glass.vis .cell { animation: charge 2.4s ease-in-out infinite; animation-delay: calc(1.2s + var(--i) * 60ms); }
@keyframes charge { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.motion .glass.vis .sm { animation: work 1.8s steps(2) infinite; animation-delay: calc(1.2s + var(--i) * 90ms); }
@keyframes work { 50% { fill: #5d5d80; } }
.motion .glass.vis .plot { animation: moist 3s ease-in-out infinite alternate; animation-delay: calc(1.2s + var(--i) * 70ms); }
@keyframes moist { to { opacity: .3; } }
.motion .glass.vis .water { animation: slosh 3s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes slosh { to { transform: scaleY(.97) skewX(-1.5deg); } }
.motion .glass.vis .spot { animation: pulseO 1.6s ease-in-out infinite alternate; }
@keyframes pulseO { to { opacity: .45; } }
.motion .glass.vis .gauge { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--tint) 60%, transparent)); }
.bub { fill: rgba(158, 230, 255, .5); }
.motion .glass.vis .bub { animation: bubble 2.6s ease-in infinite; animation-delay: calc(var(--i) * -.6s); transform-box: fill-box; }
@keyframes bubble { from { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } to { transform: translateY(-110px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .g-scan, .flow { display: none; } }

/* card polish: no 3D tilt (it softened text), lift + light only */
.glass { transform: translateY(var(--ty, 0px)); }
.g-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.g-facts li { padding: 6px 12px; border-radius: 10px; font-weight: 600; font-size: .875rem; color: #fff;
  background: color-mix(in srgb, var(--tint) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 35%, transparent); }
.g-title { font-size: clamp(2rem, 3.4vw, 3.5rem); }
.glass-grid.one .glass { min-height: 520px; }
.glass-grid.one .g-title { font-size: clamp(2.5rem, 4.6vw, 4.75rem); }
.motion .glass { opacity: 0; --ty: 48px; filter: none; }
.motion .glass .g-media { clip-path: inset(0 0 100% 0 round 14px); }
.motion .glass.on { opacity: 1; --ty: 0px; transition: opacity 800ms var(--ease-out), transform 1000ms var(--ease-out), box-shadow 400ms ease; transition-delay: calc(var(--i) * 140ms); }
.motion .glass.on .g-media { clip-path: inset(0 0 0 0 round 14px); transition: clip-path 1200ms var(--ease-in-out) calc(var(--i) * 140ms + 150ms); }
.motion .glass .g-body > * { opacity: 0; transform: translateY(18px); }
.motion .glass.on .g-body > * { opacity: 1; transform: none; transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out); }
.motion .glass.on .g-body > :nth-child(2) { transition-delay: 300ms; } .motion .glass.on .g-body > :nth-child(3) { transition-delay: 380ms; }
.motion .glass.on .g-body > :nth-child(4) { transition-delay: 460ms; } .motion .glass.on .g-body > :nth-child(5) { transition-delay: 540ms; }
.motion .glass.on .g-body > :nth-child(6) { transition-delay: 620ms; } .motion .glass.on .g-body > :nth-child(1) { transition-delay: 220ms; }

/* =========================================================
   Hero portrait
   ========================================================= */
.portrait { position: relative; justify-self: end; align-self: end; width: min(320px, 32svh); aspect-ratio: 1; margin: 0 calc(3vw + 70px) 4vh 0; display: grid; place-items: center; }
.portrait .halo { position: absolute; inset: -18%; border-radius: 50%; background: conic-gradient(from 0deg, var(--c1), var(--c2), var(--c3), var(--c1)); filter: blur(40px); opacity: .45; }
.motion .portrait .halo { animation: spin360 14s linear infinite; }
.av-portrait { width: 100%; height: 100%; font-size: clamp(3rem, 6vw, 5rem); }
.av-portrait::after { padding: 3px; }
.orbit-tags { position: absolute; inset: 0; pointer-events: none; }
.orbit-tags li { position: absolute; left: 50%; top: 50%; padding: 7px 13px; border-radius: 999px; font-weight: 600; font-size: .8125rem; white-space: nowrap;
  background: rgba(20,20,26,.55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
  transform: rotate(var(--a)) translateX(calc(min(320px, 32svh) * .68)) rotate(calc(-1 * var(--a))) translate(-50%, -50%); }
.motion .orbit-tags { animation: spin360 36s linear infinite; }
.motion .orbit-tags li { animation: counter 36s linear infinite; }
@keyframes counter { from { transform: rotate(var(--a)) translateX(calc(min(320px, 32svh) * .68)) rotate(calc(-1 * var(--a))) translate(-50%, -50%) rotate(0deg); }
  to { transform: rotate(var(--a)) translateX(calc(min(320px, 32svh) * .68)) rotate(calc(-1 * var(--a))) translate(-50%, -50%) rotate(-360deg); } }
.portrait figcaption { position: absolute; bottom: -58px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-weight: 600; font-size: .875rem; color: var(--ink-2); }
.avail { color: #3dff8f; }
.motion .portrait[data-rise] { opacity: 0; transform: scale(.94); }
.motion.go .portrait[data-rise] { opacity: 1; transform: none; transition: opacity 1000ms var(--ease-out) 900ms, transform 1200ms var(--ease-out) 900ms; }
@media (max-width: 899px) { .portrait { justify-self: center; width: min(220px, 56vw); margin: 10px 0 70px; order: -1; } .orbit-tags { display: none; } }

/* =========================================================
   Full-window scene cut between sections
   ========================================================= */
.cut { position: fixed; inset: 0; z-index: 175; pointer-events: none; display: none; place-content: center; text-align: center; gap: 14px; }
.cut.run { display: grid; }
.cut-panel { position: absolute; inset: 0; background: radial-gradient(90% 70% at 50% 50%, color-mix(in srgb, var(--tint, #a78bfa) 22%, #050507), #000 75%);
  box-shadow: inset 0 3px 0 var(--tint, #a78bfa), inset 0 -3px 0 var(--tint, #a78bfa); }
.cut-kicker { position: relative; font-weight: 600; color: var(--tint, var(--ink-2)); letter-spacing: .02em; }
.cut-title { position: relative; font: 900 clamp(3.5rem, 11vw, 11rem)/.9 "Display"; letter-spacing: -0.06em; padding: 0 var(--m); }
.cut-title .kl { display: inline-block; }

.portrait figcaption { display: none; }
.hero-where { font-weight: 600; font-size: .9375rem; color: var(--ink-2); }

/* ---------- v3 adjustments */
[data-scene] { transform-origin: 50% 0%; will-change: transform, opacity; }
.domain-nav { position: relative; top: auto; justify-content: flex-start; margin-top: -24px; }
.portrait { width: min(420px, 37svh); margin: 0 1vw 1vh 0; }
.av-portrait { box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 30px 80px -20px rgba(0,0,0,.8), 0 0 60px -10px rgba(167,139,250,.55); }
.av-portrait::after { padding: 4px; }
.hero-title { font-size: clamp(5rem, min(19vw, 27svh), 24rem); }
@media (min-width: 900px) and (max-height: 820px) { .hero-title { font-size: min(18vw, 25svh); } .portrait { width: min(380px, 36svh); } }
@media (max-width: 899px) { .hero-title { font-size: 26vw; } .portrait { width: min(300px, 72vw); margin: 16px 0 24px; } }

/* =========================================================
   v4: Pluto-style scenes — snap, veil sweep, blur-rise copy
   ========================================================= */

[data-scene] { transform: none !important; opacity: 1 !important; filter: none !important; will-change: auto; }
.hero, .statement, .experience, .toolkit, .contact, .about-block { min-height: 100svh; }
.statement { height: auto; display: grid; }
.statement-pin { position: static; height: auto; min-height: 100svh; }
.experience, .toolkit, .about-block { display: flex; flex-direction: column; justify-content: center; padding-top: 96px; padding-bottom: 64px; margin-top: 0; }
.contact { margin-top: 0; }
.domain { min-height: 100svh; margin-bottom: 0; padding-top: 104px; padding-bottom: 72px; display: flex; flex-direction: column; justify-content: center; scroll-margin-top: 0; }
.work { margin-top: 0; }
.work-head { min-height: 60svh; display: flex; align-items: center; margin-bottom: 0; padding-top: 96px; }

.veil { position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0; background: #000; }
.veil.is-sweeping { animation: veil 1000ms var(--ease-in-out) both; }
@keyframes veil { 0% { opacity: 0; } 35% { opacity: .92; } 100% { opacity: 0; } }

.motion [data-scene] [data-in] { opacity: 0; transform: translateY(46px); filter: blur(10px);
  transition: opacity 900ms var(--ease-out), transform 1100ms var(--ease-out), filter 900ms var(--ease-out); transition-delay: calc(var(--d, 0) * 110ms + 250ms); }
.motion [data-scene].is-active [data-in] { opacity: 1; transform: none; filter: none; }
/* glass cards take their entrance from the scene (and replay it) */
.motion .glass[data-in] { --ty: 0px; }
.motion [data-scene]:not(.is-active) .glass .g-media { clip-path: inset(0 0 100% 0 round 14px); transition: none; }
.motion [data-scene]:not(.is-active) .glass .g-body > * { opacity: 0; transform: translateY(18px); transition: none; }

/* domain bar: a solid sticky band for navigation */
.domain-nav { position: sticky; top: 0; z-index: 45; margin: 0; padding: 12px var(--m); justify-content: flex-start;
  background: rgba(0,0,0,.78); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 1px 0 rgba(255,255,255,.08); }
.domain-nav ul { background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
html.bar-stuck .nav { transform: translateY(-110%); }
html.bar-stuck .progress { top: 0; }
.domain { scroll-margin-top: 62px; }
@media (prefers-reduced-motion: reduce) { .veil { display: none; } }

/* hero name: crisp solid type; the particle film sits behind it as sparkle */
.film .hero-title, .film .hero-title .ch { color: transparent; text-shadow: none; }
.hero-title .line { padding-bottom: .08em; }

/* =========================================================
   Each domain fits exactly one screen (desktop), so every scroll lands on a whole scene
   ========================================================= */
@media (min-width: 900px) and (min-height: 680px) {
  .domain { height: 100svh; min-height: 0; padding: 86px var(--m) 28px; justify-content: flex-start; }
  .domain-head { margin-bottom: clamp(14px, 2vh, 24px); flex: none; align-items: center; }
  .domain-title { font-size: clamp(2.25rem, 4.2vw, 4.25rem); }
  .domain-title::before { margin-bottom: 10px; }
  .domain-sub { font-size: clamp(1.0625rem, 1.4vw, 1.375rem); max-width: 36ch; }
  .glass-grid { flex: 1; min-height: 0; grid-auto-rows: minmax(0, 1fr); }
  .glass { min-height: 0 !important; grid-template-rows: minmax(0, 1fr) auto; }
  .glass-grid.one .glass { grid-template-rows: none; }
  .g-media { aspect-ratio: auto !important; min-height: 0 !important; display: grid; place-items: center; }
  .g-media.art { padding: 10px 14px; }
  .g-media.art svg { width: auto; height: 100%; max-width: 100%; }
  .glass-grid:not(.one) .g-body { padding: 14px 20px 18px; gap: 8px; }
  .glass-grid:not(.one) .g-title { font-size: clamp(1.5rem, 2.2vw, 2.25rem); }
  .glass-grid:not(.one) .g-line { font-size: .9375rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .glass-grid:not(.one) .g-stack { display: none; }
  .glass-grid:not(.one) .g-facts li { padding: 4px 10px; font-size: .8125rem; }
  .glass-grid:not(.one) .g-link { min-height: 36px; padding: 0 14px; font-size: .875rem; }
  .glass-grid:not(.one) .g-status { padding: 4px 10px; }
  .glass-grid.one .g-body { padding: clamp(20px, 2.6vw, 40px); gap: 12px; }
}

/* calm cards: no sweeping light, no flowing dots, no glow sheen */
.g-scan, .flow { display: none !important; }
.glass::before { display: none; }
.motion .glass.vis .gauge { filter: none; }

/* landing is exactly one screen so snapping back up always lands at the very top */
@media (min-width: 900px) and (min-height: 680px) { .hero { height: 100svh; min-height: 0; overflow: hidden; } .hero-inner { min-height: 0; } }

html, html.motion { scroll-snap-type: none; }
.hand { fill: #2a2a33; stroke: #6b6b80; stroke-width: 2; } .pinch { fill: none; stroke: #6ee7ff; stroke-width: 3; } .planet { stroke: none; }

/* ---------- Pointer: dot + trailing ring, native arrow hidden */
@media (hover: hover) and (pointer: fine) {
  html.has-cursor, html.has-cursor * { cursor: none !important; }
  .motion .cursor { width: 34px; height: 34px; margin: -17px 0 0 -17px; background: transparent; mix-blend-mode: normal;
    box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); backdrop-filter: none; z-index: 151;
    transition: opacity 200ms ease, width 300ms var(--ease-out), height 300ms var(--ease-out), margin 300ms var(--ease-out), background-color 300ms ease, box-shadow 300ms ease; }
  .motion .cursor.big { width: 58px; height: 58px; margin: -29px 0 0 -29px; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.9); }
  .motion .cursor.card { width: 46px; height: 46px; margin: -23px 0 0 -23px; box-shadow: inset 0 0 0 1.5px rgba(167,139,250,.9); }
  .motion .cursor.text { width: 24px; height: 24px; margin: -12px 0 0 -12px; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }
  .motion .cursor.label { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: #fff; box-shadow: none; }
  .motion .cursor.down { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
  .cursor-dot { display: none; }
  .motion .cursor-dot { display: block; position: fixed; left: 0; top: 0; z-index: 152; pointer-events: none; width: 6px; height: 6px; margin: -3px 0 0 -3px;
    border-radius: 50%; background: #fff; opacity: 0; transition: opacity 150ms ease, width 200ms var(--ease-out), height 200ms var(--ease-out), margin 200ms var(--ease-out); }
  .motion .cursor-dot.on { opacity: 1; }
  .motion .cursor-dot.hide { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { html.has-cursor, html.has-cursor * { cursor: auto !important; } }
