:root {
  color-scheme: light;
  --bg: #faf9f5;
  --surface: #ffffff;
  --surface-muted: #f1f0eb;
  --ink: #171717;
  --muted: #5f5f5f;
  --subtle: #9a9a9a;
  --line: #e2e0da;
  --accent: #10b981;
  --accent-dark: #047857;
  --shadow: 0 24px 70px rgba(23, 23, 23, 0.08);
}

:root[data-theme="dim"] {
  color-scheme: dark;
  --bg: #1f211f;
  --surface: #282a27;
  --surface-muted: #252823;
  --ink: #f4f1e8;
  --muted: #c8c2b5;
  --subtle: #8f887a;
  --line: #3b3d38;
  --accent: #34d399;
  --accent-dark: #6ee7b7;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090b;
  --surface: #111113;
  --surface-muted: #141416;
  --ink: #fafafa;
  --muted: #c4c4c4;
  --subtle: #737373;
  --line: #27272a;
  --accent: #34d399;
  --accent-dark: #6ee7b7;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.12), transparent 34rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.logo img {
  width: 8.125rem;
  height: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.92rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 160ms ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.125rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.theme-toggle button {
  display: inline-flex;
  width: 2rem;
  height: 1.5rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  transition: background 160ms ease, color 160ms ease;
}

.theme-toggle button[aria-checked="true"] {
  background: var(--ink);
  color: var(--bg);
}

.theme-toggle button:not([aria-checked="true"]):hover {
  color: var(--ink);
}

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

.section {
  padding: 6rem 1.5rem;
}

.container {
  width: min(100%, 72rem);
  margin: 0 auto;
}

.narrow {
  width: min(100%, 48rem);
  text-align: center;
}

.border-top {
  border-top: 1px solid var(--line);
}

section[id] {
  scroll-margin-top: 5rem;
}

.muted {
  background: color-mix(in srgb, var(--surface-muted) 72%, transparent);
  border-top: 1px solid var(--line);
}

.hero {
  padding-top: 5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(20rem, 0.75fr);
  gap: 4rem;
  align-items: center;
}

.eyebrow,
.mini-eyebrow,
.principle,
.years {
  margin: 0 0 1rem;
  color: var(--subtle);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--accent-dark);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
.section-title,
.closing h2,
.name-plaque h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.055em;
}

h1 {
  max-width: 42rem;
  margin-bottom: 1.5rem;
  font-size: clamp(4.5rem, 13vw, 8rem);
  line-height: 0.9;
}

h1 span,
.section-title span,
.closing span,
.name-plaque span {
  font-style: italic;
}

.lede,
.section-lede {
  max-width: 43rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.lede {
  margin-bottom: 2rem;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 1.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 650;
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.secondary-link:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.journey-card,
.card,
.name-plaque {
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: var(--shadow);
}

.journey-card {
  padding: 1.5rem;
}

.timeline {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.85rem;
}

.timeline h2 {
  margin-bottom: 0.2rem;
  font-size: 1.05rem;
}

.timeline p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.step-number {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
}

.step-number.final {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.chips span,
.badge {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.chips span {
  border: 1px solid var(--line);
  padding: 0.25rem 0.55rem;
  color: var(--muted);
}

.section-title {
  max-width: 48rem;
  margin-bottom: 2.5rem;
  font-size: clamp(2.75rem, 7vw, 4.75rem);
  line-height: 1;
}

.phase-grid,
.role-grid {
  display: grid;
  gap: 1.25rem;
}

.phase-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.phase-grid.three,
.role-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  padding: 1.5rem;
  box-shadow: none;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.card:hover {
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.card-number {
  margin-bottom: 1rem;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
}

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

.card p,
.card blockquote {
  color: var(--muted);
  font-size: 0.96rem;
}

.tall {
  display: flex;
  min-height: 19rem;
  flex-direction: column;
}

.badge {
  margin-bottom: 1.1rem;
  padding: 0.3rem 0.7rem;
  background: var(--ink);
  color: var(--bg);
}

blockquote {
  margin: 0 0 1.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--line);
  font-style: italic;
}

.principle {
  margin-top: auto;
  margin-bottom: 0;
}

.evidence-layout,
.hebb-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4rem;
  align-items: start;
}

.principles {
  display: grid;
  gap: 1.4rem;
}

.principles article {
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
}

.principles h3 {
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

.principles p {
  margin-bottom: 0;
  color: var(--muted);
}

.name-plaque {
  padding: 2rem;
}

.name-plaque h2 {
  margin-bottom: 0.25rem;
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  line-height: 1;
}

.name-plaque blockquote {
  margin-top: 2rem;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
}

.closing {
  background: #0a0a0a;
  color: white;
}

.closing h2 {
  margin-bottom: 1rem;
  font-size: clamp(3.25rem, 8vw, 5.5rem);
  line-height: 0.95;
}

.closing p {
  color: #d4d4d4;
  font-size: 1.2rem;
}

.site-footer {
  border-top: 1px solid #27272a;
  background: #0a0a0a;
  color: #a3a3a3;
  padding: 1.25rem 1.5rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 900px) {
  .hero-grid,
  .evidence-layout,
  .hebb-grid {
    grid-template-columns: 1fr;
  }

  .phase-grid,
  .phase-grid.three,
  .role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .nav {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 1rem 0;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.82rem;
  }
  .section {
    padding: 4rem 1rem;
  }

  .hero {
    padding-top: 3rem;
  }

  .phase-grid,
  .phase-grid.three,
  .role-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(4rem, 21vw, 5.5rem);
  }
}
