/* ==========================================================================
   Dr. Mandela Kibiriti, portfolio v2
   Design system inspired by shadcn/ui: neutral (zinc) palette, subtle
   borders, 8px radius, Geist typography. One restrained accent (emerald)
   reserved for "health" signals: status dots, the pulse line, focus rings.
   Components are documented in components.html.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --primary: 240 5.9% 10%;
  --primary-foreground: 0 0% 98%;
  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;
  --accent: 240 4.8% 95.9%;
  --accent-foreground: 240 5.9% 10%;
  --border: 240 5.9% 90%;
  --ring: 240 5.9% 10%;
  --brand: 160 84% 30%;          /* emerald, AA on white */
  --brand-soft: 152 76% 95%;

  --radius: 0.5rem;
  --container: 72rem;
  --header-h: 3.5rem;

  --font-sans: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.06);
  color-scheme: light;
}

.dark {
  --background: 240 10% 3.9%;
  --foreground: 0 0% 98%;
  --card: 240 10% 5.2%;
  --card-foreground: 0 0% 98%;
  --muted: 240 3.7% 15.9%;
  --muted-foreground: 240 5% 64.9%;
  --primary: 0 0% 98%;
  --primary-foreground: 240 5.9% 10%;
  --secondary: 240 3.7% 15.9%;
  --secondary-foreground: 0 0% 98%;
  --accent: 240 3.7% 15.9%;
  --accent-foreground: 0 0% 98%;
  --border: 240 3.7% 15.9%;
  --ring: 240 4.9% 83.9%;
  --brand: 158 64% 52%;
  --brand-soft: 160 84% 10%;
  color-scheme: dark;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; border: 0 solid hsl(var(--border)); }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1.5rem); }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { letter-spacing: -0.025em; text-wrap: balance; }
p { text-wrap: pretty; }
ul { margin: 0; padding: 0; }
::selection { background: hsl(var(--brand) / 0.2); }

:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; border-radius: calc(var(--radius) - 2px); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -3rem; z-index: 100; padding: .5rem .875rem; border-radius: var(--radius); background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); font-size: .875rem; font-weight: 500; }
.skip-link:focus { top: .75rem; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem; }
@media (min-width: 640px) { .container { padding-inline: 2rem; } }

.muted { color: hsl(var(--muted-foreground)); }
.mono { font-family: var(--font-mono); }
.text-sm { font-size: .875rem; line-height: 1.5; }
.text-xs { font-size: .8125rem; line-height: 1.45; }

/* ---------- 3. Components ---------- */

/* Button */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 2.5rem; padding: 0 1rem; border-radius: calc(var(--radius) - 2px);
  font-size: .875rem; font-weight: 500; white-space: nowrap; line-height: 1;
  border: 1px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s;
}
.btn svg { width: 1rem; height: 1rem; flex: none; }
.btn-default   { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); box-shadow: var(--shadow-sm); }
.btn-default:hover { background: hsl(var(--primary) / .9); }
.btn-outline   { background: hsl(var(--background)); border-color: hsl(var(--border)); box-shadow: var(--shadow-sm); }
.btn-outline:hover, .btn-ghost:hover { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.btn-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); }
.btn-secondary:hover { background: hsl(var(--secondary) / .8); }
.btn-ghost     { background: transparent; }
.btn-link      { height: auto; padding: 0; text-decoration: underline; text-underline-offset: 4px; }
.btn-sm   { height: 2.25rem; padding: 0 .75rem; }
.btn-lg   { height: 2.75rem; padding: 0 1.5rem; }
.btn-icon { width: 2.25rem; height: 2.25rem; padding: 0; }

/* Badge */
.badge {
  display: inline-flex; align-items: center; gap: .375rem;
  border-radius: 9999px; padding: .125rem .625rem;
  font-size: .75rem; font-weight: 500; line-height: 1.25rem; white-space: nowrap;
  border: 1px solid hsl(var(--border));
}
.badge-default   { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-color: transparent; }
.badge-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); border-color: transparent; }
.badge-outline   { background: transparent; }
.badge-brand     { background: hsl(var(--brand-soft)); color: hsl(var(--brand)); border-color: hsl(var(--brand) / .25); }

