/* =============================================================
   Devanshu Verma — Portfolio 2026
   Design system: paper-warm light (default) / graphite dark
   ============================================================= */

:root {
  color-scheme: light;

  /* Surfaces */
  --bg: #f7f7f5;
  --bg-soft: #efeee9;
  --card: #ffffff;

  /* Ink */
  --ink: #16171a;
  --muted: #565962;
  --faint: #8b8e96;

  /* Accents */
  --accent: #16171a;
  --accent-ink: #f7f7f5;
  --highlight: #4534f5;
  --green: #16a34a;

  /* Lines & shadows */
  --line: rgba(22, 23, 26, 0.09);
  --line-strong: rgba(22, 23, 26, 0.18);
  --shadow-card: 0 1px 2px rgba(22, 23, 26, 0.05), 0 12px 32px -12px rgba(22, 23, 26, 0.14);
  --shadow-lift: 0 2px 4px rgba(22, 23, 26, 0.06), 0 24px 48px -16px rgba(22, 23, 26, 0.2);

  /* Ambient */
  --ambient-a: rgba(69, 52, 245, 0.075);
  --ambient-b: rgba(14, 143, 143, 0.07);
  --glow-color: rgba(69, 52, 245, 0.08);
  --card-glow-color: rgba(69, 52, 245, 0.1);
  --grid-line: rgba(22, 23, 26, 0.045);

  /* Terminal (dark in both themes — it's the brand moment) */
  --term-bg: #15161a;
  --term-ink: #e9eaee;
  --term-dim: #8b8f9a;
  --term-accent: #a5a1ff;
  --term-gold: #e8c988;
  --term-green: #4ade80;
  --term-border: rgba(255, 255, 255, 0.08);

  /* Type */
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 18px;
  --page: min(1128px, calc(100% - 48px));

  /* Frosted glass for fixed UI (header, menu, toast) */
  --glass-blur: blur(22px) saturate(1.5);
  --chrome-blur: blur(28px) saturate(1.7);
}

html[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0b0c0f;
  --bg-soft: #101116;
  --card: #12141a;

  --ink: #f0f1f3;
  --muted: #a2a6ad;
  --faint: #6d717a;

  --accent: #f0f1f3;
  --accent-ink: #0b0c0f;
  --highlight: #a5a1ff;
  --gold: #d4b062;
  --gold-soft: rgba(212, 176, 98, 0.14);
  --gold-line: rgba(212, 176, 98, 0.38);
  --green: #4ade80;

  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.5);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.6);

  --ambient-a: rgba(130, 119, 255, 0.11);
  --ambient-b: rgba(14, 170, 165, 0.08);
  --glow-color: rgba(140, 130, 255, 0.07);
  --card-glow-color: rgba(150, 140, 255, 0.09);
  --grid-line: rgba(255, 255, 255, 0.035);

  --term-bg: #0d0f13;
  --term-accent: #a5a1ff;
  --term-gold: #e8c988;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  overflow-x: clip;
  /* Hide the page scrollbar (scrolling still works; the top progress bar
     shows position instead). */
  scrollbar-width: none;
}
html::-webkit-scrollbar { display: none; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.theme-transitioning *, .theme-transitioning *::before, .theme-transitioning *::after {
  transition-duration: 0.01ms !important;
}

/* ---------- Theme switch animation (View Transitions) ---------- */

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
/* dark → light: new snapshot expands on top */
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
/* light → dark: old snapshot contracts on top (exact reverse) */
html.is-light-to-dark::view-transition-old(root) { z-index: 2; }
html.is-light-to-dark::view-transition-new(root) { z-index: 1; }

::selection { background: var(--highlight); color: #fff; }
html[data-theme="dark"] ::selection { color: #0b0c0f; }

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
dd { margin-left: 0; }
ul, ol { padding: 0; }
img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  top: 14px; left: 14px;
  z-index: 2100;
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono); font-size: 12px;
  transform: translateY(-200%);
  transition: transform 200ms var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Ambient & overlays ---------- */

.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; contain: strict; }
.ambient-blob {
  position: absolute; border-radius: 50%;
  filter: blur(130px);
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}
.blob-a {
  width: min(60vw, 720px); aspect-ratio: 1;
  top: -22%; left: -12%;
  background: radial-gradient(circle, var(--ambient-a), transparent 65%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.blob-b {
  width: min(52vw, 640px); aspect-ratio: 1;
  bottom: -18%; right: -14%;
  background: radial-gradient(circle, var(--ambient-b), transparent 65%);
  animation: drift-b 32s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(50px, 40px) scale(1.06); } }
@keyframes drift-b { to { transform: translate(-60px, -40px) scale(1.05); } }

.ambient-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, black 20%, transparent 90%);
}

.ambient-glow {
  position: absolute;
  left: 0; top: 0;
  width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, var(--glow-color), transparent 65%);
  will-change: transform;
}

.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 1300; contain: strict; }
.scroll-progress span {
  display: block; height: 100%;
  background: var(--highlight); /* purple in light, lavender in dark */
  transform: scaleX(0); transform-origin: left;
  will-change: transform;
}
html[data-theme="dark"] .scroll-progress span { background: var(--gold); }

/* ---------- Boot / loading screen ---------- */

