/* ==================================================================
   David Zimmerer — Homepage Design System
   Light theme (default) with optional dark mode.
   ================================================================== */

/* ── Design tokens — LIGHT (default) ────────────────────────────── */
:root {
  --bg:          #ffffff;
  --bg-alt:      #f7f8fa;
  --bg-card:     #ffffff;
  --bg-elevated: #f0f2f6;
  --border:      #e0e4ea;
  --border-soft: #eef1f5;

  --text:        #1a1d24;
  --text-soft:   #5a6273;
  --text-dim:    #8a93a3;

  --accent:      #2563eb;
  --accent-2:    #7c3aed;
  --accent-3:    #0d9488;
  --accent-glow: rgba(37, 99, 235, 0.12);

  --hero-grid:   rgba(0, 0, 0, 0.04);
  --particle:    rgba(37, 99, 235, 0.5);
  --particle-line: rgba(37, 99, 235, 0.1);

  --shadow-card:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.08);
  --shadow-nav:   0 1px 3px rgba(0,0,0,0.05);

  --font-sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:   'JetBrains Mono', 'SF Mono', Consolas, monospace;

  --max:         720px;
  --max-wide:    1080px;
  --radius:      14px;
  --radius-sm:   8px;
  --ease:        cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Design tokens — DARK (opt-in via [data-theme="dark"]) ──────── */
[data-theme="dark"] {
  --bg:          #0a0c10;
  --bg-alt:      #0f1218;
  --bg-card:     #131722;
  --bg-elevated: #181d2a;
  --border:      #232938;
  --border-soft: #1a1f2c;

  --text:        #e8eaed;
  --text-soft:   #a4adbb;
  --text-dim:    #6b7283;

  --accent:      #6ea8fe;
  --accent-2:    #a78bfa;
  --accent-3:    #5eead4;
  --accent-glow: rgba(110, 168, 254, 0.15);

  --hero-grid:   rgba(255, 255, 255, 0.03);
  --particle:    rgba(110, 168, 254, 0.6);
  --particle-line: rgba(110, 168, 254, 0.08);

  --shadow-card:  0 1px 3px rgba(0,0,0,0.3);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.4);
  --shadow-nav:   0 1px 3px rgba(0,0,0,0.2);
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-weight: 400;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .3s var(--ease), color .3s var(--ease);
}
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-2); }
img, canvas { max-width: 100%; }
::selection { background: var(--accent-glow); color: var(--text); }

/* ── Scroll progress bar ────────────────────────────────────────── */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  z-index: 1000; transition: width .1s linear;
}

/* ── Navigation ─────────────────────────────────────────────────── */
.nav-wrap {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, padding .3s, background .3s;
}
.nav-wrap.scrolled { border-bottom-color: var(--border); padding: 12px 32px; box-shadow: var(--shadow-nav); }

.nav-logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.nav-logo:hover { color: var(--text); }
.nav-logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff; letter-spacing: -0.5px;
}
.nav-logo-text { font-size: 15px; letter-spacing: -0.3px; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  color: var(--text-soft); font-size: 14px; font-weight: 500;
  padding: 8px 14px; border-radius: 8px; transition: all .2s;
}
.nav-link:hover { color: var(--text); background: var(--bg-elevated); }
.nav-link.active { color: var(--accent); }
.nav-cta {
  border: 1px solid var(--border); margin-left: 8px;
  color: var(--text);
}
.nav-cta:hover { border-color: var(--accent); color: var(--accent); }

/* ── Nav social icons ───────────────────────────────────────────── */
.nav-social { display: flex; align-items: center; gap: 2px; margin-left: 6px; padding-left: 8px; border-left: 1px solid var(--border); }
.nav-icon {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  color: var(--text-soft); transition: all .2s;
}
.nav-icon svg { width: 18px; height: 18px; }
.nav-icon:hover { color: var(--accent); background: var(--bg-elevated); }

/* ── Theme toggle ───────────────────────────────────────────────── */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg);
  cursor: pointer; margin-left: 8px;
  transition: all .2s; color: var(--text-soft);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Layout helpers ─────────────────────────────────────────────── */
