/* The blog (built by tools/build.mjs from blog/posts.json and blog/posts/<slug>.html). Uses the site's theme
   variables from /theme.css so it matches every other page. */
.blog { max-width: var(--content-width); margin: 0 auto; padding: var(--space-8) var(--gutter) var(--section-space); }
.blog-head { max-width: var(--narrow-width); margin-bottom: var(--space-7); }
.blog-head h1 { font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: clamp(2rem, 1.4rem + 2.4vw, var(--h1)); line-height: var(--heading-line-height); color: var(--color-primary); margin: 0 0 var(--space-2); }
.blog-head p { color: var(--color-muted); font-size: 1.125rem; margin: 0; }
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-6) var(--space-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.post-card { display: flex; flex-direction: column; background: var(--color-background); }
.post-card:not(:has(img)) { border-top: 1px solid #dfe6ee; }
.post-card:hover h2 a { color: var(--color-link); text-decoration: underline; text-underline-offset: .2em; }
.post-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--color-surface); border-radius: calc(var(--radius) * .75); }
.post-card .body { padding: var(--space-2) 0 0; display: flex; flex-direction: column; gap: var(--space-1); flex: 1; }
.post-card h2 { font-family: var(--font-heading); font-size: 1.1875rem; line-height: 1.3; margin: 0; }
.post-card h2 a { color: var(--color-primary); text-decoration: none; }
.post-card h2 a::after { content: ""; position: absolute; inset: 0; }
.post-card { position: relative; }
.post-card h2 a:focus-visible { outline: none; }
.post-card:focus-within { outline: 3px solid var(--color-accent); outline-offset: 6px; border-radius: 4px; }
.post-card p { margin: 0; color: var(--color-muted); font-size: .9375rem; }
.meta { color: var(--color-muted); font-size: .875rem; margin: 0; }
.post { max-width: var(--narrow-width); margin: 0 auto; padding: var(--space-8) var(--gutter) var(--section-space); }
.post .back { display: inline-block; margin-bottom: var(--space-4); color: var(--color-link); font-weight: 600; }
.post h1 { font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: clamp(1.875rem, 1.3rem + 2vw, 2.75rem); line-height: 1.15; color: var(--color-primary); margin: 0 0 var(--space-2); }
.post .hero { width: 100%; height: auto; border-radius: var(--radius); margin: var(--space-4) 0 var(--space-5); }
.post .content { font-size: 1.0625rem; line-height: 1.75; color: var(--color-text); overflow-wrap: break-word; }
.post .content :is(h2, h3, h4) { font-family: var(--font-heading); color: var(--color-primary); line-height: 1.25; margin: 1.8em 0 .5em; }
.post .content h2 { font-size: 1.5rem; } .post .content h3 { font-size: 1.25rem; } .post .content h4 { font-size: 1.0625rem; }
.post .content img { max-width: 100%; height: auto; border-radius: calc(var(--radius) / 2); }
.post .content figure { margin: var(--space-4) 0; } .post .content figcaption { color: var(--color-muted); font-size: .875rem; }
.post .content a { color: var(--color-link); }
.post .content blockquote { border-left: 4px solid var(--color-secondary); margin: var(--space-4) 0; padding: .25rem 0 .25rem var(--space-3); color: var(--color-muted); }
.post .content iframe, .post .content video { max-width: 100%; }
.post .cta { margin-top: var(--space-7); padding: var(--space-4) 0 0; border-top: 1px solid #dfe6ee; }
.post .cta p { margin: 0 0 var(--space-2); }