.boot {
  position: fixed; inset: 0; z-index: 2200;
  display: grid; place-items: center;
  background: var(--bg);
  padding: 24px;
}
html[data-theme="dark"] .boot { background: #08090b; }
.boot-panel {
  width: min(420px, calc(100vw - 48px));
  border: 1px solid var(--term-border);
  border-radius: var(--radius);
  background: var(--term-bg);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  overflow: hidden;
  animation: boot-panel-in 600ms var(--ease) both;
}
@keyframes boot-panel-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.boot-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--term-border);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--term-dim);
}
.boot-dots { display: inline-flex; gap: 6px; }
.boot-dots i { width: 10px; height: 10px; border-radius: 50%; }
.boot-dots i:nth-child(1) { background: #ff5f57; }
.boot-dots i:nth-child(2) { background: #febc2e; }
.boot-dots i:nth-child(3) { background: #28c840; }

.boot-lines { list-style: none; margin: 0; padding: 20px 18px 6px; display: grid; gap: 9px; }
.boot-lines li {
  font-family: var(--mono); font-size: 12px; color: #c9ccd4;
  display: flex; align-items: center; gap: 10px;
  opacity: 0; transform: translateY(6px);
  animation: boot-line-in 420ms var(--ease) forwards;
  animation-delay: var(--boot-line-delay, 0ms);
}
.boot-lines li::before {
  content: ">";
  color: var(--term-accent); font-weight: 500;
}
.boot-lines li::after {
  content: "✓";
  margin-left: auto; margin-right: 2px;
  color: var(--term-green); font-size: 11px;
  opacity: 0;
  animation: boot-check-in 300ms ease forwards;
  animation-delay: calc(var(--boot-line-delay, 0ms) + 260ms);
}
@keyframes boot-line-in { to { opacity: 1; transform: translateY(0); } }
@keyframes boot-check-in { to { opacity: 1; } }

.boot-bar {
  height: 3px; margin: 16px 18px 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.boot-bar i {
  display: block; height: 100%; width: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--term-accent), var(--term-gold));
  transform-origin: left;
  transform: scaleX(0);
  animation: boot-bar-fill 1.5s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
@keyframes boot-bar-fill { to { transform: scaleX(1); } }

.boot-status {
  margin: 0; padding: 10px 18px 16px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--term-dim);
}

/* Exit sequence: panel settles, then the whole screen irises away */
.boot.is-done .boot-panel { animation: boot-panel-out 360ms var(--ease) both; }
@keyframes boot-panel-out {
  to { opacity: 0; transform: translateY(-10px) scale(0.97); filter: blur(10px); }
}
.boot.is-done {
  animation: boot-out 560ms var(--ease) 200ms both;
  pointer-events: none;
}
/* The backdrop fades out while its blur pulls back into focus. */
@keyframes boot-out {
  from { backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); }
  to {
    background-color: transparent;
    backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px);
    visibility: hidden;
  }
}
.boot.gone { display: none; }

@media (prefers-reduced-motion: reduce) {
  .boot-panel, .boot-lines li, .boot-lines li::after, .boot-bar i { animation-duration: 0.01ms !important; animation-delay: 0ms !important; }
  .boot.is-done, .boot.is-done .boot-panel { animation-duration: 0.01ms !important; animation-delay: 0ms !important; }
}

/* ---------- Custom cursor ---------- */

/* With the custom cursor active, hide the system one everywhere (including
   links/buttons, which set their own cursor). Set by script.js only when the
   dot + ring actually run: fine pointer and no reduced-motion preference. */
html.custom-cursor, html.custom-cursor * { cursor: none !important; }

.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 2300; /* above the boot screen */
  pointer-events: none; border-radius: 50%;
  opacity: 0;
}
.cursor-dot { width: 5px; height: 5px; background: var(--ink); will-change: transform; }
.cursor-ring {
  width: 32px; height: 32px;
  border: 1px solid color-mix(in srgb, var(--ink) 45%, transparent);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  will-change: transform, opacity;
  transition: background 260ms ease, border-color 260ms ease, opacity 260ms ease;
}
.cursor-ring.is-hover {
  border-color: color-mix(in srgb, var(--ink) 70%, transparent);
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---------- Header ---------- */

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 14px 24px 0;
}
.header-inner {
  max-width: var(--page); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 9px 9px 9px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  backdrop-filter: var(--chrome-blur);
  -webkit-backdrop-filter: var(--chrome-blur);
  /* own compositor layer: scrolling under it doesn't repaint its contents */
  transform: translateZ(0);
  transition: border-color 300ms ease, box-shadow 300ms ease, background 300ms ease;
}
.site-header.scrolled .header-inner {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}

.brand { display: inline-flex; align-items: center; flex: 0 0 auto; min-height: 34px; }
.brand-name { font-weight: 600; font-size: 15.5px; letter-spacing: -0.014em; }

.desktop-nav { display: flex; gap: 2px; }
.desktop-nav a {
  position: relative;
  padding: 8px 13px; border-radius: 9px;
  font-size: 13.5px; font-weight: 450; color: var(--muted);
  transition: color 200ms ease, background 200ms ease;
}
.desktop-nav a::after {
  content: "";
  position: absolute; left: 50%; bottom: 2px;
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--ink);
  transform: translateX(-50%) scale(0);
  transition: transform 220ms var(--ease);
}
.desktop-nav a:hover { color: var(--ink); }
.desktop-nav a.active { color: var(--ink); }
.desktop-nav a.active::after { transform: translateX(-50%) scale(1); }

.header-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.header-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em;
  color: var(--muted);
  padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px;
}
.header-status i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--green) 18%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--green) 0%, transparent); } }

.header-resume {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: 10px;
  font-size: 13px; font-weight: 500; color: var(--ink);
  border: 1px solid var(--line-strong);
  transition: background 200ms ease, border-color 200ms ease;
}
.header-resume span { transition: transform 220ms var(--ease); }
.header-resume:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); border-color: var(--ink); }
.header-resume:hover span { transform: translate(1.5px, -1.5px); }

.theme-toggle {
  position: relative;
  width: 38px; height: 38px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  display: grid; place-items: center;
  color: var(--muted);
  transition: color 200ms ease, border-color 200ms ease, background 200ms ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.theme-icon { grid-area: 1 / 1; width: 16px; height: 16px; transition: opacity 350ms var(--ease), transform 450ms var(--ease); }
.theme-icon svg { width: 100%; height: 100%; }
html[data-theme="light"] .theme-icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }
html[data-theme="light"] .theme-icon-sun { opacity: 0; transform: rotate(90deg) scale(0.4); }
html[data-theme="dark"] .theme-icon-sun { opacity: 1; transform: rotate(0deg) scale(1); }
html[data-theme="dark"] .theme-icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.4); }

/* Glass light toggle (glass-toggle.js): a WebGL track at the original's
   432 × 224 proportions, scaled to the header's button height. The canvas
   overhangs the button so the shadow and light spill can reach the header. */
.theme-toggle.is-glass {
  width: calc(var(--toggle-h, 38px) * 432 / 224);
  height: var(--toggle-h, 38px);
  border: 0; padding: 0;
  border-radius: calc(var(--toggle-h, 38px) * 72 / 224);
  background: none;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none;
}
.theme-toggle.is-glass:hover { background: none; }
.theme-toggle.is-glass .theme-icon { display: none; }
.theme-toggle.is-glass:focus-visible { outline: 2px solid var(--highlight); outline-offset: 3px; }
.glass-toggle-canvas {
  position: absolute; display: block;
  pointer-events: none;
  /* Captured on its own during the theme View Transition so it keeps
     animating live above the circular reveal. */
  view-transition-name: glass-toggle;
}
::view-transition-group(glass-toggle) { animation: none; z-index: 10; }
::view-transition-old(glass-toggle) { display: none; }
::view-transition-new(glass-toggle) { animation: none; }
@media (max-width: 640px) { .theme-toggle.is-glass { --toggle-h: 30px; } }
@media (max-width: 420px) { .theme-toggle.is-glass { --toggle-h: 26px; } }

