/* ═══════════════════════════════════════════════════════════════════
   DESIGN TOKENS — Rhetorical Infrastructure
   Art direction: scholarly/editorial + data urgency + fire/amber warmth
   Primary palette: deep amber/ochre accent on neutral slate surfaces
═══════════════════════════════════════════════════════════════════ */

:root,
[data-theme='light'] {
  /* Surfaces */
  --color-bg: #f8f6f1;
  --color-surface: #faf9f5;
  --color-surface-2: #fcfbf8;
  --color-surface-offset: #f0ece4;
  --color-surface-offset-2: #e8e3d8;
  --color-surface-dynamic: #e0d9cc;
  --color-divider: #d6d0c4;
  --color-border: #cac3b4;

  /* Text */
  --color-text: #1e1a12;
  --color-text-muted: #6b6354;
  --color-text-faint: #b0a898;
  --color-text-inverse: #faf9f5;

  /* Primary — deep amber/ochre: scholarly warmth + urgency */
  --color-primary: #b5640d;
  --color-primary-hover: #8f4d09;
  --color-primary-active: #6b3907;
  --color-primary-highlight: #f0ddc8;

  /* Secondary accent — forest green for data/success */
  --color-secondary: #2e6b4f;
  --color-secondary-hover: #1e4e39;
  --color-secondary-highlight: #c8e0d4;

  /* Fire accent — for FEMA highlights */
  --color-fire: #d94f0a;
  --color-fire-highlight: #fde8db;

  /* Red Cross accent */
  --color-arc: #c0392b;
  --color-arc-highlight: #fce9e7;

  /* Semantic */
  --color-warning: #b07d0a;
  --color-error: #a12c2c;
  --color-success: #2e6b4f;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px oklch(0.18 0.03 60 / 0.08);
  --shadow-md: 0 4px 16px oklch(0.18 0.03 60 / 0.1);
  --shadow-lg: 0 12px 40px oklch(0.18 0.03 60 / 0.14);
  --shadow-xl: 0 24px 64px oklch(0.18 0.03 60 / 0.18);

  /* Content widths */
  --content-narrow: 680px;
  --content-default: 1000px;
  --content-wide: 1240px;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 7rem);

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'Helvetica Neue', sans-serif;
  --font-body: 'Satoshi', 'Helvetica Neue', sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Nav height */
  --nav-h: 64px;
}

[data-theme='dark'] {
  --color-bg: #131209;
  --color-surface: #181610;
  --color-surface-2: #1d1b12;
  --color-surface-offset: #1a1810;
  --color-surface-offset-2: #201e15;
  --color-surface-dynamic: #2a2820;
  --color-divider: #232117;
  --color-border: #35321f;
  --color-text: #e8e3d8;
  --color-text-muted: #8a8170;
  --color-text-faint: #5a5244;
  --color-text-inverse: #1e1a12;
  --color-primary: #e08840;
  --color-primary-hover: #f0a060;
  --color-primary-active: #f0b880;
  --color-primary-highlight: #3a2a18;
  --color-secondary: #5ab382;
  --color-secondary-hover: #3a9060;
  --color-secondary-highlight: #1a3028;
  --color-fire: #f07050;
  --color-fire-highlight: #3a1a10;
  --color-arc: #e06060;
  --color-arc-highlight: #381818;
  --color-border: #35321f;
  --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.25);
  --shadow-md: 0 4px 16px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 12px 40px oklch(0 0 0 / 0.45);
  --shadow-xl: 0 24px 64px oklch(0 0 0 / 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #131209;
    --color-surface: #181610;
    --color-surface-2: #1d1b12;
    --color-surface-offset: #1a1810;
    --color-surface-offset-2: #201e15;
    --color-surface-dynamic: #2a2820;
    --color-divider: #232117;
    --color-border: #35321f;
    --color-text: #e8e3d8;
    --color-text-muted: #8a8170;
    --color-text-faint: #5a5244;
    --color-text-inverse: #1e1a12;
    --color-primary: #e08840;
    --color-primary-hover: #f0a060;
    --color-primary-active: #f0b880;
    --color-primary-highlight: #3a2a18;
    --color-secondary: #5ab382;
    --color-secondary-highlight: #1a3028;
    --color-fire: #f07050;
    --color-fire-highlight: #3a1a10;
    --color-arc: #e06060;
    --color-arc-highlight: #381818;
    --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.25);
    --shadow-md: 0 4px 16px oklch(0 0 0 / 0.35);
    --shadow-lg: 0 12px 40px oklch(0 0 0 / 0.45);
  }
}

