:root {
  --bg: #f8fcf7;
  --text: #223144;
  --text-muted: #536579;
  --accent: #f07b16;
  --accent-dim: rgba(240, 123, 22, 0.1);
  --border: #cfdccf;
  --surface: rgba(255, 255, 255, 0.92);
  --nav-bg: rgba(248, 252, 247, 0.9);
}

[data-theme="dark"] {
  --bg: #101a20;
  --text: #f7fbf7;
  --text-muted: #d0dad2;
  --accent: #ff9a3d;
  --accent-dim: rgba(255, 154, 61, 0.16);
  --border: #4b625b;
  --surface: rgba(28, 42, 47, 0.96);
  --nav-bg: rgba(16, 26, 32, 0.94);
}

body {
  background:
    radial-gradient(circle at top left, rgba(240, 123, 22, 0.07), transparent 24%),
    radial-gradient(circle at top right, rgba(103, 153, 126, 0.12), transparent 28%),
    linear-gradient(180deg, var(--bg), var(--bg));
  color: var(--text);
  overflow-x: hidden;
}

.wrap {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: clamp(24px, 8vw, 120px);
}

.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: calc(88px + clamp(24px, 5vw, 48px)) clamp(24px, 6vw, 72px) clamp(48px, 6vw, 68px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: clamp(28px, 4vw, 44px);
  align-items: center;
}

.hero-copy h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(3rem, 7vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  margin-bottom: 1.25rem;
}

.hero-copy h1 em {
  color: var(--accent);
  font-style: normal;
}

.hero-copy h1 .brand-next {
  color: #4f995f;
}

[data-theme="dark"] .hero-copy h1 .brand-next {
  color: #7bc287;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 1rem;
}

.hero-tag,
.hero-year,
.chip,
.section-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-tag,
.hero-year {
  font-size: 0.72rem;
  font-weight: 700;
}

.hero-tag {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--accent);
  background: var(--surface);
}

.hero-year {
  color: var(--text-muted);
}

.hero-desc {
  max-width: 33rem;
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  color: var(--text-muted);
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  list-style: none;
  margin-top: 1.5rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.chip {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.hero-visual {
  background:
    linear-gradient(135deg, rgba(240, 123, 22, 0.04), rgba(103, 153, 126, 0.08)),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 1rem;
  box-shadow: 0 14px 34px rgba(34, 49, 68, 0.06);
}

.hero-visual img {
  border-radius: 22px;
}

.page-divider,
.s-divider {
  border: 0;
  border-top: 1px solid var(--border);
  max-width: 1080px;
  margin-inline: auto;
}

.top-block {
  margin-top: clamp(48px,7vw,80px);
}

.stat-wrap {
  margin: 0 auto clamp(32px,5vw,56px);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat {
  padding: 1.25rem 1rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  text-align: center;
  box-shadow: 0 10px 24px rgba(34, 49, 68, 0.04);
}

.stat-value {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.layout {
  max-width: 1080px;
  padding: 0 clamp(24px,8vw,120px);
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: clamp(22px, 4vw, 48px);
}

.section-gap {
  margin: 0 auto clamp(72px,10vw,120px);
}

.section-body h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

.section-body p + p,
.section-body p + .card-grid,
.section-body p + .phase-list,
.section-body p + .decision-grid,
.section-body p + .bullet-list,
.section-body .card-grid + p,
.section-body .phase-list + p,
.section-body .decision-grid + p,
.section-body .bullet-list + p,
.section-body .callout + p,
.section-body .deep-dive {
  margin-top: 1rem;
}

.section-body .card-grid + .callout,
.section-body .decision-grid + .callout {
  margin-top: 1.5rem;
}

.section-body p,
.tldr-text,
.bullet-list li,
.card p,
.decision-card p,
.phase-content p {
  color: var(--text-muted);
}

.callout {
  padding: 1.25rem 1.35rem;
  border-left: 4px solid var(--accent);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-dim), rgba(103, 153, 126, 0.06));
}

.card-grid,
.decision-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  align-items: start;
}

.card,
.decision-card {
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(34, 49, 68, 0.04);
}

.card h4,
.decision-card h4,
.phase-content h4 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  line-height: 1.2;
  margin-bottom: 0.55rem;
}

.phase-list {
  list-style: none;
  display: grid;
  gap: 1rem;
}

.phase-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.phase-item:first-child {
  border-top: 0;
}

.phase-num {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(240, 123, 22, 0.14), rgba(103, 153, 126, 0.1));
  color: var(--accent);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
}

.bullet-list {
  padding-left: 1.15rem;
}

.bullet-list li + li {
  margin-top: 0.65rem;
}

.deep-dive-body {
  padding: 1.25rem 1.5rem;
}

.cta-section {
  max-width: 1080px;
  margin: 0 auto clamp(48px,7vw,72px);
  padding: 0 clamp(24px,8vw,120px);
}

.cta-inner {
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: clamp(28px, 4vw, 40px);
  background:
    linear-gradient(135deg, rgba(240, 123, 22, 0.05), rgba(103, 153, 126, 0.08)),
    var(--surface);
  box-shadow: 0 14px 34px rgba(34, 49, 68, 0.05);
}

[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(255, 154, 61, 0.1), transparent 22%),
    radial-gradient(circle at top right, rgba(123, 194, 135, 0.1), transparent 26%),
    linear-gradient(180deg, #101a20, #101a20);
}

[data-theme="dark"] .hero-tag,
[data-theme="dark"] .chip,
[data-theme="dark"] .stat,
[data-theme="dark"] .card,
[data-theme="dark"] .decision-card,
[data-theme="dark"] .hero-visual,
[data-theme="dark"] .cta-inner {
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

[data-theme="dark"] .hero-year,
[data-theme="dark"] .hero-desc,
[data-theme="dark"] .section-body p,
[data-theme="dark"] .tldr-text,
[data-theme="dark"] .bullet-list li,
[data-theme="dark"] .card p,
[data-theme="dark"] .decision-card p,
[data-theme="dark"] .phase-content p,
[data-theme="dark"] .stat-label,
[data-theme="dark"] .cta-inner p {
  color: var(--text-muted);
}

[data-theme="dark"] .btn-primary {
  background: #f3f7f3;
  color: #132027;
  border-color: #f3f7f3;
}

[data-theme="dark"] .btn-secondary {
  background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .callout {
  background: linear-gradient(135deg, rgba(255, 154, 61, 0.16), rgba(123, 194, 135, 0.1));
}

.cta-inner h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
}

.cta-inner p {
  color: var(--text-muted);
  margin-top: 0.6rem;
}

.cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.9rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid var(--border);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-secondary {
  background: var(--surface);
}

.btn:hover,
.nav-resume:hover,
.nav-links a:hover,
footer a:hover {
  opacity: 0.88;
}

footer {
  margin-top: 2rem;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .hero {
    padding-inline: 1.25rem;
  }
  .wrap,
  .layout,
  .cta-section {
    padding-inline: 1.25rem;
  }
  .stat-row,
  .card-grid,
  .decision-grid {
    grid-template-columns: 1fr;
  }
  .phase-item {
    grid-template-columns: 1fr;
  }
  .phase-num {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 767px) {
  .tldr-strip,
  .stat-row,
  .card-grid,
  .decision-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .wrap,
  .layout,
  .cta-section {
    width: 100%;
    max-width: 100%;
  }

  .hero-copy h1,
  .section-body h2,
  .cta-inner h2 {
    overflow-wrap: anywhere;
  }
}

