/* ==========================================================================
   Shashankk Shekar Chaturvedi — Portfolio v2
   Design system: "Mission Control" — cinematic dark, editorial serif accents,
   lime signal accent (#e6fe49, carried over from the original site).
   No build step: plain CSS, served as-is from cPanel.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #050608;
  --bg-elev: #0b0d12;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-2: rgba(255, 255, 255, 0.065);
  --panel-solid: #0e1117;
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.17);
  --fg: #f3f4f7;
  --fg-2: #b6bbc8;
  --fg-3: #80869a;
  --accent: #e6fe49;
  --accent-ink: #0b0c04;
  --accent-fg: #e6fe49;
  --accent-soft: rgba(230, 254, 73, 0.12);
  --blue: #7c96ff;
  --violet: #a78bfa;
  --cyan: #5eead4;
  --rose: #fb7185;
  --amber: #fbbf24;
  --star: 230, 236, 255;
  --glow-a: rgba(92, 112, 255, 0.28);
  --glow-b: rgba(167, 139, 250, 0.22);
  --glow-c: rgba(230, 254, 73, 0.10);
  --shadow-lg: 0 40px 100px -30px rgba(0, 0, 0, 0.75), 0 0 0 1px var(--line);
  --shadow-md: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --grain-opacity: 0.07;
  --nav-bg: rgba(11, 13, 18, 0.72);
  --menu-bg: rgba(5, 6, 8, 0.94);
  --glass-bg: rgba(11, 13, 18, 0.82);
  --orgs-bg: rgba(5, 6, 8, 0.6);
  --metric-bg: #080a0d;
  --fg-fade: rgba(243, 244, 247, 0.08);
  --serif-mid: #e8fd63;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1280px;
  --nav-h: 72px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f4f3ee;
  --bg-elev: #ffffff;
  --panel: rgba(12, 14, 22, 0.03);
  --panel-2: rgba(12, 14, 22, 0.06);
  --panel-solid: #ffffff;
  --line: rgba(12, 14, 22, 0.1);
  --line-strong: rgba(12, 14, 22, 0.2);
  --fg: #0b0d12;
  --fg-2: #3a404e;
  --fg-3: #555c6b;
  --accent: #e6fe49;
  --accent-ink: #0b0c04;
  --accent-fg: #4f6100;
  --accent-soft: rgba(110, 140, 0, 0.1);
  --blue: #3b5bdb;
  --violet: #7048e8;
  --cyan: #0f9d8a;
  --rose: #e11d48;
  --amber: #b45309;
  --star: 20, 24, 40;
  --glow-a: rgba(80, 110, 255, 0.16);
  --glow-b: rgba(150, 110, 250, 0.14);
  --glow-c: rgba(170, 200, 0, 0.12);
  --shadow-lg: 0 40px 90px -40px rgba(20, 24, 40, 0.35), 0 0 0 1px var(--line);
  --shadow-md: 0 20px 40px -24px rgba(20, 24, 40, 0.3);
  --grain-opacity: 0.045;
  --nav-bg: rgba(255, 255, 255, 0.72);
  --menu-bg: rgba(244, 243, 238, 0.95);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --orgs-bg: rgba(244, 243, 238, 0.6);
  --metric-bg: #ffffff;
  --fg-fade: rgba(11, 13, 18, 0.08);
  --serif-mid: #5d7300;
  color-scheme: light;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color 0.5s var(--ease-out), color 0.5s var(--ease-out);
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, h5, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
em { font-style: italic; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[data-theme="light"] :focus-visible { outline-color: #6b7f00; }
[hidden] { display: none !important; }
html.modal-open { overflow: hidden; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 1000; padding: 10px 16px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 600; transition: top 0.2s; }
.skip-link:focus { top: 16px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.serif { font-family: var(--font-serif); font-weight: 400; font-style: italic; letter-spacing: -0.01em; }
.mono { font-family: var(--font-mono); }
.accent { color: var(--accent-fg); }

/* ---------- Ambient layers ---------- */
.starfield { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0.9; }
.aurora { position: fixed; inset: -20vmax; z-index: 0; pointer-events: none; filter: blur(80px); opacity: 1; }
.aurora span { position: absolute; border-radius: 50%; mix-blend-mode: screen; will-change: transform; }
[data-theme="light"] .aurora span { mix-blend-mode: multiply; }
.aurora span:nth-child(1) { width: 52vmax; height: 52vmax; left: 8%; top: 4%; background: radial-gradient(circle, var(--glow-a), transparent 65%); animation: drift-a 26s var(--ease-in-out) infinite alternate; }
.aurora span:nth-child(2) { width: 46vmax; height: 46vmax; right: 2%; top: 16%; background: radial-gradient(circle, var(--glow-b), transparent 65%); animation: drift-b 32s var(--ease-in-out) infinite alternate; }
.aurora span:nth-child(3) { width: 40vmax; height: 40vmax; left: 34%; top: 46%; background: radial-gradient(circle, var(--glow-c), transparent 65%); animation: drift-c 38s var(--ease-in-out) infinite alternate; }
@keyframes drift-a { to { transform: translate3d(12vmax, 8vmax, 0) scale(1.1); } }
@keyframes drift-b { to { transform: translate3d(-10vmax, 12vmax, 0) scale(0.9); } }
@keyframes drift-c { to { transform: translate3d(-8vmax, -10vmax, 0) scale(1.15); } }
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
[data-theme="light"] .grain { filter: invert(1); }
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}
.page { position: relative; z-index: 2; }

/* Scroll progress */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 120; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--blue), var(--violet), var(--accent)); }