/* ═══════════════════ BASE RESET ═══════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  hanging-punctuation: first last;
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
ul[role='list'], ol[role='list'] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.15; }
p, li, figcaption { text-wrap: pretty; max-width: 72ch; }
button { cursor: pointer; background: none; border: none; }
a { color: var(--color-primary); text-decoration-color: transparent; transition: color var(--transition-interactive), text-decoration-color var(--transition-interactive); }
a:hover { text-decoration-color: currentColor; }

::selection { background: color-mix(in oklab, var(--color-primary) 25%, transparent); color: var(--color-text); }

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }

/* ═══════════════════ LAYOUT ═══════════════════ */
.container {
  width: min(var(--content-wide), 100% - var(--space-8));
  margin-inline: auto;
}

.section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
}
.section-alt { background: var(--color-surface); }

/* ═══════════════════ SCROLL ANIMATIONS ═══════════════════ */
.fade-in { opacity: 1; }

@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: fadeReveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 60%;
  }
}
@keyframes fadeReveal { to { opacity: 1; } }

/* ═══════════════════ TYPOGRAPHY ═══════════════════ */
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 900;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 60ch;
  line-height: 1.7;
}

.section-header {
  margin-bottom: clamp(var(--space-8), 4vw, var(--space-16));
}

/* ═══════════════════ BUTTONS ═══════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.75rem 1.5rem;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition:
    background var(--transition-interactive),
    color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.btn-primary:hover { background: var(--color-primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); color: var(--color-text-inverse); text-decoration-color: transparent; }
.btn-primary:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}
.btn-ghost:hover { background: var(--color-surface-offset); border-color: var(--color-primary); color: var(--color-primary); transform: translateY(-1px); text-decoration-color: transparent; }

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: color var(--transition-interactive), background var(--transition-interactive);
}
.icon-btn:hover { color: var(--color-text); background: var(--color-surface-offset); }

/* ═══════════════════ BADGES ═══════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.35rem 0.85rem;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
}
.badge-fire { background: var(--color-fire-highlight); color: var(--color-fire); }
.badge-course { background: var(--color-primary-highlight); color: var(--color-primary); }

/* ═══════════════════ NAVIGATION ═══════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--color-divider);
}

.nav-inner {
  height: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-sm);
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
}
.nav-links a {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: color var(--transition-interactive), background var(--transition-interactive);
}
.nav-links a:hover { color: var(--color-text); background: var(--color-surface-offset); }

.nav-actions { display: flex; align-items: center; gap: var(--space-2); }
.nav-hamburger { display: none; }

.mobile-nav {
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  padding: var(--space-4);
}
.mobile-nav ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-1); }
.mobile-nav a { display: block; padding: var(--space-3) var(--space-4); font-weight: 600; color: var(--color-text); border-radius: var(--radius-md); text-decoration: none; }
.mobile-nav a:hover { background: var(--color-surface-offset); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

/* ═══════════════════ HERO ═══════════════════ */
.hero {
  position: relative;
  min-height: calc(100dvh - var(--nav-h));
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-16);
  padding: clamp(var(--space-12), 8vw, var(--space-24));
  padding-top: clamp(var(--space-16), 10vw, var(--space-32));
  max-width: var(--content-wide);
  margin-inline: auto;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--color-border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--color-border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.4;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}

.hero-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--color-text);
  margin-bottom: var(--space-6);
}
.hero-title em {
  font-style: italic;
  font-family: var(--font-serif);
  color: var(--color-primary);
  font-weight: 400;
}

.hero-subtitle {
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-8);
  max-width: 50ch;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  padding: var(--space-4) var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  width: fit-content;
}
.hero-stat { text-align: center; }
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: var(--space-1);
}
.hero-stat-divider { width: 1px; height: 40px; background: var(--color-divider); }

.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Hero visual */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 440px;
}

.platform-ring {
  position: relative;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 1px dashed var(--color-border);
  animation: rotate-ring 30s linear infinite;
}

@keyframes rotate-ring {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.platform-node {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  animation: counter-rotate 30s linear infinite;
  cursor: default;
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive);
}
.platform-node:hover { transform: rotate(0deg) scale(1.08); box-shadow: var(--shadow-lg); }

@keyframes counter-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

.node-fema-x { top: -18px; left: 50%; transform: translateX(-50%) rotate(0deg); color: var(--color-text); }
.node-arc-x { right: -60px; top: 50%; transform: translateY(-50%) rotate(0deg); color: var(--color-text); }
.node-fema-ig { bottom: -18px; left: 50%; transform: translateX(-50%) rotate(0deg); color: var(--color-text); }
.node-arc-ig { left: -60px; top: 50%; transform: translateY(-50%) rotate(0deg); color: var(--color-text); }

