/* ============ Tokens ============ */
:root {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --surface-2: #efede7;
  --line: #e2dfd7;
  --line-strong: #cdc9bd;
  --text: #121418;
  --text-2: #444b55;
  --muted: #6b7280;
  --accent: #e4521a;
  --accent-2: #ff8a4c;
  --accent-ink: #ffffff;
  --accent-soft: rgba(228, 82, 26, 0.1);
  --grid: rgba(18, 20, 24, 0.055);
  --glow-a: rgba(228, 82, 26, 0.16);
  --glow-b: rgba(124, 92, 255, 0.12);
  --shadow: 0 1px 2px rgba(18, 20, 24, 0.05), 0 10px 30px rgba(18, 20, 24, 0.07);
  --shadow-lg: 0 20px 60px rgba(18, 20, 24, 0.18);
  --c-ai: #7c3aed;
  --c-robotics: #e4521a;
  --c-hardware: #b45309;
  --c-apps: #0f766e;
  --c-ventures: #2563eb;
  --s-live: #16a34a;
  --s-dev: #2563eb;
  --s-built: #71717a;
  --s-concept: #ca8a04;
  --s-research: #db2777;
  --nav-bg: rgba(245, 244, 240, 0.78);
  --danger-inv: #ff9088;

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1180px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0c0f;
    --surface: #11151a;
    --surface-2: #171c23;
    --line: #20272f;
    --line-strong: #2e3741;
    --text: #e9edf1;
    --text-2: #b4bec8;
    --muted: #808c98;
    --accent: #ff6a2b;
    --accent-2: #ff9a5c;
    --accent-ink: #120700;
    --accent-soft: rgba(255, 106, 43, 0.13);
    --grid: rgba(255, 255, 255, 0.045);
    --glow-a: rgba(255, 106, 43, 0.18);
    --glow-b: rgba(124, 92, 255, 0.16);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.6);
    --c-ai: #a78bfa;
    --c-robotics: #ff7a3d;
    --c-hardware: #fbbf24;
    --c-apps: #2dd4bf;
    --c-ventures: #60a5fa;
    --s-live: #4ade80;
    --s-dev: #60a5fa;
    --s-built: #a1a1aa;
    --s-concept: #facc15;
    --s-research: #f472b6;
    --nav-bg: rgba(10, 12, 15, 0.72);
    --danger-inv: #b42318;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0c0f;
  --surface: #11151a;
  --surface-2: #171c23;
  --line: #20272f;
  --line-strong: #2e3741;
  --text: #e9edf1;
  --text-2: #b4bec8;
  --muted: #808c98;
  --accent: #ff6a2b;
  --accent-2: #ff9a5c;
  --accent-ink: #120700;
  --accent-soft: rgba(255, 106, 43, 0.13);
  --grid: rgba(255, 255, 255, 0.045);
  --glow-a: rgba(255, 106, 43, 0.18);
  --glow-b: rgba(124, 92, 255, 0.16);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.6);
  --c-ai: #a78bfa;
  --c-robotics: #ff7a3d;
  --c-hardware: #fbbf24;
  --c-apps: #2dd4bf;
  --c-ventures: #60a5fa;
  --s-live: #4ade80;
  --s-dev: #60a5fa;
  --s-built: #a1a1aa;
  --s-concept: #facc15;
  --s-research: #f472b6;
  --nav-bg: rgba(10, 12, 15, 0.72);
  --danger-inv: #b42318;
  color-scheme: dark;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }
kbd {
  font: 500 11px/1 var(--font-mono);
  padding: 3px 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface);
}
.ic { width: 18px; height: 18px; flex: none; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* ============ Nav ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.brand__mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  font: 700 13px/1 var(--font-mono); letter-spacing: -0.02em;
  background: var(--text); color: var(--bg);
}
.brand__name { font-family: var(--font-display); font-size: 17px; }
.nav__links { display: flex; gap: 2px; margin-left: auto; }
.nav__links a {
  position: relative; padding: 8px 12px; border-radius: 8px;
  font-size: 14px; color: var(--text-2); transition: color 0.2s, background 0.2s;
}
.nav__links a:hover { color: var(--text); background: var(--surface-2); }
.nav__links a.is-active { color: var(--text); }
.nav__links a.is-active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--accent);
}
.nav__actions { display: flex; align-items: center; gap: 8px; }
.kbar-btn {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted);
  cursor: pointer; font-size: 13px; transition: border-color 0.2s, color 0.2s;
}
.kbar-btn:hover { border-color: var(--line-strong); color: var(--text); }
.kbar-btn .ic { width: 15px; height: 15px; }
.icon-btn {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--text-2);
  transition: border-color 0.2s, color 0.2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.icon-btn .ic { width: 17px; height: 17px; }
