/* Blog: listing and article pages. Page-only chrome on top of the framework. */

/* ---------- Article ---------- */
.blog-article { max-width: calc(1040px + 2 * var(--gutter)); margin: 0 auto; padding: 72px var(--gutter) 96px; overflow-wrap: anywhere; }

.blog-head { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
/* framework .crumbs in their usual top-left spot (same offset as .hero-inner) */
.blog-crumbs { padding-top: 38px; }
.blog-crumbs .crumbs { margin-bottom: 0; }
.blog-crumbs + .blog-article, .blog-crumbs + .blog-index-head { padding-top: 40px; }
.blog-byline { font-size: 1rem; color: var(--text-muted); }
.blog-byline strong { font-weight: 600; color: var(--ink); }
.blog-title {
  font-size: clamp(2.3rem, 6vw, 4rem); font-weight: 650; line-height: 1.04;
  letter-spacing: -0.035em; max-width: 18ch;
}
.blog-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.blog-lead { font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.55; color: var(--text-muted); max-width: 44ch; }
.blog-meta { font: 500 0.9rem 'Space Grotesk', sans-serif; color: var(--text-muted); font-feature-settings: "tnum"; }

/* cover: wider than the text, like a print feature */
.blog-cover { margin: 56px 0 0; aspect-ratio: 16 / 9; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--border); background: var(--cream); }
.blog-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* body copy: a calm, centered reading column */
.blog-prose { margin: 64px auto 0; font-size: 1.125rem; line-height: 1.8; max-width: 68ch; }
.blog-prose > * + * { margin-top: 1.4em; }
.blog-prose > :first-child { margin-top: 0; }
.blog-prose h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin-top: 2.2em; }
.blog-prose h3 { font-size: 1.3rem; margin-top: 1.8em; }
.blog-prose h2 + *, .blog-prose h3 + * { margin-top: 0.7em; }
.blog-prose a { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.blog-prose strong { font-weight: 600; }
.blog-prose ul, .blog-prose ol { padding-left: 1.4em; display: grid; gap: 0.5em; }
.blog-prose li::marker { color: var(--orange); font-weight: 600; }
.blog-prose img { display: block; max-width: 100%; height: auto; margin-inline: auto; border-radius: var(--r-media); border: 1px solid var(--border); }
.blog-prose p:has(> img:only-child) { margin-block: 2em; }

/* embedded videos: framework .video-frame, given room like an image */
.blog-prose .blog-video { margin: 2.2em 0; }
.blog-prose .blog-video .video-frame { border-radius: var(--r-media); }
.blog-prose .blog-video figcaption { margin-top: 10px; font-size: 0.92rem; color: var(--text-muted); text-align: center; }

/* pull quote */
.blog-prose blockquote {
  margin: 2.2em 0; padding: 4px 0 4px 28px; border-left: 3px solid var(--orange);
  font: 500 clamp(1.25rem, 2.6vw, 1.55rem)/1.45 'Space Grotesk', sans-serif; letter-spacing: -0.015em; color: var(--ink);
}
.blog-prose blockquote p + p { margin-top: 0.8em; }

/* code: matches Learn */
.blog-prose code { font-family: var(--font-mono); font-size: 0.88em; padding: 0.15em 0.4em; border-radius: 4px; background: var(--cream); }
.blog-prose pre {
  margin-block: 2em; padding: 24px; overflow-x: auto; border-radius: var(--r-media);
  background: var(--ink); color: var(--ink-inverse); font-size: 0.9rem; line-height: 1.7; tab-size: 4;
}
.blog-prose pre code { padding: 0; background: transparent; color: inherit; font-size: inherit; white-space: pre; overflow-wrap: normal; }

/* tables */
.blog-prose table {
  display: block; width: fit-content; max-width: 100%; overflow-x: auto; margin-block: 2em;
  border: 1px solid var(--border); border-radius: var(--r-media); border-collapse: separate; border-spacing: 0;
  font-size: 1rem; line-height: 1.5;
}
.blog-prose th, .blog-prose td { padding: 12px 18px; text-align: left; border-bottom: 1px solid var(--border); }
.blog-prose th { background: var(--cream); font: 600 0.95rem 'Space Grotesk', sans-serif; }
.blog-prose tr:last-child td { border-bottom: 0; }

/* section break */
.blog-prose hr { border: 0; margin: 3em 0; text-align: center; }
.blog-prose hr::after { content: "\2022\2002\2022\2002\2022"; color: var(--orange); letter-spacing: 0.3em; }

/* author sign-off */
.blog-foot { max-width: 68ch; margin: 72px auto 0; padding-top: 32px; border-top: 1px solid var(--border); display: grid; gap: 18px; }
.blog-author { display: flex; align-items: center; gap: 14px; }
.blog-author strong { display: block; font: 600 1.1rem 'Space Grotesk', sans-serif; }
.blog-author-label { font-size: 0.85rem; color: var(--text-muted); }
.blog-avatar {
  flex: 0 0 52px; width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue-tint); color: var(--blue-deep); font: 600 1.05rem 'Space Grotesk', sans-serif;
}
.blog-foot:has(.blog-share) { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.blog-share { margin-top: 0; padding-top: 0; border-top: 0; }

/* ---------- Keep reading band ---------- */
.blog-more { background: var(--cream); padding-top: 80px; padding-bottom: 96px; }
.blog-more-title { font-size: clamp(1.6rem, 3vw, 2.1rem); text-align: center; margin-bottom: 32px; }
.blog-more-all { display: table; margin: 36px auto 0; }

.blog-card { display: flex; flex-direction: column; gap: 10px; }
.blog-card h3 { font-size: 1.25rem; }
.blog-card p { color: var(--text-muted); }
.blog-card-date { font: 500 0.85rem 'Space Grotesk', sans-serif; color: var(--text-muted); font-feature-settings: "tnum"; }
.blog-card-go { margin-top: auto; padding-top: 6px; font-weight: 600; color: var(--orange-deep); }
.blog-card .blog-tags { justify-content: flex-start; }

/* ---------- Listing ---------- */
.blog-index-head { max-width: 760px; margin: 0 auto; padding: 72px var(--gutter) 0; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.blog-index-head h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); font-weight: 650; letter-spacing: -0.035em; line-height: 1; }
.blog-index-head .blog-lead { max-width: 40ch; }
.blog-index-head .blog-tags { margin-top: 8px; }
.blog-list { padding-top: 56px; padding-bottom: 96px; overflow-wrap: anywhere; }
.blog-empty { text-align: center; color: var(--text-muted); }