.platform-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  animation: counter-rotate 30s linear infinite;
}
.center-glyph { animation: rotate-ring 8s linear infinite; }
.center-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-align: center;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; min-height: auto; gap: var(--space-12); }
  .hero-visual { display: none; }
}

/* ═══════════════════ OVERVIEW ═══════════════════ */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-8), 4vw, var(--space-16));
  margin-bottom: var(--space-16);
}

.overview-text { display: flex; flex-direction: column; gap: var(--space-4); }
.overview-text p { font-size: var(--text-base); color: var(--color-text-muted); line-height: 1.75; }
.overview-text strong { color: var(--color-text); font-weight: 700; }

.overview-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.feature-card {
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: box-shadow var(--transition-interactive), transform var(--transition-interactive), border-color var(--transition-interactive);
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.feature-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
}
.card-fire .feature-card-icon { background: var(--color-fire-highlight); color: var(--color-fire); }
.card-api .feature-card-icon { background: var(--color-primary-highlight); color: var(--color-primary); }
.card-rhetoric .feature-card-icon { background: var(--color-secondary-highlight); color: var(--color-secondary); }
.card-platform .feature-card-icon { background: var(--color-surface-offset-2); color: var(--color-text-muted); }

.feature-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 800;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}
.feature-card p { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.65; max-width: none; }

/* Corpus table */
.corpus-grid {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: clamp(var(--space-6), 3vw, var(--space-10));
}
.corpus-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  margin-bottom: var(--space-6);
  color: var(--color-text);
  letter-spacing: -0.01em;
}
.corpus-table { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-border); margin-bottom: var(--space-5); }
.corpus-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 0; }
.corpus-row > * { padding: var(--space-3) var(--space-5); font-size: var(--text-sm); border-bottom: 1px solid var(--color-border); }
.corpus-row:last-child > * { border-bottom: none; }
.corpus-row-header > * { font-weight: 700; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; background: var(--color-surface-offset); color: var(--color-text-muted); display: flex; align-items: center; gap: var(--space-2); }
.corpus-row-fema > * { background: var(--color-surface-2); }
.corpus-row-arc > * { background: var(--color-surface); }
.corpus-row-footer > * { background: var(--color-surface-offset); font-weight: 700; }
.corpus-total { font-weight: 800; color: var(--color-primary); }
.corpus-org { display: flex; align-items: center; gap: var(--space-2); font-weight: 600; }
.org-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot-fema { background: var(--color-fire); }
.dot-arc { background: var(--color-arc); }

.wildfire-seasons { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.season-badge {
  padding: 0.4rem 0.9rem;
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .overview-grid { grid-template-columns: 1fr; }
  .overview-cards { grid-template-columns: 1fr; }
  .corpus-row { grid-template-columns: 1fr 1fr; }
  .corpus-row-header > *:nth-child(3),
  .corpus-row > *:nth-child(3) { display: none; }
}

/* ═══════════════════ THEORY / THINKERS ═══════════════════ */
.thinkers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-10);
}

.thinker-card {
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  transition:
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive),
    border-color var(--transition-interactive),
    background var(--transition-interactive);
  position: relative;
  overflow: hidden;
}
.thinker-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--thinker-color, var(--color-primary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-interactive);
}
.thinker-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--color-primary); }
.thinker-card:hover::before { transform: scaleX(1); }
.thinker-card.active { border-color: var(--color-primary); box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-primary) 20%, transparent); }
.thinker-card.active::before { transform: scaleX(1); }

.thinker-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}
.thinker-domain {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--thinker-bg, var(--color-primary-highlight));
  color: var(--thinker-color, var(--color-primary));
}
.thinker-expand-icon { color: var(--color-text-faint); flex-shrink: 0; }

.thinker-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-1);
  letter-spacing: -0.01em;
}
.thinker-work {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.thinker-hook {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: none;
}

/* Thinker panel */
.thinker-panel {
  background: var(--color-surface);
  border: 1.5px solid var(--color-primary);
  border-radius: var(--radius-2xl);
  padding: clamp(var(--space-6), 3vw, var(--space-10));
  margin-bottom: var(--space-10);
  position: relative;
  animation: panelIn 300ms var(--ease-out) both;
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.thinker-panel-close { position: absolute; top: var(--space-4); right: var(--space-4); }
.thinker-panel-inner h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}
.thinker-panel-inner .panel-work {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--color-primary);
  margin-bottom: var(--space-5);
}
.thinker-panel-inner .panel-connection {
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
  max-width: 72ch;
}
.thinker-panel-inner .panel-quote {
  padding: var(--space-4) var(--space-6);
  border-left: 3px solid var(--color-primary);
  background: var(--color-primary-highlight);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--color-text);
  line-height: 1.75;
  max-width: 72ch;
  margin-bottom: var(--space-4);
}