.ic--moon { display: none; }
:root[data-theme="dark"] .ic--sun { display: none; }
:root[data-theme="dark"] .ic--moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ic--sun { display: none; }
  :root:not([data-theme="light"]) .ic--moon { display: block; }
}
.nav__burger { display: none; }
.mobile-menu { border-top: 1px solid var(--line); background: var(--bg); }
.mobile-menu nav { display: grid; padding-top: 8px; padding-bottom: 16px; }
.mobile-menu a { padding: 14px 4px; border-bottom: 1px solid var(--line); font: 500 18px var(--font-display); }
.mobile-menu a:last-child { border-bottom: 0; }

/* ============ Buttons & chips ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface);
  font-weight: 500; font-size: 15px; cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--text-2); }
.btn .ic { width: 16px; height: 16px; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px -8px var(--accent); }
.btn--primary:hover { border-color: var(--accent); background: var(--accent-2); }
.btn--primary .ic { transition: transform 0.2s var(--ease); }
.btn--primary:hover .ic { transform: translateX(3px); }
.btn--sm { height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }

.social {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
  transition: color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.social:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-1px); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: 14px; color: var(--text-2); cursor: pointer; transition: all 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip__count { font: 500 11px var(--font-mono); opacity: 0.6; }
.chip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

.tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px;
  font: 500 11.5px var(--font-mono); letter-spacing: 0.01em;
  color: var(--c, var(--text-2));
  background: color-mix(in srgb, var(--c, var(--text-2)) 12%, transparent);
  white-space: nowrap;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
  font: 500 12px var(--font-mono); color: var(--text-2);
  background: color-mix(in srgb, var(--surface) 82%, transparent); border: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sc, var(--muted)); flex: none; }
.dot--live { --sc: var(--s-live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--s-live) 25%, transparent); }
.dot-live {
  width: 8px; height: 8px; border-radius: 50%; background: var(--s-live); display: inline-block;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--s-live) 60%, transparent); animation: ping 2.2s infinite;
}
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--s-live) 55%, transparent); } 80%, 100% { box-shadow: 0 0 0 8px transparent; } }

/* ============ Hero ============ */
.hero { position: relative; padding: 72px 0 40px; isolation: isolate; }
.hero__bg {
  position: absolute; inset: -64px 0 0 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 400px at 85% 20%, var(--glow-a), transparent 70%),
    radial-gradient(500px 380px at 10% 0%, var(--glow-b), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 44px 44px;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}
