/* The blog (/blog): the app's paper, ink and type, for long reading. Pages are built by tools/build-blog.mjs. */
@font-face {
  font-family: 'Literata Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(/fonts/literata-latin-opsz-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Literata Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(/fonts/literata-latin-ext-opsz-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Literata Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 200 900;
  src: url(/fonts/literata-latin-opsz-italic.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #ebe8e1;
  --ink: #1c1b18;
  --ink-2: #57534b;
  --ink-3: #6f6a61;
  --line: rgba(28, 27, 24, 0.1);
  --line-strong: rgba(28, 27, 24, 0.2);
  --accent: #1f5f72;
  --accent-ink: #ffffff;
  --accent-soft: rgba(31, 95, 114, 0.11);
  --font-serif: 'Literata Variable', Literata, Georgia, 'Times New Roman', serif;
  --font-ui: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --gutter: 20px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #111112;
    --surface: #202022;
    --surface-2: #2b2b2e;
    --ink: #e8e4dc;
    --ink-2: #b0aba2;
    --ink-3: #8f8a82;
    --line: rgba(232, 228, 220, 0.1);
    --line-strong: rgba(232, 228, 220, 0.2);
    --accent: #7cc4d4;
    --accent-ink: #0d262c;
    --accent-soft: rgba(124, 196, 212, 0.14);
  }
}
@media (min-width: 640px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- header and footer ---------- */
.site-head { border-bottom: 1px solid var(--line); }
.site-head-in {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 1120px;
  min-height: 64px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 640 24px/1 var(--font-serif);
  letter-spacing: -0.022em;
  color: var(--ink);
  text-decoration: none;
}
.head-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-size: 15px;
  color: var(--ink-2);
  text-decoration: none;
}
.head-link:hover, .head-link[aria-current] { color: var(--ink); }
.head-link[aria-current] { font-weight: 600; }
.site-head .btn { margin-left: auto; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font: 600 15px/1 var(--font-ui);
  letter-spacing: 0.005em;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 160ms var(--ease-out), opacity 160ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { opacity: 0.92; }
.site-foot { margin-top: 72px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-3); }
.site-foot-in { max-width: 1120px; margin: 0 auto; padding: 20px var(--gutter) 40px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 0 18px; margin-bottom: 4px; }
.site-foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }
.site-foot p { margin: 0; }

/* ---------- lists: the blog, a category, the author ---------- */
.list { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.list-head { padding: 44px 0 20px; }
.list-head h1 {
  margin: 0 0 10px;
  font: 600 36px/1.12 var(--font-serif);
  letter-spacing: -0.018em;
  text-wrap: balance;
}
.list-head p { margin: 0; max-width: 60ch; font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.author-head { display: flex; align-items: center; gap: 16px; }
.author-head img { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; padding: 0; list-style: none; }
.chips a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
}
.chips a:hover { background: var(--accent-soft); border-color: transparent; }
.chips a[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chips span { font-size: 13px; opacity: 0.72; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 40px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.card a { display: block; color: inherit; text-decoration: none; }
.card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  background: var(--surface-2);
}
.card-cat {
  margin: 14px 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.card h2, .card h3 {
  margin: 0 0 8px;
  font: 600 20px/1.3 var(--font-serif);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.card a:hover h2, .card a:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.card-sum {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}
.card-date { margin: 0; font-size: 13px; color: var(--ink-3); }

/* ---------- one post ---------- */
.post { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding-top: 20px; font-size: 14px; color: var(--ink-3); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.post h1 {
  margin: 8px 0 16px;
  font: 600 clamp(30px, 4.6vw, 44px)/1.14 var(--font-serif);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 28px; font-size: 14px; color: var(--ink-2); }
.byline a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; font-weight: 600; }
.byline a:hover { text-decoration: underline; }
.byline img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.cover { margin: 0 0 28px; }
.cover img { display: block; width: 100%; border-radius: 16px; background: var(--surface-2); }
.cover figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-3); text-align: center; }
.cover figcaption a { color: inherit; }
.toc { margin: 0 0 32px; border: 1px solid var(--line-strong); border-radius: 14px; }
.toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: '+'; font-size: 20px; font-weight: 400; color: var(--ink-2); }
.toc[open] summary::after { content: '\2212'; }
.toc ol { margin: 0; padding: 0 18px 14px 40px; font-size: 15px; line-height: 1.4; }
.toc li { margin: 0; }
.toc a { display: block; padding: 7px 0; color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }

.prose { font: 400 18px/1.7 var(--font-serif); overflow-wrap: break-word; }
@media (max-width: 639px) { .prose { font-size: 17px; } }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.1em; }
.prose h2 { margin: 1.9em 0 0.6em; font-size: 1.45em; line-height: 1.25; font-weight: 600; letter-spacing: -0.012em; scroll-margin-top: 16px; }
.prose h3 { margin: 1.6em 0 0.5em; font-size: 1.18em; line-height: 1.3; font-weight: 600; scroll-margin-top: 16px; }
.prose h4 { margin: 1.4em 0 0.4em; font-size: 1em; font-weight: 600; }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.prose li { margin: 0.35em 0; }
.prose li > p { margin: 0; }
.prose a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
/* a link alone on its line is a thumb-sized target */
.prose .link-line a { display: inline-flex; align-items: center; min-height: 44px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose blockquote {
  margin: 1.4em 0;
  padding: 2px 0 2px 20px;
  border-left: 3px solid var(--accent);
  color: var(--ink-2);
  font-style: italic;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose figure { margin: 1.8em 0; }
.prose figure img { display: block; width: 100%; border-radius: 12px; background: var(--surface-2); }
.prose figcaption { margin-top: 8px; font: 13px/1.4 var(--font-ui); color: var(--ink-3); text-align: center; }
.prose figcaption a { color: inherit; }
.prose hr { margin: 2.2em 0; border: 0; border-top: 1px solid var(--line-strong); }
.table-wrap { margin: 1.6em 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line-strong); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; font: 15px/1.45 var(--font-ui); }
.prose th, .prose td { min-width: 120px; padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }
.prose td > p, .prose th > p { margin: 0; }
.prose .link-cell { padding-top: 0; padding-bottom: 0; }
.prose .link-cell a { display: flex; align-items: center; min-height: 44px; }

.cta {
  margin: 48px 0 0;
  padding: 28px;
  border-radius: 20px;
  background: var(--accent);
  color: var(--accent-ink);
}
.cta h2 { margin: 0 0 8px; font: 600 24px/1.25 var(--font-serif); letter-spacing: -0.01em; }
.cta p { margin: 0 0 20px; font-size: 16px; line-height: 1.5; opacity: 0.92; max-width: 52ch; }
.cta .btn { background: var(--bg); color: var(--ink); }
.cta .btn:hover { opacity: 0.92; }
.more { max-width: 1120px; margin: 64px auto 0; padding: 0 var(--gutter); }
.more > h2 { margin: 0 0 20px; font: 600 24px/1.25 var(--font-serif); }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