/* Framework overview */
.framework-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}
.framework-node {
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
}
.fw-digital-studies { border-top: 3px solid var(--color-primary); }
.fw-infrastructure { border-top: 3px solid var(--color-fire); }
.fw-postapi { border-top: 3px solid var(--color-secondary); }
.fw-crisis { border-top: 3px solid var(--color-arc); }

.framework-node h4 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 800;
  margin-bottom: var(--space-3);
  color: var(--color-text);
}
.framework-node ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-1); }
.framework-node li {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  padding: 0.2rem 0;
  border-bottom: 1px solid var(--color-divider);
}
.framework-node li:last-child { border-bottom: none; }

/* ═══════════════════ DATA / CHARTS ═══════════════════ */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}
.charts-row-2 {
  grid-template-columns: 2fr 1fr;
}

.chart-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-5), 2vw, var(--space-8));
  transition: box-shadow var(--transition-interactive);
}
.chart-card:hover { box-shadow: var(--shadow-md); }
.chart-card-wide { grid-column: 1; }

.chart-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}
.chart-desc { font-size: var(--text-xs); color: var(--color-text-muted); margin-bottom: var(--space-5); max-width: none; line-height: 1.6; }

.chart-wrap { position: relative; height: 240px; }
.chart-wrap-wide { height: 260px; }

/* Findings */
.findings-grid {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: clamp(var(--space-6), 3vw, var(--space-10));
  margin-top: var(--space-8);
}
.findings-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  margin-bottom: var(--space-8);
  color: var(--color-text);
  letter-spacing: -0.01em;
}
.finding-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-5);
  padding-block: var(--space-5);
  border-top: 1px solid var(--color-divider);
}
.finding-item:first-of-type { border-top: none; }
.finding-num {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 900;
  color: var(--color-primary);
  opacity: 0.3;
  line-height: 1;
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}
.finding-text h4 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.finding-text p { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.75; max-width: none; }

@media (max-width: 768px) {
  .charts-row, .charts-row-2 { grid-template-columns: 1fr; }
}

/* ═══════════════════ POSTS ═══════════════════ */
.posts-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.filter-btn {
  padding: 0.45rem 1rem;
  font-size: var(--text-xs);
  font-weight: 700;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  transition: all var(--transition-interactive);
  cursor: pointer;
}
.filter-btn:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-highlight); }
.filter-btn.active { background: var(--color-primary); border-color: var(--color-primary); color: white; }

.posts-search {
  padding: 0.45rem 1rem;
  font-size: var(--text-sm);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  outline: none;
  margin-left: auto;
  min-width: 200px;
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.posts-search:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-primary) 20%, transparent); }

.posts-count {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-bottom: var(--space-6);
  font-weight: 600;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-4);
}

.post-card {
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition:
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive),
    border-color var(--transition-interactive);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
}
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--color-primary); }

.post-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.post-org-badge {
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
}
.post-org-badge.fema { background: var(--color-fire-highlight); color: var(--color-fire); }
.post-org-badge.arc { background: var(--color-arc-highlight); color: var(--color-arc); }
.post-date { font-size: var(--text-xs); color: var(--color-text-faint); font-weight: 500; }

.post-excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: none;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.post-rhetoric-tag {
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}
.post-rhetoric-tag.logos { background: color-mix(in oklab, var(--color-secondary) 15%, transparent); color: var(--color-secondary); }
.post-rhetoric-tag.pathos { background: color-mix(in oklab, var(--color-arc) 15%, transparent); color: var(--color-arc); }
.post-rhetoric-tag.ethos { background: color-mix(in oklab, var(--color-primary) 15%, transparent); color: var(--color-primary); }
.post-media-tag { font-size: var(--text-xs); color: var(--color-text-faint); }

.post-card.hidden { display: none; }

