/* Blog pages share styles.css (tokens, header, footer, buttons) and add a
   reading column: the landing page's heavy Archivo titles over a calm body
   set wide enough for code and captures. Dark only, like the rest of the site. */
.blog-main { max-width: 760px; padding-block: clamp(40px, 6vw, 72px) 72px; }

.blog-kicker { font-size: 0.9375rem; margin-bottom: 16px; }
.blog-kicker a { color: var(--muted); text-decoration: none; }
.blog-kicker a:hover { color: var(--text); }
.blog-lede { max-width: 62ch; font-size: var(--t-lede); line-height: 1.55; color: var(--text-2); margin-top: 20px; }
.blog-meta { margin-top: 20px; color: var(--muted); font-size: var(--t-small); }

.blog-index-head, .blog-post-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.blog-index-head h1 { font-size: var(--t-h2); line-height: 1; letter-spacing: -0.045em; }
.blog-post-head h1 { font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem); line-height: 1.05; letter-spacing: -0.045em; text-wrap: balance; }

.blog-list { list-style: none; padding: 0; display: grid; }
.blog-card { border-top: 1px solid var(--edge); }
.blog-card:last-child { border-bottom: 1px solid var(--edge); }
.blog-card a {
  display: grid; grid-template-columns: 15rem minmax(0, 1fr); column-gap: clamp(16px, 3vw, 28px); row-gap: 8px;
  /* The thumbnail spans the text rows; the last row takes any height it adds,
     so a short entry keeps its date, title and summary packed at the top. */
  grid-template-areas: "image time" "image title" "image text"; grid-template-rows: auto auto 1fr;
  padding: 24px 0; color: inherit; text-decoration: none;
}
/* Thumbnails are the 1200×630 social cards; cover keeps the fallback poster,
   which is taller, on the same band. An img cannot paint an inset shadow over
   itself, so the hairline edge is an inset outline instead. */
.blog-card-image { grid-area: image; display: block; width: 100%; height: auto; aspect-ratio: 40 / 21; object-fit: cover; border-radius: 10px; background: #0b0d12; outline: 1px solid rgba(255, 255, 255, 0.07); outline-offset: -1px; transition: outline-color 160ms ease; }
.blog-card a:hover .blog-card-image { outline-color: rgba(255, 255, 255, 0.2); }
@media (prefers-reduced-motion: reduce) { .blog-card-image { transition: none; } }
.blog-card time { grid-area: time; font-size: var(--t-small); color: var(--muted); }
.blog-card h2 { grid-area: title; font-size: var(--t-h3); line-height: 1.2; letter-spacing: -0.03em; }
.blog-card p { grid-area: text; color: var(--text-2); line-height: 1.6; max-width: 62ch; }
.blog-card a:hover h2 { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.blog-empty { color: var(--muted); }

/* ---------- post body ---------- */
.blog-prose { min-width: 0; overflow-wrap: break-word; font-size: var(--t-body); }
.blog-prose > * + * { margin-top: 1.25em; }
.blog-prose p, .blog-prose li { color: var(--text-2); line-height: 1.75; }
.blog-prose h2 { font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem); line-height: 1.2; letter-spacing: -0.035em; margin-top: 2.25em; }
.blog-prose h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.02em; margin-top: 1.75em; }
.blog-prose h2 + *, .blog-prose h3 + * { margin-top: 0.75em; }
.blog-prose strong { color: var(--text); }
.blog-prose a { color: var(--text); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.blog-prose a:hover { color: var(--accent); }
.blog-prose ul, .blog-prose ol { padding-left: 1.4em; }
.blog-prose li + li { margin-top: 0.5em; }
.blog-prose blockquote { padding-left: 1.1em; border-left: 3px solid var(--accent); }
.blog-prose blockquote p { color: var(--text); }
.blog-prose hr { border: 0; border-top: 1px solid var(--edge); margin-block: 2.5em; }
.blog-prose img { display: block; width: 100%; height: auto; border-radius: var(--r-shot); background: #0b0d12; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
.blog-prose code { font-family: var(--mono); font-size: 0.875em; padding: 0.15em 0.4em; border-radius: 6px; background: var(--surface); border: 1px solid var(--edge-soft); color: var(--text); }
.blog-prose pre { overflow-x: auto; padding: 18px 20px; border-radius: var(--r-control); background: var(--surface); border: 1px solid var(--edge-soft); line-height: 1.6; }
.blog-prose pre code { padding: 0; border: 0; background: none; font-size: 0.875rem; }
.blog-prose table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; display: block; overflow-x: auto; }
.blog-prose th, .blog-prose td { padding: 10px 12px; border-bottom: 1px solid var(--edge); text-align: left; vertical-align: top; }
.blog-prose th { color: var(--text); font-weight: 600; }
.blog-prose td { color: var(--text-2); }

/* ---------- closing call to action ---------- */
.blog-cta { display: grid; gap: 12px; justify-items: start; margin-top: clamp(3rem, 6vw, 4.5rem); padding: clamp(24px, 4vw, 36px); border-radius: var(--r-card); background: var(--panel); border: 1px solid var(--panel-edge); }
.blog-cta-title { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; color: var(--text); }
.blog-cta p:not(.blog-cta-title) { color: var(--on-panel-2); line-height: 1.6; max-width: 52ch; }
.blog-cta .button { margin-top: 8px; }
/* A phone keeps the thumbnail beside the date and title only; the summary
   takes the full width below rather than a column a few words wide. */
@media (max-width: 520px) {
  .blog-card a { padding: 20px 0; grid-template-columns: 6.5rem minmax(0, 1fr); column-gap: 14px; grid-template-areas: "image time" "image title" "text text"; grid-template-rows: auto 1fr auto; }
  .blog-card-image { border-radius: 8px; }
}