.hero__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font: 500 13px var(--font-mono); color: var(--text-2);
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
}
.eyebrow .ic { width: 14px; height: 14px; color: var(--accent); }
.eyebrow__sep { color: var(--line-strong); }
.hero__title {
  margin-top: 22px;
  font-size: clamp(3rem, 8vw, 6rem); font-weight: 700; letter-spacing: -0.045em; line-height: 0.95;
}
.hero__title span {
  background: linear-gradient(180deg, var(--text) 30%, color-mix(in srgb, var(--text) 55%, var(--accent)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__role { margin-top: 18px; font: 500 clamp(1.1rem, 2vw, 1.35rem) var(--font-display); color: var(--text); }
.hero__rotator { margin-top: 6px; font: 500 clamp(1.1rem, 2vw, 1.35rem) var(--font-display); color: var(--muted); min-height: 1.6em; }
.rotator { color: var(--accent); display: inline-block; transition: opacity 0.35s, transform 0.35s var(--ease); }
.rotator.is-out { opacity: 0; transform: translateY(8px); }
.rotator::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 3px; vertical-align: -0.12em; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__intro { margin-top: 18px; max-width: 54ch; color: var(--text-2); font-size: 17px; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 30px; }
.hero__socials { display: flex; gap: 8px; margin-left: 4px; }

/* Hero "Featured work" card: one preview image + a list; the highlighted row owns the image. */
.hero__visual { position: relative; min-width: 0; }
.showcase {
  border-radius: 22px; border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.showcase__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.showcase__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.45s var(--ease); }
.showcase__slide.is-active { opacity: 1; }
.showcase__slide > img { width: 100%; height: 100%; object-fit: cover; }
.showcase__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 6px; }
.showcase__head h2 { margin: 0; font: 500 12px var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.showcase__head a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--accent); text-decoration: none; }
.showcase__head a .ic { width: 14px; height: 14px; transition: transform 0.2s var(--ease); }
.showcase__head a:hover .ic { transform: translateX(3px); }
.showcase__list { list-style: none; margin: 0; padding: 0 10px 10px; }
.showcase__item {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 14px;
  border-radius: 14px; color: inherit; text-decoration: none; transition: background 0.2s;
}
.showcase__item::before {
  content: ""; position: absolute; left: 3px; top: 16px; bottom: 16px; width: 3px; border-radius: 3px;
  background: var(--accent); opacity: 0; transition: opacity 0.2s;
}
.showcase__item.is-active { background: var(--surface-2); }
.showcase__item.is-active::before { opacity: 1; }
.showcase__thumb {
  position: relative; flex: none; width: 46px; height: 46px; border-radius: 11px; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface-2);
}
.showcase__thumb img { width: 100%; height: 100%; object-fit: cover; }
.showcase__thumb .gen span { font-size: 14px; }
.showcase__thumb .gen::after { display: none; }
.showcase__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.showcase__text b { font: 600 15px/1.3 var(--font-display); }
.showcase__text span {
  font-size: 13px; line-height: 1.4; color: var(--muted);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.showcase__item .pill { flex: none; }
.showcase__item:hover { background: var(--surface-2); }

.stats {
  list-style: none; margin: 64px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden;
}
.stats li { padding: 22px 24px; border-right: 1px solid var(--line); }
.stats li:last-child { border-right: 0; }
.stats b { display: block; font: 700 clamp(1.8rem, 3vw, 2.4rem)/1 var(--font-display); letter-spacing: -0.03em; }
.stats span { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); }

/* ============ Sections ============ */
.section { padding: 112px 0 0; }
.sec-head { margin-bottom: 40px; max-width: 760px; }
.sec-num { font: 500 13px var(--font-mono); color: var(--accent); letter-spacing: 0.04em; margin-bottom: 14px; text-transform: uppercase; }
.sec-head h2, .contact h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 600; letter-spacing: -0.035em; }
.sec-sub { margin-top: 14px; color: var(--text-2); font-size: 17px; }

/* About */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.about__text p { font-size: 18px; color: var(--text-2); }
.about__text p + p { margin-top: 16px; }
.about__text p:first-child { color: var(--text); }
.now { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 22px; }
.now__head { display: flex; align-items: center; gap: 10px; font: 500 12px var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.now ul { list-style: none; margin: 14px 0 0; padding: 0; }
.now li + li { border-top: 1px solid var(--line); }
.now button {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left;
  background: none; border: 0; padding: 12px 0; cursor: pointer; font-size: 15px; color: var(--text);
}
.now button .ic { width: 16px; height: 16px; color: var(--muted); transition: transform 0.2s var(--ease), color 0.2s; }
.now button:hover .ic { transform: translateX(3px); color: var(--accent); }
.focus { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.focus__card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 24px; }
.focus__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.focus__icon .ic { width: 20px; height: 20px; }
.focus__card h3 { margin-top: 18px; font-size: 20px; font-weight: 600; }
.focus__card p { margin-top: 8px; color: var(--text-2); font-size: 15px; }

/* Projects */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.search {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; min-width: 260px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted);
  transition: border-color 0.2s;
}
.search:focus-within { border-color: var(--accent); }
.search .ic { width: 16px; height: 16px; }
.search input { border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 14px; width: 100%; }
.result-note { font: 500 12px var(--font-mono); color: var(--muted); margin-bottom: 16px; min-height: 1.2em; }