/* ═══════════════════ POST MODAL ═══════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: oklch(0.1 0.02 60 / 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: overlayIn 200ms var(--ease-out) both;
}
.modal-overlay[hidden] { display: none !important; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: clamp(var(--space-6), 3vw, var(--space-10));
  max-width: 600px;
  width: 100%;
  max-height: 90dvh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-xl);
  animation: modalIn 300ms var(--ease-out) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close { position: sticky; top: 0; float: right; }

.modal-org-badge { margin-bottom: var(--space-3); }
.modal-date { font-size: var(--text-xs); color: var(--color-text-faint); margin-bottom: var(--space-4); font-weight: 600; }
.modal-title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 800; color: var(--color-text); margin-bottom: var(--space-4); letter-spacing: -0.01em; }
.modal-content-text { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.8; margin-bottom: var(--space-5); max-width: none; }
.modal-analysis { padding: var(--space-4); background: var(--color-surface-offset); border-radius: var(--radius-lg); margin-bottom: var(--space-5); }
.modal-analysis h4 { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-text-muted); margin-bottom: var(--space-2); }
.modal-analysis p { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.7; max-width: none; }
.modal-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-5); }
.modal-link { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 700; color: var(--color-primary); text-decoration: none; padding: 0.6rem 1.2rem; border: 1.5px solid var(--color-primary); border-radius: var(--radius-full); transition: all var(--transition-interactive); }
.modal-link:hover { background: var(--color-primary); color: white; transform: translateY(-1px); text-decoration-color: transparent; }

/* ═══════════════════ TIMELINE ═══════════════════ */
.timeline-container {
  position: relative;
  padding-left: var(--space-8);
}
.timeline-container::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-primary), var(--color-border));
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-6);
  cursor: pointer;
}
.timeline-dot {
  position: absolute;
  left: calc(-1 * var(--space-8) + 8px);
  top: 18px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--color-bg);
  transition: transform var(--transition-interactive);
}
.timeline-dot-fire { background: var(--color-fire); }
.timeline-dot-platform { background: var(--color-primary); }
.timeline-dot-covid { background: var(--color-warning); }
.timeline-dot-api { background: var(--color-secondary); }

.timeline-item:hover .timeline-dot { transform: scale(1.4); }

.timeline-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  transition: box-shadow var(--transition-interactive), border-color var(--transition-interactive), transform var(--transition-interactive);
}
.timeline-item:hover .timeline-card { box-shadow: var(--shadow-md); border-color: var(--color-primary); transform: translateX(4px); }

.timeline-year {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: var(--space-1);
}
.timeline-event-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.timeline-desc { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.65; max-width: none; }
.timeline-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.timeline-tag {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.timeline-detail {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
  max-width: none;
  display: none;
}
.timeline-item.expanded .timeline-detail { display: block; }

/* ═══════════════════ ABOUT ═══════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(var(--space-10), 5vw, var(--space-20));
  align-items: start;
}
.about-photo-wrap {
  position: relative;
  display: inline-block;
}
.about-photo {
  width: 260px;
  height: 320px;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-2xl);
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-lg);
}
.about-photo-ring {
  position: absolute;
  inset: -8px;
  border-radius: calc(var(--radius-2xl) + 8px);
  border: 2px solid var(--color-primary);
  opacity: 0.4;
}

.about-bio { display: flex; flex-direction: column; gap: var(--space-4); }
.about-lead { font-size: var(--text-lg); color: var(--color-text); line-height: 1.6; max-width: none; }
.about-lead strong { color: var(--color-primary); }
.about-bio p { font-size: var(--text-base); color: var(--color-text-muted); line-height: 1.75; max-width: none; }

.about-links { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-2); }
.about-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.6rem 1.2rem;
  font-size: var(--text-sm);
  font-weight: 700;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text);
  text-decoration: none;
  transition: all var(--transition-interactive);
}
.about-link:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-highlight); transform: translateY(-1px); text-decoration-color: transparent; }

.about-affiliations { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.affiliation-badge {
  padding: 0.35rem 0.85rem;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--color-surface-offset-2);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { width: 100%; height: 280px; }
}

/* ═══════════════════ BIBLIOGRAPHY ═══════════════════ */
.bib-list { display: flex; flex-direction: column; gap: var(--space-3); }

.bib-entry {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: box-shadow var(--transition-interactive);
}
.bib-entry:hover { box-shadow: var(--shadow-md); }

.bib-entry-header {
  padding: var(--space-5) var(--space-6);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  transition: background var(--transition-interactive);
}
.bib-entry-header:hover { background: var(--color-surface-offset); }
.bib-entry.open .bib-entry-header { background: var(--color-primary-highlight); }

.bib-citation {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.75;
  flex: 1;
  max-width: none;
}
.bib-citation em { font-style: italic; color: var(--color-text); }
.bib-citation a { color: var(--color-primary); word-break: break-all; }

.bib-expand-btn {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: transform var(--transition-interactive), color var(--transition-interactive);
}
.bib-entry.open .bib-expand-btn { transform: rotate(180deg); color: var(--color-primary); }

.bib-annotation {
  padding: var(--space-4) var(--space-6) var(--space-5);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.8;
  display: none;
  background: var(--color-surface-2);
  max-width: none;
}
.bib-entry.open .bib-annotation { display: block; }

/* ═══════════════════ FOOTER ═══════════════════ */
.site-footer {
  background: var(--color-surface-offset);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-12);
}
.footer-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.footer-brand { display: flex; align-items: center; gap: var(--space-4); }
.footer-title { font-family: var(--font-display); font-weight: 800; font-size: var(--text-base); color: var(--color-text); }
.footer-sub { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: var(--space-1); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.footer-links a { font-size: var(--text-sm); font-weight: 600; color: var(--color-text-muted); text-decoration: none; transition: color var(--transition-interactive); }
.footer-links a:hover { color: var(--color-primary); }
.footer-note { font-size: var(--text-xs); color: var(--color-text-faint); line-height: 1.7; max-width: 70ch; }

/* ═══════════════════ WILDFIRE GALLERY ═══════════════════ */
.wildfire-gallery-section {
  background: linear-gradient(180deg, var(--color-bg) 0%, oklch(0.15 0.06 40 / 0.04) 100%);
  position: relative;
  overflow: hidden;
}
.wildfire-gallery-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 60% 40%, oklch(0.65 0.18 40 / 0.06), transparent 70%);
  pointer-events: none;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.gallery-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  background: var(--color-surface-offset);
  box-shadow: 0 4px 24px oklch(0.1 0.04 40 / 0.15);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  cursor: pointer;
}
.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px oklch(0.1 0.04 40 / 0.25);
}
.gallery-item-large { min-height: 420px; }
.gallery-item { min-height: 190px; }

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease-out);
  min-height: inherit;
}
.gallery-item-large .gallery-img { min-height: 420px; }
.gallery-col .gallery-item .gallery-img { min-height: 190px; }
.gallery-item:hover .gallery-img { transform: scale(1.04); }

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-5) var(--space-5) var(--space-4);
  background: linear-gradient(to top, oklch(0.08 0.03 40 / 0.92) 0%, oklch(0.08 0.03 40 / 0.6) 60%, transparent 100%);
  color: white;
}
.gallery-caption p {
  font-size: var(--text-sm);
  line-height: 1.55;
  color: oklch(0.92 0.01 80);
  max-width: none;
  margin-top: var(--space-2);
}