/* ---------- Custom cursor ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none; display: none; }
html.has-cursor .cursor { display: block; }
html.has-cursor, html.has-cursor * { cursor: none !important; }
html.has-cursor input, html.has-cursor textarea { cursor: text !important; }
.cursor__dot, .cursor__ring { position: fixed; left: 0; top: 0; border-radius: 50%; transform: translate3d(-100px, -100px, 0); will-change: transform; }
.cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--accent); }
.cursor__ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1px solid color-mix(in srgb, var(--fg) 45%, transparent);
  display: grid; place-items: center; transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out), margin 0.35s var(--ease-out), background-color 0.35s, border-color 0.35s;
}
.cursor__label { font: 600 11px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); opacity: 0; transition: opacity 0.2s; }
.cursor.is-hover .cursor__ring { width: 56px; height: 56px; margin: -28px 0 0 -28px; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.cursor.is-label .cursor__ring { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: var(--accent); border-color: var(--accent); }
.cursor.is-label .cursor__label { opacity: 1; }
.cursor.is-label .cursor__dot, .cursor.is-text .cursor__dot { opacity: 0; }
.cursor.is-text .cursor__ring { width: 3px; height: 26px; margin: -13px 0 0 -1.5px; border-radius: 2px; background: var(--accent); border-color: transparent; }
.cursor.is-down .cursor__ring { transform-origin: center; scale: 0.85; }

/* ---------- Preloader ---------- */
.preloader { display: none; }
html.is-loading { overflow: hidden; }
html.js.is-loading .preloader, .preloader.is-done {
  display: grid; position: fixed; inset: 0; z-index: 500; place-items: center; background: var(--bg);
  clip-path: inset(0 0 0 0); transition: clip-path 0.9s var(--ease-in-out);
}
.preloader.is-leaving { clip-path: inset(0 0 100% 0); pointer-events: none; }
/* Failsafe: if site.js never runs, the head script adds .no-reveal and everything shows */
html.no-reveal [data-reveal], html.no-reveal .split .w > span, html.no-reveal .hero__line > span { opacity: 1 !important; transform: none !important; }
html.no-reveal .preloader { display: none !important; }
.preloader__inner { display: grid; gap: 18px; justify-items: center; text-align: center; }
.preloader__mark { width: 64px; height: 64px; color: var(--fg); }
.preloader__mark path { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1.1s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.preloader__count { font: 500 clamp(56px, 10vw, 120px)/1 var(--font-sans); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.preloader__count small { font-size: 0.35em; color: var(--fg-3); margin-left: 4px; }
.preloader__status { font: 400 12px/1.4 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); min-height: 1.4em; }
.preloader__bar { width: min(240px, 60vw); height: 1px; background: var(--line); overflow: hidden; }
.preloader__bar span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Buttons ---------- */
.btn {
  --h: 52px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 24px; border-radius: 999px; font-weight: 500; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap;
  transition: transform 0.4s var(--ease-out), background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.4s;
  isolation: isolate; overflow: hidden;
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform 0.4s var(--ease-out); }
.btn:hover svg.arrow-ne { transform: translate(2px, -2px); }
.btn:hover svg.arrow-r { transform: translateX(3px); }
.btn:hover svg.arrow-d { transform: translateY(2px); }
.btn--accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -10px rgba(230, 254, 73, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.btn--accent::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.65) 50%, transparent 70%); transform: translateX(-120%); transition: transform 0.9s var(--ease-out); }
.btn--accent:hover::after { transform: translateX(120%); }
.btn--accent:hover { box-shadow: 0 16px 40px -10px rgba(230, 254, 73, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
[data-theme="light"] .btn--accent { box-shadow: 0 10px 24px -12px rgba(90, 110, 0, 0.6), inset 0 0 0 1px rgba(80, 100, 0, 0.25); }
.btn--ghost { border: 1px solid var(--line-strong); background: var(--panel); color: var(--fg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn--ghost:hover { border-color: var(--fg-3); background: var(--panel-2); }
.btn--sm { --h: 40px; padding: 0 16px; font-size: 14px; }
.btn--xs { --h: 34px; padding: 0 14px; font-size: 13px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.6; pointer-events: none; }

.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 999px; color: var(--fg-2);
  border: 1px solid var(--line); background: var(--panel); transition: color 0.25s, border-color 0.25s, background-color 0.25s, transform 0.4s var(--ease-out);
}
.icon-btn:hover { color: var(--fg); border-color: var(--line-strong); background: var(--panel-2); }
.icon-btn svg { width: 18px; height: 18px; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--fg); background-image: linear-gradient(currentColor, currentColor); background-size: 0% 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size 0.5s var(--ease-out), color 0.2s; padding-bottom: 2px; }
.link-arrow:hover { background-size: 100% 1px; color: var(--accent-fg); }
.link-arrow svg { width: 15px; height: 15px; transition: transform 0.4s var(--ease-out); }
.link-arrow:hover svg { transform: translate(2px, -2px); }

.kbd { display: inline-flex; align-items: center; gap: 2px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-strong); font: 500 11px/1.4 var(--font-mono); color: var(--fg-2); background: var(--panel); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 14px; left: 50%; z-index: 100; translate: -50% 0;
  width: min(calc(100% - 24px), 1180px); height: 60px; padding: 0 10px 0 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-radius: 999px; border: 1px solid transparent;
  transition: background-color 0.4s, border-color 0.4s, box-shadow 0.4s, transform 0.5s var(--ease-out), top 0.4s var(--ease-out);
}
.nav.is-scrolled { background: var(--nav-bg); border-color: var(--line); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); box-shadow: var(--shadow-md); }
.nav.is-hidden { transform: translateY(-120%); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.02em; }
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__mark path { transition: stroke 0.3s; }
.brand:hover .brand__mark .mark-accent { stroke: var(--accent); }
.brand__text { font-size: 15px; }
.brand__text span { color: var(--fg-3); font-weight: 400; }
.nav__links { display: flex; align-items: center; gap: 2px; }
.nav__links a { position: relative; padding: 8px 13px; border-radius: 999px; font-size: 14px; color: var(--fg-2); transition: color 0.25s, background-color 0.25s; }
.nav__links a:hover { color: var(--fg); background: var(--panel-2); }
.nav__links a.is-active { color: var(--fg); }
.nav__links a.is-active::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.nav__cmd { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--fg-3); font-size: 13px; transition: border-color 0.25s, color 0.25s; }
.nav__cmd:hover { border-color: var(--line-strong); color: var(--fg); }
.nav__cmd svg { width: 15px; height: 15px; }
.theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-sun { display: block; }
[data-theme="light"] .theme-icon-moon { display: none; }
.nav__burger { display: none; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 99; background: var(--menu-bg); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  display: flex; flex-direction: column; justify-content: flex-start; overflow-y: auto; overscroll-behavior: contain; padding: 100px var(--gutter) 40px; gap: 6px;
  opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease-out), visibility 0.4s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu a.mobile-menu__link { display: flex; align-items: baseline; gap: 14px; font-size: clamp(34px, 9vw, 56px); font-weight: 500; letter-spacing: -0.04em; line-height: 1.15; opacity: 0; transform: translateY(20px); transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out), color 0.2s; }
.mobile-menu a.mobile-menu__link small { font: 400 12px/1 var(--font-mono); color: var(--fg-3); }
.mobile-menu.is-open a.mobile-menu__link { opacity: 1; transform: none; transition-delay: calc(var(--i) * 50ms + 80ms); }
.mobile-menu a.mobile-menu__link:hover { color: var(--accent-fg); }
.mobile-menu > :first-child { margin-top: auto; }
.mobile-menu__foot { margin-top: 32px; margin-bottom: auto; display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-height: 520px) { .mobile-menu { padding-top: 84px; } .mobile-menu a.mobile-menu__link { font-size: clamp(24px, 7.5vh, 40px); } }

/* ---------- Section scaffolding ---------- */
.section { position: relative; padding-block: clamp(96px, 14vw, 180px); }
.section--tight { padding-block: clamp(64px, 9vw, 120px); }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font: 500 12px/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-3); }
.eyebrow b { color: var(--accent-fg); font-weight: 500; }
.eyebrow::after { content: ""; width: 48px; height: 1px; background: var(--line-strong); }
.section-head { display: grid; gap: 22px; margin-bottom: clamp(48px, 7vw, 88px); }
.section-head--split { grid-template-columns: 1.3fr 1fr; align-items: end; gap: 32px 64px; }
.section-title { font-size: clamp(40px, 6.4vw, 88px); line-height: 0.98; font-weight: 500; letter-spacing: -0.045em; text-wrap: balance; }
.section-title em { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.02em; padding-right: 0.04em; background: linear-gradient(100deg, var(--fg) 0%, var(--accent-fg) 60%, var(--fg) 120%); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="light"] .section-title em { background: linear-gradient(100deg, #1b2410, #5d7300 70%); -webkit-background-clip: text; background-clip: text; }
.section-lede { font-size: clamp(16px, 1.35vw, 19px); color: var(--fg-2); max-width: 54ch; line-height: 1.65; }

/* Word-split reveal */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.split .w > span { display: inline-block; }
html.js .split .w > span { transform: translateY(105%); transition: transform 1s var(--ease-out); transition-delay: calc(var(--wi, 0) * 45ms); }
html.js .split.is-in .w > span { transform: none; }

/* Generic reveal */
html.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: calc(var(--d, 0) * 80ms); }
html.js [data-reveal="fade"] { transform: none; }
html.js [data-reveal="scale"] { transform: scale(0.96) translateY(20px); }
html.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: calc(var(--nav-h) + clamp(24px, 4.5vh, 64px)); padding-bottom: clamp(48px, 8vh, 96px); }
.hero__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: clamp(20px, 3.5vh, 36px); }
.status-pill { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 13.5px; color: var(--fg-2); transition: border-color 0.3s, color 0.3s; }
.status-pill:hover { border-color: var(--line-strong); color: var(--fg); }
.status-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; flex: none; }
.status-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid #4ade80; animation: ping 2s var(--ease-out) infinite; }
@keyframes ping { 0% { transform: scale(0.6); opacity: 1; } 100% { transform: scale(2.2); opacity: 0; } }
.hero__loc { display: inline-flex; align-items: center; gap: 8px; font: 400 12px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); }
.hero__loc svg { width: 14px; height: 14px; }