.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.card {
  position: relative; display: flex; flex-direction: column; text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  overflow: hidden; cursor: pointer; padding: 0; grid-column: span 2;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.card--featured { grid-column: span 3; }
.card__cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); flex: none; }
.card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.card:hover .card__cover img { transform: scale(1.04); }
.card__badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; z-index: 1; }
.card__body { display: flex; flex-direction: column; gap: 10px; padding: 20px 20px 18px; flex: 1; }
.card__meta { display: flex; align-items: center; gap: 8px; font: 500 12px var(--font-mono); color: var(--muted); }
.card__meta .ic { width: 13px; height: 13px; }
.card__title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.card--featured .card__title { font-size: 28px; }
.card__tagline { color: var(--text-2); font-size: 15px; }
.card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.card__more {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--accent);
}
.card__more .ic { width: 15px; height: 15px; transition: transform 0.2s var(--ease); }
.card:hover .card__more .ic { transform: translateX(3px); }
.card__link { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.card__link:focus-visible { outline-offset: -2px; border-radius: var(--radius); }
.card__links { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px; }
.card__ext {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2);
  font-size: 13px; font-weight: 500; color: var(--text-2); white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.card__ext:hover { color: var(--text); border-color: var(--accent); }
.card__ext .ic { width: 14px; height: 14px; flex: none; }
.card__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 8px; border-top: 1px dashed var(--line); margin-top: 6px; }
.card__foot .card__more { margin-left: auto; flex: none; }
.card__stack { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 12px var(--font-mono); color: var(--muted); }

/* Generative cover for projects without a photo */
.gen {
  position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% 0%, hsl(var(--h) 85% 58% / 0.35), transparent 60%),
    radial-gradient(90% 80% at 0% 100%, hsl(calc(var(--h) + 40) 80% 55% / 0.22), transparent 60%),
    var(--surface-2);
}
.gen::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 22px 22px;
}
.gen::after {
  content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%;
  border: 1px dashed hsl(var(--h) 70% 55% / 0.45); animation: spin 40s linear infinite;
}
.gen span {
  position: relative; z-index: 1; font: 700 clamp(2.4rem, 5vw, 3.6rem)/1 var(--font-display); letter-spacing: -0.04em;
  color: hsl(var(--h) 75% 45%);
}
:root[data-theme="dark"] .gen span { color: hsl(var(--h) 90% 72%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gen span { color: hsl(var(--h) 90% 72%); } }
@keyframes spin { to { transform: rotate(360deg); } }

.empty { grid-column: 1 / -1; padding: 48px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }
.empty button { margin-top: 12px; }

/* Videos */
.videos { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--line); }
.player img { width: 100%; height: 100%; object-fit: cover; opacity: 0.92; transition: opacity 0.3s, transform 0.6s var(--ease); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play-btn {
  position: absolute; inset: 0; display: grid; place-items: center; border: 0; background: none; cursor: pointer; padding: 0;
}
.play-btn:hover img { opacity: 1; transform: scale(1.02); }
.play-btn__icon {
  position: absolute; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 40px -6px var(--accent);
  transition: transform 0.25s var(--ease);
}
.play-btn__icon .ic { width: 30px; height: 30px; margin-left: 4px; }
.play-btn:hover .play-btn__icon { transform: scale(1.08); }
.play-btn__note { position: absolute; bottom: 12px; right: 12px; font: 500 11px var(--font-mono); color: rgba(255,255,255,0.8); background: rgba(0,0,0,0.5); padding: 4px 8px; border-radius: 6px; }
.player__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 4px 0; }
.player__meta h3 { font-size: 20px; font-weight: 600; }
.player__meta p { font: 500 13px var(--font-mono); color: var(--muted); white-space: nowrap; }