.gallery-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.gallery-badge-2025 { background: #e05c2a; color: white; }
.gallery-badge-2024 { background: #b07d0a; color: white; }
.gallery-badge-ops  { background: #2e6b4f; color: white; }

/* Gallery stats strip */
.gallery-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  padding: var(--space-6) var(--space-8);
  background: linear-gradient(135deg, var(--color-fire) 0%, #e05c2a 50%, var(--color-primary) 100%);
  border-radius: var(--radius-2xl);
  box-shadow: 0 8px 32px oklch(0.5 0.18 40 / 0.3);
}
.gstat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-1);
  padding: var(--space-3);
  border-right: 1px solid oklch(1 0 0 / 0.2);
}
.gstat:last-child { border-right: none; }
.gstat-num {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 900;
  color: white;
  line-height: 1;
  letter-spacing: -0.02em;
}
.gstat-label {
  font-size: var(--text-xs);
  color: oklch(0.95 0.02 80);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

/* ═══════════════════ COLOR ENHANCEMENTS ═══════════════════ */

/* Hero: more dramatic gradient background */
.hero {
  background:
    linear-gradient(145deg,
      oklch(0.96 0.018 80 / 0.82) 0%,
      oklch(0.94 0.025 70 / 0.80) 40%,
      oklch(0.92 0.032 60 / 0.78) 100%),
    url('LA-Wildfire.jpg') center center / cover no-repeat;
}
[data-theme="dark"] .hero {
  background:
    linear-gradient(145deg,
      oklch(0.11 0.025 45 / 0.88) 0%,
      oklch(0.09 0.03 40 / 0.86) 50%,
      oklch(0.08 0.02 35 / 0.84) 100%),
    url('LA-Wildfire.jpg') center center / cover no-repeat;
}

/* Section headers: add color accent line */
.section-eyebrow {
  color: var(--color-fire);
  font-weight: 800;
  letter-spacing: 0.12em;
}

/* Feature cards: more vivid gradient top borders */
.card-fire  { border-top: 3px solid var(--color-fire); }
.card-api   { border-top: 3px solid var(--color-primary); }
.card-rhetoric { border-top: 3px solid var(--color-secondary); }
.card-platform { border-top: 3px solid #7c5cbf; }

/* Framework nodes: more colorful backgrounds */
.fw-digital-studies { background: linear-gradient(135deg, oklch(0.94 0.03 60) 0%, oklch(0.97 0.01 80) 100%); border-color: var(--color-primary); }
.fw-infrastructure  { background: linear-gradient(135deg, oklch(0.94 0.03 150) 0%, oklch(0.97 0.01 140) 100%); border-color: var(--color-secondary); }
.fw-postapi         { background: linear-gradient(135deg, oklch(0.93 0.04 40) 0%, oklch(0.97 0.01 60) 100%); border-color: var(--color-fire); }
.fw-crisis          { background: linear-gradient(135deg, oklch(0.93 0.03 20) 0%, oklch(0.97 0.01 30) 100%); border-color: var(--color-arc); }
[data-theme="dark"] .fw-digital-studies { background: oklch(0.18 0.03 60); }
[data-theme="dark"] .fw-infrastructure  { background: oklch(0.18 0.03 150); }
[data-theme="dark"] .fw-postapi         { background: oklch(0.18 0.03 40); }
[data-theme="dark"] .fw-crisis          { background: oklch(0.18 0.03 20); }

/* Section alternating backgrounds: more vivid distinction */
.section-alt {
  background: linear-gradient(180deg, oklch(0.93 0.018 75) 0%, oklch(0.95 0.012 80) 100%);
}
[data-theme="dark"] .section-alt {
  background: linear-gradient(180deg, oklch(0.12 0.022 45) 0%, oklch(0.10 0.018 40) 100%);
}

/* Timeline: more vivid left accent line */
.timeline-spine { background: linear-gradient(to bottom, var(--color-fire), var(--color-primary), var(--color-secondary)); }

/* Post cards: hover glow */
.post-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 24px oklch(0.6 0.18 50 / 0.15);
}

/* Filter buttons: more vivid active state */
.filter-btn.active {
  background: linear-gradient(135deg, var(--color-fire) 0%, var(--color-primary) 100%);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 16px oklch(0.6 0.18 40 / 0.3);
}

/* Stat counters in hero: make numbers pop */
.stat-num {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--color-fire);
  text-shadow: 0 2px 8px oklch(0.6 0.2 40 / 0.2);
}

/* Key findings: numbered items color */
.finding-num {
  color: var(--color-fire);
  font-size: var(--text-xl);
  font-weight: 900;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  opacity: 0.85;
  min-width: 56px;
  flex-shrink: 0;
}

/* About section: warmer photo ring */
.about-photo-ring {
  border: 3px solid var(--color-fire);
  box-shadow: 0 0 0 6px var(--color-fire-highlight), 0 8px 40px oklch(0.6 0.18 40 / 0.2);
}

/* Bibliography: open entry amber left border */
.bib-entry.open {
  border-left: 4px solid var(--color-primary);
}

/* Responsive gallery */
@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .gallery-item-large { min-height: 280px; }
  .gallery-stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .gstat { border-right: none; border-bottom: 1px solid oklch(1 0 0 / 0.2); }
  .gstat:last-child, .gstat:nth-child(2) { border-bottom: none; }
}
@media (max-width: 600px) {
  .gallery-stat-strip {
    grid-template-columns: 1fr 1fr;
    padding: var(--space-4);
  }
  .gstat-num { font-size: var(--text-xl); }
}