.hero__title { font-size: clamp(46px, 9.4vw, 150px); line-height: 0.9; letter-spacing: -0.055em; font-weight: 500; margin-left: -0.04em; }
.hero__line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero__line > span { display: inline-block; }
html.js .hero__line > span { transform: translateY(110%); }
html.js.hero-in .hero__line > span { transform: none; transition: transform 0.95s var(--ease-out); }
html.js.hero-in .hero__line:nth-child(2) > span { transition-delay: 0.09s; }
.hero__line--2 { display: flex; align-items: flex-end; gap: clamp(16px, 2.4vw, 40px); flex-wrap: wrap; }
.hero__serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.035em; padding-right: 0.06em;
  background: linear-gradient(95deg, var(--fg) 10%, var(--serif-mid) 55%, var(--violet) 110%); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="light"] .hero__serif { background: linear-gradient(95deg, #0b0d12 10%, #5d7300 60%, #5b3fd4 110%); -webkit-background-clip: text; background-clip: text; }
.hero__tagline { font-size: clamp(14px, 1.2vw, 17px); line-height: 1.45; letter-spacing: -0.01em; color: var(--fg-2); max-width: 22ch; padding-bottom: 0.9em; font-weight: 400; }
.hero__tagline b { color: var(--fg); font-weight: 500; }

.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: start; margin-top: clamp(24px, 4vh, 48px); }
.hero__copy { padding-top: clamp(4px, 1.5vh, 20px); }
.hero__role { font-size: clamp(20px, 2.1vw, 28px); line-height: 1.3; letter-spacing: -0.025em; font-weight: 450; margin-bottom: 18px; }
.rotator { position: relative; display: inline-grid; vertical-align: bottom; color: var(--accent-fg); }
.rotator > span { grid-area: 1 / 1; transition: transform 0.7s var(--ease-out), opacity 0.5s, filter 0.5s; white-space: nowrap; }
.rotator > span:not(.is-active) { opacity: 0; transform: translateY(60%); filter: blur(6px); }
.rotator > span.is-leaving { opacity: 0; transform: translateY(-60%); filter: blur(6px); }
.hero__lede { font-size: clamp(15.5px, 1.2vw, 17.5px); color: var(--fg-2); line-height: 1.7; max-width: 52ch; }
.hero__lede strong { color: var(--fg); font-weight: 500; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__socials { display: flex; gap: 8px; margin-top: 28px; align-items: center; }
.hero__socials-label { font: 400 12px/1 var(--font-mono); color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase; margin-right: 8px; }

.scroll-cue { position: absolute; left: 50%; bottom: 22px; translate: -50% 0; display: grid; justify-items: center; gap: 10px; font: 400 10.5px/1 var(--font-mono); letter-spacing: 0.24em; text-transform: uppercase; color: var(--fg-3); }
.scroll-cue i { width: 1px; height: 40px; background: linear-gradient(var(--fg-3), transparent); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--accent); animation: cue 2.2s var(--ease-in-out) infinite; }
@keyframes cue { to { top: 110%; } }

/* ---------- Terminal ---------- */
.terminal-wrap { position: relative; }
.terminal-wrap::before { content: ""; position: absolute; inset: -1px; border-radius: calc(var(--radius) + 1px); padding: 1px; background: conic-gradient(from var(--angle, 0deg), rgba(124, 150, 255, 0.6), rgba(167, 139, 250, 0.2), rgba(230, 254, 73, 0.55), rgba(94, 234, 212, 0.25), rgba(124, 150, 255, 0.6)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin-angle 8s linear infinite; pointer-events: none; z-index: 2; }
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin-angle { to { --angle: 360deg; } }
.terminal-wrap::after { content: ""; position: absolute; inset: 10% 6% -8%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(110, 130, 255, 0.35), transparent); filter: blur(40px); }
.terminal {
  position: relative; border-radius: var(--radius); overflow: hidden; background: rgba(9, 11, 17, 0.82);
  backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%);
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #d6f5e6; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.65;
  transition: transform 0.6s var(--ease-out), opacity 0.5s var(--ease-out), filter 0.5s;
  transform-origin: 50% 100%;
}
[data-theme="light"] .terminal { background: rgba(12, 14, 22, 0.92); }
.terminal__bar { display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 12px 0 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)); }
.traffic { display: flex; gap: 12px; }
.traffic button { width: 12px; height: 12px; border-radius: 50%; display: grid; place-items: center; color: rgba(0, 0, 0, 0.55); box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.25); position: relative; }
.traffic button::before { content: ""; position: absolute; inset: -6px; }
.traffic button svg { width: 8px; height: 8px; opacity: 0; transition: opacity 0.15s; }
.traffic:hover button svg, .traffic button:focus-visible svg { opacity: 1; }
.traffic .t-red { background: #ff5f57; } .traffic .t-yellow { background: #febc2e; } .traffic .t-green { background: #28c840; }
.terminal__title { flex: 1; text-align: center; font-size: 12px; color: rgba(214, 245, 230, 0.55); letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.terminal__tools { display: flex; gap: 6px; }
.term-chip { height: 26px; padding: 0 10px; border-radius: 7px; font: 500 11.5px/1 var(--font-mono); color: rgba(214, 245, 230, 0.8); background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.07); transition: background-color 0.2s, color 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.term-chip:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.term-chip[aria-pressed="true"] { background: rgba(230, 254, 73, 0.16); color: var(--accent); border-color: rgba(230, 254, 73, 0.3); }
.terminal__body { position: relative; height: clamp(250px, 34vh, 330px); overflow-y: auto; padding: 18px 20px 14px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.15) transparent; }
.terminal__body::-webkit-scrollbar { width: 6px; } .terminal__body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 3px; }
.terminal__body::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 80% at 100% 0%, rgba(94, 234, 212, 0.08), transparent 55%), radial-gradient(90% 70% at 0% 100%, rgba(124, 150, 255, 0.09), transparent 60%); }
.t-line { position: relative; white-space: pre-wrap; word-break: break-word; }
.t-line + .t-line { margin-top: 1px; }
.t-gap { height: 10px; }
.t-prompt { color: #9bf6c8; } .t-prompt b { color: #7cc4ff; font-weight: 500; }
.t-muted { color: rgba(214, 245, 230, 0.5); }
.t-accent { color: var(--accent); }
.t-blue { color: #8fb3ff; } .t-violet { color: #c4b5fd; } .t-yellow { color: #ffe277; } .t-rose { color: #fda4af; } .t-cyan { color: #67e8f9; }
.t-line a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(230, 254, 73, 0.35); text-underline-offset: 3px; }
.t-line a:hover { text-decoration-color: var(--accent); }
.t-table { display: grid; grid-template-columns: max-content 1fr; gap: 2px 18px; }
.t-input-row { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; position: relative; }
.t-input-wrap { position: relative; flex: 1; min-width: 0; }
.t-input { width: 100%; background: transparent; border: 0; outline: 0; color: #f1fff7; caret-color: var(--accent); font: inherit; padding: 0; }
.t-ghost { position: absolute; inset: 0; pointer-events: none; color: rgba(214, 245, 230, 0.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-ghost::after { content: ""; display: inline-block; width: 8px; height: 1.1em; margin-left: 2px; vertical-align: -0.18em; background: var(--accent); animation: blink 1.05s steps(1) infinite; }
.t-input:focus + .t-ghost, .t-input:not(:placeholder-shown) + .t-ghost { display: none; }
@keyframes blink { 50% { opacity: 0; } }
.terminal__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 14px; border-top: 1px solid rgba(255, 255, 255, 0.06); background: rgba(255, 255, 255, 0.015); padding-right: 76px; }
.terminal__chips button { height: 28px; padding: 0 11px; border-radius: 8px; font: 500 12px/1 var(--font-mono); color: #a8f0cf; background: rgba(155, 246, 200, 0.06); border: 1px solid rgba(155, 246, 200, 0.14); transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.3s var(--ease-out); }
.terminal__chips button:hover { background: rgba(230, 254, 73, 0.14); color: var(--accent); border-color: rgba(230, 254, 73, 0.35); transform: translateY(-1px); }
.terminal__chips button::before { content: "$ "; color: rgba(168, 240, 207, 0.45); }
.coffee { position: absolute; right: 16px; bottom: 10px; width: 46px; height: 70px; pointer-events: none; z-index: 3; }
.coffee .steam { animation: steam 2.6s linear infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.coffee .steam:nth-of-type(2) { animation-duration: 2.9s; animation-delay: -1s; }
.coffee .steam:nth-of-type(3) { animation-duration: 3.3s; animation-delay: -2s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(4px) scaleX(1); } 30% { opacity: 0.9; } 100% { opacity: 0; transform: translateY(-16px) scaleX(1.15); } }
.terminal.is-closing { transform: scale(0.92) translateY(10px); opacity: 0; filter: blur(6px); }
.terminal.is-min { transform: scale(0.2) translateY(140%); opacity: 0; pointer-events: none; visibility: hidden; transition: transform 0.6s var(--ease-out), opacity 0.5s var(--ease-out), filter 0.5s, visibility 0s linear 0.6s; }
.terminal-dock { position: absolute; left: 50%; bottom: 0; translate: -50% 0; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; font: 500 12.5px/1 var(--font-mono); color: #d6f5e6; background: rgba(9, 11, 17, 0.9); border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity 0.4s, transform 0.5s var(--ease-out); }
.terminal-dock { visibility: hidden; }
.terminal-dock.is-visible { opacity: 1; pointer-events: auto; transform: none; visibility: visible; }
.terminal-dock i { width: 7px; height: 7px; border-radius: 50%; background: #28c840; }
html.term-max .page { z-index: 200; }
.terminal-wrap.is-max { position: fixed; inset: 16px; z-index: 300; }
.terminal-wrap.is-max::after { display: none; }
.terminal-wrap.is-max .terminal { height: 100%; display: flex; flex-direction: column; }
.terminal-wrap.is-max .terminal__body { flex: 1; height: auto; }
.terminal-backdrop { position: fixed; inset: 0; z-index: 299; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* ---------- Orgs marquee ---------- */
.orgs { position: relative; padding-block: 34px; border-block: 1px solid var(--line); background: var(--orgs-bg); }
.orgs__label { text-align: center; font: 400 11.5px/1 var(--font-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 22px; }
.marquee { --gap: clamp(32px, 5vw, 72px); --speed: 40s; display: flex; overflow: hidden; user-select: none; gap: var(--gap); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { flex: none; display: flex; align-items: center; gap: var(--gap); min-width: 100%; justify-content: space-around; animation: marquee var(--speed) linear infinite; }
.marquee--reverse .marquee__track { animation-direction: reverse; }
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-100% - var(--gap))); } }
.org { display: inline-flex; align-items: center; gap: 12px; font-size: clamp(18px, 2vw, 26px); font-weight: 500; letter-spacing: -0.03em; color: var(--fg-2); white-space: nowrap; transition: color 0.3s; }
.org:hover { color: var(--fg); }
.org .serif { font-size: 1.1em; }
.org-sep { color: var(--accent-fg); font-size: 14px; opacity: 0.8; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--panel); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.stat { position: relative; padding: clamp(22px, 2.6vw, 34px); display: grid; gap: 10px; align-content: start; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat__num { font-size: clamp(36px, 4.2vw, 60px); line-height: 1; font-weight: 500; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.stat__num sup, .stat__num small { font-size: 0.5em; letter-spacing: -0.02em; color: var(--accent-fg); vertical-align: top; margin-left: 2px; }
.stat__num sup { position: relative; top: 0.15em; }
.stat__label { font-size: 13.5px; color: var(--fg-2); line-height: 1.45; }
.stat__label span { display: block; font: 400 11px/1.4 var(--font-mono); color: var(--fg-3); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 6px; }

/* ---------- Cards (shared) ---------- */
.card { position: relative; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: border-color 0.4s, transform 0.6s var(--ease-out), background-color 0.4s; }
.spot { --mx: 50%; --my: 50%; }
.spot::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.4s; background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 9%, transparent), transparent 45%); z-index: 0; }
.spot::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1px; opacity: 0; transition: opacity 0.4s; background: radial-gradient(300px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 55%, transparent), transparent 50%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; z-index: 1; }
.spot:hover::before, .spot:hover::after { opacity: 1; }
.spot > * { position: relative; z-index: 2; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; color: var(--fg-2); border: 1px solid var(--line); background: var(--panel); white-space: nowrap; transition: color 0.25s, border-color 0.25s; }
.chip--accent { color: var(--accent-fg); border-color: color-mix(in srgb, var(--accent-fg) 35%, transparent); background: var(--accent-soft); }
.chip--mono { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.02em; }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.portrait { position: sticky; top: calc(var(--nav-h) + 32px); }
.portrait__frame { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 5; background: var(--panel-solid); box-shadow: var(--shadow-lg); transform-style: preserve-3d; }
.portrait__frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 1.4s var(--ease-out), filter 0.6s; filter: saturate(0.9) contrast(1.04); }
.portrait:hover .portrait__frame img { transform: scale(1.02); filter: saturate(1.02) contrast(1.04); }
.portrait__frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(5, 6, 8, 0.75)); pointer-events: none; }
.portrait__caption { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 2; display: flex; justify-content: space-between; align-items: end; gap: 12px; color: #fff; }
.portrait__caption strong { display: block; font-weight: 500; font-size: 17px; letter-spacing: -0.02em; }
.portrait__caption span { font: 400 11px/1.4 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.75; }
.portrait__badge { position: absolute; top: -30px; right: -30px; z-index: 3; width: 116px; height: 116px; border-radius: 50%; background: var(--glass-bg); border: 1px solid var(--line-strong); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--shadow-md); padding: 6px; }
.portrait__badge svg { width: 100%; height: 100%; animation: spin 18s linear infinite; }
.portrait__badge text { font: 500 10.5px var(--font-mono); letter-spacing: 0.18em; text-transform: uppercase; fill: var(--fg); }
.portrait__badge::after { content: "✦"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent-fg); font-size: 22px; }
@keyframes spin { to { transform: rotate(360deg); } }
.about__body { display: grid; gap: 28px; }
.about__intro { font-size: clamp(22px, 2.3vw, 32px); line-height: 1.32; letter-spacing: -0.025em; font-weight: 400; color: var(--fg); text-wrap: pretty; }
.about__intro em { font-family: var(--font-serif); color: var(--accent-fg); font-size: 1.08em; }
.about__intro .dim { color: var(--fg-3); }
.about__text { display: grid; gap: 16px; color: var(--fg-2); font-size: 16.5px; line-height: 1.75; max-width: 62ch; }
.about__text strong { color: var(--fg); font-weight: 500; }
.about__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fact { padding: 20px 22px; display: grid; gap: 6px; }
.fact__k { font: 400 11px/1.4 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); }
.fact__v { font-size: 15.5px; color: var(--fg); line-height: 1.45; }
.fact__v small { display: block; color: var(--fg-3); font-size: 13px; margin-top: 2px; }
.about__open { padding: 22px 24px; display: grid; gap: 14px; }
.about__open p { color: var(--fg-2); font-size: 15px; }