/* Status dot */
.dot { position: relative; width: .5rem; height: .5rem; border-radius: 9999px; background: hsl(var(--brand)); flex: none; }
.dot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: inherit; animation: ping 2s cubic-bezier(0,0,.2,1) infinite; }
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }

/* Card */
.card {
  background: hsl(var(--card)); color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border)); border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-sm);
}
.card-header  { display: grid; gap: .375rem; padding: 1.5rem 1.5rem 0; }
.card-title   { font-size: 1.0625rem; font-weight: 600; line-height: 1.35; letter-spacing: -.015em; }
.card-description { font-size: .875rem; color: hsl(var(--muted-foreground)); }
.card-content { padding: 1.25rem 1.5rem 1.5rem; }
.card-footer  { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: 0 1.5rem 1.5rem; margin-top: auto; }
.card-interactive { transition: border-color .15s, box-shadow .15s, transform .15s; }
.card-interactive:hover { border-color: hsl(var(--foreground) / .2); box-shadow: var(--shadow); }

/* Stat */
.stat { padding: 1.25rem 1.5rem; }
.stat-value { font-size: clamp(1.75rem, 3.2vw, 2.25rem); font-weight: 600; letter-spacing: -.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { margin-top: .375rem; font-size: .875rem; color: hsl(var(--muted-foreground)); }

/* Avatar */
.avatar { width: 2rem; height: 2rem; border-radius: 9999px; display: grid; place-items: center; overflow: hidden; flex: none;
  background: hsl(var(--muted)); font-size: .75rem; font-weight: 600; letter-spacing: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.avatar-lg { width: 3rem; height: 3rem; font-size: .9375rem; }

/* Separator */
.separator { height: 1px; width: 100%; background: hsl(var(--border)); }

/* Kbd */
.kbd { display: inline-flex; align-items: center; height: 1.25rem; padding: 0 .375rem; border-radius: .25rem; border: 1px solid hsl(var(--border));
  background: hsl(var(--muted)); font-family: var(--font-mono); font-size: .6875rem; color: hsl(var(--muted-foreground)); }

/* Tabs (segmented control) */
.tabs-list { display: inline-flex; flex-wrap: wrap; gap: .25rem; padding: .25rem; border-radius: var(--radius); background: hsl(var(--muted)); }
.tabs-trigger { height: 2rem; padding: 0 .75rem; border-radius: calc(var(--radius) - 2px); font-size: .875rem; font-weight: 500; color: hsl(var(--muted-foreground)); white-space: nowrap; transition: background-color .15s, color .15s; }
.tabs-trigger:hover { color: hsl(var(--foreground)); }
.tabs-trigger[aria-pressed="true"], .tabs-trigger[aria-selected="true"] { background: hsl(var(--background)); color: hsl(var(--foreground)); box-shadow: var(--shadow-sm); }

/* Accordion (native <details>) */
.accordion-item { border-bottom: 1px solid hsl(var(--border)); }
.accordion-trigger { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; font-size: .9375rem; font-weight: 500; cursor: pointer; list-style: none; }
.accordion-trigger::-webkit-details-marker { display: none; }
.accordion-trigger:hover { text-decoration: underline; text-underline-offset: 4px; }
.accordion-trigger .chev { width: 1rem; height: 1rem; transition: transform .2s; flex: none; color: hsl(var(--muted-foreground)); }
details[open] > .accordion-trigger .chev { transform: rotate(180deg); }
.accordion-content { padding-bottom: 1rem; font-size: .875rem; color: hsl(var(--muted-foreground)); }

/* Inline "more" disclosure inside cards */
.disclosure > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .25rem; font-size: .875rem; font-weight: 500; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.disclosure > summary .chev { width: .875rem; height: .875rem; transition: transform .2s; }
.disclosure[open] > summary .chev { transform: rotate(180deg); }
.disclosure-body { margin-top: .75rem; font-size: .875rem; color: hsl(var(--muted-foreground)); display: grid; gap: .5rem; }
.disclosure-body a { color: hsl(var(--foreground)); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: hsl(var(--border)); }
.disclosure-body a:hover { text-decoration-color: currentColor; }

/* Alert */
.alert { display: grid; grid-template-columns: auto 1fr; gap: .25rem .75rem; padding: 1rem; border: 1px solid hsl(var(--border)); border-radius: var(--radius); font-size: .875rem; }
.alert svg { width: 1rem; height: 1rem; margin-top: .2rem; grid-row: span 2; }
.alert-title { font-weight: 500; }
.alert-description { color: hsl(var(--muted-foreground)); }

/* Tooltip (CSS only, for icon buttons) */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip); position: absolute; left: 50%; top: calc(100% + .5rem); transform: translate(-50%, -2px);
  padding: .25rem .5rem; border-radius: calc(var(--radius) - 2px); background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  font-size: .75rem; font-weight: 500; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s, transform .15s; z-index: 60;
}
[data-tooltip]:hover::after, [data-tooltip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }

/* Toast */
.toast { position: fixed; right: 1rem; bottom: 1rem; z-index: 80; padding: .875rem 1rem; border-radius: var(--radius);
  background: hsl(var(--card)); border: 1px solid hsl(var(--border)); box-shadow: 0 10px 30px -10px rgb(0 0 0 / .25);
  font-size: .875rem; font-weight: 500; opacity: 0; transform: translateY(.5rem); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: none; }

/* Icon (inline SVG wrapper, uses the <symbol> sprite) */
.icon, .btn svg, .icon-box svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon { width: 1rem; height: 1rem; flex: none; }
.icon-box { width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border-radius: var(--radius); border: 1px solid hsl(var(--border)); background: hsl(var(--background)); }
.icon-box svg { width: 1.125rem; height: 1.125rem; }

/* ---------- 4. Layout: header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--background) / .8); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); }
.site-header .container { height: 100%; display: flex; align-items: center; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .625rem; font-weight: 600; font-size: .9375rem; letter-spacing: -.02em; white-space: nowrap; }
.nav { display: none; align-items: center; gap: 1.5rem; font-size: .875rem; }
.nav a { color: hsl(var(--muted-foreground)); transition: color .15s; }
.nav a:hover, .nav a[aria-current="true"] { color: hsl(var(--foreground)); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.header-cta { display: none; }
@media (min-width: 900px) { .nav { display: flex; } .menu-toggle { display: none; } .header-cta { display: inline-flex; margin-left: .5rem; } }

/* theme icon swap */
.theme-toggle .moon { display: none; }
.dark .theme-toggle .sun { display: none; }
.dark .theme-toggle .moon { display: block; }

/* Mobile sheet */
.mobile-nav { position: fixed; inset: var(--header-h) 0 auto 0; z-index: 49; background: hsl(var(--background)); border-bottom: 1px solid hsl(var(--border));
  padding: .5rem 1.25rem 1.25rem; display: none; box-shadow: 0 16px 30px -20px rgb(0 0 0 / .35); }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: .75rem 0; border-bottom: 1px solid hsl(var(--border)); font-size: 1rem; font-weight: 500; }
.mobile-nav .btn { display: flex; margin-top: 1rem; width: 100%; border-bottom: 0; font-size: .875rem; }
@media (min-width: 900px) { .mobile-nav { display: none !important; } }

/* ---------- 5. Sections ---------- */
.section { padding-block: 4.5rem; }
@media (min-width: 768px) { .section { padding-block: 6rem; } }
.section + .section { border-top: 1px solid hsl(var(--border)); }
.section-head { display: grid; gap: .75rem; max-width: 42rem; margin-bottom: 2.5rem; }
.eyebrow { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .02em; color: hsl(var(--muted-foreground)); text-transform: uppercase; }
.section-title { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 600; line-height: 1.12; letter-spacing: -.035em; }
.section-lead { font-size: 1.0625rem; color: hsl(var(--muted-foreground)); }