/* ═══════════════════ HISTORICAL CONTEXT ═══════════════════ */

/* ── Accretion progress bar ── */
.hist-accretion-bar {
  margin: var(--space-8) 0 var(--space-10);
}

.hist-accretion-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 0 var(--space-4);
}

.hist-accretion-track::before {
  content: '';
  position: absolute;
  left: var(--space-4);
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  height: 3px;
  background: linear-gradient(to right,
    #8a7060, #2e6b4f, #1d78c4, #7c5cbf, #c0392b, #b5640d);
  border-radius: 99px;
  opacity: 0.4;
  z-index: 0;
}

.hist-accretion-node {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.hist-accretion-node::before {
  content: '';
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 3px solid var(--color-divider);
  transition: all 0.25s ease;
}

.hist-accretion-node span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-text-faint);
  white-space: nowrap;
  transition: color 0.25s ease;
}

.hist-accretion-node:hover::before,
.hist-accretion-node.active::before {
  border-color: var(--color-primary);
  background: var(--color-primary);
  transform: scale(1.35);
}

.hist-accretion-node:hover span,
.hist-accretion-node.active span {
  color: var(--color-primary);
}

.hist-accretion-now::before {
  border-color: var(--color-fire);
  background: var(--color-fire-highlight);
}

.hist-accretion-now.active::before {
  background: var(--color-fire);
  border-color: var(--color-fire);
}

/* ── Era cards grid ── */
.hist-eras-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.hist-era-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-top: 3px solid var(--era-color, var(--color-primary));
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.hist-era-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--era-color, var(--color-primary));
  transform: translateY(-2px);
}