/* Education list */
.edu { display: grid; gap: 0; border-top: 1px solid var(--line); }
.edu__item { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.edu__deg { font-size: 16px; font-weight: 500; letter-spacing: -0.015em; }
.edu__deg em { font-family: var(--font-serif); font-weight: 400; color: var(--accent-fg); font-size: 1.08em; }
.edu__school { grid-column: 1; color: var(--fg-3); font-size: 14px; }
.edu__date { grid-row: 1; grid-column: 2; font: 400 12px/1.6 var(--font-mono); color: var(--fg-3); white-space: nowrap; }

/* ---------- Stack / bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.bento__cell { padding: clamp(22px, 2.4vw, 32px); display: grid; gap: 18px; align-content: start; overflow: hidden; }
.bento__cell--ai { grid-column: span 7; }
.bento__cell--cloud { grid-column: span 5; }
.bento__cell--data { grid-column: span 5; }
.bento__cell--qa { grid-column: span 7; }
.bento__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bento__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--panel-2); color: var(--accent-fg); }
.bento__icon svg { width: 22px; height: 22px; }
.bento__idx { font: 400 11px/1 var(--font-mono); color: var(--fg-3); letter-spacing: 0.1em; }
.bento__title { font-size: clamp(22px, 2vw, 28px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.1; }
.bento__title em { font-family: var(--font-serif); font-weight: 400; }
.bento__desc { color: var(--fg-2); font-size: 15px; max-width: 48ch; }
.bento__viz { position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; opacity: 0.5; pointer-events: none; z-index: 0 !important; }

.tech-marquee { margin-top: 56px; display: grid; gap: 14px; }
.tech-marquee .marquee { --speed: 60s; --gap: 12px; }
.tech-pill { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 15px; color: var(--fg-2); white-space: nowrap; }
.tech-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--accent)); box-shadow: 0 0 10px var(--c, var(--accent)); }

/* ---------- Work ---------- */
.feature { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 4.5vw, 64px); align-items: center; padding-block: clamp(36px, 5vw, 64px); border-top: 1px solid var(--line); }
.feature:last-of-type { border-bottom: 1px solid var(--line); }
.feature:nth-of-type(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.feature:nth-of-type(even) .feature__media { order: 2; }
.feature__media { position: relative; display: block; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 10; background: var(--panel-solid); box-shadow: var(--shadow-lg); transform-style: preserve-3d; will-change: transform; }
.feature__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 1.2s var(--ease-out); }
.feature__media:hover img { transform: scale(1.04); }
.feature__media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); pointer-events: none; }
.media-credit { position: absolute; right: 12px; bottom: 12px; z-index: 2; padding: 4px 9px; border-radius: 999px; font: 400 10.5px/1.4 var(--font-mono); color: rgba(255, 255, 255, 0.85); background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.media-credit a { text-decoration: underline; text-underline-offset: 2px; }
.feature__num { font: 400 12px/1 var(--font-mono); color: var(--fg-3); letter-spacing: 0.14em; display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.feature__num b { color: var(--accent-fg); font-weight: 500; }
.feature__title { font-size: clamp(30px, 3.6vw, 52px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 500; margin-bottom: 16px; }
.feature__title em { font-family: var(--font-serif); font-weight: 400; color: var(--fg-2); }
.feature__desc { color: var(--fg-2); font-size: 16px; line-height: 1.7; margin-bottom: 22px; max-width: 54ch; }
.feature__metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 22px; }
.metric { padding: 14px 16px; background: var(--bg-elev); display: grid; gap: 4px; }
.metric { background: var(--metric-bg); }
.metric b { font-size: 22px; font-weight: 500; letter-spacing: -0.04em; line-height: 1.1; }
.metric span { font-size: 12px; color: var(--fg-3); line-height: 1.35; }
.feature__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.work-sub { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin: clamp(80px, 10vw, 140px) 0 32px; }
.work-sub h3 { font-size: clamp(28px, 3.4vw, 46px); font-weight: 500; letter-spacing: -0.04em; line-height: 1.05; }
.work-sub h3 em { font-family: var(--font-serif); font-weight: 400; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.filters button { position: relative; height: 36px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; color: var(--fg-2); transition: color 0.25s, background-color 0.25s; display: inline-flex; align-items: center; gap: 7px; }
.filters button:hover { color: var(--fg); }
.filters button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.filters button sup { font: 500 10px/1 var(--font-mono); top: -0.4em; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.p-card { display: flex; flex-direction: column; overflow: hidden; }
.p-card.is-filtered { display: none; }
.p-card.is-entering { animation: card-in 0.7s var(--ease-out) both; animation-delay: calc(var(--k, 0) * 40ms); }
@keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
.p-card__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; margin: 8px 8px 0; border-radius: calc(var(--radius) - 6px); background: var(--panel-solid); }
.p-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 1s var(--ease-out); }
.p-card:hover .p-card__media img { transform: scale(1.05); }
.p-card__media--poster img { object-position: center 30%; }
.p-card__play { position: absolute; left: 12px; bottom: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.6); color: #fff; font: 500 11.5px/1 var(--font-mono); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.p-card__play svg { width: 12px; height: 12px; }
.p-card__gen { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.p-card__gen svg { width: 100%; height: 100%; }
.p-card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.p-card__meta { display: flex; justify-content: space-between; gap: 10px; font: 400 11px/1.3 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); }
.p-card__meta .status { color: var(--accent-fg); }
.p-card__title { font-size: 19px; font-weight: 500; letter-spacing: -0.025em; line-height: 1.25; }
.p-card__desc { color: var(--fg-2); font-size: 14.5px; line-height: 1.6; }
.p-card__more { display: none; color: var(--fg-2); font-size: 14.5px; line-height: 1.6; }
.p-card__more p + p { margin-top: 10px; }
.p-card__more ul { display: grid; gap: 4px; margin-top: 6px; }
.p-card__more li { position: relative; padding-left: 14px; }
.p-card__more li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-fg); }
.p-card.is-expanded .p-card__more { display: block; }
.p-card__links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: auto; padding-top: 6px; font-size: 14px; }
.toggle-more { color: var(--fg-3); font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.toggle-more:hover { color: var(--fg); }
.grid-more { display: flex; justify-content: center; margin-top: 36px; }
.p-card--hidden { display: none; }

/* Research band (NASA) */
.research { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 0; overflow: hidden; margin-top: 16px; }
.research__media { position: relative; min-height: 100%; }
.research__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.research__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 50%, color-mix(in srgb, var(--bg) 40%, transparent)); }
.research__body { padding: clamp(26px, 3.4vw, 48px); display: grid; gap: 16px; align-content: center; }
.research__body h3 { font-size: clamp(24px, 2.6vw, 36px); font-weight: 500; letter-spacing: -0.04em; line-height: 1.08; }
.research__body h3 em { font-family: var(--font-serif); font-weight: 400; }
.research__body p { color: var(--fg-2); font-size: 15px; line-height: 1.7; }