/* ---------- Explore / Recruiter view switch ---------- */

.view-switch {
  position: relative; isolation: isolate;
  display: inline-grid; grid-template-columns: 1fr 1fr;
  padding: 3px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: color-mix(in srgb, var(--card) 60%, transparent);
  flex: 0 0 auto;
}
.view-switch button {
  position: relative; z-index: 1;
  height: 30px; padding: 0 13px; border-radius: 999px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.03em;
  color: var(--muted); white-space: nowrap;
  transition: color 320ms var(--ease);
}
.view-switch button:hover { color: var(--ink); }
.view-switch button[aria-pressed="true"] { color: var(--accent-ink); }
/* Sliding highlight — each column is exactly half the content box. */
.view-switch-pill {
  position: absolute; z-index: 0;
  top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 6px 16px -8px color-mix(in srgb, var(--accent) 60%, transparent);
  transition: transform 420ms var(--ease);
}
.view-switch[data-active="recruiter"] .view-switch-pill,
html[data-view="recruiter"] .view-switch:not([data-active]) .view-switch-pill { transform: translateX(100%); }

/* Which content belongs to which view */
html[data-view="recruiter"] #main-content,
html[data-view="recruiter"] [data-view-only="explore"],
html[data-view="recruiter"] .boot,
html:not([data-view="recruiter"]) #recruiter-view,
html:not([data-view="recruiter"]) [data-view-only="recruiter"] { display: none !important; }

/* Swap animation: fade the old view out, then the new one rises in. */
html.view-leaving :is(main, .site-footer) {
  opacity: 0; translate: 0 10px; filter: blur(8px);
  transition: opacity 180ms ease, translate 180ms ease, filter 180ms ease;
}
html.view-entering :is(main, .site-footer) { animation: view-in 560ms var(--ease) both; }
@keyframes view-in {
  from { opacity: 0; translate: 0 14px; filter: blur(10px); }
  to { opacity: 1; translate: 0 0; filter: none; }
}
main:focus { outline: none; }

.menu-toggle {
  display: none; align-items: center; gap: 10px;
  height: 38px; padding: 0 15px; border-radius: 10px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.03em;
  transition: background 200ms ease, border-color 200ms ease;
}
.menu-toggle:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); border-color: var(--ink); }
.menu-toggle span { display: grid; gap: 4px; }
.menu-toggle i { display: block; width: 15px; height: 1.5px; background: currentColor; transition: transform 240ms var(--ease); }
.menu-toggle[aria-expanded="true"] i:first-child { transform: translateY(2.75px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] i:last-child { transform: translateY(-2.75px) rotate(-45deg); }

/* ---------- Full-screen menu ---------- */

.site-header .header-inner { position: relative; z-index: 2; } /* stays above the menu */
.mobile-panel {
  position: fixed; inset: 0; z-index: 1;
  height: 100dvh;
  display: flex;
  padding: 104px 24px calc(28px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 74%, transparent);
  backdrop-filter: var(--chrome-blur);
  -webkit-backdrop-filter: var(--chrome-blur);
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: none;
  /* closed: invisible and out of the tab order; visibility flips after the fade */
  visibility: hidden; opacity: 0;
  transition: opacity 320ms var(--ease), visibility 0s linear 320ms;
}
.mobile-panel.is-open {
  visibility: visible; opacity: 1;
  transition: opacity 320ms var(--ease), visibility 0s;
}
/* The header melts into the menu while it's open. */
html.menu-open .header-inner {
  background: transparent; border-color: transparent; box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
html.menu-open { overflow: hidden; }

.mobile-panel-inner {
  width: 100%; max-width: 640px; margin-inline: auto;
  display: flex; flex-direction: column; gap: 28px;
}
.mobile-kicker {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--faint);
}

.mobile-links { list-style: none; border-top: 1px solid var(--line); }
.mobile-links li { border-bottom: 1px solid var(--line); }
.mobile-links a {
  display: grid; grid-template-columns: 42px 1fr auto; align-items: baseline;
  padding: 16px 4px;
  font-size: clamp(32px, 9vw, 52px); font-weight: 600;
  letter-spacing: -0.04em; line-height: 1.05;
  color: var(--ink);
  transition: color 220ms ease, padding 320ms var(--ease);
}
.mobile-links a span {
  font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: 0.06em;
  color: var(--faint); translate: 0 -0.9em;
}
.mobile-links a i {
  font-style: normal; font-size: 0.5em; font-weight: 400; color: var(--faint);
  opacity: 0; translate: -10px 0;
  transition: opacity 220ms ease, translate 320ms var(--ease), color 220ms ease;
}
.mobile-links a:hover, .mobile-links a:focus-visible { padding-left: 12px; }
.mobile-links a:hover i, .mobile-links a:focus-visible i { opacity: 1; translate: 0 0; }
.mobile-links a.active { color: var(--highlight); }
.mobile-links a.active span, .mobile-links a.active i { color: var(--highlight); opacity: 1; translate: 0 0; }
html[data-theme="dark"] .mobile-links a.active,
html[data-theme="dark"] .mobile-links a.active span,
html[data-theme="dark"] .mobile-links a.active i { color: var(--gold); }

.mobile-foot { margin-top: auto; display: grid; gap: 18px; }
.mobile-resume {
  display: flex; align-items: center; justify-content: space-between;
  height: 54px; padding: 0 22px; border-radius: 14px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 15px; font-weight: 550;
}
html[data-view="recruiter"] .mobile-resume { background: var(--gold); color: #000; }
.mobile-resume span { transition: transform 220ms var(--ease); }
.mobile-resume:hover span { transform: translate(2px, -2px); }
.mobile-social { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.mobile-social a {
  padding: 6px 0;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); transition: color 180ms ease;
}
.mobile-social a:hover { color: var(--ink); }
.mobile-status {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--faint);
}
.mobile-status i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--green) 18%, transparent);
}

/* Staggered entrance: links, then the footer, rise and come into focus. */
.mobile-kicker, .mobile-links li, .mobile-foot {
  opacity: 0; translate: 0 18px; filter: blur(6px);
  transition: opacity 420ms var(--ease), translate 520ms var(--ease), filter 420ms var(--ease);
}
.mobile-panel.is-open :is(.mobile-kicker, .mobile-links li, .mobile-foot) {
  opacity: 1; translate: 0 0; filter: none;
  transition-delay: calc(60ms + var(--i, 0) * 45ms);
}

