/* ============================================================
   THOMAS BAPTIST — Personal Website
   css/style.css — Main Stylesheet
   ============================================================ */

/* ============================================================
   1. CSS CUSTOM PROPERTIES
   ============================================================ */

:root {
  /* Light mode */
  --bg:         #f8fafc;
  --bg-alt:     #f1f5f9;
  --bg-card:    #ffffff;
  --text:       #0f172a;
  --text-muted: #475569;
  --text-sub:   #94a3b8;
  --border:     #e2e8f0;
  --border-sub: #f1f5f9;
  --accent:     #0284c7;
  --accent-h:   #0369a1;
  --accent-bg:  #e0f2fe;
  --nav-bg:     rgba(248, 250, 252, 0.92);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.05);

  /* Typography */
  --font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

  /* Layout */
  --nav-h:    64px;
  --max-w:    1100px;
  --pad:      clamp(1rem, 4vw, 2rem);
  --radius:   10px;
  --radius-sm: 6px;
  --radius-lg: 16px;

  /* Motion */
  --dur:      200ms;
  --dur-slow: 400ms;
  --ease:     cubic-bezier(.4, 0, .2, 1);
}

[data-theme="dark"] {
  --bg:         #060e1a;
  --bg-alt:     #0a1525;
  --bg-card:    #0f1f35;
  --text:       #f1f5f9;
  --text-muted: #94a3b8;
  --text-sub:   #64748b;
  --border:     #1e3a5f;
  --border-sub: #132338;
  --accent:     #38bdf8;
  --accent-h:   #7dd3fc;
  --accent-bg:  rgba(56, 189, 248, .10);
  --nav-bg:     rgba(6, 14, 26, 0.96);

  --shadow-sm: 0 1px 3px rgba(0,0,0,.35);
  --shadow-md: 0 4px 16px rgba(0,0,0,.50), 0 2px 4px rgba(0,0,0,.25);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.65), 0 4px 8px rgba(0,0,0,.35);
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  transition: background-color var(--dur-slow) var(--ease),
              color var(--dur-slow) var(--ease);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
a:hover { color: var(--accent-h); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

ul, ol { list-style: none; }

button {
  font-family: var(--font);
  cursor: pointer;
  border: none;
  background: none;
}
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

p { max-width: 65ch; }

/* ============================================================
   3. LAYOUT
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: clamp(4rem, 8vw, 7rem); }
.section--alt { background-color: var(--bg-alt); }

.grid   { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.max-prose    { max-width: 72ch; }

/* ============================================================
   4. TYPOGRAPHY COMPONENTS
   ============================================================ */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.875rem;
}

.section-sub {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 56ch;
}

.section-header          { margin-bottom: 3rem; }
.section-header.centered { text-align: center; }
.section-header.centered .section-sub { margin-inline: auto; }

/* ============================================================
   5. SKIP LINK
   ============================================================ */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 9999;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 0; }

/* ============================================================
   6. NAVIGATION
   ============================================================ */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  z-index: 1000;
  transition: border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 1.5rem;
}

.nav-logo {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color var(--dur) var(--ease);
}
.nav-logo:hover { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  flex: 1;
  justify-content: center;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
.nav-link:hover { color: var(--text); background: var(--bg-alt); }
.nav-link.active {
  color: var(--accent);
  background: var(--accent-bg);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Theme button */
.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
.theme-btn:hover { color: var(--text); background: var(--bg-alt); }

.theme-btn .icon-moon { display: block; }
.theme-btn .icon-sun  { display: none; }
[data-theme="dark"] .theme-btn .icon-moon { display: none; }
[data-theme="dark"] .theme-btn .icon-sun  { display: block; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  gap: 5px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
.nav-toggle:hover { color: var(--text); background: var(--bg-alt); }

.nav-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur) var(--ease),
              opacity var(--dur) var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   7. BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
  line-height: 1.25;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-h);
  border-color: var(--accent-h);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(2, 132, 199, .3);
}
[data-theme="dark"] .btn-primary:hover {
  box-shadow: 0 4px 14px rgba(56, 189, 248, .25);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
  padding-inline: 0.75rem;
}
.btn-ghost:hover { color: var(--text); background: var(--bg-alt); }

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.875rem;
}

