:root {
  color-scheme: light dark;
  --paper: #fffefd;
  --ink: #20201e;
  --muted: #66655f;
  --line: #deddd7;
  --accent: #155f55;
  --content-width: 45rem;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Charter, "Bitstream Charter", "Iowan Old Style", Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration-thickness: .07em; text-underline-offset: .14em; }
a:hover { color: var(--ink); }

.container { width: min(calc(100% - 3rem), var(--content-width)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.navigation { min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.site-name { color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .94rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.navigation-links { display: flex; flex-wrap: wrap; justify-content: flex-end; column-gap: 1.25rem; row-gap: .2rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
.navigation-links a { color: var(--muted); text-decoration: none; }
.navigation-links a:hover, .navigation-links a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: .3em; }

main { padding-block: 5.5rem 6.5rem; }
section + section { margin-top: 5.5rem; }
h1, h2, h3 { color: var(--ink); line-height: 1.18; }
h1 { margin: 0 0 1.4rem; font-size: clamp(2.4rem, 7vw, 4.5rem); font-weight: 500; letter-spacing: -.045em; }
h2 { margin: 0 0 1.5rem; font-size: 1.55rem; font-weight: 600; letter-spacing: -.025em; }
h3 { margin: 0 0 .45rem; font-size: 1.2rem; font-weight: 600; }
h3 a, .project-list h2 a { color: inherit; text-decoration: none; }
h3 a:hover, .project-list h2 a:hover { color: var(--accent); text-decoration: underline; }
p { margin: 0 0 1.2rem; }
.intro { max-width: 42rem; }
.lede { max-width: 38rem; font-size: clamp(1.35rem, 3vw, 1.72rem); line-height: 1.45; letter-spacing: -.018em; }
.eyebrow { margin-bottom: .65rem; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.feature { padding: 1.65rem 0 1.15rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature h3 { font-size: 1.75rem; }
.feature p { max-width: 37rem; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.section-heading > a { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; white-space: nowrap; }
.project-list { border-top: 1px solid var(--line); }
.project-list article { padding: 1.5rem 0 1.1rem; border-bottom: 1px solid var(--line); }
.project-list p { max-width: 38rem; }
.project-list--full { margin-top: 3rem; }
.project-list--full h2 { margin-bottom: .55rem; font-size: 1.65rem; }
.writing-list { margin: 0 0 1.4rem; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.writing-list li { padding: .85rem 0; border-bottom: 1px solid var(--line); }
.writing-list a { font-size: 1.08rem; }
.site-footer { border-top: 1px solid var(--line); }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; padding-block: 1.65rem 2.5rem; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }

@media (prefers-color-scheme: dark) {
  :root { --paper: #171716; --ink: #e9e7e0; --muted: #b7b3a8; --line: #393833; --accent: #82c9b9; }
}

@media (max-width: 38rem) {
  body { font-size: 1.0625rem; }
  .container { width: min(calc(100% - 2rem), var(--content-width)); }
  .navigation { align-items: flex-start; flex-direction: column; gap: .55rem; padding-block: 1.1rem; }
  .navigation-links { justify-content: flex-start; gap: .25rem 1rem; }
  main { padding-block: 3.8rem 4.5rem; }
  section + section { margin-top: 4rem; }
}