/* Only the small-screen header has a menu button. */
@media (min-width: 961px) {
  .mobile-panel { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px; border-radius: 13px;
  font-family: var(--sans); font-size: 14.5px; font-weight: 500; letter-spacing: -0.005em;
  border: 1px solid transparent; cursor: pointer;
  translate: var(--mx, 0) var(--my, 0);
  transition: translate 220ms var(--ease), transform 240ms var(--ease), box-shadow 240ms ease,
    background 240ms ease, border-color 240ms ease, color 240ms ease;
  will-change: transform;
}
.btn:active { transform: scale(0.985); }
.btn-arrow { font-size: 15px; transition: transform 260ms var(--ease); display: inline-block; }
.btn:hover .btn-arrow { transform: translateX(3px); }
a[href^="http"] .btn-arrow { transform: none; }
a[href^="http"]:hover .btn-arrow { transform: translate(2px, -2px); }

.btn-primary {
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 10px 28px -10px color-mix(in srgb, var(--accent) 45%, transparent);
}
.btn-primary:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 16px 36px -10px color-mix(in srgb, var(--accent) 55%, transparent);
}
.btn-ghost {
  color: var(--ink);
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--card) 55%, transparent);
}
.btn-ghost:hover {
  transform: translateY(-1.5px);
  border-color: var(--ink);
  background: var(--card);
}

/* ---------- Section scaffolding ---------- */

main { position: relative; z-index: 1; }
.section { padding: clamp(72px, 7vw, 116px) 24px; contain: content; }

.section-head {
  display: flex; align-items: center; gap: 16px;
  max-width: var(--page); margin: 0 auto clamp(40px, 5vw, 60px);
}
.section-index {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  flex: 0 0 auto;
}
.section-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.section-rule { height: 1px; flex: 1; background: linear-gradient(90deg, var(--line-strong), transparent); }

h2 {
  font-weight: 600; letter-spacing: -0.035em; line-height: 1.06;
  font-size: clamp(32px, 4vw, 54px);
  text-wrap: balance;
}
.accent-serif {
  font-family: var(--serif); font-style: italic; font-weight: 450;
  color: var(--highlight);
  letter-spacing: -0.01em;
}
[data-theme="dark"] .accent-serif { font-weight: 400; }

/* ---------- Dark-mode gold accents ---------- */

html[data-theme="dark"] .section-index {
  border-color: var(--gold-line);
  color: var(--gold);
}
html[data-theme="dark"] .section-rule {
  background: linear-gradient(90deg, var(--gold-line), transparent);
}
html[data-theme="dark"] .accent-serif { color: var(--gold); }
html[data-theme="dark"] .t-date { color: var(--gold); }
html[data-theme="dark"] .t-dot {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-soft);
}
html[data-theme="dark"] .work-tab::after { background: var(--gold); }
html[data-theme="dark"] .work-layer-index { color: var(--gold); }
html[data-theme="dark"] .term-prompt { color: var(--term-gold); }
html[data-theme="dark"] .stack-items span:hover {
  color: var(--gold);
  border-color: var(--gold-line);
  box-shadow: 0 6px 18px -6px rgba(212, 176, 98, 0.28);
}
html[data-theme="dark"] .stack-items span:hover,
html[data-theme="dark"] .tag-list li:hover { color: var(--gold); }
html[data-theme="dark"] .tag-list li:hover { border-color: var(--gold-line); }
html[data-theme="dark"] .aside-mini { color: var(--gold); }
html[data-theme="dark"] .scroll-cue i::after { background: var(--gold); }
html[data-theme="dark"] .citation-block button:hover { border-color: var(--gold-line); }
html[data-theme="dark"] .proof-strip a { text-decoration-color: var(--gold-line); }
html[data-theme="dark"] .proof-strip a:hover { text-decoration-color: var(--gold); }
html[data-theme="dark"] ::selection { background: var(--gold); color: #0b0c0f; }

/* ---------- Hero ---------- */

.hero { position: relative; padding: clamp(140px, 16vh, 190px) 24px clamp(72px, 8vw, 110px); overflow: clip; }
.hero-copy { display: flex; flex-direction: column; }
.hero-inner {
  max-width: var(--page); margin-inline: auto;
  display: grid; grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(44px, 5vw, 72px); align-items: stretch;
}
.eyebrow-row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-bottom: 26px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em;
  color: var(--ink);
  padding: 9px 15px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--card);
}
.eyebrow i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--green) 18%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
.hero-meta { font-family: var(--mono); font-size: 11.5px; color: var(--muted); letter-spacing: 0.02em; }

.hero h1 {
  font-size: clamp(42px, 5.3vw, 74px);
  font-weight: 600; letter-spacing: -0.04em; line-height: 1.02;
  margin-bottom: 24px; text-wrap: balance;
}
@media (min-width: 1081px) and (max-height: 900px) {
  .hero h1 { font-size: clamp(42px, 5.3vw, 64px); }
}
@media (min-width: 1081px) and (max-height: 800px) {
  .hero h1 { font-size: clamp(40px, 5vw, 56px); }
}
.hero h1 .accent-serif { font-size: 1.02em; line-height: 1; }

.hero-deck { max-width: 54ch; color: var(--muted); font-size: clamp(16px, 1.35vw, 17.5px); line-height: 1.72; margin-bottom: 36px; }
.hero-deck strong { color: var(--ink); font-weight: 550; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Terminal card ---------- */

.hero-visual { perspective: 1400px; display: flex; flex-direction: column; justify-content: center; }
.terminal-card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--term-border);
  background: var(--term-bg);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 260ms ease-out;
}
.terminal-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(255, 255, 255, 0.18), transparent 95%);
}

.terminal-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--term-border);
}
.terminal-dots { display: inline-flex; gap: 6px; }
.terminal-dots i { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dots i:nth-child(1) { background: #ff5f57; }
.terminal-dots i:nth-child(2) { background: #febc2e; }
.terminal-dots i:nth-child(3) { background: #28c840; }
.terminal-path { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--term-dim); }
.terminal-live {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em;
  color: var(--term-green);
  border: 1px solid color-mix(in srgb, var(--term-green) 35%, transparent);
  border-radius: 999px; padding: 4px 10px;
}
.terminal-live i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--term-green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--term-green) 20%, transparent);
  animation: pulse 2s ease-in-out infinite;
}