.channel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 22px; }
.channel__top { display: flex; align-items: center; gap: 14px; }
.channel__top img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.channel__top h3 { font-size: 17px; font-weight: 600; }
.channel__top p { font: 500 13px var(--font-mono); color: var(--muted); }
.channel__nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.channel__nums div { padding: 12px; border-radius: 12px; background: var(--surface-2); }
.channel__nums b { display: block; font: 700 24px/1 var(--font-display); }
.channel__nums span { font-size: 13px; color: var(--muted); }
.channel__nums .channel__views { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; }
.channel__views b { font-size: 30px; color: var(--accent); }
.channel__blurb { font-size: 14px; color: var(--text-2); margin-bottom: 18px; }
.btn--yt { width: 100%; justify-content: center; background: #ff0033; border-color: #ff0033; color: #fff; }
.btn--yt:hover { background: #e0002d; border-color: #e0002d; }

.tabs { display: flex; gap: 6px; margin: 28px 0 16px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid transparent; background: none;
  font-size: 14px; color: var(--text-2); cursor: pointer; transition: all 0.2s;
}
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab[aria-selected="true"] { color: var(--text); background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }

.vlist { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.vcard { text-align: left; background: none; border: 0; padding: 0; cursor: pointer; color: var(--text); }
.vcard__thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.vcard__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.vcard:hover .vcard__thumb img { transform: scale(1.05); }
.vcard__thumb::after {
  content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.0); transition: background 0.3s;
}
.vcard:hover .vcard__thumb::after { background: rgba(0,0,0,0.15); }
.vcard__views { position: absolute; right: 8px; bottom: 8px; z-index: 1; font: 500 11px var(--font-mono); color: #fff; background: rgba(0,0,0,0.6); padding: 3px 7px; border-radius: 6px; }
.vcard.is-playing .vcard__thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.vcard.is-playing .vcard__views { background: var(--accent); color: var(--accent-ink); }
.vcard h4 { margin-top: 10px; font: 500 14.5px/1.35 var(--font-body); letter-spacing: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Journey */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 119px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--line-strong), var(--line) 80%, transparent); }
.tl { display: grid; grid-template-columns: 96px 1fr; gap: 46px; padding-bottom: 40px; position: relative; }
.tl:last-child { padding-bottom: 0; }
.tl__year { font: 700 28px/1 var(--font-display); letter-spacing: -0.03em; text-align: right; color: var(--muted); padding-top: 2px; }
.tl:last-child .tl__year { color: var(--accent); }
.tl::before {
  content: ""; position: absolute; left: 114px; top: 8px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-strong);
}
.tl:last-child::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.tl__body h3 { font-size: 22px; font-weight: 600; }
.tl__body p { margin-top: 8px; color: var(--text-2); max-width: 68ch; }
.tl__links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tl__links button {
  height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
  font: 500 12px var(--font-mono); color: var(--text-2); cursor: pointer; transition: all 0.2s;
}
.tl__links button:hover { color: var(--accent); border-color: var(--accent); }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.skill { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 22px; }
.skill h3 { font: 500 12px var(--font-mono); text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.skill ul { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.skill li { padding: 6px 11px; border-radius: 9px; background: var(--surface-2); font-size: 14px; }

/* Contact */
.contact { padding-bottom: 96px; }
.contact__card {
  position: relative; overflow: hidden; border-radius: 28px; padding: clamp(32px, 6vw, 72px);
  background: var(--text); color: var(--bg); isolation: isolate;
}
.contact__card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(500px 300px at 90% 10%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%),
    linear-gradient(color-mix(in srgb, var(--bg) 8%, transparent) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(90deg, color-mix(in srgb, var(--bg) 8%, transparent) 1px, transparent 1px) 0 0 / 36px 36px;
}
.contact__card .sec-num { color: var(--accent-2); }
.contact__card h2 { font-size: clamp(2.2rem, 6vw, 4rem); letter-spacing: -0.04em; }
.contact__intro > p:not(.sec-num) { margin-top: 14px; max-width: 52ch; font-size: 18px; opacity: 0.8; }
.contact__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.contact__links .btn { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 30%, transparent); }
.contact__links .btn:hover { border-color: var(--bg); }
.contact__links .btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Contact form (on the inverted card, so it uses --bg for text and lines) */
.contact__card { display: grid; gap: 40px; }
@media (min-width: 980px) {
  .contact__card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(40px, 5vw, 72px); align-items: start; }
  .contact__card h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
}
.cform, .cform__done {
  border-radius: 20px; padding: clamp(20px, 3vw, 28px);
  background: color-mix(in srgb, var(--bg) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--bg) 16%, transparent);
}
.cform { display: grid; gap: 16px; }
.cform[hidden], .cform__done[hidden] { display: none; }
.cform__title { font: 600 20px var(--font-display); letter-spacing: -0.02em; }
.cform__row { display: grid; gap: 16px; }
@media (min-width: 560px) { .cform__row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 7px; min-width: 0; }
.field label { font: 500 12px var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.75; }
.field input, .field textarea {
  width: 100%; min-height: 46px; padding: 12px 14px; border-radius: 12px;
  font: inherit; font-size: 16px; color: var(--bg);
  background: color-mix(in srgb, var(--bg) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--bg) 24%, transparent);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--bg) 45%, transparent); }
