:root {
  --paper: #0e2238;
  --ink: #f1f3f8;
  --accent: #4d7fb8;
  --accent-rgb: 77, 127, 184;
  --muted: #4a5a73;
  --line: rgba(14, 34, 56, 0.12);
  --line-strong: rgba(14, 34, 56, 0.22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--paper);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--paper);
}

a { color: var(--accent); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 4px; }

p { margin: 0 0 1.1em; }

/* ─── Layout ─── */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: 740px; margin: 0 auto; padding: 0 28px; }

section { padding: 88px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: none; }

/* ─── Nav ─── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(241, 243, 248, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
  max-width: 1100px; margin: 0 auto;
}
.nav-brand {
  font-family: 'Fraunces', serif;
  font-size: 19px; font-weight: 600;
  color: var(--paper);
  letter-spacing: -0.01em;
}
.nav-brand:hover { color: var(--accent); text-decoration: none; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a {
  font-size: 14px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.nav-links a:hover { color: var(--paper); text-decoration: none; }

/* ─── Hero ─── */
.hero { padding: 110px 0 90px; }
.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 22px;
}
.eyebrow .dot { color: var(--accent); margin: 0 6px; }
.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.02;
  max-width: 16ch;
  margin-bottom: 28px;
}
.hero h1 .accent { color: var(--accent); }
.hero .lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 36px;
  line-height: 1.55;
}

/* ─── Button ─── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 500;
  font-size: 15px;
  border-radius: 999px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  border: none;
}
.btn:hover {
  background: var(--accent);
  color: var(--ink);
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow: 0 10px 30px -10px rgba(var(--accent-rgb), 0.5);
}
.btn .arrow { transition: transform .25s ease; }
.btn:hover .arrow { transform: translateX(4px); }

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ─── Section title ─── */
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 14px;
}
.section-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: 48px;
}

/* ─── Three-up grid ─── */
.three-up { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.three-up .card { padding: 0; }
.card h3 { font-size: 1.35rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.97rem; line-height: 1.6; }

/* ─── Links list ─── */
.linklist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 32px; margin-top: 20px; }
.linklist a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--paper);
  font-size: 1rem;
}
.linklist a:hover { color: var(--accent); text-decoration: none; border-bottom-color: var(--accent); }
.linklist a .meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ─── Post list ─── */
.posts { display: grid; gap: 0; }
.posts a.post {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 28px;
  align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  color: var(--paper);
}
.posts a.post:hover { text-decoration: none; }
.posts a.post:hover h3 { color: var(--accent); }
.posts .post-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}
.posts h3 { font-size: 1.4rem; line-height: 1.2; margin-bottom: 6px; transition: color .18s ease; }
.posts .post-sum { color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.posts .post-arrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--accent);
}

/* ─── Footer ─── */
footer {
  background: var(--paper);
  color: var(--ink);
  padding: 64px 0 40px;
}
footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; }
footer h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(241, 243, 248, 0.5);
  margin-bottom: 18px;
}
footer a { color: var(--ink); display: block; padding: 4px 0; font-size: 0.97rem; }
footer a:hover { color: var(--accent); text-decoration: none; }
footer .brand {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  margin-bottom: 12px;
}
footer .tagline { color: rgba(241, 243, 248, 0.6); font-size: 0.95rem; max-width: 32ch; }
footer .colophon {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(241, 243, 248, 0.12);
  padding-top: 24px;
  margin-top: 32px;
  font-size: 0.85rem;
  color: rgba(241, 243, 248, 0.45);
  display: flex; justify-content: space-between;
}

/* ─── Breadcrumbs ─── */
nav.breadcrumbs {
  padding: 22px 0 0;
  border-bottom: 0;
  background: transparent;
  position: static;
  backdrop-filter: none;
}
nav.breadcrumbs .wrap-narrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}
nav.breadcrumbs a { color: var(--muted); }
nav.breadcrumbs a:hover { color: var(--accent); text-decoration: none; }
nav.breadcrumbs span { color: var(--line-strong); margin: 0 8px; }
nav.breadcrumbs span[aria-current] { color: var(--paper); margin: 0; }

/* ─── Article (blog post) ─── */
article.post-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 28px 100px;
}
article.post-body .post-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 18px;
}
article.post-body h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.08;
  margin-bottom: 32px;
}
article.post-body p, article.post-body li {
  font-size: 1.08rem;
  line-height: 1.78;
  color: var(--paper);
}
article.post-body h2 {
  font-size: 1.55rem;
  margin: 44px 0 16px;
}
article.post-body ul, article.post-body ol { margin: 0 0 1.4em 1.4em; }
article.post-body li { margin-bottom: 10px; }
article.post-body .byline {
  margin-top: 60px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--muted);
}
article.post-body .byline a { color: var(--accent); }

/* ─── Headshot ─── */
.headshot {
  width: 180px; height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--paper);
  margin-bottom: 28px;
  box-shadow: 0 18px 40px -20px rgba(14, 34, 56, 0.45);
}

/* ─── About body ─── */
.about-body { display: grid; grid-template-columns: 220px 1fr; gap: 56px; align-items: start; }
.about-body p { font-size: 1.05rem; line-height: 1.75; }
.about-body p + p { margin-top: 1.2em; }

/* ─── Reveal animations ─── */
.reveal { opacity: 0; transform: translateY(24px); }

/* ─── Responsive ─── */
@media (max-width: 880px) {
  .three-up { grid-template-columns: 1fr; gap: 28px; }
  .linklist { grid-template-columns: 1fr; }
  footer .wrap { grid-template-columns: 1fr 1fr; }
  footer .brand-col { grid-column: 1 / -1; }
  .about-body { grid-template-columns: 1fr; gap: 32px; }
  .headshot { width: 140px; height: 140px; }
  .posts a.post { grid-template-columns: 1fr; gap: 8px; }
  .posts .post-arrow { display: none; }
  section { padding: 64px 0; }
  .hero { padding: 70px 0 60px; }
  .nav-links { gap: 16px; }
  .nav-links a:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