/* ============================================================
   8. BADGES & TAGS
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.275rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
  border-radius: 4px;
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid currentColor;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 4px;
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* ============================================================
   9. CARDS
   ============================================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.card-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
}

.card-body {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-sub);
  margin-top: auto;
}

.project-card { display: flex; flex-direction: column; }

.project-status {
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--font-mono);
  color: var(--text-sub);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.project-status::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

/* ============================================================
   10. HERO — HOME PAGE
   ============================================================ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}

/* Subtle dot-grid background texture */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, var(--border) 1px, transparent 0);
  background-size: 28px 28px;
  opacity: 0.6;
  z-index: 0;
  pointer-events: none;
}

/* Soft glow accent in top-right */
.hero::after {
  content: '';
  position: absolute;
  top: 10%;
  right: -5%;
  width: 50%;
  height: 65%;
  background: radial-gradient(ellipse at center, var(--accent-bg) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-block: 5rem;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.875rem;
}
.hero-tag::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: currentColor;
}

.hero-title {
  font-size: clamp(2.75rem, 7vw, 4.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
  max-width: 16ch;
}
.hero-title .accent { color: var(--accent); }

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.175rem);
  color: var(--text-muted);
  max-width: 52ch;
  line-height: 1.75;
  margin-top: 1.125rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero-certs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-sub);
}

/* ============================================================
   11. PAGE HERO (inner pages)
   ============================================================ */

.page-hero {
  padding-top: calc(var(--nav-h) + 3.5rem);
  padding-bottom: 3.5rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.page-hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.page-hero-sub {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 56ch;
}

/* ============================================================
   12. STATS STRIP
   ============================================================ */

.stats-strip {
  background: var(--bg-card);
  border-block: 1px solid var(--border);
  padding-block: 1.75rem;
}

.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: center;
  align-items: center;
}

.stat { text-align: center; }

.stat-value {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-weight: 500;
}

/* ============================================================
   13. ABOUT SNIPPET (home page)
   ============================================================ */

.about-grid {
  display: grid;
  gap: 3.5rem;
}
@media (min-width: 768px) {
  .about-grid { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
}

.about-text p {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 62ch;
}
.about-text p + p { margin-top: 1.125rem; }

.focus-list { display: grid; gap: 0.75rem; }

.focus-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color var(--dur) var(--ease);
}
.focus-item:hover { border-color: var(--accent); }

.focus-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--accent);
  margin-top: 2px;
}

.focus-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.focus-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ============================================================
   14. ABOUT PAGE
   ============================================================ */

.bio-text {
  font-size: 1.075rem;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 70ch;
}
.bio-text + .bio-text { margin-top: 1.25rem; }

.interest-grid { display: grid; gap: 1.25rem; }
@media (min-width: 600px) {
  .interest-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .interest-grid { grid-template-columns: repeat(3, 1fr); }
}

.interest-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.interest-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.interest-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.interest-title {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.interest-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Cert list */
.cert-list  { display: grid; gap: 0.875rem; }

.cert-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color var(--dur) var(--ease);
}
.cert-item:hover { border-color: var(--accent); }

.cert-icon-wrap {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  display: block;
}

.cert-issuer {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
  display: block;
}

.cert-date {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--accent);
  margin-top: 0.25rem;
  display: block;
}

/* ============================================================
   15. PROJECTS PAGE
   ============================================================ */

.project-card-full {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease);
}
.project-card-full:hover { border-color: var(--accent); }

.project-card-header {
  padding: 2rem 2rem 1.5rem;
  border-bottom: 1px solid var(--border-sub);
}

.project-card-body {
  padding: 1.75rem 2rem;
}

.project-card-title {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.project-card-summary {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.125rem;
  max-width: 70ch;
}

.project-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  font-family: var(--font-mono);
  margin-bottom: 0.625rem;
  margin-top: 1.5rem;
}
.project-section-label:first-child { margin-top: 0; }