/* Hero */
.hero { position: relative; isolation: isolate; padding-block: 3rem 4rem; }
@media (min-width: 768px) { .hero { padding-block: 5rem 5.5rem; } }
.hero::before { /* faint grid, masked to fade out: graph paper for a maths lover */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(hsl(var(--border) / .7) 1px, transparent 1px), linear-gradient(90deg, hsl(var(--border) / .7) 1px, transparent 1px);
  background-size: 48px 48px; background-position: center top;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
}
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 4rem; } }
.hero-copy { display: grid; gap: 1.5rem; justify-items: start; }
.hero-copy .badge { white-space: normal; line-height: 1.35; padding-block: .3rem; }
.hero-title { font-size: clamp(2.375rem, 6vw, 4rem); font-weight: 600; line-height: 1.04; letter-spacing: -.045em; }
.hero-title .soft { color: hsl(var(--muted-foreground)); }
.hero-lead { font-size: clamp(1.0625rem, 1.6vw, 1.1875rem); color: hsl(var(--muted-foreground)); max-width: 38rem; }
.hero-lead strong { color: hsl(var(--foreground)); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.hero-socials { display: flex; gap: .25rem; }

.pulse-line { width: 100%; max-width: 26rem; height: 32px; color: hsl(var(--brand)); }
.pulse-line path { stroke-dasharray: 520; stroke-dashoffset: 520; animation: draw 2.4s .3s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Hero: particle helix (inspired by medical particle visuals) ---------- */
.hx { position: relative; isolation: isolate; overflow: clip; min-height: calc(100svh - var(--header-h)); display: grid; align-items: center; padding-block: 4rem 6rem;
  background: radial-gradient(ellipse 70% 60% at 72% 45%, hsl(var(--brand) / .10), transparent 70%), hsl(var(--background)); }
.dark .hx { background: radial-gradient(ellipse 65% 60% at 72% 45%, hsl(var(--brand) / .14), transparent 70%), hsl(240 10% 3%); }
.hx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hx-scrim { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, hsl(var(--background)) 0%, hsl(var(--background) / .82) 32%, hsl(var(--background) / 0) 62%); }
.dark .hx-scrim { background: linear-gradient(90deg, hsl(240 10% 3%) 0%, hsl(240 10% 3% / .78) 30%, hsl(240 10% 3% / 0) 60%); }
@media (max-width: 959px) { .hx-scrim, .dark .hx-scrim { background: linear-gradient(180deg, hsl(var(--background) / .55), hsl(var(--background) / .9) 55%, hsl(var(--background) / .35)); } }
.hx-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 960px) { .hx-grid { grid-template-columns: 1fr 1fr; } }
.hx-copy { display: grid; gap: 1.5rem; justify-items: start; max-width: 36rem; }
.hx-badge { background: hsl(var(--background) / .6); backdrop-filter: blur(6px); }
.hx-title { white-space: nowrap; font-size: clamp(2.5rem, 5.4vw, 4.75rem); font-weight: 600; line-height: .98; letter-spacing: -.055em; }
.hx-title .x { color: hsl(var(--brand)); font-weight: 300; }
.hx-title .soft { color: hsl(var(--muted-foreground)); }
.hx-lead { font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); color: hsl(var(--muted-foreground)); max-width: 34rem; }
.hx-lead strong { color: hsl(var(--foreground)); font-weight: 500; }
.hx-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hx-ghost { background: hsl(var(--background) / .5); backdrop-filter: blur(6px); }
.hx-side { position: relative; min-height: 30rem; }
@media (max-width: 959px) { .hx-side { min-height: 16rem; } }
.hx-glass { position: absolute; background: hsl(var(--background) / .55); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-color: hsl(var(--foreground) / .12); box-shadow: 0 20px 40px -24px rgb(0 0 0 / .5); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.hx-tag { right: 0; top: 6%; padding: .875rem 1.125rem; }
.hx-tag b { display: block; font-size: 1.75rem; font-weight: 600; letter-spacing: -.04em; line-height: 1.1; margin-top: .25rem; }
.hx-tag span { font-size: .8125rem; color: hsl(var(--muted-foreground)); }
.hx-id { left: 6%; bottom: 4%; display: flex; align-items: center; gap: .75rem; padding: .625rem 1.125rem .625rem .625rem; animation-delay: -3.5s; }
.hx-id .avatar { width: 2.75rem; height: 2.75rem; }
.hx-id b { display: block; font-size: .875rem; font-weight: 600; } .hx-id span { font-size: .75rem; color: hsl(var(--muted-foreground)); }
.hx-eq { position: absolute; right: 0; bottom: 30%; text-align: right; font-family: var(--font-mono); font-size: .75rem; line-height: 1.8; color: hsl(var(--muted-foreground)); }
.hx-eq b { color: hsl(var(--foreground)); font-weight: 500; }
@media (max-width: 959px) { .hx-side { min-height: 0; display: flex; flex-wrap: wrap; gap: .75rem; } .hx-glass { position: static; animation: none; } .hx-eq { display: none; } .hx-tag b { font-size: 1.375rem; } }
.hx-hint { position: absolute; left: 50%; bottom: 1.25rem; transform: translateX(-50%); display: grid; justify-items: center; gap: .375rem;
  font-family: var(--font-mono); font-size: .6875rem; color: hsl(var(--muted-foreground)); }
.hx-hint i { width: 1px; height: 28px; background: linear-gradient(hsl(var(--brand)), transparent); transform-origin: top; animation: hint 1.8s ease-in-out infinite; }
@keyframes hint { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Convergence: three-discipline Venn (scroll-driven) ---------- */
.cv { position: relative; height: 260vh; }
.cv-sticky { position: sticky; top: var(--header-h); height: calc(100svh - var(--header-h)); display: grid; align-items: center; padding-block: 1.25rem; }
.cv-panel { --panel: 168 42% 14%; position: relative; overflow: hidden; display: grid; align-items: center; gap: 1rem;
  height: min(40rem, calc(100svh - var(--header-h) - 2.5rem)); padding: 2rem 1.5rem;
  border-radius: 2rem 2rem 2rem 2rem; color: hsl(45 30% 94%);
  background: radial-gradient(ellipse 80% 70% at 75% 50%, hsl(168 35% 20%), transparent 70%), hsl(var(--panel)); }
.cv-panel::after { /* film grain */ content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@media (min-width: 960px) { .cv-panel { grid-template-columns: .8fr 1.2fr; padding: 3rem 2rem 3rem 3.5rem; border-radius: 2rem 2rem 2rem 14rem; } }
.cv-copy { position: relative; z-index: 1; display: grid; gap: 1rem; align-self: start; padding-top: .5rem; }
@media (min-width: 960px) { .cv-copy { padding-top: 2rem; } }
.cv-eyebrow { color: hsl(45 20% 80% / .7); letter-spacing: .18em; }
.cv-title { font-size: clamp(2rem, 4.4vw, 3.5rem); font-weight: 400; line-height: 1.04; letter-spacing: -.04em; }
.cv-title b { font-weight: 600; }
.cv-lead { font-size: .9375rem; color: hsl(45 20% 88% / .78); max-width: 20rem; }
.venn-svg { width: 100%; height: 100%; min-height: 0; max-height: 100%; overflow: visible; }
@media (max-width: 959px) { .cv-panel { grid-template-rows: auto 1fr; } .venn-svg { max-height: 26rem; justify-self: center; } }
.v-circle { mix-blend-mode: screen; }
.v-core { opacity: var(--pc, 0); }
.v-late { opacity: var(--pc, 0); }
.v-leaders path { stroke: hsl(45 30% 90% / .35); stroke-width: 1; }
.v-dots .halo { fill: hsl(45 30% 95% / .06); stroke: hsl(45 30% 95% / .3); stroke-width: 1; }
.v-dots .pt { fill: hsl(45 40% 97%); }
.v-pair { fill: hsl(45 30% 95%); font-family: var(--font-sans); font-size: 14px; font-weight: 500; text-anchor: middle; dominant-baseline: middle; letter-spacing: -.01em; }
.v-core-label { fill: hsl(25 30% 22%); font-family: var(--font-sans); font-size: 21px; font-weight: 600; text-anchor: middle; dominant-baseline: middle; letter-spacing: -.03em; }
.v-outer { fill: hsl(45 30% 92%); font-family: var(--font-sans); font-size: 15px; font-weight: 500; letter-spacing: .32em; dominant-baseline: middle; }
@media (max-width: 700px) { .v-pair { font-size: 18px; } .v-outer { font-size: 20px; letter-spacing: .1em; } .v-core-label { font-size: 23px; } .cv-panel { padding: 1.75rem 1.25rem 1rem; } .venn-svg { max-height: none; width: 112%; margin-inline: -6%; } }
.cv-stats { padding-block: 0 4.5rem; }
.cv-stats .stats { margin-top: 0; }
@media (max-width: 959px) { .hero-visual { width: 100%; max-width: 32rem; } }
.hero-grid > * { min-width: 0; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .75rem; margin-top: 3rem; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; margin-top: 4rem; } }

/* Lenses (about) */
.lenses { display: grid; gap: 1rem; }
@media (min-width: 900px) { .lenses { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.lens { display: flex; flex-direction: column; }
.lens .card-header { gap: .75rem; }
.lens ul { list-style: none; display: grid; gap: .5rem; }
.lens li { display: flex; gap: .625rem; font-size: .875rem; color: hsl(var(--muted-foreground)); }
.lens li::before { content: ""; flex: none; width: .375rem; height: .375rem; margin-top: .5rem; border-radius: 9999px; background: hsl(var(--foreground) / .35); }

.bayes { display: grid; gap: 1.25rem; margin-top: 1rem; padding: 1.5rem; }
@media (min-width: 900px) { .bayes { grid-template-columns: auto 1fr; align-items: center; gap: 2.5rem; padding: 1.75rem 2rem; } }
.formula { font-family: var(--font-mono); font-size: clamp(1rem, 2.4vw, 1.25rem); display: inline-flex; align-items: center; gap: .625rem; white-space: nowrap; }
.frac { display: inline-grid; text-align: center; }
.frac > span:first-child { border-bottom: 1px solid currentColor; padding: 0 .25rem .125rem; }
.frac > span:last-child { padding-top: .125rem; }
.formula .hl { color: hsl(var(--brand)); }

/* Work */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.toolbar .tabs-list { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.work-grid { display: grid; gap: 1rem; }
@media (min-width: 700px) { .work-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1100px) { .work-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.work-card { display: flex; flex-direction: column; }
.work-card[hidden] { display: none; }
.work-card .card-header { gap: .75rem; }
.work-card .top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.work-card .org { font-size: .8125rem; color: hsl(var(--muted-foreground)); }
.metric { display: flex; align-items: baseline; gap: .5rem; padding: .75rem .875rem; border-radius: var(--radius); background: hsl(var(--muted) / .6); border: 1px solid hsl(var(--border)); margin-bottom: 1rem; }
.metric b { font-size: 1.25rem; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.metric span { font-size: .8125rem; color: hsl(var(--muted-foreground)); }
.mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .5rem; margin-bottom: 1rem; }
.mini-stats .metric { margin-bottom: 0; flex-direction: column; gap: .125rem; }
.mini-stats .metric { padding: .625rem .75rem; }
.mini-stats .metric span { font-size: .75rem; line-height: 1.35; }
.tags { display: flex; flex-wrap: wrap; gap: .375rem; }
.work-card.featured { border-color: hsl(var(--foreground) / .25); }
@media (min-width: 1100px) { .work-card.featured { grid-column: span 2; } }

/* Experience */
.exp-layout { display: grid; gap: 2rem; }
@media (min-width: 960px) { .exp-layout { grid-template-columns: 1fr 22rem; gap: 2.5rem; align-items: start; } }
.timeline { list-style: none; position: relative; }
.tl-item { position: relative; display: grid; gap: .5rem; padding: 0 0 2rem 1.75rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: .3125rem; top: .5rem; bottom: -.5rem; width: 1px; background: hsl(var(--border)); }
.tl-item:last-child::before { display: none; }
.tl-item::after { content: ""; position: absolute; left: 0; top: .375rem; width: .6875rem; height: .6875rem; border-radius: 9999px; background: hsl(var(--background)); border: 2px solid hsl(var(--foreground) / .5); }
.tl-item.current::after { border-color: hsl(var(--brand)); background: hsl(var(--brand)); box-shadow: 0 0 0 4px hsl(var(--brand) / .15); }
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; }
.tl-role { font-weight: 600; letter-spacing: -.015em; }
.tl-org { font-size: .875rem; color: hsl(var(--muted-foreground)); }
.tl-date { font-family: var(--font-mono); font-size: .75rem; color: hsl(var(--muted-foreground)); white-space: nowrap; }
.tl-points { list-style: none; display: grid; gap: .375rem; margin-top: .25rem; }
.tl-points li { position: relative; padding-left: 1rem; font-size: .9375rem; color: hsl(var(--muted-foreground)); }
.tl-points li::before { content: "–"; position: absolute; left: 0; }
.tl-points strong { color: hsl(var(--foreground)); font-weight: 500; }
.side-stack { display: grid; gap: 1rem; }
@media (min-width: 960px) { .side-stack { position: sticky; top: calc(var(--header-h) + 1.5rem); } }

/* Skills */
.skills-grid { display: grid; gap: 1rem; }
@media (min-width: 700px) { .skills-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1100px) { .skills-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.skills-grid .card-header { grid-template-columns: auto 1fr; align-items: center; gap: .75rem; }

/* Learning log */
.log { display: grid; gap: 0; }
.log-row { display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem; padding: 1rem 0; border-top: 1px solid hsl(var(--border)); }
.log-row:last-child { border-bottom: 1px solid hsl(var(--border)); }
@media (min-width: 768px) { .log-row { grid-template-columns: 6rem 1fr 1.2fr; gap: 1.5rem; align-items: baseline; } }
.log-year { font-family: var(--font-mono); font-size: .8125rem; color: hsl(var(--muted-foreground)); padding-top: .125rem; }
.log-what { font-weight: 500; }
.log-why { font-size: .875rem; color: hsl(var(--muted-foreground)); grid-column: 2; }
@media (min-width: 768px) { .log-why { grid-column: auto; } }

/* Recognition */
.rec-grid { display: grid; gap: 1rem; }
@media (min-width: 700px) { .rec-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.list-card ul { list-style: none; }
.list-card li { display: grid; gap: .125rem; padding: .875rem 0; border-top: 1px solid hsl(var(--border)); }
.list-card li:first-child { border-top: 0; padding-top: 0; }
.list-card li b { font-weight: 500; font-size: .9375rem; }
.list-card li span { font-size: .8125rem; color: hsl(var(--muted-foreground)); }
.list-card li a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: hsl(var(--border)); }
.list-card li a:hover { text-decoration-color: currentColor; }

/* Contact */
.contact { display: grid; gap: 2rem; padding: 2rem; }
@media (min-width: 900px) { .contact { grid-template-columns: 1.2fr 1fr; align-items: center; padding: 3rem; } }
.contact-actions { display: grid; gap: .75rem; }
.copy-field { display: flex; align-items: center; gap: .5rem; height: 2.75rem; padding: 0 .375rem 0 .875rem; border: 1px solid hsl(var(--border)); border-radius: calc(var(--radius) - 2px); background: hsl(var(--background)); font-family: var(--font-mono); font-size: .875rem; }
.copy-field span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-links { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

/* Footer */
.site-footer { border-top: 1px solid hsl(var(--border)); padding-block: 2rem; font-size: .875rem; color: hsl(var(--muted-foreground)); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; gap: 1.25rem; }
.site-footer a:hover { color: hsl(var(--foreground)); }

/* ---------- 6. Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .pulse-line path, .spark-line { stroke-dashoffset: 0; }
  .tile, .spark-area { opacity: 1; transform: none; }
  .signal-pulse { stroke-dasharray: none; stroke-dashoffset: 0; filter: none; }
  .chip, .hero::after, .hx-glass, .hx-hint i { animation: none; }
}

/* ---------- 7. Print ---------- */
@media print {
  .site-header, .mobile-nav, .hero::before, .toolbar, .hero-actions, .toast, .theme-toggle { display: none !important; }
  .section { padding-block: 1.5rem; }
  details { display: block; } details > * { display: block !important; }
}
