/* Family, Fun & Tech — shared stylesheet for all three builds (Eleventy, Hugo, Python+Jinja2).
   Palette from Kansas City: Royals blue and gold on a cool morning-sky paper. */
@font-face { font-family: "Bricolage Grotesque"; src: url(/assets/fonts/bricolage-grotesque-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url(/assets/fonts/bricolage-grotesque-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(/assets/fonts/source-serif-4-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(/assets/fonts/source-serif-4-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(/assets/fonts/source-serif-4-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --paper: #F3F6F9; --surface: #FFFFFF; --ink: #14212B; --muted: #4A5A66; --rule: #D3DCE4;
  --royal: #0B3D6E; --royal-ink: #FFFFFF; --gold: #B98A1F; --gold-soft: #F4E7C5; --link: #0B4F8F;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --text: "Source Serif 4", "Iowan Old Style", Charter, Georgia, serif;
  --wrap: 72rem; --read: 41rem; --gap: clamp(1rem, 3vw, 2rem);
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #0E1720; --surface: #15212C; --ink: #E6ECF1; --muted: #9FB0BD; --rule: #2A3A47;
          --royal: #1D5A96; --gold: #E0B648; --gold-soft: #3A3220; --link: #8DBDF0; }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.125rem/1.7 var(--text); }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: #000; padding: .5rem 1rem; z-index: 9; }
.skip:focus { left: 1rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gap); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); }
h3 { font-size: 1.25rem; font-weight: 600; }

/* header */
.site-head { border-bottom: 1px solid var(--rule); background: var(--surface); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; padding-top: 1rem; padding-bottom: 1rem; }
.brand { text-decoration: none; color: var(--ink); display: grid; line-height: 1.05; }
.brand b { font: 800 1.45rem/1 var(--display); letter-spacing: -.02em; }
.brand b span { color: var(--gold); }
.brand small { font: 600 .85rem/1.4 var(--display); color: var(--muted); margin-top: .25rem; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0; padding: 0; }
.site-nav a { font: 600 1rem/1 var(--display); color: var(--ink); text-decoration: none; padding: .4rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current] { border-bottom-color: var(--gold); }

/* home: the cast */
.intro { padding: clamp(2.5rem, 7vw, 5rem) 0 2rem; }
.intro h1 { max-width: 18ch; font-size: clamp(2.4rem, 6.5vw, 4.4rem); }
.intro p { max-width: 38rem; font-size: 1.25rem; color: var(--muted); margin: 0; }
.cast { display: flex; flex-wrap: wrap; gap: 1rem 0; padding: 1.5rem 0 3rem; margin: 0; list-style: none; }
.cast li { margin-right: -.9rem; }
.cast a { display: grid; justify-items: center; gap: .5rem; text-decoration: none; color: var(--ink); width: 7.5rem; }
.cast img, .cast .noimg { width: 6.5rem; height: 6.5rem; border-radius: 50%; object-fit: cover; border: 4px solid var(--surface);
  box-shadow: 0 0 0 2px var(--gold); background: var(--gold-soft); }
.cast .noimg { display: grid; place-items: center; font: 800 2rem var(--display); color: var(--royal); }
.cast span { font: 600 1rem var(--display); }
.cast a:hover img { box-shadow: 0 0 0 4px var(--gold); }
@media (max-width: 40rem) { .cast li { margin-right: 0; } .cast a { width: 5.5rem; } .cast img, .cast .noimg { width: 4.75rem; height: 4.75rem; } }

/* layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: clamp(2rem, 5vw, 4rem); padding-bottom: 4rem; }
@media (max-width: 56rem) { .layout { grid-template-columns: 1fr; } }
.side h2 { font-size: 1.05rem; font-weight: 600; margin: 2rem 0 .75rem; }
.side h2:first-child { margin-top: 0; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li { margin: .3rem 0; font-size: 1rem; }
.side a { text-decoration: none; }
.side a:hover { text-decoration: underline; }
.dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .5rem; vertical-align: .05em; }
.count { color: var(--muted); font-size: .9rem; }

/* post lists, grouped by year */
.year { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0 1.5rem; border-top: 2px solid var(--ink); padding-top: 1.25rem; margin-top: 2.5rem; }
.year:first-child { margin-top: 0; }
.year > h2 { font-size: 2.5rem; color: var(--royal); margin: 0; }
@media (max-width: 40rem) { .year { grid-template-columns: 1fr; } .year > h2 { font-size: 2rem; margin-bottom: .5rem; } }
.list { list-style: none; margin: 0; padding: 0; }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) 8.5rem; gap: 1.25rem; padding: 1.25rem 0; border-bottom: 1px solid var(--rule); }
.entry:last-child { border-bottom: 0; }
.entry:not(:has(.thumb)) { grid-template-columns: 1fr; }
.entry h3 { font-size: 1.35rem; margin: .1rem 0 .4rem; }
.entry h3 a { color: var(--ink); text-decoration: none; }
.entry h3 a:hover { color: var(--link); text-decoration: underline; }
.entry p { margin: 0; color: var(--muted); font-size: 1.02rem; }
.meta { display: flex; flex-wrap: wrap; gap: .2rem 1rem; font: 600 .9rem/1.5 var(--display); color: var(--muted); }
.meta a { color: inherit; text-decoration: none; }
.meta a:hover { color: var(--link); }
.thumb { width: 8.5rem; height: 6.4rem; object-fit: cover; border-radius: 6px; }
@media (max-width: 40rem) { .entry { grid-template-columns: 1fr 5.5rem; } .thumb { width: 5.5rem; height: 5.5rem; } }

/* page header for archives */
.archive-head { padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem; }
.archive-head p { max-width: 40rem; color: var(--muted); margin: 0; }
.crumbs { font: 600 .9rem/1.5 var(--display); color: var(--muted); margin: 0 0 1rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: .3rem; color: var(--rule); }
.crumbs a { color: inherit; }

/* single post: the category band carries the color of the post's main category */
.band { background: var(--band, var(--royal)); color: #fff; }
.band .wrap { padding-top: clamp(2.25rem, 6vw, 4rem); padding-bottom: clamp(2rem, 5vw, 3rem); }
.band .crumbs, .band .meta { color: rgba(255,255,255,.82); }
.band .crumbs li + li::before { color: rgba(255,255,255,.45); }
.band .meta a:hover { color: #fff; text-decoration: underline; }
.band h1 { max-width: 22ch; color: #fff; }
.band .cat { display: inline-block; font: 600 .95rem var(--display); color: #fff; background: rgba(255,255,255,.14); padding: .2rem .7rem; border-radius: 99px; text-decoration: none; margin-bottom: 1rem; }
.band .cat:hover { background: rgba(255,255,255,.26); }
.band.plain { --band: var(--surface); color: var(--ink); border-bottom: 1px solid var(--rule); }
.band.plain h1 { color: var(--ink); }
.band.plain .crumbs, .band.plain .meta { color: var(--muted); }

.prose { max-width: var(--read); padding: 2.5rem 0 1rem; }
.prose > * { margin-top: 0; margin-bottom: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose h2 { margin-top: 2em; } .prose h3 { margin-top: 1.6em; }
.prose img { display: block; border-radius: 6px; margin: 1.5em 0; }
.prose img.illustration { background: var(--surface); border: 1px solid var(--rule); }
.prose li + li { margin-top: .35em; }
.prose blockquote { border-left: 4px solid var(--gold); padding: .2em 0 .2em 1.1em; color: var(--muted); font-style: italic; }
.prose blockquote.tweet, .prose blockquote.twitter-tweet { font-style: normal; background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--royal); border-radius: 6px; padding: .8em 1em; font-size: 1rem; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 6px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.prose td, .prose th { border: 1px solid var(--rule); padding: .4em .6em; text-align: left; }
.prose pre { overflow-x: auto; background: var(--surface); padding: 1em; border-radius: 6px; font-size: .9rem; }

.post-foot { max-width: var(--read); border-top: 1px solid var(--rule); padding: 1.5rem 0; display: grid; gap: 1rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.tags a { font: 600 .9rem var(--display); color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 99px; padding: .25rem .75rem; text-decoration: none; }
.tags a:hover { border-color: var(--gold); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; font: 600 .95rem var(--display); }
.share a, .share button { color: var(--link); background: none; border: 0; font: inherit; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }
.author-box { max-width: var(--read); display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 1.25rem; margin: 1rem 0 2rem; }
.author-box .mono { width: 4rem; height: 4rem; border-radius: 50%; background: var(--royal); color: #fff; display: grid; place-items: center; font: 800 1.5rem var(--display); }
.author-box h2 { font-size: 1.15rem; margin: 0 0 .25rem; }
.author-box p { margin: 0; font-size: 1rem; color: var(--muted); }
.pn { max-width: var(--read); display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 0 0 2.5rem; }
.pn a { display: block; text-decoration: none; color: var(--ink); border-top: 2px solid var(--ink); padding-top: .6rem; }
.pn a span { display: block; font: 600 .85rem var(--display); color: var(--muted); }
.pn a b { font: 600 1.05rem/1.35 var(--display); }
.pn .older { text-align: right; grid-column: 2; }
.related h2 { font-size: 1.3rem; }

.pager { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 2rem 0; font: 600 1rem var(--display); }
.pager a, .pager span { padding: .35rem .75rem; border-radius: 6px; text-decoration: none; border: 1px solid var(--rule); background: var(--surface); }
.pager [aria-current] { background: var(--royal); color: #fff; border-color: var(--royal); }

/* static pages: family members get a portrait layout */
.page-body { max-width: var(--read); padding: 2.5rem 0 3rem; }
.family .prose img:first-of-type { width: 14rem; height: 14rem; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--gold); }

/* footer */
.site-foot { background: var(--royal); color: rgba(255,255,255,.9); padding: 3rem 0 2rem; font-size: 1rem; }
.site-foot .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
@media (max-width: 48rem) { .site-foot .wrap { grid-template-columns: 1fr; } }
.site-foot h2 { font-size: 1.05rem; font-weight: 600; color: #fff; margin: 0 0 .75rem; }
.site-foot a { color: #fff; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.site-foot p { margin: 0 0 .75rem; max-width: 34rem; }
.site-foot .fine { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.2); padding-top: 1rem; font-size: .9rem; color: rgba(255,255,255,.7); }

.sitemap-year { margin: 2rem 0; }
.sitemap-year ul { columns: 2 22rem; column-gap: 2rem; padding-left: 1.1rem; }
.sitemap-year li { break-inside: avoid; margin: .25rem 0; }
.notfound { padding: 4rem 0; max-width: var(--read); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print { .site-head, .site-foot, .share, .side, .pn, .related { display: none; } .band { background: none; color: #000; } .band h1 { color: #000; } }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* new posts (Markdown, Twigor format) */
.short-answer { background: var(--gold-soft); border-left: 4px solid var(--gold); border-radius: 0 6px 6px 0; padding: .9rem 1.2rem; margin: 2rem 0 0; }
.short-answer p { margin: 0; }
.prose figure.cover { margin: 0 0 1.5em; }
.prose figure.cover img { width: 100%; height: auto; margin: 0; background: var(--surface); border: 1px solid var(--rule); }
.prose figcaption { font: 600 .85rem/1.5 var(--display); color: var(--muted); margin-top: .5rem; }
.faq, .sources { margin-top: 2.5rem; }
.faq h3 { font-size: 1.15rem; }
.sources ol { font-size: 1rem; }