.project-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.project-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.project-list li::before {
  content: '';
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 0.55rem;
}

/* ============================================================
   16. WRITING / BLOG PAGE
   ============================================================ */

.writing-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-bg);
  color: var(--accent);
  border-color: var(--accent);
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  color: var(--text);
  transition: transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  color: var(--text);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.8rem;
  color: var(--text-sub);
  font-family: var(--font-mono);
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.post-meta-sep { color: var(--border); }

.post-title {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.post-excerpt {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1.25rem;
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-sub);
  font-size: 0.8rem;
  color: var(--text-sub);
  font-family: var(--font-mono);
}

/* Coming soon callout */
.callout {
  padding: 2rem 2.5rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  margin-bottom: 3rem;
}
.callout-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.callout-body {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 60ch;
}

/* ============================================================
   17. CV PAGE
   ============================================================ */

.cv-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.cv-banner p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  max-width: 48ch;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-bottom: 0;
}

.skills-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.375rem 1.5rem;
}

.skills-group-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-bottom: 0.875rem;
}

.skills-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* Timeline */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 2.5rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1.5rem - 4px);
  top: 0.375rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 0.2rem;
  display: block;
}

.timeline-role {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.timeline-org {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0.125rem 0 0.75rem;
}

.timeline-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.timeline-desc ul {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-top: 0.5rem;
}

.timeline-desc ul li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.timeline-desc ul li::before {
  content: '▸';
  color: var(--accent);
  flex-shrink: 0;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* ============================================================
   18. CONTACT PAGE
   ============================================================ */

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 340px));
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  min-width: 0;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all var(--dur) var(--ease);
  box-shadow: var(--shadow-sm);
}
.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--text);
}

.contact-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-card-label {
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--font-mono);
  color: var(--text-sub);
  display: block;
  margin-bottom: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.contact-card-value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  overflow-wrap: break-word;
  word-break: break-all;
  min-width: 0;
}

.contact-card > div {
  min-width: 0;
  overflow: hidden;
}

/* ============================================================
   19. FOOTER
   ============================================================ */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding-block: 2rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.footer-links {
  display: flex;
  gap: 0.125rem;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: color var(--dur) var(--ease);
}
.footer-link:hover { color: var(--accent); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-sub);
  font-family: var(--font-mono);
}

/* ============================================================
   20. ANIMATIONS
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {
  .fade-up {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
  }
  .fade-up.visible { opacity: 1; transform: translateY(0); }
  .fade-up:nth-child(2) { transition-delay:  80ms; }
  .fade-up:nth-child(3) { transition-delay: 160ms; }
  .fade-up:nth-child(4) { transition-delay: 240ms; }
  .fade-up:nth-child(5) { transition-delay: 320ms; }
  .fade-up:nth-child(6) { transition-delay: 400ms; }
}

@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; }
}

/* ============================================================
   21. RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--nav-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 0.75rem 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    gap: 0.125rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 0.625rem 0.875rem; font-size: 0.9375rem; }
  .nav-toggle { display: flex; }

  .project-card-header,
  .project-card-body { padding: 1.25rem; }

  .cv-banner { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; align-items: flex-start; }

  .stats-row { justify-content: flex-start; gap: 1.75rem; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { width: auto; }
}

/* ============================================================
   22. PERSONAL TIMELINE
   ============================================================ */

.personal-timeline {
  position: relative;
  max-width: 680px;
  padding-top: 0.5rem;
}

/* Vertical spine */
.personal-timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
  border-radius: 2px;
}

.pt-item {
  position: relative;
  padding-left: 52px;
  padding-bottom: 2.5rem;
}

.pt-item:last-child {
  padding-bottom: 0;
}

/* Dot on the spine */
.pt-item::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

/* Filled dot for completed events */
.pt-item.pt-done::before {
  background: var(--accent);
  border-color: var(--accent);
}

/* Accent colour glow on milestone */
.pt-item.pt-milestone::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-bg);
}

.pt-date {
  display: inline-block;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.pt-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.3rem;
  line-height: 1.35;
}