.container { max-width: var(--max-wide); margin: 0 auto; padding: 0 32px; }
.container.narrow { max-width: var(--max); }
.container.center { text-align: center; }
.section { padding: 100px 0; }
.section-top { padding-top: 140px; }
.section-alt { background: var(--bg-alt); }
.section-title {
  font-size: 14px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 2px; color: var(--accent);
  margin-bottom: 28px;
}
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.section-head .section-title { margin-bottom: 0; }

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px 32px 80px; overflow: hidden;
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(var(--hero-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 80%);
  opacity: 1;
}
.hero-content { position: relative; z-index: 2; max-width: var(--max-wide); margin: 0 auto; width: 100%; }
.hero-eyebrow {
  font-size: 13px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(40px, 7vw, 76px); font-weight: 800; line-height: 1.05;
  letter-spacing: -2px; margin-bottom: 28px;
}
.hero-title-sub {
  font-size: clamp(22px, 3.5vw, 40px); font-weight: 500;
  letter-spacing: -1px; color: var(--text-soft);
  display: inline-block;
}
.rotator { display: inline-block; position: relative; color: var(--accent); }
.rotator > span {
  display: inline-block; opacity: 0; position: absolute; left: 0; white-space: nowrap;
  transition: opacity .6s var(--ease);
}
.rotator > span.active { opacity: 1; position: relative; }
.hero-blurb {
  font-size: 18px; color: var(--text-soft); max-width: 620px; margin-bottom: 28px; line-height: 1.8;
}
.hero-blurb strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 60px; }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-size: 14px; font-weight: 600;
  transition: all .25s var(--ease); cursor: pointer; border: 1px solid transparent;
}
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 24px var(--accent-glow); }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-icon { padding: 12px; border-color: var(--border); color: var(--text-soft); }
.btn-icon svg { width: 18px; height: 18px; }
.btn-icon:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* Hero social button group */
.hero-social { display: inline-flex; gap: 8px; margin-left: 4px; padding-left: 12px; border-left: 1px solid var(--border); }

/* ── Stats ──────────────────────────────────────────────────────── */
.hero-stats { display: flex; flex-wrap: wrap; gap: 40px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-value { font-size: 28px; font-weight: 800; color: var(--text); letter-spacing: -1px; }
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); }

.hero-scroll {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  font-size: 12px; color: var(--text-dim); letter-spacing: 1px;
  animation: bob 2s ease-in-out infinite; z-index: 2;
}
@keyframes bob { 0%,100%{ transform: translateX(-50%) translateY(0); } 50%{ transform: translateX(-50%) translateY(8px); } }

/* ── Text decode effect ─────────────────────────────────────────── */
.decode {
  font-family: var(--font-mono);
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 80%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ── Tags ───────────────────────────────────────────────────────── */
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 28px; }
.tag {
  font-size: 12px; font-weight: 500; padding: 5px 12px;
  border-radius: 20px; background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text-soft); transition: all .2s;
}
.tag:hover { border-color: var(--accent); color: var(--accent); }
.tag-sm { font-size: 11px; padding: 3px 9px; }

/* ── Cards ──────────────────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.card {
  display: block;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; transition: all .3s var(--ease); box-shadow: var(--shadow-card);
  text-decoration: none; color: var(--text);
}
.card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-hover); color: var(--text); }
.card-icon { font-size: 28px; color: var(--accent); margin-bottom: 16px; }
.card h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.3px; }
.card p { font-size: 14px; color: var(--text-soft); line-height: 1.7; }
.card p strong { color: var(--text); }
.card-link { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--accent); }

/* ── Post list / cards ──────────────────────────────────────────── */
.post-list { display: flex; flex-direction: column; gap: 16px; }
.post-card {
  display: block; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 32px; color: var(--text);
  transition: all .3s var(--ease); box-shadow: var(--shadow-card);
}
.post-card:hover { border-color: var(--accent); transform: translateY(-3px); color: var(--text); box-shadow: var(--shadow-hover); }
.post-card-date { font-size: 12px; color: var(--text-dim); font-family: var(--font-mono); }
.post-card-title { font-size: 20px; font-weight: 700; margin: 8px 0 10px; letter-spacing: -0.3px; }
.post-card-excerpt { font-size: 14px; color: var(--text-soft); line-height: 1.7; margin-bottom: 14px; }
.post-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Page / Post body ───────────────────────────────────────────── */
.page-title, .post-title {
  font-size: clamp(30px, 5vw, 48px); font-weight: 800; letter-spacing: -1.5px;
  margin-bottom: 10px; line-height: 1.15;
}
.page-subtitle, .post-subtitle { font-size: 18px; color: var(--text-soft); margin-bottom: 32px; }
.page-body, .post-body { font-size: 16px; line-height: 1.85; color: var(--text); }
.page-body > *:first-child, .post-body > *:first-child { margin-top: 0; }

