:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --text: #23221f;
  --muted: #69655c;
  --rule: #e2ddd1;
  --accent: #1f5c4a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --measure: 660px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151614;
    --text: #e9e6dd;
    --muted: #a5a296;
    --rule: #30332e;
    --accent: #8fd0b3;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }

body {
  margin: 0;
  min-width: 280px;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ul, ol, table, dl, dd { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; text-wrap: balance; }
h1 { font-size: clamp(2.125rem, 1.6rem + 2.4vw, 3.25rem); line-height: 1.12; letter-spacing: -0.012em; }
h2 { font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem); line-height: 1.2; letter-spacing: -0.008em; }
h3 { font-size: 1.1875rem; line-height: 1.3; }
p + p { margin-top: 1em; }

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; text-decoration-color: var(--rule); transition: color 0.15s, text-decoration-color 0.15s; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
::selection { background: var(--accent); color: var(--bg); }

.wrap { width: min(920px, 100% - 3rem); margin-inline: auto; }
.wrap--narrow { width: min(var(--measure), 100% - 3rem); }
.narrow { max-width: var(--measure); }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -6rem; z-index: 20; padding: 0.5rem 0.9rem; background: var(--bg); }
.skip-link:focus { top: 0.5rem; }

.eyebrow { font-size: 0.75rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.eyebrow a { text-decoration: none; }
.lead { font: 400 clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem)/1.5 var(--serif); color: var(--muted); text-wrap: pretty; }
.more { color: var(--accent); text-decoration-color: transparent; }
.more::after { content: " \2192"; }
.links { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }
.links--start { margin-top: 2rem; }

/* Illustrations */
.art { display: block; fill: none; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; color: var(--text); }
.art--icon { width: 4.5rem; height: auto; margin-bottom: 1.25rem; }
.art--hero { width: min(100%, 26rem); height: auto; }
.art__ink { stroke: currentColor; }
.art__ink--bold { stroke-width: 2; }
.art__faint { stroke: var(--rule); }
.art__accent { stroke: var(--accent); }
.art__sheet { fill: var(--bg); stroke: currentColor; }
.art__back { fill: var(--bg); stroke: var(--rule); }
.art__seal { fill: var(--bg); stroke: var(--accent); }
.art__node { fill: var(--bg); stroke: currentColor; }
.art__node--accent { stroke: var(--accent); stroke-width: 2; }
.art__text { fill: currentColor; stroke: none; font: 400 22px var(--serif); letter-spacing: 0.04em; }

/* Navigation */
.masthead__inner { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 2rem; padding-block: 1.5rem 1.25rem; border-bottom: 1px solid var(--rule); }
.masthead__name { font: 400 1.125rem/1.2 var(--serif); text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: 0 1.75rem; padding: 0; list-style: none; font-size: 0.875rem; }
.nav a { display: inline-block; padding-block: 0.5rem; color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current] { color: var(--text); }
.nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 0.5em; }

/* Home */
.hero { padding-block: clamp(4rem, 11vw, 8rem) clamp(3.5rem, 9vw, 6.5rem); }
.hero__inner { display: grid; gap: 3rem; align-items: center; }
.hero h1 { margin-top: 1.25rem; max-width: 19ch; font-size: clamp(2.5rem, 1.7rem + 3.6vw, 4rem); line-height: 1.08; letter-spacing: -0.018em; }
.hero .lead { margin-top: 1.5rem; max-width: 32em; }
.hero .links { margin-top: 2rem; }

.tiles { display: grid; gap: 0 3rem; border-top: 1px solid var(--text); }
.tile { display: flex; flex-direction: column; align-items: flex-start; padding-block: 1.75rem 2rem; border-bottom: 1px solid var(--rule); }
.tile h2 { margin-top: 0.6rem; }
.tile__text { margin-top: 0.6rem; max-width: 34em; color: var(--muted); }
.tile .more { margin-top: 1rem; font-size: 0.9375rem; }

.contact { padding-block: clamp(3.5rem, 9vw, 6rem); }
.contact .lead { margin-top: 0.6rem; max-width: 30em; }
.contact .email { display: inline-block; margin-top: 1.1rem; font: 400 1.3125rem/1.3 var(--serif); text-decoration-color: var(--accent); overflow-wrap: anywhere; }

/* Inner pages */
.page { padding-block: clamp(3rem, 8vw, 5.5rem) clamp(3rem, 8vw, 5rem); }
.page__head h1 { margin-top: 1.1rem; max-width: 18ch; }
.page__head .lead { margin-top: 1.1rem; max-width: 32em; }
.page__head .links { margin-top: 1.75rem; }
.page__body { margin-top: clamp(2.5rem, 6vw, 4rem); }

.grid { display: grid; gap: 0 3rem; border-top: 1px solid var(--text); }
.card { padding-block: 1.6rem 1.75rem; border-bottom: 1px solid var(--rule); }
.card h2 { font-size: 1.3125rem; }
.card p { margin-top: 0.5rem; color: var(--muted); }