.hist-era-card.active {
  background: var(--era-bg, var(--color-primary-highlight));
  border-color: var(--era-color, var(--color-primary));
  box-shadow: 0 0 0 3px oklch(from var(--era-color, #b5640d) l c h / 0.15), var(--shadow-md);
}

/* Fallback for older browsers that don't support CSS oklch with relative color syntax */
.hist-era-card.active {
  box-shadow: var(--shadow-md);
}

.hist-era-card-top {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.hist-era-card-icon {
  color: var(--era-color, var(--color-primary));
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.hist-era-card:hover .hist-era-card-icon,
.hist-era-card.active .hist-era-card-icon {
  opacity: 1;
}

.hist-era-card-date {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
  margin-top: var(--space-1);
}

.hist-era-expand-icon {
  color: var(--color-text-faint);
  flex-shrink: 0;
  margin-top: 2px;
  transition: transform 0.25s ease, color 0.2s;
}

.hist-era-card.active .hist-era-expand-icon {
  transform: rotate(90deg);
  color: var(--era-color, var(--color-primary));
}

.hist-era-card-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0;
}

.hist-era-card-summary {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin: 0;
  flex: 1;
}

.hist-era-card-scholars {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--era-color, var(--color-primary));
  letter-spacing: 0.03em;
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-2);
  margin-top: auto;
}

/* Era badge variants */
.hist-era-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  width: fit-content;
  line-height: 1.6;
}

.hist-badge-radio   { background: #f5ede6; color: #6b4a38; }
.hist-badge-web     { background: #c8e0d4; color: #1e4e39; }
.hist-badge-open    { background: #d6eaf5; color: #1a5a8c; }
.hist-badge-covid   { background: #ece6f8; color: #5a3d9a; }
.hist-badge-closed  { background: #fce9e7; color: #8e2b20; }
.hist-badge-present { background: var(--color-primary-highlight); color: var(--color-primary-active); }

[data-theme="dark"] .hist-badge-radio   { background: oklch(0.22 0.03 50);  color: oklch(0.82 0.06 55); }
[data-theme="dark"] .hist-badge-web     { background: oklch(0.2 0.04 150);  color: oklch(0.82 0.08 145); }
[data-theme="dark"] .hist-badge-open    { background: oklch(0.2 0.04 230);  color: oklch(0.82 0.07 225); }
[data-theme="dark"] .hist-badge-covid   { background: oklch(0.2 0.05 290);  color: oklch(0.82 0.07 285); }
[data-theme="dark"] .hist-badge-closed  { background: oklch(0.2 0.05 25);   color: oklch(0.82 0.08 30); }
[data-theme="dark"] .hist-badge-present { background: oklch(0.22 0.04 55);  color: oklch(0.85 0.08 60); }

/* ── Detail panel ── */
.hist-detail-panel {
  position: relative;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: clamp(var(--space-6), 3vw, var(--space-10));
  margin-top: var(--space-4);
  animation: panelSlideIn 0.25s ease;
}

@keyframes panelSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hist-panel-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
}

.hist-panel-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-6), 4vw, var(--space-10));
  margin-top: var(--space-6);
}

.hist-panel-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.hist-panel-subhead {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.hist-insight-box {
  background: var(--era-bg, var(--color-primary-highlight));
  border-left: 3px solid var(--era-color, var(--color-primary));
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-4) var(--space-5);
}

.hist-insight-label {
  display: block;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--era-color, var(--color-primary));
  margin-bottom: var(--space-2);
}

.hist-insight-box p {
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--color-text);
  line-height: 1.65;
  font-weight: 500;
  margin: 0;
  max-width: none;
}

.hist-panel-connection,
.hist-panel-scholars {
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
}

.hist-scholars-names {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--era-color, var(--color-primary));
  margin-bottom: var(--space-1);
}

/* ── Dark mode adjustments ── */
[data-theme="dark"] .hist-era-card {
  background: var(--color-surface);
  border-color: oklch(0.28 0.02 50);
}

[data-theme="dark"] .hist-era-card.active {
  background: oklch(0.18 0.025 55);
}

[data-theme="dark"] .hist-detail-panel {
  background: var(--color-surface);
  border-color: oklch(0.28 0.02 50);
}

[data-theme="dark"] .hist-panel-connection,
[data-theme="dark"] .hist-panel-scholars {
  background: oklch(0.16 0.02 50);
}

[data-theme="dark"] .hist-insight-box {
  background: oklch(0.18 0.03 55);
}

[data-theme="dark"] .hist-accretion-node::before {
  background: oklch(0.14 0.02 50);
  border-color: oklch(0.35 0.02 50);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hist-eras-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hist-panel-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hist-eras-grid {
    grid-template-columns: 1fr;
  }
  .hist-accretion-track {
    justify-content: space-around;
    padding: 0;
  }
  .hist-accretion-node span {
    font-size: 0.6rem;
  }
}
