:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-2: #f0ece3;
  --text: #211e19;
  --text-muted: #625c4f;
  --text-faint: #948d7c;
  --accent: #b8511b;
  --accent-strong: #8f3f14;
  --border: #e4ddce;
  --focus: #b8511b;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16140f;
    --surface: #1d1a14;
    --surface-2: #24201a;
    --text: #f3efe6;
    --text-muted: #b6ae9c;
    --text-faint: #837a67;
    --accent: #e2854c;
    --accent-strong: #f0a06e;
    --border: #342f25;
    --focus: #e2854c;
  }
}

:root[data-theme="dark"] {
  --bg: #16140f;
  --surface: #1d1a14;
  --surface-2: #24201a;
  --text: #f3efe6;
  --text-muted: #b6ae9c;
  --text-faint: #837a67;
  --accent: #e2854c;
  --accent-strong: #f0a06e;
  --border: #342f25;
  --focus: #e2854c;
}

:root[data-theme="light"] {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-2: #f0ece3;
  --text: #211e19;
  --text-muted: #625c4f;
  --text-faint: #948d7c;
  --accent: #b8511b;
  --accent-strong: #8f3f14;
  --border: #e4ddce;
  --focus: #b8511b;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.script {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

h1, h2, h3 { text-wrap: balance; margin: 0; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.narrow {
  max-width: 640px;
}

/* Nav */
nav.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
nav.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: flex;
  align-items: center;
}
.brand img {
  height: 150px;
  width: auto;
}
:root[data-theme="dark"] .brand img { filter: invert(1) brightness(1.6); }
@media (prefers-color-scheme: dark) {
  .brand img { filter: invert(1) brightness(1.6); }
}
:root[data-theme="light"] .brand img { filter: none; }
.navlinks {
  display: flex;
  gap: 24px;
  font-size: 15px;
}
.navlinks a {
  color: var(--text-muted);
}
.navlinks a:hover, .navlinks a.current { color: var(--accent); }
.navlinks a.current { text-decoration: none; font-weight: 600; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme]) .theme-toggle .icon-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Hero */
.hero {
  padding: 64px 0 72px;
  border-bottom: 1px solid var(--border);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
h1.name {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.role {
  margin-top: 12px;
  font-size: 21px;
  color: var(--accent);
  font-weight: 600;
}
.lede {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 18px;
  max-width: 46ch;
}
.cta-row {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--border);
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--accent);
  color: #fff9f4;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-ghost {
  color: var(--text);
  background: var(--surface);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-photo figure { margin: 0; }
.hero-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.hero-photo figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-faint);
  text-align: center;
}

/* Prose sections */
section.prose {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}
section.prose:last-of-type { border-bottom: none; }
.section-label {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 700;
  margin-bottom: 18px;
}
.prose p {
  color: var(--text-muted);
  max-width: 62ch;
}
.prose p + p { margin-top: 14px; }
.prose strong { color: var(--text); font-weight: 700; }

/* Page header (non-home pages) */
.page-header {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
}
h1.page-title {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.page-header p {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 18px;
  max-width: 52ch;
}

/* Story rows (Things I've Done) */
.story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}
.story:last-of-type { border-bottom: none; }
.story.reverse .story-media { order: 2; }
.story.reverse .story-text { order: 1; }
.story-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.story-media.two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.story-media.two-up img { aspect-ratio: 1 / 1; }
.story-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.story-text p {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 16.5px;
}
.story-text a.more { font-weight: 600; }
.story-text p.credit {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-faint);
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  padding: 52px 0 60px;
}
.stat-figure {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.stat p {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 14.5px;
}
.stat-cta {
  margin-top: 14px;
  font-size: 13px;
  padding: 7px 14px;
}

/* Find me */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}
.contact-list a {
  color: var(--text);
  font-size: 19px;
  font-weight: 600;
}
.contact-list a:hover { color: var(--accent); }
.contact-list .via {
  color: var(--text-faint);
  font-size: 13px;
  display: block;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

/* Footer */
footer.site-footer {
  padding: 48px 0 64px;
}
.signoff {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 56ch;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
}
.signoff-name {
  margin-top: 10px;
  color: var(--text-faint);
  font-size: 13px;
  font-style: normal;
}
footer.site-footer .foot-links {
  margin-top: 24px;
  display: flex;
  gap: 18px;
  font-size: 14px;
  color: var(--text-faint);
}

@media (max-width: 720px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-photo { order: -1; max-width: 360px; margin: 0 auto; }
  h1.name { font-size: 38px; }
  .story { grid-template-columns: 1fr; gap: 20px; padding: 36px 0; }
  .story.reverse .story-media { order: 1; }
  .story.reverse .story-text { order: 2; }
  .navlinks { gap: 14px; font-size: 14px; }
  .stats { grid-template-columns: 1fr; gap: 28px; padding: 40px 0 48px; }
}