.terminal-body { padding: clamp(20px, 2vw, 26px) clamp(18px, 2vw, 26px) clamp(24px, 2.4vw, 30px); font-family: var(--mono); }
.term-line { display: flex; align-items: baseline; gap: 12px; font-size: 12.5px; color: var(--term-ink); }
.term-prompt { color: var(--term-accent); font-weight: 500; }

.term-steps { list-style: none; margin: 18px 0 22px; display: grid; gap: 7px; }
.term-steps li {
  display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 8px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 11.5px; color: #c9ccd4;
  opacity: 0; transform: translateY(8px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease), border-color 250ms ease;
}
.hero-visual.revealed .term-steps li { opacity: 1; transform: translateY(0); }
.term-steps li:nth-child(1) { transition-delay: 150ms; }
.term-steps li:nth-child(2) { transition-delay: 280ms; }
.term-steps li:nth-child(3) { transition-delay: 410ms; }
.term-steps li:nth-child(4) { transition-delay: 540ms; }
.term-steps li:nth-child(5) { transition-delay: 670ms; }
.term-steps b { color: var(--term-accent); font-weight: 500; font-size: 10px; text-align: center; }
.term-steps i {
  font-style: normal; color: var(--term-green); font-size: 11px;
  opacity: 0; transform: scale(0.4); transition: opacity 350ms var(--ease), transform 350ms var(--ease);
}
.hero-visual.revealed .term-steps li i { opacity: 1; transform: scale(1); transition-delay: 900ms; }

.term-result { padding-top: 20px; border-top: 1px solid var(--term-border); }
.term-answer { min-height: 20px; }
.term-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.term-chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  font-size: 10px; letter-spacing: 0.05em; color: var(--term-dim);
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
}
.term-chip i { width: 6px; height: 6px; border-radius: 2px; background: var(--term-accent); opacity: 0.8; }

.card-glow {
  position: absolute; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, var(--card-glow-color), transparent 65%);
  top: var(--glow-y, 50%); left: var(--glow-x, 50%);
  transform: translate(-50%, -50%);
  opacity: 0; transition: opacity 320ms ease; pointer-events: none;
}
[data-tilt]:hover .card-glow { opacity: 1; }

.scroll-cue {
  position: absolute; bottom: 30px; left: 50%; translate: -50% 0;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--faint);
  transition: color 200ms ease;
}
.scroll-cue:hover { color: var(--ink); }
.scroll-cue i { display: block; width: 1px; height: 30px; background: var(--line-strong); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; inset: 0; background: var(--highlight); animation: scroll-line 2s ease-in-out infinite; }
@keyframes scroll-line { 0% { transform: translateY(-100%); } 55%, 100% { transform: translateY(100%); } }

/* ---------- About ---------- */

.about-grid {
  max-width: var(--page); margin: 0 auto clamp(40px, 5vw, 64px);
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 4vw, 72px); align-items: end;
}
.about-copy p { color: var(--muted); font-size: clamp(16px, 1.3vw, 18px); line-height: 1.78; margin-bottom: 16px; }
.about-copy p:last-child { margin-bottom: 0; }
.about-copy .muted { color: var(--faint); font-size: 15.5px; }

.fact-grid, .work-facts {
  max-width: var(--page); margin-inline: auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.fact {
  position: relative;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card);
  padding: clamp(22px, 2.4vw, 30px);
  box-shadow: var(--shadow-card);
  transition: translate 300ms var(--ease), border-color 300ms ease, box-shadow 300ms ease;
  overflow: hidden;
}
.fact:hover { translate: 0 -3px; border-color: var(--line-strong); box-shadow: var(--shadow-lift); }
.fact-label {
  display: block; margin-bottom: 14px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.fact h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; margin-bottom: 10px; }
.fact p { color: var(--muted); font-size: 14.5px; line-height: 1.7; }

/* ---------- Stack ---------- */

.stack-head {
  max-width: var(--page); margin: 0 auto clamp(36px, 4vw, 52px);
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 28px; align-items: end;
}
.stack-head p { color: var(--muted); font-size: 16px; line-height: 1.7; max-width: 46ch; }

.stack-group-label {
  font-family: var(--serif); font-style: italic; font-weight: 450;
  font-size: clamp(21px, 2vw, 25px); letter-spacing: -0.01em;
  color: var(--ink);
}

.stack-groups { max-width: var(--page); margin-inline: auto; border-top: 1px solid var(--line); }
.stack-group {
  display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: start;
  padding: clamp(24px, 3vw, 34px) 0;
  border-bottom: 1px solid var(--line);
}
.stack-items { display: flex; flex-wrap: wrap; gap: 8px; }
.stack-items li { list-style: none; }
.stack-items span {
  display: inline-block; text-align: center;
  font-size: 14px; font-weight: 450; color: var(--muted);
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  transition: color 200ms ease, border-color 200ms ease, translate 250ms var(--ease), box-shadow 250ms ease;
  cursor: default;
}
.stack-items span:hover {
  color: var(--highlight); border-color: color-mix(in srgb, var(--highlight) 55%, transparent);
  translate: 0 -2px;
  box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--highlight) 35%, transparent);
}

.stack-daily {
  max-width: var(--page); margin: clamp(40px, 5vw, 56px) auto 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 60%, transparent);
  overflow: hidden;
}
.stack-daily p {
  display: grid; gap: 7px; padding: 24px 26px;
}
.stack-daily p span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.stack-daily p strong { font-size: 15px; font-weight: 550; letter-spacing: -0.01em; }
.stack-daily p + p { border-left: 1px solid var(--line); }

/* ---------- Work ---------- */

.work { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--highlight) 2.5%, transparent) 30%, transparent); }