/* ---------- Experience timeline ---------- */
.timeline { position: relative; display: grid; gap: 0; }
.timeline__rail { position: absolute; left: 230px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.timeline__rail span { position: absolute; inset: 0; transform-origin: 50% 0; transform: scaleY(var(--tp, 0)); background: linear-gradient(var(--accent), var(--violet), var(--blue)); }
.job { position: relative; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 60px; padding: 0 0 clamp(40px, 5vw, 64px); }
.job:last-child { padding-bottom: 0; }
.job__when { padding-top: 4px; text-align: right; display: grid; gap: 6px; align-content: start; }
.job__date { font: 500 13px/1.4 var(--font-mono); color: var(--fg-2); }
.job__loc { font-size: 13px; color: var(--fg-3); }
.job__dot { position: absolute; left: 230px; top: 8px; width: 13px; height: 13px; margin-left: -6px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-strong); transition: border-color 0.4s, box-shadow 0.4s, background-color 0.4s; }
.job.is-in .job__dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 18%, transparent), 0 0 20px var(--accent); }
.job__card { padding: clamp(22px, 2.6vw, 32px); display: grid; gap: 14px; }
.job__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.job__role { font-size: clamp(20px, 2vw, 26px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.2; }
.job__org { font-family: var(--font-serif); font-style: italic; font-size: clamp(19px, 1.8vw, 24px); color: var(--accent-fg); }
.job__org small { font-family: var(--font-sans); font-style: normal; font-size: 13px; color: var(--fg-3); margin-left: 6px; }
.job__list { display: grid; gap: 10px; color: var(--fg-2); font-size: 15px; line-height: 1.65; }
.job__list li { position: relative; padding-left: 22px; }
.job__list li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 10px; height: 1px; background: var(--fg-3); }
.job__list strong { color: var(--fg); font-weight: 500; }

/* ---------- Certifications ---------- */
.certs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cert { padding: 22px; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 18px; align-items: start; }
.cert__logo { width: 76px; height: 76px; border-radius: 16px; background: #fff; display: grid; place-items: center; overflow: hidden; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.cert__logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.cert__body { display: grid; gap: 6px; }
.cert__issuer { font: 400 11px/1.3 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); }
.cert__name { font-size: 17px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.3; }
.cert__desc { color: var(--fg-2); font-size: 14px; line-height: 1.6; }
.cert--featured { grid-column: span 1; }
.cert--featured .cert__name::after { content: "Professional"; display: inline-flex; vertical-align: middle; margin-left: 8px; height: 20px; padding: 0 8px; align-items: center; border-radius: 999px; font: 500 10px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); }
.cert--progress { border-style: dashed; }
.cert--progress .cert__logo { background: var(--panel-2); color: var(--fg-2); box-shadow: inset 0 0 0 1px var(--line); }
.cert--progress .cert__logo svg { width: 34px; height: 34px; }

/* ---------- Testimonials ---------- */
.quotes { display: grid; gap: 16px; }
.quotes .marquee { --speed: 70s; --gap: 16px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.quote { width: clamp(300px, 34vw, 440px); flex: none; padding: 26px 26px 22px; display: grid; gap: 18px; align-content: space-between; white-space: normal; }
.quote blockquote { font-size: 16.5px; line-height: 1.55; letter-spacing: -0.012em; color: var(--fg); }
.quote blockquote::before { content: "\201C"; display: block; font-family: var(--font-serif); font-size: 54px; line-height: 0.6; color: var(--accent-fg); margin-bottom: 8px; height: 24px; }
.quote figcaption { display: flex; align-items: center; gap: 12px; }
.quote__avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 600 13px/1 var(--font-sans); color: var(--fg); background: linear-gradient(135deg, color-mix(in srgb, var(--h1, var(--blue)) 55%, transparent), color-mix(in srgb, var(--h2, var(--violet)) 45%, transparent)); border: 1px solid var(--line-strong); flex: none; }
.quote__who { display: grid; line-height: 1.3; }
.quote__who strong { font-weight: 500; font-size: 14.5px; }
.quote__who span { font-size: 12.5px; color: var(--fg-3); }
.recog { margin-top: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.recog__item { padding: 22px 24px; display: flex; align-items: center; gap: 16px; }
.recog__icon { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-fg); border: 1px solid color-mix(in srgb, var(--accent-fg) 30%, transparent); }
.recog__icon svg { width: 22px; height: 22px; }
.recog__item strong { display: block; font-weight: 500; font-size: 15.5px; letter-spacing: -0.015em; color: var(--fg); }
.recog__item strong + span { display: block; font-size: 13.5px; color: var(--fg-3); }
.quotes__foot { margin-top: 28px; display: flex; justify-content: center; }