@media (max-width: 640px) {
  .blog-article { padding-top: 48px; padding-bottom: 72px; }
  .blog-prose { margin-top: 40px; font-size: 1.0625rem; }
  .blog-cover { margin-top: 40px; border-radius: var(--r-media); }
  .blog-index-head { padding-top: 48px; }
  .blog-crumbs { padding-top: 24px; }
  .blog-foot:has(.blog-share) { grid-template-columns: minmax(0, 1fr); }
  .blog-crumbs + .blog-article, .blog-crumbs + .blog-index-head { padding-top: 28px; }
  .blog-more { padding-top: 56px; padding-bottom: 64px; }
}
.blog-card-title { font-size: 1.35rem; }
.blog-card-title a { color: var(--ink); }
.blog-card-title a:hover { color: var(--orange-deep); }
.blog-list .card-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.blog-card .blog-tags { margin-top: auto; padding-top: 6px; }
.blog-card-media { display: block; margin: -8px -8px 4px; }
.blog-card .thumb { width: 100%; }

/* categories */
.blog-card-categories { font: 500 0.8rem 'Space Grotesk', sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange-deep); }
.blog-card-categories a { color: var(--orange-deep); }
.blog-card-categories a:hover { text-decoration: underline; text-underline-offset: 3px; }
.blog-card-categories { margin-bottom: -4px; }
.blog-tag-filter { align-items: center; }
.blog-tag-label { font: 500 0.78rem 'Space Grotesk', sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-right: 4px; }

/* private preview of an unpublished post */
.blog-preview { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 52ch; padding: 16px 20px; border-radius: var(--r-media); background: var(--warn-tint); color: var(--warn-deep); font-size: 0.92rem; line-height: 1.5; }
.blog-preview .chip { background: var(--surface); font-weight: 600; }