.work-head { max-width: var(--page); margin: 0 auto clamp(36px, 4vw, 52px); }
.work-head h2 { margin-bottom: 18px; }
.work-head > p { color: var(--muted); font-size: 16.5px; line-height: 1.7; max-width: 62ch; margin-bottom: 26px; }
.work-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.work-shell {
  max-width: var(--page); margin-inline: auto;
  border: 1px solid var(--line-strong); border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.work-toolbar {
  display: flex; justify-content: space-between; align-items: stretch; gap: 16px;
  border-bottom: 1px solid var(--line);
}
.work-tabs { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.work-tabs::-webkit-scrollbar { display: none; }
.work-tab {
  flex: 0 0 auto; padding: 17px 20px; position: relative;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em;
  color: var(--faint); white-space: nowrap;
  transition: color 180ms ease;
}
.work-tab::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px;
  background: var(--highlight);
  transform: scaleX(0); transform-origin: left;
  transition: transform 300ms var(--ease);
}
.work-tab:hover { color: var(--ink); }
.work-tab.active { color: var(--ink); }
.work-tab.active::after { transform: scaleX(1); }
.work-note {
  align-self: center; margin: 0; padding-right: 24px;
  color: var(--muted); font-family: var(--mono); font-size: 11px; text-align: right;
  max-width: 300px; line-height: 1.6;
}

.work-layout { display: grid; grid-template-columns: 1fr 300px; }
.work-body { padding: clamp(28px, 4.5vw, 56px); min-height: 340px; }
.work-layer-index {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--highlight);
}
.work-body h3 {
  margin: 18px 0 16px;
  font-size: clamp(30px, 3.4vw, 48px); font-weight: 600;
  letter-spacing: -0.04em; line-height: 1.02;
}
.layer-enter { animation: layer-in 520ms var(--ease) both; }
@keyframes layer-in {
  from { opacity: 0; translate: 0 10px; filter: blur(6px); }
  to { opacity: 1; translate: 0 0; filter: none; }
}
.work-body > p { max-width: 58ch; color: var(--muted); font-size: 15.5px; line-height: 1.75; margin-bottom: 26px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li {
  list-style: none;
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.03em;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--muted);
  background: color-mix(in srgb, var(--highlight) 3%, transparent);
  transition: color 200ms ease, border-color 200ms ease;
}
.tag-list li:hover { color: var(--highlight); border-color: color-mix(in srgb, var(--highlight) 55%, transparent); }

.work-aside {
  border-left: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-soft) 55%, transparent);
  padding: 36px 30px;
  display: flex; flex-direction: column; justify-content: center;
}
.aside-label, .aside-mini {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.aside-mini { margin-bottom: 12px; line-height: 1.7; }
.work-aside > strong { display: block; margin: 14px 0 10px; font-size: 27px; font-weight: 600; letter-spacing: -0.03em; }
.work-aside > p { color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.aside-rule { margin: 26px 0; border-top: 1px solid var(--line); }
.aside-links { display: grid; gap: 2px; }
.aside-links a {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  min-height: 34px; padding: 6px 0;
  font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted);
  transition: color 180ms ease;
}
.aside-links a span { transition: transform 220ms var(--ease); }
.aside-links a:hover { color: var(--ink); }
.aside-links a:hover span { transform: translate(2px, -2px); }

.work-source {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 15px 24px;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.03em; color: var(--faint);
}

.work-facts { margin-top: 16px; }

/* ---------- Journey ---------- */

.journey-head {
  max-width: var(--page); margin: 0 auto clamp(36px, 4vw, 52px);
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 28px; align-items: end;
}
.journey-head p { color: var(--muted); font-size: 16px; line-height: 1.7; }

.timeline { list-style: none; max-width: var(--page); margin: 0 auto; display: grid; gap: 14px; }
/* Direct children only — otherwise this also grids the tag pills inside each card. */
.timeline > li { position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 18px; }
.timeline > li:not(:last-child)::before {
  content: ""; position: absolute; left: 7px; top: 34px; bottom: -14px;
  width: 1px; background: var(--line);
}
.t-dot {
  width: 15px; height: 15px; border-radius: 50%; margin-top: 26px;
  background: var(--bg); border: 2px solid var(--highlight);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--highlight) 12%, transparent);
}
.t-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card);
  padding: clamp(22px, 3vw, 32px) clamp(22px, 3vw, 36px);
  box-shadow: var(--shadow-card);
  transition: translate 300ms var(--ease), border-color 300ms ease, box-shadow 300ms ease;
}
.t-card:hover { translate: 4px 0; border-color: var(--line-strong); box-shadow: var(--shadow-lift); }
.t-date { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--highlight); }
.t-card h3 { margin: 12px 0 10px; font-size: clamp(19px, 2vw, 24px); font-weight: 600; letter-spacing: -0.025em; }
.t-card p { color: var(--muted); font-size: 15px; line-height: 1.72; max-width: 72ch; margin-bottom: 18px; }

.proof-strip {
  max-width: var(--page); margin: clamp(36px, 4vw, 48px) auto 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 60%, transparent);
}
.proof-strip > div { padding: 24px 28px; }
.proof-strip > div + div { border-left: 1px solid var(--line); }
.proof-strip span { display: block; margin-bottom: 7px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.proof-strip strong { font-size: 15px; font-weight: 550; letter-spacing: -0.01em; }
.proof-strip a {
  color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
  display: inline-block; padding: 4px 1px; margin: -4px 0;
  transition: text-decoration-color 200ms ease;
}
.proof-strip a:hover { text-decoration-color: var(--ink); }

/* ---------- Contact ---------- */

.contact-card {
  position: relative; max-width: var(--page); margin-inline: auto;
  border: 1px solid var(--line-strong); border-radius: 28px;
  padding: clamp(44px, 6vw, 92px);
  background: var(--card);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  transition: transform 260ms ease-out;
}
.contact-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 320px at 88% 0%, var(--ambient-a), transparent 70%),
    radial-gradient(500px 300px at 0% 100%, var(--ambient-b), transparent 70%);
}
.contact-card > * { position: relative; }
.contact-eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.contact-card h2 { font-size: clamp(40px, 6.2vw, 82px); margin: 22px 0 20px; line-height: 1.0; letter-spacing: -0.045em; }
.contact-card > p { max-width: 56ch; color: var(--muted); font-size: 16.5px; line-height: 1.72; margin-bottom: 34px; }
.contact-card > p strong { color: var(--ink); font-weight: 550; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.citation-block {
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
  max-width: 640px; margin-top: 40px; padding: 15px 18px;
  border: 1px solid var(--line); border-radius: 13px;
  background: color-mix(in srgb, var(--bg-soft) 70%, transparent);
}
.citation-block code { font-family: var(--mono); font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.citation-block button {
  flex: 0 0 auto; height: 36px; padding: 0 15px; border-radius: 9px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink);
  transition: background 180ms ease, border-color 180ms ease;
}
.citation-block button:hover { border-color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent); }

/* ---------- Footer ---------- */