.block { margin-top: clamp(3.5rem, 9vw, 5.5rem); }
.block__head h2 { margin-top: 0.7rem; max-width: 22ch; }
.block__head .lead { margin-top: 0.7rem; max-width: 30em; font-size: 1.125rem; }

.rows { margin-top: 1.75rem; padding: 0; list-style: none; border-top: 1px solid var(--text); }
.rows li { display: grid; gap: 0.15rem 2rem; padding-block: 1rem; border-bottom: 1px solid var(--rule); }
.rows strong { font: 400 1.0625rem/1.5 var(--serif); }
.rows span { color: var(--muted); }

.facts { border-top: 1px solid var(--text); }
.facts div { display: grid; gap: 0.1rem 2rem; padding-block: 0.9rem; border-bottom: 1px solid var(--rule); }
.facts dt { font-size: 0.75rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); line-height: 2.2; }

.prose-block { font-size: 1.0625rem; line-height: 1.75; }

/* Writing list */
.entries { padding: 0; list-style: none; border-top: 1px solid var(--text); }
.entry { padding-block: 1.6rem 1.7rem; border-bottom: 1px solid var(--rule); }
.entry__meta { font-size: 0.75rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; }
.entry__title { margin-top: 0.5rem; font-size: 1.375rem; line-height: 1.25; }
.entry__title a { text-decoration: none; }
.entry p + p { margin-top: 0.45rem; color: var(--muted); }

/* Projects */
.project { display: grid; gap: 1rem 3rem; padding-block: clamp(2rem, 5vw, 3rem); border-top: 1px solid var(--rule); scroll-margin-top: 24px; }
.project:first-child { border-top-color: var(--text); }
.project__side h2 { margin-top: 0.6rem; }
.project__side p + p { margin-top: 0.75rem; font-size: 0.875rem; overflow-wrap: anywhere; }
.project__summary { color: var(--muted); }
.project__insight { margin-top: 0.75rem; font: italic 400 1.375rem/1.35 var(--serif); text-wrap: balance; }
.project__body h3 { margin-top: 1.75rem; font: 400 0.75rem/1.4 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.project__body ul { margin-top: 0.5rem; padding-left: 1.1rem; }
.project__body li { margin-top: 0.5rem; }
.project__body li::marker { color: var(--accent); }

/* Articles */
.post { padding-block: clamp(3rem, 8vw, 5.5rem) clamp(3rem, 8vw, 5rem); }
.post__head h1 { margin-top: 1.1rem; font-size: clamp(1.875rem, 1.5rem + 1.8vw, 2.625rem); line-height: 1.16; }
.post__head .lead { margin-top: 1rem; }
.post__meta { margin-top: 1.5rem; font-size: 0.75rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; }
.prose { margin-top: 2.25rem; padding-top: 2.25rem; border-top: 1px solid var(--text); font-size: 1.0625rem; line-height: 1.78; }
.prose > * + * { margin-top: 1.25em; }
.prose h2 { margin-top: 2.2em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--accent); }
.prose strong { font-weight: 600; }
.prose a { text-decoration-color: var(--accent); }
.prose blockquote { margin-inline: 0; padding-left: 1.1rem; border-left: 1px solid var(--accent); font: italic 1.1875rem/1.55 var(--serif); }
.prose code { font: 0.88em var(--mono); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; border-top: 1px solid var(--text); }
.prose th { padding: 0.7rem 0.9rem 0.7rem 0; text-align: left; vertical-align: bottom; border-bottom: 1px solid var(--rule); font-size: 0.75rem; font-weight: 400; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.prose td { padding: 0.7rem 0.9rem 0.7rem 0; vertical-align: top; border-bottom: 1px solid var(--rule); }
.post__foot { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); font-size: 0.9375rem; color: var(--muted); }

/* Footer */
.colophon__inner { display: grid; gap: 0.3rem; padding-block: 1.5rem 2.5rem; border-top: 1px solid var(--rule); font-size: 0.8125rem; color: var(--muted); }
.colophon p + p { margin-top: 0; }

@media (min-width: 900px) {
  .hero__inner { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .art--hero { justify-self: end; }
}

@media (min-width: 720px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .tile { border-bottom: 0; }
  .grid { grid-template-columns: 1fr 1fr; }
  .rows li { grid-template-columns: 15rem 1fr; align-items: baseline; }
  .facts div { grid-template-columns: 15rem 1fr; align-items: baseline; }
  .project { grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); }
  .colophon__inner { grid-template-columns: 1fr auto; }
  .colophon__inner p:first-child { grid-column: 1 / -1; }
}

@media (max-width: 419px) {
  .nav { gap: 0 1.1rem; }
  .prose table { font-size: 0.875rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media print {
  .masthead nav, .skip-link { display: none; }
  body { background: #fff; color: #000; }
}