/* ---------- Contact ---------- */
.contact { overflow: hidden; }
.contact__title { font-size: clamp(48px, 9vw, 148px); line-height: 0.92; letter-spacing: -0.055em; font-weight: 500; text-wrap: balance; }
.contact__title em { font-family: var(--font-serif); font-weight: 400; background: linear-gradient(95deg, var(--fg) 0%, var(--accent-fg) 50%, var(--violet) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.05em; }
[data-theme="light"] .contact__title em { background: linear-gradient(95deg, #0b0d12, #5d7300 55%, #5b3fd4); -webkit-background-clip: text; background-clip: text; }
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 96px); margin-top: clamp(48px, 7vw, 88px); align-items: start; }
.contact__lede { color: var(--fg-2); font-size: 17px; line-height: 1.7; max-width: 46ch; }
.email-big { display: inline-flex; align-items: center; gap: 14px; margin-top: 28px; font-size: clamp(22px, 2.6vw, 36px); letter-spacing: -0.035em; font-weight: 500; word-break: break-all; }
.email-big a { background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size 0.6s var(--ease-out); padding-bottom: 4px; }
.email-big a:hover { background-size: 100% 2px; }
.copy-btn { flex: none; }
.copy-btn .i-check { display: none; }
.copy-btn.is-copied .i-copy { display: none; }
.copy-btn.is-copied .i-check { display: block; color: #4ade80; }
.socials { display: grid; gap: 0; margin-top: 36px; border-top: 1px solid var(--line); }
.social { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 4px; border-bottom: 1px solid var(--line); font-size: 17px; letter-spacing: -0.02em; transition: padding 0.4s var(--ease-out), color 0.3s; }
.social span { display: inline-flex; align-items: center; gap: 14px; }
.social span svg { width: 20px; height: 20px; color: var(--fg-3); transition: color 0.3s; }
.social small { font: 400 12.5px/1 var(--font-mono); color: var(--fg-3); margin-left: auto; text-align: right; }
.social > svg { width: 18px; height: 18px; color: var(--fg-3); transition: transform 0.4s var(--ease-out), color 0.3s; }
.social:hover { padding-inline: 14px 8px; color: var(--accent-fg); }
.social:hover span svg, .social:hover > svg { color: var(--accent-fg); }
.social:hover > svg { transform: translate(3px, -3px); }

.form { padding: clamp(22px, 3vw, 36px); display: grid; gap: 14px; }
.form__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 4px; }
.form__head h3 { font-size: 20px; font-weight: 500; letter-spacing: -0.025em; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { position: relative; display: grid; }
.field input, .field textarea, .field select {
  width: 100%; padding: 22px 16px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); font-size: 15.5px; line-height: 1.4; outline: none;
  transition: border-color 0.25s, background-color 0.25s, box-shadow 0.25s; -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 140px; resize: vertical; }
.field label { position: absolute; left: 17px; top: 17px; font-size: 15px; color: var(--fg-3); pointer-events: none; transform-origin: 0 0; transition: transform 0.25s var(--ease-out), color 0.25s; }
.field input:focus, .field textarea:focus { border-color: color-mix(in srgb, var(--accent-fg) 60%, transparent); background: var(--panel-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-10px) scale(0.76); color: var(--fg-2); }
.field.is-invalid input, .field.is-invalid textarea { border-color: color-mix(in srgb, var(--rose) 70%, transparent); }
.field__err { font-size: 12.5px; color: var(--rose); margin-top: 6px; padding-left: 4px; min-height: 0; }
.field__err:empty { display: none; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form__note { font-size: 12.5px; color: var(--fg-3); line-height: 1.5; }
.form__note a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Footer ---------- */
.footer { position: relative; padding-top: clamp(64px, 8vw, 110px); border-top: 1px solid var(--line); overflow: hidden; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer__blurb { color: var(--fg-2); font-size: 15px; max-width: 36ch; line-height: 1.65; }
.footer__blurb .brand { margin-bottom: 16px; }
.footer h2 { font: 500 11.5px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 18px; }
.footer ul { display: grid; gap: 10px; }
.footer ul a { color: var(--fg-2); font-size: 14.5px; transition: color 0.2s; }
.footer ul a:hover { color: var(--accent-fg); }
.footer__word { margin-top: clamp(56px, 8vw, 100px); font-size: clamp(60px, 17.2vw, 260px); line-height: 0.8; letter-spacing: -0.065em; font-weight: 600; white-space: nowrap; text-align: center; user-select: none;
  background: linear-gradient(180deg, var(--fg) 0%, var(--fg-fade) 92%); -webkit-background-clip: text; background-clip: text; color: transparent; transform: translateY(0.12em); }
.footer__word em { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.04em; }
.footer__bar { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-block: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--fg-3); background: var(--bg); }
.footer__bar a { color: var(--fg-2); }
.footer__bar a:hover { color: var(--accent-fg); }
.footer__credit { display: inline-flex; align-items: center; gap: 8px; }
.footer__credit img { width: 22px; height: 22px; object-fit: contain; }

.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--glass-bg); border: 1px solid var(--line-strong); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--fg); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity 0.4s, transform 0.5s var(--ease-out), border-color 0.3s; }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--accent); color: var(--accent-fg); }
.to-top svg { width: 18px; height: 18px; position: relative; z-index: 1; }
.to-top circle { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 145; stroke-dashoffset: calc(145 - 145 * var(--p, 0)); transition: stroke-dashoffset 0.1s linear; }
.to-top .ring { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); transform: rotate(-90deg); }