.pt-body {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  max-width: 55ch;
}

/* ============================================================
   23. PRINT (CV page)
   ============================================================ */

@media print {
  .site-header,
  .site-footer,
  .cv-banner,
  .nav-toggle,
  .theme-btn,
  .scroll-progress-nav { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .timeline::before { background: #333; }
  a { color: #000; }
  .section { padding-block: 1.5rem; }
}

/* ============================================================
   24. SCROLL PROGRESS NAV
   ============================================================ */

/* Only render on screens wide enough that it won't overlap content */
.scroll-progress-nav {
  display: none;
}

@media (min-width: 1420px) {

  .scroll-progress-nav {
    display: block;
    position: fixed;
    left: 1.625rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 90;
  }

  /* Inner wrapper — used to anchor the track line */
  .spn-inner {
    position: relative;
    display: flex;
    flex-direction: column;
  }

  /* Background track line */
  .spn-track {
    position: absolute;
    left: 5px;   /* (dot 12px / 2) − (line 2px / 2) */
    top: 14px;   /* centre of first dot */
    bottom: 14px; /* centre of last dot */
    width: 2px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
  }

  /* Filled progress portion — height driven by JS */
  .spn-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--accent);
    border-radius: 2px;
    transition: height 0.12s linear;
  }

  /* Ordered list of section items */
  .spn-list {
    position: relative;
    z-index: 1;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
  }

  .spn-item {
    padding: 5px 0;
  }

  /* Clickable link row */
  .spn-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 2px 0;
    text-decoration: none;
    color: var(--text-sub);
    transition: color var(--dur) var(--ease);
    cursor: pointer;
  }
  .spn-link:hover { color: var(--text); }
  .spn-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 3px;
  }

  /* Section dot */
  .spn-dot {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--border);
    position: relative;
    z-index: 2;
    transition:
      background  var(--dur) var(--ease),
      border-color var(--dur) var(--ease),
      transform   var(--dur) var(--ease),
      box-shadow  var(--dur) var(--ease);
  }

  /* Passed sections — dot filled solid */
  .spn-item.passed .spn-dot {
    background: var(--accent);
    border-color: var(--accent);
  }

  /* Active section — dot enlarged with halo */
  .spn-item.active .spn-dot {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.35);
    box-shadow: 0 0 0 4px var(--accent-bg);
  }

  /* Section label */
  .spn-label {
    font-family: var(--font);
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.3;
    max-width: 115px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Hidden by default — slides in on nav hover or active */
    opacity: 0;
    transform: translateX(6px);
    transition:
      opacity   var(--dur) var(--ease),
      transform var(--dur) var(--ease),
      color     var(--dur) var(--ease);
    pointer-events: none;
  }

  /* Reveal all labels when hovering the nav */
  .scroll-progress-nav:hover .spn-label {
    opacity: 1;
    transform: translateX(0);
  }

  /* Active label is always visible, accented */
  .spn-item.active .spn-label {
    opacity: 1;
    transform: translateX(0);
    font-weight: 600;
  }

  .spn-item.active   .spn-link { color: var(--accent); }
  .spn-item.passed   .spn-link { color: var(--text-muted); }

  /* Stagger label transitions for a cascade on hover */
  .spn-item:nth-child(1)  .spn-label { transition-delay:  0ms; }
  .spn-item:nth-child(2)  .spn-label { transition-delay: 20ms; }
  .spn-item:nth-child(3)  .spn-label { transition-delay: 40ms; }
  .spn-item:nth-child(4)  .spn-label { transition-delay: 60ms; }
  .spn-item:nth-child(5)  .spn-label { transition-delay: 80ms; }
  .spn-item:nth-child(6)  .spn-label { transition-delay: 100ms; }
  .spn-item:nth-child(7)  .spn-label { transition-delay: 120ms; }

  @media (prefers-reduced-motion: reduce) {
    .spn-label   { transition: none; opacity: 1; transform: none; }
    .spn-fill    { transition: none; }
    .spn-dot     { transition: none; }
  }

}