.site-footer { position: relative; z-index: 1; padding: clamp(56px, 7vw, 88px) 24px 28px; border-top: 1px solid var(--line); }
.footer-top {
  display: flex; justify-content: space-between; align-items: end; gap: 24px;
  max-width: var(--page); margin: 0 auto;
  padding-bottom: 40px; border-bottom: 1px solid var(--line);
}
.footer-top > p { max-width: 34ch; color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.5; text-align: right; }
.footer-grid {
  display: grid; grid-template-columns: 1.2fr 1fr 0.6fr; gap: 40px;
  max-width: var(--page); margin: 0 auto; padding: 44px 0 56px;
}
.footer-grid span { display: block; margin-bottom: 12px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.footer-grid p, .footer-grid a { color: var(--muted); font-size: 14px; line-height: 2; }
.footer-grid p a { display: inline-block; padding: 4px 0; margin: -4px 0; }
.footer-links a { display: block; width: fit-content; min-height: 32px; padding: 5px 0; }
.footer-links a, .footer-grid p a { transition: color 180ms ease; }
.footer-links a:hover, .footer-grid p a:hover { color: var(--ink); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  max-width: var(--page); margin: 0 auto; padding-top: 24px; border-top: 1px solid var(--line);
  color: var(--faint); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.05em;
}

/* ---------- Recruiter view ---------- */
/* Always black / gold / white, regardless of the theme toggle — the same gold
   language as the dark explore view, stripped down to a résumé-style page. */

html[data-view="recruiter"] {
  color-scheme: dark;
  --bg: #000;
  --bg-soft: #0a0a0a;
  --card: #0a0a0a;
  --ink: #f5f4ef;
  --muted: rgba(245, 244, 239, 0.66);
  --faint: rgba(245, 244, 239, 0.42);
  --accent: #f5f4ef;
  --accent-ink: #000;
  --gold: #d4b062;
  --gold-soft: rgba(212, 176, 98, 0.14);
  --gold-line: rgba(212, 176, 98, 0.38);
  --highlight: var(--gold);
  --green: var(--gold);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --shadow-card: none;
  --shadow-lift: none;
}
html[data-view="recruiter"] .ambient,
html[data-view="recruiter"] .theme-toggle { display: none; }
html[data-view="recruiter"] .scroll-progress span { background: var(--gold); }
html[data-view="recruiter"] ::selection { background: var(--gold); color: #000; }
/* Fade the page colour as the views swap, instead of a hard light → black cut. */
html.view-entering body { transition: background-color 450ms ease, color 450ms ease; }

.recruiter {
  max-width: min(860px, calc(100% - 48px)); margin-inline: auto;
  padding: clamp(124px, 15vh, 160px) 0 clamp(64px, 7vw, 96px);
}

/* Intro */
.r-status {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold);
}
.r-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3.5px var(--gold-soft); }
.r-intro h1 {
  margin-top: 14px;
  /* Script faces draw small for their size, so this runs larger than the
     sans headings to stay readable. */
  font-family: "Pinyon Script", var(--serif);
  font-size: clamp(54px, 7.6vw, 96px); font-weight: 400;
  letter-spacing: 0; line-height: 1.15;
}
.r-role {
  margin-top: 12px;
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(21px, 2.3vw, 28px); letter-spacing: -0.01em;
  color: var(--gold);
}
.r-summary { margin-top: 22px; max-width: 62ch; color: var(--muted); font-size: 16.5px; line-height: 1.72; }
.r-summary strong { color: var(--ink); font-weight: 550; }

.r-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.r-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 11px;
  border: 1px solid var(--line-strong);
  font-size: 14px; font-weight: 500; color: var(--ink);
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}
.r-btn:hover { border-color: var(--ink); }
.r-btn span { transition: transform 220ms var(--ease); }
.r-btn:hover span { transform: translate(2px, -2px); }
.r-btn-gold { background: var(--gold); border-color: var(--gold); color: #000; font-weight: 600; }
.r-btn-gold:hover { background: #e2c27a; border-color: #e2c27a; }
.r-meta { margin-top: 18px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.02em; color: var(--faint); }

/* At a glance */
.r-glance {
  margin-top: clamp(44px, 5vw, 60px);
  display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 20px 28px;
  padding: 22px 0;
  border-top: 1px solid var(--gold-line); border-bottom: 1px solid var(--line);
}
.r-glance > div { display: grid; gap: 5px; }
.r-glance dt { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.r-glance dd { font-size: 15px; font-weight: 550; letter-spacing: -0.01em; }

/* Sections: gold label on the left, content on the right, hairline between rows */
.r-row {
  display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px;
  padding: clamp(32px, 4vw, 44px) 0;
  border-bottom: 1px solid var(--line);
}
.r-row > h2 {
  padding-top: 5px;
  font-family: var(--mono); font-size: 11px; font-weight: 400;
  letter-spacing: 0.16em; text-transform: uppercase; line-height: 1.4;
  color: var(--gold);
}
.r-body > p { color: var(--muted); font-size: 15px; line-height: 1.72; }
.r-body > p + p { margin-top: 10px; }

.r-item-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 18px; flex-wrap: wrap; }
.r-item-head h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.025em; }
.r-item-links { display: flex; gap: 18px; }
.r-item-links a, .r-date {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--faint);
}
.r-item-links a { padding: 4px 0; transition: color 180ms ease; }
.r-item-links a:hover { color: var(--gold); }
.r-body > .r-sub { margin: 4px 0 12px; font-size: 14px; color: var(--ink); opacity: 0.85; }

.r-bullets { list-style: none; display: grid; gap: 9px; margin: 18px 0; }
.r-bullets li { position: relative; padding-left: 20px; color: var(--muted); font-size: 15px; line-height: 1.68; }
.r-bullets li::before {
  content: ""; position: absolute; left: 2px; top: 0.75em;
  width: 7px; height: 1.5px; background: var(--gold);
}
.r-bullets strong { color: var(--ink); font-weight: 550; }
.r-body > .r-stack { font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; color: var(--faint); }

.r-skills { display: grid; gap: 12px; }
.r-skills > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; align-items: baseline; }
.r-skills dt { font-size: 14px; font-weight: 550; color: var(--ink); }
.r-skills dd { font-size: 15px; line-height: 1.6; color: var(--muted); }