/* ---------- Dialogs ---------- */
.dialog { border: 0; padding: 0; margin: auto; background: transparent; color: var(--fg); max-width: none; max-height: none; overflow: visible; }
.dialog:focus, .dialog:focus-visible, .dialog__panel:focus { outline: none; }
.dialog::backdrop { background: rgba(3, 4, 6, 0.62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity 0.4s; }
[data-theme="light"] .dialog::backdrop { background: rgba(20, 22, 30, 0.38); }
.dialog.is-open::backdrop { opacity: 1; }
.dialog__panel { position: relative; width: min(540px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto; border-radius: var(--radius-lg); background: var(--bg-elev); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); padding: clamp(24px, 4vw, 40px); opacity: 0; transform: translateY(24px) scale(0.98); transition: opacity 0.4s var(--ease-out), transform 0.6s var(--ease-out); }
.dialog.is-open .dialog__panel { opacity: 1; transform: none; }
.dialog__close { position: absolute; top: 14px; right: 14px; z-index: 5; }
.dialog__eyebrow { font: 500 11.5px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-fg); margin-bottom: 14px; display: inline-flex; gap: 8px; align-items: center; }
.dialog__title { font-size: clamp(28px, 3.4vw, 38px); font-weight: 500; letter-spacing: -0.04em; line-height: 1.05; margin-bottom: 10px; }
.dialog__title em { font-family: var(--font-serif); font-weight: 400; }
.dialog__sub { color: var(--fg-2); font-size: 15px; margin-bottom: 24px; }
.dialog .form { padding: 0; }
.resume-success { display: none; text-align: center; padding: 20px 0 6px; }
.resume-success svg { width: 56px; height: 56px; margin: 0 auto 14px; color: #4ade80; }
.resume-success h3 { font-size: 22px; font-weight: 500; letter-spacing: -0.025em; margin-bottom: 8px; }
.resume-success p { color: var(--fg-2); font-size: 15px; }
.dialog.is-success .resume-form { display: none; }
.dialog.is-success .resume-success { display: block; }

/* Case study drawer */
.dialog--sheet { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; }
.dialog--sheet .dialog__panel { width: min(860px, 100vw); height: 100dvh; max-height: 100dvh; border-radius: var(--radius-lg) 0 0 var(--radius-lg); padding: 0; transform: translateX(40px); border-right: 0; }
.dialog--sheet.is-open .dialog__panel { transform: none; }
.case__hero { position: relative; aspect-ratio: 16 / 8; overflow: hidden; background: var(--panel-solid); }
.case__hero img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.case__hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, var(--bg-elev)); }
.dialog--sheet .dialog__close { position: sticky; top: 14px; display: grid; margin: 14px 14px -54px auto; background: rgba(0, 0, 0, 0.55); color: #fff; border-color: rgba(255, 255, 255, 0.2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.dialog--sheet .dialog__close:hover { background: rgba(0, 0, 0, 0.72); color: #fff; }
[data-theme="light"] .case__head .dialog__eyebrow { justify-self: start; background: rgba(255, 255, 255, 0.9); padding: 6px 10px; border-radius: 10px; }
.case__head { padding: 0 clamp(22px, 4vw, 48px); margin-top: -64px; position: relative; z-index: 2; display: grid; gap: 14px; }
.case__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.prose { padding: 28px clamp(22px, 4vw, 48px) 56px; color: var(--fg-2); font-size: 16px; line-height: 1.75; display: grid; gap: 16px; }
.prose h3 { color: var(--fg); font-size: 22px; font-weight: 500; letter-spacing: -0.03em; margin-top: 18px; }
.prose h4 { color: var(--fg); font-size: 17px; font-weight: 500; letter-spacing: -0.015em; margin-top: 6px; }
.prose strong { color: var(--fg); font-weight: 500; }
.prose em { color: var(--fg); }
.prose code { font-family: var(--font-mono); font-size: 0.88em; padding: 2px 6px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); color: var(--fg); }
.prose ul { display: grid; gap: 10px; }
.prose ul li { position: relative; padding-left: 22px; }
.prose ul li::before { content: ""; position: absolute; left: 2px; top: 0.75em; width: 10px; height: 1px; background: var(--accent-fg); }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 12px 0; }
.prose .steps { counter-reset: s; display: grid; gap: 12px; }
.prose .steps > div { counter-increment: s; position: relative; padding: 16px 18px 16px 60px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.prose .steps > div::before { content: counter(s, decimal-leading-zero); position: absolute; left: 18px; top: 16px; font: 500 13px/1.6 var(--font-mono); color: var(--accent-fg); }
.prose .steps h4 { margin: 0 0 4px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.prose th, .prose td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { font: 500 11.5px/1.3 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); background: var(--panel); }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child { color: var(--fg); font-weight: 500; white-space: nowrap; }
.callouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.callouts > div { padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.callouts strong { display: block; margin-bottom: 4px; }

/* Lightbox */
.dialog--lightbox .dialog__panel { width: min(1200px, calc(100vw - 32px)); padding: 0; background: #000; border-color: rgba(255, 255, 255, 0.12); overflow: hidden; display: grid; }
.lightbox__img { width: 100%; max-height: calc(100dvh - 120px); object-fit: contain; background: #000; }
.lightbox__cap { padding: 14px 20px; display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 14px; color: #c9ccd6; background: #0b0c10; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.lightbox__cap .t-muted { color: #8a8f9c; font: 400 12px/1.4 var(--font-mono); }
.lightbox__loading { position: absolute; inset: 0; display: grid; place-items: center; color: #c9ccd6; font: 400 12px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; pointer-events: none; }
.lightbox__loading::before { content: ""; width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.15); border-top-color: var(--accent); animation: spin 0.8s linear infinite; position: absolute; top: calc(50% - 44px); left: calc(50% - 17px); }
.dialog--lightbox .dialog__close { color: #fff; background: rgba(0, 0, 0, 0.5); border-color: rgba(255, 255, 255, 0.18); }

/* Command palette */
.dialog--palette { margin: 12vh auto auto; }
.dialog--palette .dialog__panel { width: min(640px, calc(100vw - 24px)); padding: 0; overflow: hidden; }
.palette__search { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.palette__search svg { width: 18px; height: 18px; color: var(--fg-3); flex: none; }
.palette__search input { flex: 1; height: 60px; background: transparent; border: 0; outline: 0; font-size: 16.5px; color: var(--fg); }
.palette__search input::placeholder { color: var(--fg-3); }
.palette__list { max-height: min(56vh, 440px); overflow-y: auto; padding: 8px; }
.palette__group { padding: 12px 12px 6px; font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); }
.palette__item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; text-align: left; font-size: 14.5px; color: var(--fg-2); }
.palette__item svg { width: 17px; height: 17px; color: var(--fg-3); flex: none; }
.palette__item kbd { margin-left: auto; font: 400 11px/1 var(--font-mono); color: var(--fg-3); }
.palette__item[aria-selected="true"] { background: var(--panel-2); color: var(--fg); }
.palette__item[aria-selected="true"] svg { color: var(--accent-fg); }
.palette__empty { padding: 28px; text-align: center; color: var(--fg-3); font-size: 14px; }
.palette__foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--fg-3); }
.palette__foot span { display: inline-flex; gap: 6px; align-items: center; }

/* Toast */
.toast-region { position: fixed; left: 50%; bottom: 24px; translate: -50% 0; z-index: 600; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: var(--fg); color: var(--bg); font-size: 14px; font-weight: 500; box-shadow: var(--shadow-md); animation: toast-in 0.5s var(--ease-out); max-width: calc(100vw - 32px); }
.toast a { text-decoration: underline; text-underline-offset: 2px; }
.toast.is-leaving { animation: toast-out 0.35s var(--ease-in-out) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px) scale(0.98); } }

/* Snow overlay */
.snow { position: fixed; inset: 0; z-index: 400; pointer-events: none; width: 100%; height: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nav__links a { padding: 8px 10px; }
  .nav__cmd-label { display: none; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat:nth-child(4) { border-left: 0; }
  .stat:nth-child(n+4) { border-top: 1px solid var(--line); }
  .certs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline__rail, .job__dot { left: 190px; }
  .job { grid-template-columns: 160px minmax(0, 1fr); }
}
@media (max-width: 980px) {
  :root { --nav-h: 64px; }
  .nav { height: 56px; top: 10px; }
  .nav__links, .nav__cmd { display: none; }
  .nav__burger { display: inline-grid; }
  .nav__burger .bars span { display: block; width: 16px; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform 0.4s var(--ease-out), opacity 0.2s; }
  .nav__burger .bars { display: grid; gap: 4px; }
  .nav__burger[aria-expanded="true"] .bars span:first-child { transform: translateY(2.75px) rotate(45deg); }
  .nav__burger[aria-expanded="true"] .bars span:last-child { transform: translateY(-2.75px) rotate(-45deg); }
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: auto; }
  .scroll-cue { display: none; }
  .section-head--split { grid-template-columns: minmax(0, 1fr); }
  .about__grid { grid-template-columns: minmax(0, 1fr); }
  .portrait { position: relative; top: 0; max-width: 460px; }
  .bento__cell--ai, .bento__cell--cloud, .bento__cell--data, .bento__cell--qa { grid-column: span 12; }
  .feature, .feature:nth-of-type(even) { grid-template-columns: minmax(0, 1fr); }
  .feature:nth-of-type(even) .feature__media { order: 0; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .research { grid-template-columns: minmax(0, 1fr); }
  .research__media { aspect-ratio: 16 / 9; }
  .contact__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__blurb { grid-column: span 2; }
  .recog { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .timeline__rail, .job__dot { left: 6px; }
  .job { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-left: 32px; }
  .job__when { text-align: left; display: flex; gap: 12px; flex-wrap: wrap; padding-top: 0; }
  .job__dot { top: 4px; }
  .certs { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(n) { border-left: 0; border-top: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat:last-child { grid-column: span 2; border-left: 0; }
  .callouts { grid-template-columns: minmax(0, 1fr); }
  .dialog--sheet .dialog__panel { border-radius: var(--radius-lg) var(--radius-lg) 0 0; transform: translateY(40px); }
  .dialog--sheet { margin: auto 0 0 0; height: 94dvh; max-height: 94dvh; width: 100%; }
  .dialog--sheet .dialog__panel { height: 94dvh; max-height: 94dvh; width: 100vw; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .about__facts { grid-template-columns: minmax(0, 1fr); }
  .feature__metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric { padding: 12px; }
  .metric b { font-size: 18px; }
  .filters { border-radius: 18px; }
  .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .terminal { font-size: 12.5px; }
  .terminal__tools .term-chip span { display: none; }
  .terminal__body { height: 300px; padding: 16px 14px 12px; }
  .terminal__chips { padding-right: 64px; }
  .hero__line--2 { gap: 12px; }
  .rotator { display: grid; }
  .status-pill { font-size: 12.5px; }
  .hero__tagline { max-width: none; padding-bottom: 0; }
  .portrait__badge { width: 88px; height: 88px; top: -18px; right: -6px; }
  .edu__item { grid-template-columns: minmax(0, 1fr); }
  .edu__date { grid-row: auto; grid-column: 1; }
  .to-top { right: 14px; bottom: 14px; }
  .quote { width: 82vw; }
}
@media (max-width: 480px) {
  .social small { display: none; }
}
@media (max-width: 400px) {
  .brand__text span { display: none; }
  .btn { padding: 0 20px; }
  .hero__ctas .btn { width: 100%; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0ms !important; }
  html.js [data-reveal], html.js .split .w > span, html.js .hero__line > span { opacity: 1 !important; transform: none !important; }
  .marquee { overflow-x: auto; }
  .marquee__track { animation: none !important; }
  .marquee__track[aria-hidden="true"] { display: none; }
  .grain, .aurora span { animation: none !important; }
}

/* Print: keep it readable */
@media print {
  .starfield, .aurora, .grain, .nav, .cursor, .progress, .to-top, .terminal-wrap, .marquee, .preloader { display: none !important; }
  body { background: #fff; color: #000; }
  html.js [data-reveal], html.js .split .w > span, html.js .hero__line > span { opacity: 1 !important; transform: none !important; }
}

/* ---------- Review fixes ---------- */
/* Native pointer inside dialogs (custom cursor is removed while a dialog is open, see site.js) */
html.has-cursor dialog[open], html.has-cursor dialog[open] * { cursor: auto !important; }
html.has-cursor dialog[open] :is(a, button, label, .palette__item) { cursor: pointer !important; }
html.has-cursor dialog[open] :is(input, textarea) { cursor: text !important; }
/* Programmatic focus targets (skip link, in-page anchors) */
[tabindex="-1"]:focus { outline: none; }
/* Narrowest phones / 400% zoom: keep the menu button on screen */
@media (max-width: 374px) { .nav .brand__text { display: none; } .nav { padding-left: 12px; } }
/* User-controlled motion pause (WCAG 2.2.2) */
html.motion-paused .marquee__track, html.motion-paused .aurora span, html.motion-paused .grain,
html.motion-paused .portrait__badge svg, html.motion-paused .terminal-wrap::before, html.motion-paused .status-dot::after,
html.motion-paused .scroll-cue i::after { animation-play-state: paused !important; }
.quotes__foot { gap: 20px; align-items: center; flex-wrap: wrap; }

/* ==========================================================================
   Experience layer: dock, soundtrack, missions, trajectory (v2.2)
   ========================================================================== */
.dock {
  position: fixed; left: 20px; bottom: 20px; z-index: 95; display: flex; align-items: center; gap: 2px; padding: 4px;
  border-radius: 999px; background: var(--glass-bg); border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%); box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease-out), transform 0.7s var(--ease-out), box-shadow 0.4s;
}
html.hero-in .dock { opacity: 1; transform: none; }
.dock.is-pulse { animation: dock-pulse 0.9s var(--ease-out); }
@keyframes dock-pulse { 0% { box-shadow: 0 0 0 0 rgba(230, 254, 73, 0.55), var(--shadow-md); } 100% { box-shadow: 0 0 0 18px rgba(230, 254, 73, 0), var(--shadow-md); } }
.dock__btn { display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 14px 0 10px; border-radius: 999px; color: var(--fg-2); font-size: 13px; transition: background-color 0.25s, color 0.25s; }
.dock__btn:hover { background: var(--panel-2); color: var(--fg); }
.dock__sep { width: 1px; height: 20px; background: var(--line-strong); }
.dock__label { font: 500 12px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.dock__count { font: 500 13px/1 var(--font-mono); color: var(--fg); font-variant-numeric: tabular-nums; }
.dock__count span { color: var(--fg-3); }
.dock__where { font-size: 13px; color: var(--fg-2); max-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock__where.is-swap { animation: where-in 0.5s var(--ease-out); }
@keyframes where-in { from { opacity: 0; transform: translateY(6px); } }
.dock .ring { width: 24px; height: 24px; transform: rotate(-90deg); flex: none; }
.dock .ring circle { fill: none; stroke-width: 3; }
.ring__bg { stroke: var(--line-strong); }
.ring__fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 94.25; stroke-dashoffset: 94.25; transition: stroke-dashoffset 0.9s var(--ease-out); }
[data-theme="light"] .ring__fg { stroke: #7a9400; }
.dock.is-complete .ring__fg { stroke: var(--violet); }

/* equalizer bars: flat when off, dancing when the soundtrack plays */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; width: 18px; height: 16px; }
.eq i { display: block; width: 3px; height: 3px; border-radius: 2px; background: currentColor; transition: height 0.3s var(--ease-out); }
html.sound-on .dock__sound { color: var(--accent-fg); }
html.sound-on .eq i { animation: eq 1.1s ease-in-out infinite; }
html.sound-on .eq i:nth-child(2) { animation-duration: 0.9s; animation-delay: -0.3s; }
html.sound-on .eq i:nth-child(3) { animation-duration: 1.3s; animation-delay: -0.6s; }
html.sound-on .eq i:nth-child(4) { animation-duration: 0.8s; animation-delay: -0.15s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 15px; } }

/* sound hint bubble */
.sound-hint {
  position: fixed; left: 20px; bottom: 76px; z-index: 96; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; max-width: calc(100vw - 40px);
  border-radius: 999px; background: var(--fg); color: var(--bg); font-size: 13.5px; box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(10px) scale(0.97); pointer-events: none; visibility: hidden;
  transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out), visibility 0s linear 0.6s;
}
.sound-hint.is-visible { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.sound-hint::after { content: ""; position: absolute; left: 30px; bottom: -6px; width: 12px; height: 12px; background: var(--fg); transform: rotate(45deg); border-radius: 2px; }
.sound-hint__on { height: 30px; padding: 0 14px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 13px; }
.sound-hint__x { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: inherit; opacity: 0.7; }
.sound-hint__x:hover { opacity: 1; }
.sound-hint__x svg { width: 14px; height: 14px; }

/* achievement cards */
.achv-region { position: fixed; left: 20px; bottom: 78px; z-index: 97; display: grid; gap: 10px; pointer-events: none; }
.achv {
  display: flex; align-items: center; gap: 14px; padding: 12px 18px 12px 12px; min-width: 240px; border-radius: 18px;
  background: var(--glass-bg); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line-strong)); border-color: rgba(230, 254, 73, 0.4);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6), 0 0 40px -10px rgba(230, 254, 73, 0.25);
  animation: achv-in 0.7s var(--ease-out) both;
}
.achv.is-leaving { animation: achv-out 0.45s var(--ease-in-out) forwards; }
@keyframes achv-in { from { opacity: 0; transform: translateX(-24px) scale(0.94); } }
@keyframes achv-out { to { opacity: 0; transform: translateX(-16px) scale(0.97); } }
.achv__icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); flex: none; animation: achv-pop 0.8s var(--ease-out) 0.15s both; }
.achv__icon svg { width: 21px; height: 21px; }
@keyframes achv-pop { 0% { transform: scale(0.4) rotate(-20deg); } 60% { transform: scale(1.12) rotate(6deg); } 100% { transform: none; } }
.achv__text { display: grid; gap: 2px; }
.achv__text small { font: 500 10.5px/1.2 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-fg); }
.achv__text strong { font-size: 16px; font-weight: 500; letter-spacing: -0.02em; color: var(--fg); }