.field input:hover, .field textarea:hover { border-color: color-mix(in srgb, var(--bg) 42%, transparent); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  background: color-mix(in srgb, var(--bg) 10%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
}
.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--bg);
  -webkit-box-shadow: 0 0 0 100px color-mix(in srgb, var(--bg) 10%, var(--text)) inset;
  caret-color: var(--bg);
}
.field [aria-invalid="true"] { border-color: var(--danger-inv); }
.field__err { font-size: 13px; color: var(--danger-inv); }
.field__err:empty, .cform__status:empty { display: none; }
.cform__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cform__status {
  padding: 10px 12px; border-radius: 10px; font-size: 14px; color: var(--danger-inv);
  background: color-mix(in srgb, var(--danger-inv) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger-inv) 35%, transparent);
}
.cform__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.cform__foot .btn[disabled] { opacity: 0.7; cursor: progress; transform: none; }
.cform__note { flex: 1 1 220px; font-size: 13px; line-height: 1.45; opacity: 0.65; }
.cform__done { display: grid; justify-items: start; gap: 10px; }
.cform__done:focus { outline: none; }
.cform__done-ic { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 4px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.cform__done-ic .ic { width: 22px; height: 22px; }
.cform__done h3 { font: 600 22px var(--font-display); letter-spacing: -0.02em; }
.cform__done p { opacity: 0.8; }
.cform__done strong { overflow-wrap: anywhere; }
.cform__done .btn { margin-top: 8px; background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 30%, transparent); }
.cform__done .btn:hover { border-color: var(--bg); }

.footer { border-top: 1px solid var(--line); }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; padding-bottom: 32px; font-size: 14px; color: var(--muted); }
.footer a:hover { color: var(--text); }

