:root {
  --bg-color: #ffffff;
  --text-color: #1a1a1a;
  --text-muted: #666666;
  --accent-color: #2563eb;
  --accent-hover: #1d4ed8;
  --border-color: #e5e5e5;
  --card-bg: #f9fafb;
  --shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  --nav-bg: rgba(255, 255, 255, 0.95);
  --hero-gradient: linear-gradient(160deg, #f9fbff 0%, #ffffff 50%);
  --section-alt-gradient: linear-gradient(to bottom, #f9fafb 0%, #ffffff 100%);
  --section-conclusion-gradient: linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%);
  --insight-panel-bg: #f0f5ff;
  --insight-panel-border: rgba(37, 99, 235, 0.2);
  --accent-bg-subtle: rgba(37, 99, 235, 0.06);
  --accent-bg-light: rgba(37, 99, 235, 0.1);
  --accent-border-light: rgba(37, 99, 235, 0.2);
  --accent-border-ghost: rgba(37, 99, 235, 0.3);
  --accent-bg-ghost: rgba(37, 99, 235, 0.05);
  --accent-bg-ghost-hover: rgba(37, 99, 235, 0.1);
  --accent-border-ghost-hover: rgba(37, 99, 235, 0.4);
  --iframe-bg: #f5f7fb;
  --image-bg: #ffffff;
}

[data-theme="dark"] {
  --bg-color: #0f0f0f;
  --text-color: #e5e5e5;
  --text-muted: #a0a0a0;
  --accent-color: #60a5fa;
  --accent-hover: #93c5fd;
  --border-color: #333333;
  --card-bg: #1a1a1a;
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  --nav-bg: rgba(15, 15, 15, 0.95);
  --hero-gradient: linear-gradient(160deg, #1a1a1a 0%, #0f0f0f 50%);
  --section-alt-gradient: linear-gradient(to bottom, #1a1a1a 0%, #0f0f0f 100%);
  --section-conclusion-gradient: linear-gradient(to bottom, #0f0f0f 0%, #1a1a1a 100%);
  --insight-panel-bg: rgba(96, 165, 250, 0.1);
  --insight-panel-border: rgba(96, 165, 250, 0.3);
  --accent-bg-subtle: rgba(96, 165, 250, 0.08);
  --accent-bg-light: rgba(96, 165, 250, 0.15);
  --accent-border-light: rgba(96, 165, 250, 0.3);
  --accent-border-ghost: rgba(96, 165, 250, 0.4);
  --accent-bg-ghost: rgba(96, 165, 250, 0.1);
  --accent-bg-ghost-hover: rgba(96, 165, 250, 0.15);
  --accent-border-ghost-hover: rgba(96, 165, 250, 0.5);
  --iframe-bg: #1a1a1a;
  --image-bg: #262626;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  font-size: 16px;
  transition: background-color 0.3s, color 0.3s;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-color);
}

.text-link {
  color: var(--accent-color);
  text-decoration: underline;
}

.text-link:hover {
  color: var(--accent-hover);
}

nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  padding: 1rem 0;
  min-height: 64px;
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 48px;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav li {
  margin: 0;
}

nav ul a {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

nav ul a:hover,
nav ul a.active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

.back-link {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
}

.back-link:hover {
  color: var(--accent-color);
}

.theme-toggle,
.style-toggle {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-color);
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  width: 38px;
}

.theme-toggle:hover,
.style-toggle:hover {
  background-color: var(--card-bg);
}

.nav-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--hero-gradient);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  align-items: start;
}

.eyebrow {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: 2.4rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.lede {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

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

.hero-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.pill {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent-bg-light);
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.meta-grid {
  display: grid;
  gap: 1rem;
}

.meta-grid dt {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.meta-grid dd {
  font-weight: 500;
}

.section {
  padding: 3rem 0;
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-header h2,
section h2 {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.section-header p {
  color: var(--text-muted);
  max-width: 700px;
  line-height: 1.7;
  font-size: 1.05rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.cards--compact {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

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

.card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.card p {
  color: var(--text-muted);
  line-height: 1.6;
}

.list {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  color: var(--text-muted);
}

.list li {
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.5;
}

.list li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: 700;
}

.list strong {
  color: var(--text-color);
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  align-items: start;
}

.two-col h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.two-col p {
  line-height: 1.7;
  color: var(--text-muted);
}

.insight-panel {
  background: var(--insight-panel-bg);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--insight-panel-border);
}

.insight-panel h3 {
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.insight-panel ul {
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.insight-panel li {
  padding-left: 1.25rem;
  position: relative;
}

.insight-panel li:before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: 600;
}

.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.section-block {
  margin-top: 2rem;
}

blockquote {
  padding: 1.5rem;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  font-style: italic;
  line-height: 1.6;
}

blockquote span {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: normal;
  font-weight: 500;
}

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

.media-grid img,
.gallery img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--card-bg);
}

.media-grid--portrait {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.media-grid--portrait img {
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: var(--image-bg);
}

.media-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.media-grid--compact img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.media-grid--landscape {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.media-grid--landscape img {
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: var(--image-bg);
}

.media-grid--three-col {
  grid-template-columns: repeat(3, 1fr);
}

.media-grid--three-col img {
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: var(--image-bg);
}

.media-grid--midfi {
  align-items: start;
}

.media-grid--midfi img {
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--image-bg);
}

figure {
  margin: 0;
}

figure figcaption {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.gallery {
  display: grid;
  gap: 1.5rem;
}

.horizontal-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.horizontal-gallery figure {
  min-width: 240px;
}

.horizontal-gallery img {
  border-radius: 8px;
}

.subhead {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-color);
}
.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.impact-grid article {
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.impact-grid h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--text-color);
}

.impact-grid p {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.impact-grid .quote-snippet {
  margin-top: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.button.primary {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.button.primary:hover {
  background: var(--accent-hover);
  color: white;
}

.button.ghost {
  color: var(--accent-color);
  border-color: var(--accent-border-ghost);
  background: var(--accent-bg-ghost);
}

.button.ghost:hover {
  background: var(--accent-bg-ghost-hover);
  border-color: var(--accent-border-ghost-hover);
}

.iframe-wrap {
  margin-top: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--iframe-bg);
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow);
}

.iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.callout {
  border: 1px solid var(--accent-border-light);
  background: var(--accent-bg-subtle);
  padding: 1.5rem;
  border-radius: 12px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-card p:not(.stat-number) {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.timeline {
  display: grid;
  gap: 1.25rem;
}

.timeline > div {
  padding: 1.25rem;
  background: var(--card-bg);
  border-radius: 8px;
  border-left: 3px solid var(--accent-color);
}

.timeline h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
}

.timeline p {
  color: var(--text-muted);
  margin: 0;
}

.badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent-bg-light);
  color: var(--accent-color);
}

.quote-snippet {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  padding-left: 1rem;
  border-left: 2px solid var(--border-color);
}

.section.alt {
  background: var(--section-alt-gradient);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section.conclusion {
  background: var(--section-conclusion-gradient);
  border-top: 1px solid var(--border-color);
}

.footer {
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 3rem;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  .hero {
    padding: 3rem 0 2rem;
  }

  nav .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  nav ul {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .cards,
  .media-grid,
  .media-grid--compact,
  .media-grid--landscape,
  .media-grid--three-col {
    grid-template-columns: 1fr;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .impact-grid {
    grid-template-columns: 1fr;
  }

  .quote-grid {
    grid-template-columns: 1fr;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