/* mission log dialog */
.mission-progress { height: 6px; border-radius: 99px; background: var(--panel-2); overflow: hidden; margin: 4px 0 10px; }
.mission-progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--blue), var(--violet), var(--accent)); transition: transform 0.9s var(--ease-out); }
.mission-summary { font: 500 12px/1.4 var(--font-mono); color: var(--fg-3); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px; }
.mission-list { display: grid; gap: 8px; }
.mission { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); transition: border-color 0.3s, background-color 0.3s; }
.mission__icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; color: var(--fg-3); background: var(--panel-2); border: 1px solid var(--line); }
.mission__icon svg { width: 19px; height: 19px; }
.mission__text { display: grid; gap: 1px; flex: 1; min-width: 0; }
.mission__text strong { font-weight: 500; font-size: 15px; letter-spacing: -0.015em; }
.mission__text span { font-size: 13px; color: var(--fg-3); }
.mission__text em { font-style: normal; font-family: var(--font-mono); font-size: 12px; color: var(--accent-fg); margin-left: 4px; }
.mission__state { width: 26px; height: 26px; border-radius: 50%; border: 1px dashed var(--line-strong); display: grid; place-items: center; flex: none; }
.mission__state svg { width: 14px; height: 14px; }
.mission.is-done { border-color: rgba(230, 254, 73, 0.32); background: var(--accent-soft); }
.mission.is-done .mission__icon { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.mission.is-done .mission__state { border: 0; background: var(--accent); color: var(--accent-ink); }
.mission-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; font-size: 12.5px; color: var(--fg-3); flex-wrap: wrap; }

/* trajectory rail (wide screens) */
.trail { position: fixed; right: 26px; top: 50%; z-index: 80; height: min(52vh, 440px); translate: 0 -50%; display: none; flex-direction: column; justify-content: space-between; align-items: flex-end; opacity: 0; transition: opacity 0.6s; }
html.hero-in .trail { opacity: 1; }
.trail__line { position: absolute; right: 5px; top: 0; bottom: 0; width: 1px; background: var(--line-strong); }
.trail__fill { position: absolute; inset: 0; transform-origin: 50% 0; transform: scaleY(0); background: linear-gradient(var(--accent), var(--violet), var(--blue)); }
.trail__probe { position: absolute; right: 1px; top: 0; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(230, 254, 73, 0.18), 0 0 18px var(--accent); transition: top 0.12s linear; }
.trail__node { position: relative; display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.trail__node i { width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-strong); transition: background-color 0.4s, border-color 0.4s, transform 0.4s var(--ease-out); }
.trail__node span { font: 500 11px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-2); white-space: nowrap; padding: 6px 10px; border-radius: 999px; background: var(--glass-bg); border: 1px solid var(--line); opacity: 0; transform: translateX(8px); transition: opacity 0.3s, transform 0.4s var(--ease-out); pointer-events: none; }
.trail__node:hover span, .trail__node:focus-visible span, .trail__node.is-current span { opacity: 1; transform: none; }
.trail__node.is-reached i { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 30%, var(--bg)); }
.trail__node.is-current i { background: var(--accent); border-color: var(--accent); transform: scale(1.25); }
@media (min-width: 1360px) { .trail { display: flex; } }

.burst { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 650; pointer-events: none; }

/* motion pause also stills the equalizer */
html.motion-paused.sound-on .eq i { animation-play-state: paused; }

/* mobile: compact dock, toasts above it */
@media (max-width: 640px) {
  .dock { left: 12px; bottom: 12px; }
  .dock__btn { height: 38px; padding: 0 10px 0 8px; gap: 7px; }
  .dock__sound .dock__label { display: none; }
  .dock__sound { padding: 0 10px; }
  .dock__where { max-width: 92px; font-size: 12.5px; }
  .sound-hint { left: 12px; bottom: 64px; font-size: 12.5px; max-width: calc(100vw - 24px); }
  .sound-hint::after { left: 22px; }
  .achv-region { left: 12px; right: 12px; bottom: 64px; }
  .achv { min-width: 0; }
  .toast-region { bottom: 64px; }
  .to-top { right: 12px; bottom: 12px; width: 46px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) { html.sound-on .eq i { animation: none !important; height: 10px; } }
@media print { .dock, .trail, .sound-hint, .achv-region { display: none !important; } }

/* v2.2 polish: collision-free floating UI */
.trail__node { flex-direction: row-reverse; }
.sound-hint__on { white-space: nowrap; flex: none; }
.sound-hint__txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sound-hint.is-visible ~ .achv-region { bottom: 132px; }
@media (max-width: 640px) {
  .sound-hint__more { display: none; }
  .sound-hint.is-visible ~ .achv-region { bottom: 112px; }
}
