/* Blog: listing, category + author archives, and single posts */

/* ---------- Shared: soft two-tone grey header (text-only, so no hard split behind the copy) ---------- */
.blog-hero,
.archive-head,
.post-header { background: linear-gradient(90deg, var(--bg-hero) 0%, var(--bg-hero) 40%, var(--bg-hero-2) 70%, var(--bg-hero-2) 100%); }
@media (max-width: 900px) {
  .blog-hero, .archive-head, .post-header { background: var(--bg-hero); }
}

/* Author initials */
.avatar {
  display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: var(--green-100); color: var(--green); font-size: .875rem; font-weight: 700; line-height: 1; text-transform: uppercase;
}
.avatar--sm { width: 26px; height: 26px; font-size: .75rem; }
.avatar--md { width: 52px; height: 52px; font-size: 1.125rem; }
.avatar--lg { width: clamp(72px, 8vw, 104px); height: clamp(72px, 8vw, 104px); font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); background: var(--green); color: #fff; box-shadow: 0 12px 28px rgba(58, 117, 95, .25); }

/* ---------- Blog index hero ---------- */
.blog-hero__inner { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-block: clamp(28px, 4vw, 60px) clamp(56px, 8vw, 120px); }
.blog-hero__copy { max-width: 860px; }
.blog-hero h1 { text-wrap: balance; }
.blog-hero__sub { margin: 20px 0 0; max-width: 800px; font-size: clamp(1.125rem, 1rem + .55vw, 1.5rem); font-weight: 600; line-height: 1.3; color: var(--ink); text-wrap: pretty; }

/* ---------- Listing ---------- */
.blog-listing { padding-top: clamp(40px, 4vw, 56px); }
.blog-filter { justify-content: center; margin-bottom: clamp(28px, 3vw, 40px); }
.blog-filter button { min-height: 44px; }
.blog-empty { margin: 0; padding: 48px 16px; text-align: center; color: var(--muted); }

/* Category links on archive pages (same look as the blog filter) */
.cat-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(28px, 3vw, 40px); }
.cat-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 20px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 500;
  transition: background-color .2s, color .2s, border-color .2s;
}
.cat-nav a:hover { border-color: var(--green); color: var(--green); }
.cat-nav a[aria-current="page"] { background: var(--green); border-color: var(--green); color: #fff; }

/* Post cards (identical on blog, category and author pages) */
.post-card__meta { align-items: center; margin-bottom: 12px; }
.post-card__meta a.cat { position: relative; z-index: 1; }
.post-card__meta a.cat:hover { color: var(--green-700); text-decoration: underline; text-underline-offset: 3px; }
.post-card h3 { text-wrap: balance; }
.post-card h3 a:hover { color: var(--green); }
.post-card h3 a:focus-visible { outline: none; }
.post-card:has(h3 a:focus-visible) { outline: 3px solid rgba(58, 117, 95, .45); outline-offset: 3px; }
.post-card__excerpt {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
  margin-bottom: 20px; line-height: 1.55;
}
.post-card__byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; padding-top: 16px;
  border-top: 1px solid var(--line); font-size: .8125rem; color: var(--muted);
}
.post-card__byline a { position: relative; z-index: 1; color: var(--ink); font-weight: 600; }
.post-card__byline a:hover { color: var(--green); }
.post-card__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); }

/* ---------- Archive header (category / author) ---------- */
.archive-head { padding-block: clamp(48px, 6vw, 96px); }
.archive-head .eyebrow { margin: 0 0 10px; font-size: .8125rem; }
.archive-head .archive-head__count { margin: 10px 0 0; font-size: 1rem; color: var(--muted); }
.archive-head__inner { display: flex; align-items: center; gap: clamp(18px, 3vw, 32px); margin-top: 8px; }
.archive-head__inner h1 { overflow-wrap: anywhere; }

/* Empty author archive */
.empty-state {
  max-width: 640px; margin-inline: auto; padding: clamp(36px, 5vw, 64px) clamp(24px, 5vw, 56px);
  text-align: center; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-xl);
}
.empty-state__icon { display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 20px; border-radius: 50%; background: var(--green-100); color: var(--green); }
.empty-state__icon .icon { width: 28px; height: 28px; stroke-width: 1.8; }
.empty-state h2 { font-size: var(--fs-h3); }
.empty-state p { margin: 0 auto 28px; max-width: 460px; }

/* ---------- Single post ---------- */
.post { --hero-overlap: clamp(56px, 9vw, 150px); }
.post-header { padding-top: clamp(36px, 5vw, 72px); padding-bottom: calc(var(--hero-overlap) + clamp(32px, 4vw, 56px)); }
.post-header .breadcrumbs { margin-bottom: 24px; }
.post-header .breadcrumbs span { color: var(--ink); }
.post-header__cat { margin-bottom: 16px; }
.post-header__cat:hover { background: var(--green-100); color: var(--green-700); }
.post-header h1 { margin-bottom: 24px; text-wrap: balance; }
.article-meta { gap: 10px 24px; color: var(--text); }
.article-meta__author { display: inline-flex; align-items: center; gap: 10px; }
.article-meta__author a { font-weight: 600; }
.article-meta__item { display: inline-flex; align-items: center; gap: 8px; }
.article-meta__item .icon { width: 18px; height: 18px; color: var(--green); }

.article-hero { margin: calc(var(--hero-overlap) * -1) 0 0; }
.article-hero img { width: 100%; height: auto; max-height: none; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); background: var(--bg-card); }
@media (max-width: 768px) {
  .article-hero img { aspect-ratio: 16 / 10; border-radius: var(--radius); }
}

.post-main { padding-top: clamp(40px, 5vw, 72px); }
.post-body > p:first-child { font-size: clamp(1.125rem, 1.05rem + .3vw, 1.3125rem); line-height: 1.6; color: var(--ink); }
.post-takeaway {
  margin-top: 2em !important; padding: 22px 26px; border-left: 4px solid var(--green); border-radius: 0 12px 12px 0;
  background: var(--green-50); color: var(--ink); line-height: 1.6;
}
.post-takeaway strong { font-weight: 600; color: var(--ink); }
.alpha-list { list-style: lower-alpha; }
.alpha-list li::marker { content: counter(list-item, lower-alpha) ")  "; font-weight: 600; }

.post-footer { margin-top: clamp(40px, 5vw, 64px); padding-top: 32px; border-top: 1px solid var(--line); }
.author-box { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.author-box p { margin: 0; }
.author-box__label { font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.author-box__name { font-size: 1.125rem; font-weight: 600; color: var(--ink); }
.author-box__more { margin-left: auto; }
.post-nav { margin-top: 32px; }
.post-nav a { display: flex; flex-direction: column; justify-content: center; min-height: 92px; transition: border-color .2s, color .2s, box-shadow .2s; }
.post-nav a:hover { box-shadow: var(--shadow-sm); }
.post-nav a span { display: inline-flex; align-items: center; gap: 6px; }
.post-nav a span .icon { width: 16px; height: 16px; }
.post-nav__next span { justify-content: flex-end; }
@media (max-width: 640px) {
  .author-box__more { margin-left: 0; width: 100%; }
  .post-nav__next span { justify-content: flex-start; }
}

/* Closing call to action */
.post-cta .cta-band h2 { text-wrap: balance; }
.post-cta .cta-band p { margin: 0; font-size: var(--fs-lead); }
@media (max-width: 480px) {
  .post-cta .btn-row, .post-cta .btn { width: 100%; }
}
