:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --ink: #111114;
  --muted: #55575e;
  --faint: #8b8d93;
  --line: #e3e1db;
  --accent: #ff4f1f;
  --accent-ink: #ffffff;
  --accent-soft: #ffe6dc;
  --contact-bg: #111114;
  --contact-ink: #f7f6f2;

  --display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --wrap: 72rem;
  --radius: 18px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e11;
    --surface: #18181c;
    --ink: #f3f2ee;
    --muted: #b0b1b7;
    --faint: #7d7f86;
    --line: #26262c;
    --accent: #ff6a3d;
    --accent-ink: #111114;
    --accent-soft: #2e1810;
    --contact-bg: #ff6a3d;
    --contact-ink: #111114;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 720px) { .wrap { padding-inline: 2rem; } }

h1, h2, h3 { font-family: var(--display); line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; max-width: 18ch; margin-bottom: 3rem; }
h3 { font-size: 1.35rem; font-weight: 700; }

.kicker {
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 1rem;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.4rem; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-weight: 600; text-decoration: none; border: 2px solid var(--ink);
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-small { padding: 0.5rem 1rem; font-size: 0.9rem; }
.btn-light { background: var(--contact-ink); color: var(--contact-bg); border-color: var(--contact-ink); }
.btn-ghost-light { background: transparent; color: var(--contact-ink); border-color: var(--contact-ink); }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.logo { font-family: var(--display); font-weight: 800; font-size: 1.5rem; text-decoration: none; }
.logo span { color: var(--accent); }
.nav nav { display: flex; align-items: center; gap: 1.5rem; }
.nav nav a:not(.btn) { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 0.95rem; }
.nav nav a:not(.btn):hover { color: var(--ink); }
@media (max-width: 640px) { .nav nav a:not(.btn) { display: none; } }

/* Hero */
.hero {
  display: grid; gap: 3rem; align-items: center;
  padding-block: 4rem 5rem;
}
@media (min-width: 900px) { .hero { grid-template-columns: 1.4fr 1fr; padding-block: 6rem; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.9rem; font-weight: 500; color: var(--muted);
  padding: 0.4rem 0.9rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); margin: 0 0 1.75rem;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px #22c55e33; }

h1 { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 800; }
h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 38rem; margin: 1.75rem 0 0; }

.hero-photo {
  position: relative; aspect-ratio: 4 / 5; max-width: 420px; width: 100%; justify-self: center;
  border-radius: 28px; overflow: hidden;
  background: linear-gradient(145deg, var(--accent), #ffb347);
  box-shadow: 18px 18px 0 var(--ink);
}
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.monogram {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 8rem; color: #ffffffd9;
}

/* Impact */
.impact {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  padding: 0;
}
@media (min-width: 820px) { .impact { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); padding: 1.75rem 1.5rem; }
.stat strong { display: block; font-family: var(--display); font-size: clamp(2.25rem, 5vw, 3rem); font-weight: 800; line-height: 1; color: var(--accent); }
.stat span { display: block; margin-top: 0.6rem; font-size: 0.95rem; color: var(--muted); line-height: 1.45; }

/* Sections */
.journey, .strengths, .running { padding-block: 6rem 2rem; }

/* Journey */
.chapters { list-style: none; margin: 0; padding: 0; }
.chapter {
  display: grid; gap: 0.75rem 2rem;
  padding: 2rem 0; border-top: 1px solid var(--line);
}
@media (min-width: 820px) { .chapter { grid-template-columns: 12rem 1fr; padding: 2.75rem 0; } }
.chapter-meta { display: flex; align-items: baseline; gap: 1rem; }
@media (min-width: 820px) { .chapter-meta { flex-direction: column; gap: 0.25rem; } }
.num { font-family: var(--display); font-weight: 800; font-size: 3rem; line-height: 1; color: var(--line); transition: color .4s ease; }
.chapter:hover .num, .chapter.current .num { color: var(--accent); }
.when { font-size: 0.9rem; font-weight: 600; color: var(--faint); }
.chapter-body { max-width: 42rem; }
.chapter-body h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
.where { color: var(--accent); font-weight: 600; font-size: 0.95rem; margin: 0.4rem 0 0.9rem; }
.chapter-body p { margin: 0 0 0.9rem; color: var(--muted); }
.lesson { display: flex; gap: 0.75rem; align-items: baseline; color: var(--ink) !important; font-weight: 500; }
.lesson span {
  flex-shrink: 0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.15rem 0.55rem; border-radius: 6px; background: var(--accent-soft); color: var(--accent);
}

/* Strengths */
.cards { display: grid; gap: 1rem; }
@media (min-width: 820px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem; transition: transform .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.icon {
  display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent); font-size: 1.4rem; margin-bottom: 1.5rem;
}
.card p { color: var(--muted); margin: 0.75rem 0 0; }

/* Running */
.running-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 900px) { .running-grid { grid-template-columns: 1.1fr 1fr; gap: 4rem; } }
.running-text h2 { margin-bottom: 1.5rem; }
.running-text .lede { font-size: 1.3rem; color: var(--ink); margin: 0 0 1.25rem; }
.running-text p { color: var(--muted); margin: 0 0 1.75rem; max-width: 34rem; }
.strava-mark { color: #fc4c02; font-size: 1.1rem; }

.run-stats {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.run-stats li { background: var(--surface); padding: 1.75rem 1.5rem; }
.run-stats strong {
  display: block; font-family: var(--display); font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1; color: var(--accent);
}
.run-stats span { display: block; margin-top: 0.6rem; font-size: 0.9rem; color: var(--muted); line-height: 1.45; }
.run-stats em { font-style: normal; color: var(--faint); }
.run-updated { margin: 1rem 0 0; font-size: 0.85rem; color: var(--faint); }
.run-updated a { color: var(--accent); text-decoration: none; font-weight: 500; }
.run-updated a:hover { text-decoration: underline; }

/* Contact */
.contact {
  margin-top: 6rem; padding-block: 6rem;
  background: var(--contact-bg); color: var(--contact-ink);
}
.contact .kicker { color: var(--contact-ink); opacity: 0.7; }
.contact h2 { font-size: clamp(2.5rem, 7vw, 4.75rem); font-weight: 800; max-width: 14ch; margin-bottom: 1.5rem; }
.contact p { max-width: 36rem; font-size: 1.15rem; opacity: 0.85; margin: 0; }

/* Footer */
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem;
  padding-block: 2rem; font-size: 0.9rem; color: var(--faint);
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}