/* Post layout */
.post { padding-top: 120px; padding-bottom: 80px; }
.back-link { display: inline-block; font-size: 14px; color: var(--text-dim); margin-bottom: 32px; }
.back-link:hover { color: var(--accent); }
.post-header { margin-bottom: 40px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 13px; color: var(--text-dim); font-family: var(--font-mono); }
.post-meta-tags { display: flex; gap: 6px; }
.post-footer { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.post-footer-tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Prose / Markdown styles ────────────────────────────────────── */
.post-body h1, .page-body h1 { font-size: 32px; font-weight: 800; margin: 48px 0 16px; letter-spacing: -0.5px; }
.post-body h2, .page-body h2 {
  font-size: 24px; font-weight: 700; margin: 40px 0 14px; letter-spacing: -0.3px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border-soft);
}
.post-body h3, .page-body h3 { font-size: 19px; font-weight: 700; margin: 32px 0 12px; }
.post-body h4, .page-body h4 { font-size: 16px; font-weight: 700; margin: 24px 0 10px; color: var(--text-soft); }
.post-body p, .page-body p { margin-bottom: 16px; }
.post-body strong, .page-body strong { color: var(--text); font-weight: 700; }
.post-body em, .page-body em { color: var(--accent); font-style: italic; }
.post-body a, .page-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent-glow); }
.post-body a:hover, .page-body a:hover { text-decoration-color: var(--accent); }

.post-body ul, .page-body ul,
.post-body ol, .page-body ol { margin: 0 0 16px 24px; }
.post-body li, .page-body li { margin-bottom: 6px; }
.post-body ul li::marker, .page-body ul li::marker { color: var(--accent); }

.post-body blockquote, .page-body blockquote {
  border-left: 3px solid var(--accent); padding: 12px 20px; margin: 20px 0;
  background: var(--bg-elevated); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-soft); font-style: italic;
}

.post-body code, .page-body code {
  font-family: var(--font-mono); font-size: 0.875em;
  background: var(--bg-elevated); border: 1px solid var(--border-soft);
  padding: 2px 6px; border-radius: 5px; color: var(--accent-3);
}
.post-body pre, .page-body pre {
  background: var(--bg-elevated) !important; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px; overflow-x: auto;
  margin: 20px 0; font-size: 14px; line-height: 1.6;
}
.post-body pre code, .page-body pre code { background: none; border: none; padding: 0; color: var(--text); }

.post-body table, .page-body table {
  width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px;
}
.post-body th, .page-body th { text-align: left; font-weight: 700; padding: 10px 14px; border-bottom: 2px solid var(--border); color: var(--text); }
.post-body td, .page-body td { padding: 10px 14px; border-bottom: 1px solid var(--border-soft); color: var(--text-soft); }
.post-body tr:hover td, .page-body tr:hover td { background: var(--bg-elevated); }

.post-body hr, .page-body hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.post-body img, .page-body img { border-radius: var(--radius); margin: 20px 0; }

/* MathJax display math */
.post-body mjx-container[display="true"], .page-body mjx-container[display="true"] {
  overflow-x: auto; overflow-y: hidden; padding: 8px 0; margin: 20px 0;
}

/* Admonition */
.admonition { border-radius: var(--radius-sm); padding: 16px 20px; margin: 20px 0; border-left: 3px solid; }
.admonition-title { font-weight: 700; margin-bottom: 8px; }
.admonition.note { background: var(--accent-glow); border-color: var(--accent); }
.admonition.note .admonition-title { color: var(--accent); }
.admonition.warning { background: rgba(250,204,21,0.1); border-color: #facc15; }
.admonition.warning .admonition-title { color: #ca8a04; }
.admonition.tip { background: rgba(13,148,136,0.08); border-color: var(--accent-3); }
.admonition.tip .admonition-title { color: var(--accent-3); }

/* Task lists */
.task-list-item { list-style: none; margin-left: -20px; }
.task-list-item-checkbox { margin-right: 8px; }

/* ── Lead text ──────────────────────────────────────────────────── */
.lead { font-size: 18px; color: var(--text-soft); line-height: 1.8; margin-bottom: 20px; }
.lead strong { color: var(--text); font-weight: 600; }

/* ── Hero quote ─────────────────────────────────────────────────── */
.hero-quote {
  font-size: 15px; color: var(--text-dim); font-style: italic;
  max-width: 620px; margin-bottom: 32px; line-height: 1.7;
  border-left: 2px solid var(--border); padding-left: 16px;
}

/* ── Skills bars ────────────────────────────────────────────────── */
.skills-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
.skills-block { display: flex; flex-direction: column; }
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 32px; margin-bottom: 24px; }
.skill { display: flex; flex-direction: column; gap: 6px; }
.skill-name { font-size: 13px; font-weight: 600; color: var(--text-soft); font-family: var(--font-mono); }
.skill-bar { height: 6px; background: var(--bg-elevated); border-radius: 3px; overflow: hidden; }
.skill-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 3px; transition: width 1.2s var(--ease); }
.tech-stack-subtitle { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-dim); margin: 0 0 14px; }
.tech-stack-subtitle:not(:first-child) { margin-top: 24px; }