.r-email {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 14px;
  font-size: clamp(19px, 2.4vw, 26px); font-weight: 550; letter-spacing: -0.02em;
  text-decoration: underline; text-decoration-color: var(--gold-line);
  text-decoration-thickness: 1.5px; text-underline-offset: 7px;
  overflow-wrap: anywhere;
  transition: text-decoration-color 180ms ease, color 180ms ease;
}
.r-email:hover { color: var(--gold); text-decoration-color: var(--gold); }
.r-email span { font-size: 0.7em; color: var(--gold); }
.r-body > .r-elsewhere { margin-top: 16px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.r-elsewhere a {
  display: inline-block; padding: 4px 2px; color: var(--muted);
  text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}
.r-elsewhere a:hover { color: var(--gold); text-decoration-color: var(--gold); }

.r-explore-note { margin-top: clamp(40px, 5vw, 56px); text-align: center; color: var(--faint); font-size: 14.5px; }
.r-explore-note button {
  margin-left: 6px; padding: 4px 2px; font-weight: 550; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--gold-line); text-underline-offset: 4px;
  transition: text-decoration-color 180ms ease, color 180ms ease;
}
.r-explore-note button:hover { color: var(--gold); text-decoration-color: var(--gold); }

@media (max-width: 760px) {
  .r-glance { grid-template-columns: 1fr 1fr; justify-content: stretch; }
  .r-row { grid-template-columns: 1fr; gap: 14px; }
  .r-row > h2 { padding-top: 0; }
}
@media (max-width: 640px) {
  .recruiter { max-width: none; padding: 112px 18px 56px; }
  .r-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .r-actions .r-btn { justify-content: center; }
  .r-actions .r-btn-gold,
  .r-actions .r-btn:last-child { grid-column: 1 / -1; }
  .r-skills > div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 1800;
  padding: 13px 20px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 80%, transparent); color: var(--accent-ink);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.03em;
  box-shadow: var(--shadow-lift);
  opacity: 0; pointer-events: none;
  translate: -50% 14px; filter: blur(6px);
  transition: opacity 260ms var(--ease), translate 260ms var(--ease), filter 260ms var(--ease);
}
.toast.show { opacity: 1; translate: -50% 0; filter: none; }

/* ---------- Reveal ---------- */

.js [data-reveal] {
  opacity: 0; translate: 0 28px;
  transition: opacity 850ms var(--ease), translate 850ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].revealed { opacity: 1; translate: 0 0; }
/* Headings blur into focus. Kept to headings on purpose: every element
   mid-blur is its own GPU pass, and blurring all ~40 reveal targets (or any
   frosted surface) made scrolling drop frames on integrated graphics. */
.js :is(h1, h2)[data-reveal] {
  filter: blur(8px);
  transition: opacity 850ms var(--ease), translate 850ms var(--ease), filter 850ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.js :is(h1, h2)[data-reveal].revealed { filter: none; }
/* The contact card is the finale: a slower, softer blur-in. It's a single
   element at the end of the page, so the blur costs nothing while scrolling.
   transform stays in the list so the hover tilt keeps easing. */
.js .contact-card[data-reveal] {
  filter: blur(14px);
  transition: opacity 1600ms var(--ease), translate 1600ms var(--ease),
    filter 1600ms var(--ease), transform 260ms ease-out;
}
.js .contact-card[data-reveal].revealed { filter: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; gap: 52px; }
  .hero-visual { max-width: 620px; }
  .about-grid, .stack-head, .journey-head { grid-template-columns: 1fr; gap: 20px; align-items: start; }
  .work-layout { grid-template-columns: 1fr; }
  .work-aside {
    border-left: 0; border-top: 1px solid var(--line);
    flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 32px;
  }
  .work-aside > strong { margin: 0; font-size: 20px; }
  .work-aside > p { margin: 0; }
  .aside-rule, .aside-mini { display: none; }
  .aside-links { display: flex; gap: 24px; }
  .stack-daily { grid-template-columns: 1fr 1fr; }
  .stack-daily p:nth-child(3) { border-left: 0; }
  .stack-daily p:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .stack-group { grid-template-columns: 1fr; gap: 12px; }
}

/* The status pill is decorative; drop it before the header gets crowded. */
@media (max-width: 1180px) {
  .header-status { display: none; }
}

@media (max-width: 960px) {
  .desktop-nav, .header-status, .header-resume { display: none; }
  .menu-toggle { display: inline-flex; }
}

@media (max-width: 520px) {
  .menu-toggle { width: 38px; padding: 0; justify-content: center; }
  .menu-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
}

@media (max-width: 420px) {
  .brand-last { display: none; }
  .header-actions { gap: 6px; }
  .header-inner { padding-left: 14px; gap: 8px; }
  .view-switch button { padding: 0 8px; font-size: 10px; letter-spacing: 0.02em; }
}

/* Very narrow phones: monogram brand (the link keeps its full aria-label). */
@media (max-width: 360px) {
  .brand-name { font-size: 0; }
  .brand-name::before { content: "DV"; font-size: 15.5px; }
  .theme-toggle, .menu-toggle { width: 36px; height: 36px; }
}

@media (max-width: 640px) {
  .site-header { padding: 10px 12px 0; }
  .header-inner { max-width: none; }
  .section { padding: 64px 16px; }
  .hero { padding: 128px 16px 64px; }
  .hero h1 { font-size: clamp(38px, 11vw, 48px); }
  .hero-actions { display: grid; }
  .fact-grid, .work-facts { grid-template-columns: 1fr; }
  .stack-daily { grid-template-columns: 1fr; }
  .stack-daily p + p { border-left: 0; border-top: 1px solid var(--line); }
  .work-toolbar { flex-direction: column; }
  .work-note { text-align: left; padding: 12px 20px; max-width: none; border-top: 1px solid var(--line); }
  .work-body { padding: 26px 20px; min-height: 0; }
  .proof-strip { grid-template-columns: 1fr; }
  .proof-strip > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .citation-block { flex-direction: column; align-items: stretch; }
  .citation-block button { width: 100%; }
  .contact-card { border-radius: 20px; padding: 36px 24px; }
  .contact-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .contact-actions .btn { min-width: 0; padding-inline: 10px; gap: 7px; }
  .footer-top { flex-direction: column; align-items: start; gap: 20px; }
  .footer-top > p { text-align: left; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding: 36px 0 40px; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .scroll-cue { display: none; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-reveal], .js :is(h1, h2)[data-reveal] { opacity: 1; translate: none; filter: none; }
  .cursor-dot, .cursor-ring, .ambient-glow { display: none; }
  .ambient-blob { opacity: 0.6; animation: none; }
  .term-steps li, .hero-visual.revealed .term-steps li i { opacity: 1; transform: none; }
}

/* ---------- Reduced transparency ---------- */
/* Visitors who ask for less transparency get solid surfaces, no glass. */

@media (prefers-reduced-transparency: reduce) {
  .header-inner, .mobile-panel { background: var(--bg); }
  html.menu-open .header-inner { background: transparent; }
  .header-inner, .mobile-panel, .toast {
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .toast { background: var(--accent); }
}
