:root {
  --paper: #f2f3ec;
  --white: #fff;
  --ink: #142521;
  --muted: #657069;
  --line: #d4dcd2;
  --accent: #365f4b;
  --soft: #e7ebe2;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #9b4d34; }
.shell { width: min(920px, calc(100% - 40px)); margin: 0 auto; }
.skip-link { position: absolute; left: 10px; top: 10px; z-index: 2; transform: translateY(-150%); padding: 10px 14px; background: var(--ink); color: white; }
.skip-link:focus { transform: none; }
.site-header { background: #10211e; color: #f2f3ec; }
.site-header .wordmark { color: inherit; }
.nav-wrap { display: flex; align-items: center; justify-content: flex-end; min-height: 66px; gap: 20px; }
.wordmark { color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; }
.site-header nav { display: flex; align-items: center; gap: 22px; font-size: 12px; }
.site-header nav a { color: #dbe5da; text-decoration: none; }
.site-header nav a:hover { color: #d7f06b; text-decoration: underline; }
.intro { padding: 82px 0 58px; }
.eyebrow { margin: 0 0 18px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
.intro h1 { margin: 0; font-family: var(--serif); font-size: clamp(48px, 8vw, 80px); font-weight: 400; letter-spacing: -.045em; line-height: 1; }
.intro-title { margin: 22px 0 10px; color: var(--ink); font-size: 18px; font-weight: 650; line-height: 1.4; }
.intro-copy { max-width: 670px; margin-bottom: 14px; color: #4e5a53; font-size: 16px; line-height: 1.75; }
.writing { padding: 28px 0 62px; border-top: 1px solid var(--line); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-title h2, .about h2 { margin: 0; font-family: var(--serif); font-size: 30px; font-weight: 400; letter-spacing: -.03em; }
.section-title > a { font-size: 12px; }
.article-list { border-top: 1px solid var(--line); }
.article-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 22px; gap: 20px; padding: 23px 0; border-bottom: 1px solid var(--line); }
.article-row time, .archive-item time { padding-top: 5px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.article-row h3 { margin: 0 0 5px; font-family: var(--serif); font-size: 24px; font-weight: 400; letter-spacing: -.02em; line-height: 1.25; }
.article-row h3 a { color: var(--ink); text-decoration: none; }
.article-row h3 a:hover { color: var(--accent); text-decoration: underline; }
.article-row p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.row-arrow { padding-top: 4px; color: #77827a; text-align: right; text-decoration: none; }
.about { padding: 30px 0 70px; border-top: 1px solid var(--line); }
.about h2 { margin-bottom: 12px; }
.about p { max-width: 680px; margin: 0; color: #4e5a53; font-size: 16px; line-height: 1.75; }
.about p + p { margin-top: 14px; }
.site-footer { background: #10211e; }
.site-footer .wordmark, .site-footer a { color: #f2f3ec; }
.site-footer .footer-inner { color: #bdc9bf; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; color: var(--muted); font-size: 11px; }
.footer-inner p { margin: 0; }
.footer-link { font-size: 11px; }

/* Writing index */
.page-intro { padding: 68px 0 34px; }
.page-intro h1 { margin: 0 0 12px; font-family: var(--serif); font-size: clamp(42px, 6vw, 56px); font-weight: 400; letter-spacing: -.04em; }
.page-lede { max-width: 650px; margin: 0; color: #56625b; font-size: 14px; line-height: 1.7; }
.archive-list-section { padding-bottom: 74px; }
.archive-list-head { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 20px; padding: 11px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.archive-item { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.archive-item-title > a { color: var(--ink); font-family: var(--serif); font-size: 20px; text-decoration: none; }
.archive-item-title > a:hover { color: var(--accent); text-decoration: underline; }
.archive-footnote { margin: 16px 0 0; color: var(--muted); font-size: 11px; }

/* Individual writing pages */
.article-page { padding-top: 23px; padding-bottom: 76px; }
.breadcrumbs { display: flex; gap: 9px; color: var(--muted); font-size: 11px; }
.breadcrumbs a { color: var(--muted); }
.article-header { max-width: 760px; margin: 48px 0 34px; }
.article-header h1 { margin: 0 0 13px; font-family: var(--serif); font-size: clamp(37px, 5.5vw, 55px); font-weight: 400; letter-spacing: -.04em; line-height: 1.05; }
.article-deck { max-width: 680px; margin: 0 0 18px; color: #56625b; font-size: 15px; line-height: 1.7; }
.article-meta { display: flex; gap: 16px; color: var(--muted); font-size: 11px; }
.post-tags { margin: 12px 0 0; color: #657069; font-size: 10px; line-height: 1.5; }
.article-content { max-width: 760px; color: #29332d; font-family: var(--serif); font-size: 17px; line-height: 1.82; overflow-wrap: anywhere; }
.article-content h2, .article-content h3, .article-content h4 { margin: 2em 0 .6em; color: var(--ink); font-family: var(--sans); font-weight: 700; line-height: 1.3; }
.article-content h2 { font-size: 25px; }
.article-content h3 { font-size: 20px; }
.article-content h4 { font-size: 17px; }
.article-content p { margin: 0 0 1.25em; }
.article-content ul, .article-content ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.article-content li { margin: .35em 0; }
.article-content figure { margin: 1.8em 0; padding: 10px; background: var(--soft); }
.article-content figure img, .article-content > p > img { display: block; width: auto; max-width: 100%; height: auto; margin: 0 auto; }
.article-content figcaption { margin-top: 9px; color: var(--muted); font-family: var(--sans); font-size: 11px; line-height: 1.5; text-align: center; }
.article-content pre { overflow-x: auto; margin: 1.6em 0; padding: 16px; background: #142521; color: #edf2ec; font-size: 12px; line-height: 1.6; }
.article-content code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.article-content :not(pre) > code { padding: .12em .3em; background: var(--soft); font-size: .85em; }
.article-content blockquote { margin: 1.6em 0; padding-left: 18px; border-left: 2px solid #82958a; color: var(--muted); }
.back-link { display: inline-block; margin-top: 34px; font-size: 12px; }

@media (max-width: 620px) {
  .shell { width: calc(100% - 34px); }
  .nav-wrap { min-height: 60px; }
  .site-header nav { gap: 14px; font-size: 11px; }
  .intro { padding: 54px 0 38px; }
  .intro-title { margin-top: 16px; font-size: 15px; }
  .intro-copy { font-size: 14px; }
  .article-row { grid-template-columns: 1fr 20px; gap: 5px 12px; padding: 16px 0; }
  .article-row time { grid-column: 1; grid-row: 1; padding: 0; font-size: 10px; }
  .article-row > div { grid-column: 1; grid-row: 2; }
  .article-row h3 { font-size: 19px; }
  .row-arrow { grid-column: 2; grid-row: 2; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 15px; gap: 5px; }
  .archive-list-head, .archive-item { grid-template-columns: minmax(0, 1fr) 92px; gap: 12px; }
  .archive-item-title > a { font-size: 18px; }
  .article-header { margin: 36px 0 27px; }
  .article-meta { flex-wrap: wrap; }
  .article-content { font-size: 16px; line-height: 1.75; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Tables in articles */
.article-content table { display: block; max-width: 100%; margin: 1.6em 0; overflow-x: auto; border-collapse: collapse; font-family: var(--sans); font-size: 14px; line-height: 1.5; }
.article-content th, .article-content td { padding: 8px 14px 8px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.article-content th { border-bottom: 2px solid var(--ink); font-weight: 700; white-space: nowrap; }
.article-content td code, .article-content th code { font-size: .9em; overflow-wrap: anywhere; }