/* ── Languages ──────────────────────────────────────────────────── */
.lang-row { display: flex; flex-wrap: wrap; gap: 24px; }
.lang-item { font-size: 14px; color: var(--text-soft); }
.lang-item strong { color: var(--text); }

/* ── Timeline (for about / CV page) ─────────────────────────────── */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ''; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px;
  background: linear-gradient(var(--accent), var(--accent-2), transparent);
}
.timeline-item { position: relative; padding-bottom: 36px; }
.timeline-item::before {
  content: ''; position: absolute; left: -28px; top: 6px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--accent);
}
.timeline-date { font-size: 13px; color: var(--accent); font-family: var(--font-mono); font-weight: 500; }
.timeline-title { font-size: 17px; font-weight: 700; margin: 4px 0; }
.timeline-org { font-size: 14px; color: var(--text-soft); margin-bottom: 8px; }
.timeline-body { font-size: 14px; color: var(--text-soft); line-height: 1.7; }
.timeline-body ul { margin: 8px 0 0 18px; }

/* ── Award grid ─────────────────────────────────────────────────── */
.award-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; }
.award {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 18px 22px; transition: all .2s; box-shadow: var(--shadow-card);
}
.award:hover { border-color: var(--accent-3); transform: translateY(-2px); }
.award-icon { font-size: 20px; margin-bottom: 8px; }
.award-title { font-size: 14px; font-weight: 700; }
.award-sub { font-size: 13px; color: var(--text-dim); }

/* ── Project cards ──────────────────────────────────────────────── */
.project-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 32px; margin-bottom: 20px; box-shadow: var(--shadow-card);
  transition: border-color .3s var(--ease);
}
.project-card:hover { border-color: var(--accent); }
.project-card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.project-card-head h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.award-badge {
  font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 20px;
  background: var(--accent-glow); border: 1px solid var(--accent); color: var(--accent);
  white-space: nowrap;
}
.project-desc { font-size: 15px; color: var(--text-soft); line-height: 1.8; margin-bottom: 16px; }
.project-desc code { font-family: var(--font-mono); font-size: 0.85em; background: var(--bg-elevated); padding: 2px 6px; border-radius: 4px; }
.project-meta { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-dim); margin-bottom: 16px; }
.project-meta strong { color: var(--text-soft); }
.project-meta a { color: var(--accent); }
.tech-stack { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-badge {
  font-size: 12px; font-weight: 500; padding: 4px 10px;
  border-radius: 6px; background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text-soft); font-family: var(--font-mono);
}
.tech-stack-section h3 { font-size: 16px; font-weight: 700; margin: 32px 0 12px; }
.tech-stack-section h3:first-child { margin-top: 0; }

/* ── Footer ─────────────────────────────────────────────────────── */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 60px 32px 32px; }
.footer-grid {
  max-width: var(--max-wide); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 32px;
}
.footer-col { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-soft); }
.footer-name { font-size: 16px; font-weight: 700; color: var(--text); }
.footer-sub { font-size: 13px; color: var(--text-dim); }
.footer-links { flex-direction: column; }
.footer-links a { color: var(--text-soft); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { max-width: var(--max-wide); margin: 0 auto; padding-top: 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-dim); }

/* ── Reveal animations ──────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-wrap { padding: 14px 20px; }
  .nav-links {
    position: fixed; top: 0; right: 0; height: 100vh; width: 280px;
    background: var(--bg-elevated); flex-direction: column; align-items: flex-start;
    padding: 80px 24px; gap: 8px; transform: translateX(100%);
    transition: transform .3s var(--ease); border-left: 1px solid var(--border);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  .nav-cta { margin-left: 0; margin-top: 8px; width: 100%; justify-content: center; }
  .nav-social { margin-left: 0; padding-left: 0; border-left: none; margin-top: 8px; }
  .theme-toggle { margin-left: 0; margin-top: 8px; width: 100%; }

  .hero { padding: 110px 20px 60px; }
  .hero-stats { gap: 24px; }
  .stat-value { font-size: 22px; }

  .section { padding: 64px 0; }
  .container, .container.narrow { padding: 0 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .cards { grid-template-columns: 1fr; }
  .award-grid { grid-template-columns: 1fr; }
  .hero-actions { gap: 8px; }
  .btn { flex: 1; justify-content: center; }
  .hero-social { margin-left: 0; padding-left: 0; border-left: none; width: 100%; justify-content: center; padding-top: 8px; border-top: 1px solid var(--border); margin-top: 4px; }
  .btn-icon { flex: 0 0 auto; }
  .skills-grid { grid-template-columns: 1fr; }
  .skills-row { grid-template-columns: 1fr; gap: 32px; }
}

/* ── No-flash theme init (runs before CSS) ──────────────────────── */
