/* Shared palette, typography and spacing for every page. */
:root {
  --paper: #faf9f6;
  --ink: #232b30;
  --muted: #626a6d;
  --accent: #176b64;
  --line: #dcded7;
  --panel: #edf0ec;
  --reading-width: 46rem;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 18px/1.8 var(--serif); }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: #104b46; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
header, main, footer { width: min(calc(100% - 3rem), var(--reading-width)); margin-inline: auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 2rem 1.25rem; border-bottom: 1px solid var(--line); font: 14px/1.5 var(--sans); }
.site-header a { color: var(--ink); text-decoration: none; }
.site-header a:hover, .site-header a[aria-current] { color: var(--accent); text-decoration: underline; }
.brand { font-weight: 600; }
.site-header nav { display: flex; gap: 1.5rem; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; overflow-wrap: break-word; text-wrap: pretty; }
h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.2; letter-spacing: -.035em; margin: 0 0 1.25rem; }
h2 { font-size: 1.75rem; line-height: 1.35; letter-spacing: -.02em; margin: 3rem 0 1rem; }
h3 { font-size: 1.3rem; line-height: 1.4; margin: 2rem 0 1rem; }
p { margin: 1.25rem 0; }
li { margin-block: .5rem; }
.article-heading { padding-top: 3rem; margin-bottom: 2.5rem; }
.byline, figcaption, .source, .back-link { font: 14px/1.7 var(--sans); color: var(--muted); }
.byline { margin: 0; }
article a { overflow-wrap: anywhere; }
img { display: block; max-width: 100%; height: auto; margin: 2rem auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
figure { margin: 2rem 0; }
figure img { margin: 0 auto; }
figcaption { margin-top: .75rem; text-align: center; font-size: 13px; }
pre { overflow-x: auto; max-width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1.25rem; font: 14px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
blockquote { margin: 1.75rem 0; padding: .25rem 1.5rem; border-left: 3px solid var(--accent); color: #4e5b5c; }
.contents { padding-block: 1.25rem; border-block: 1px solid var(--line); margin-block: 2rem; font: 14px/1.7 var(--sans); }
.contents summary { cursor: pointer; font-weight: 600; }
.contents .links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding-top: .75rem; }
.source { border-top: 1px solid var(--line); padding-top: 1.5rem; margin-top: 3rem; }
.back-link { margin-top: 2.5rem; }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); margin-top: 4rem; padding-block: 1.5rem 2.5rem; color: var(--muted); font: 13px/1.7 var(--sans); }
.blog-index, .error-page { min-height: 60vh; padding-top: 3rem; }
.article-list { list-style: none; padding: 0; margin: 2.5rem 0 0; }
.article-list li { border-top: 1px solid var(--line); padding-block: 1.5rem; margin: 0; }
.article-list time { font: 14px/1.7 var(--sans); color: var(--muted); }
.article-list h2 { font-size: 1.6rem; margin: .5rem 0 0; }
.article-list h2 a { color: var(--ink); text-decoration: none; }
.article-list h2 a:hover { color: var(--accent); text-decoration: underline; }
.minimal-home { min-height: 100svh; display: grid; align-items: center; }
.minimal-home main { padding-block: 4rem; }
.minimal-home h1 { margin-bottom: 1.75rem; }
.minimal-home nav { display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; font: 16px/1.6 var(--sans); }
.profile-photo { display: block; width: 160px; margin-bottom: 2rem; border-radius: 50%; }
.profile-photo img { width: 160px; height: 160px; object-fit: cover; border-radius: 50%; margin: 0; border: 0; }
.skip { position: absolute; top: -100px; }
.skip:focus { top: 8px; left: 1rem; z-index: 1; background: var(--paper); padding: .5rem 1rem; }
@media (max-width: 520px) {
  body { font-size: 17px; }
  header, main, footer { width: calc(100% - 2.5rem); }
  .site-header { padding-top: 1.5rem; gap: 1rem; }
  .site-header nav { gap: 1rem; }
  h2 { font-size: 1.5rem; }
  .article-heading, .blog-index, .error-page { padding-top: 2rem; }
  pre { padding: 1rem; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