/* ============ Dialogs ============ */
dialog { color: var(--text); }
dialog::backdrop { background: rgba(5, 6, 8, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal {
  width: min(880px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line);
  border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden;
}
.modal[open] { animation: pop 0.28s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.modal__inner { max-height: calc(100dvh - 50px); overflow-y: auto; overscroll-behavior: contain; }
.modal__media { position: relative; aspect-ratio: 16 / 8; background: var(--surface-2); overflow: hidden; }
.modal__media img { width: 100%; height: 100%; object-fit: cover; }
.modal__media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.modal__close, .modal__share {
  position: absolute; top: 14px; z-index: 3; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: rgba(0, 0, 0, 0.55); color: #fff; cursor: pointer; backdrop-filter: blur(6px);
}
.modal__close { right: 14px; }
.modal__share { right: 60px; }
.modal__close:hover, .modal__share:hover { background: rgba(0, 0, 0, 0.75); }
.modal__close .ic, .modal__share .ic { width: 18px; height: 18px; }
.modal__content { padding: 28px clamp(20px, 4vw, 36px) 32px; }
.modal__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.modal__content h2 { margin-top: 14px; font-size: clamp(1.8rem, 4vw, 2.4rem); letter-spacing: -0.03em; }
.modal__tagline { margin-top: 6px; font-size: 17px; color: var(--text-2); }
.modal__facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font: 500 13px var(--font-mono); color: var(--muted); }
.modal__facts b { color: var(--text); font-weight: 500; }
.modal__summary { margin-top: 20px; font-size: 17px; }
.modal h3 { margin-top: 28px; font: 500 12px var(--font-mono); text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.modal ul.hl { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.modal ul.hl li { position: relative; padding-left: 22px; color: var(--text-2); }
.modal ul.hl li::before { content: ""; position: absolute; left: 4px; top: 0.62em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.modal__stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.modal__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.modal__private { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.modal__private .ic { width: 15px; height: 15px; }
.modal__videos, .modal__gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.modal__gallery { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.modal__gallery img { border-radius: 12px; border: 1px solid var(--line); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.modal__gallery img:only-child { grid-column: 1 / -1; aspect-ratio: auto; }
.modal__gallery--tall { grid-template-columns: repeat(3, 1fr); }
.modal__gallery--tall img { aspect-ratio: auto; }
.modal__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.modal__nav button { display: flex; flex-direction: column; gap: 2px; max-width: 48%; background: none; border: 0; cursor: pointer; padding: 0; text-align: left; }
.modal__nav button:last-child { text-align: right; margin-left: auto; align-items: flex-end; }
.modal__nav small { font: 500 11px var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.modal__nav span { font: 600 16px var(--font-display); }
.modal__nav button:hover span { color: var(--accent); }

.palette {
  width: min(620px, calc(100% - 32px)); margin-top: 12vh; padding: 0; border: 1px solid var(--line);
  border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg);
}
.palette[open] { animation: pop 0.2s var(--ease); }
.palette__input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette__input input { flex: 1; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 16px; }
.palette__list { list-style: none; margin: 0; padding: 8px; max-height: min(420px, 55vh); overflow-y: auto; }
.palette__group { padding: 10px 10px 6px; font: 500 11px var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }
.palette__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.palette__item .ic { width: 16px; height: 16px; color: var(--muted); }
.palette__item small { margin-left: auto; font: 500 12px var(--font-mono); color: var(--muted); white-space: nowrap; }
.palette__item[aria-selected="true"] { background: var(--accent-soft); }
.palette__item[aria-selected="true"] .ic { color: var(--accent); }
.palette__empty { padding: 24px; text-align: center; color: var(--muted); }
.palette__hint { display: flex; gap: 6px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 200; transform: translate(-50%, 20px); opacity: 0;
  padding: 10px 16px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg); pointer-events: none; transition: opacity 0.25s, transform 0.25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ============ Reveal ============ */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ============ Responsive ============ */
/* Modular capabilities (ROVI) */
.mods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.mod { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; color: inherit; text-decoration: none; }
.mod__img { aspect-ratio: 16 / 10; background: radial-gradient(120% 90% at 50% 30%, var(--surface), var(--surface-2)); }
.mod__img img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.mod__img--cover img { object-fit: cover; padding: 0; }
.mod__body { padding: 12px 14px 14px; }
.mod h4 { font: 600 15px var(--font-display); letter-spacing: -0.01em; }
.mod p { margin-top: 4px; font-size: 13.5px; line-height: 1.45; color: var(--text-2); }
.mod__more { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font: 500 12px var(--font-mono); color: var(--accent); }
.mod__more .ic { width: 13px; height: 13px; }
.mod--link { transition: border-color 0.2s, transform 0.2s var(--ease); }
.mod--link:hover { border-color: var(--accent); transform: translateY(-2px); }

/* Version history with optional 3D view */
.evo { margin-top: 12px; }
.evo__stage {
  position: relative; aspect-ratio: 16 / 10; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: radial-gradient(90% 80% at 50% 40%, var(--surface), var(--surface-2));
}
.evo__stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px; mask-image: radial-gradient(70% 70% at 50% 55%, #000, transparent);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 55%, #000, transparent);
}
.evo__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.evo__stage.is-3d .evo__poster { visibility: hidden; }
.evo__canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.evo__canvas:active { cursor: grabbing; }
.evo__toggle {
  position: absolute; right: 12px; bottom: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text);
  font: 500 13px var(--font-body); cursor: pointer; box-shadow: var(--shadow); transition: border-color 0.2s, color 0.2s;
}
.evo__toggle:hover { border-color: var(--accent); color: var(--accent); }
.evo__toggle:disabled { opacity: 0.6; cursor: progress; }
.evo__toggle .ic { width: 16px; height: 16px; }
.evo__status { position: absolute; left: 14px; bottom: 20px; z-index: 2; font: 500 12px var(--font-mono); color: var(--muted); }
.evo__status:empty { display: none; }
.evo__hint {
  position: absolute; left: 14px; top: 12px; z-index: 2; font: 500 11px var(--font-mono); color: var(--muted);
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.evo__stage.is-3d .evo__hint { opacity: 1; }
.evo__cap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-top: 12px; font-size: 14.5px; color: var(--text-2); }
.evo__cap b { font: 600 16px var(--font-display); color: var(--text); }
.evo__cap span { font: 500 12px var(--font-mono); color: var(--accent); }
.evo__rail { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 14px; }
.evo__rail button {
  display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; padding: 6px 4px 8px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.evo__rail button:hover { border-color: var(--line-strong); }
.evo__rail button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.evo__rail img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; }
.evo__rail span { font: 600 12.5px var(--font-display); color: var(--text); white-space: nowrap; }
.evo__rail small { font: 500 10.5px var(--font-mono); color: var(--muted); white-space: nowrap; }
.evo__note { margin-top: 10px; font-size: 12.5px; color: var(--muted); }

@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav__actions { margin-left: auto; }
  .nav__burger { display: grid; }
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .hero__visual { max-width: 560px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .card, .card--featured { grid-column: auto; }
  .videos { grid-template-columns: 1fr; }
  .channel { display: grid; grid-template-columns: auto 1fr auto; gap: 16px 20px; align-items: center; }
  .channel__nums { margin: 0; }
  .channel__blurb { display: none; }
  .vlist { grid-template-columns: repeat(3, 1fr); }
  .skills { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .kbar-btn span, .kbar-btn kbd { display: none; }
  .kbar-btn { width: 36px; padding: 0; justify-content: center; }
  .hero { padding-top: 40px; }
  .stats { margin-top: 48px; }
  .stats li { padding: 16px 14px; }
  .stats span { font-size: 13px; }
  .showcase__head { padding: 14px 16px 4px; }
  .showcase__list { padding: 0 6px 6px; }
  .showcase__item { gap: 12px; padding: 10px 10px 10px 12px; }
  .section { padding-top: 80px; }
  .about { grid-template-columns: 1fr; }
  .about__text p { font-size: 17px; }
  .focus { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .hero__socials { margin-left: 0; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .search { min-width: 0; }
  .grid { grid-template-columns: 1fr; }
  .card--featured .card__title { font-size: 24px; }
  .channel { grid-template-columns: 1fr; }
  .vlist { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .vcard h4 { font-size: 13.5px; }
  .player__meta { flex-direction: column; gap: 4px; }
  .timeline::before { left: 5px; }
  .tl { grid-template-columns: 1fr; gap: 6px; padding-left: 28px; }
  .tl::before { left: 0; top: 6px; }
  .tl__year { text-align: left; font-size: 22px; }
  .skills { grid-template-columns: 1fr; }
  .modal { width: 100%; max-width: 100%; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; border: 0; }
  .modal__inner { max-height: 100dvh; }
  .modal__media { aspect-ratio: 16 / 10; }
  .modal__videos { grid-template-columns: repeat(2, 1fr); }
  .mods { grid-template-columns: repeat(2, 1fr); }
  .evo__stage { aspect-ratio: 4 / 3; }
  .evo__rail { display: flex; overflow-x: auto; margin: 14px -20px 0; padding: 0 20px 4px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .evo__rail::-webkit-scrollbar { display: none; }
  .evo__rail button { flex: 0 0 96px; scroll-snap-align: start; }
  .footer__inner { flex-direction: column; }
}

@media (max-width: 420px) {
  .eyebrow__sep, .eyebrow__sep + span { display: none; }
  .mods { grid-template-columns: 1fr; gap: 10px; }
  .mod { flex-direction: row; align-items: stretch; }
  .mod__img { flex: 0 0 116px; aspect-ratio: auto; min-height: 92px; }
  .mod__body { padding: 10px 12px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ============ Small extras ============ */
.player__meta a { color: var(--accent); }
.player__meta a:hover { text-decoration: underline; }
.palette__item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
