/* Blog-specific layout only — colors, fonts, spacing scale, and the site
   header/footer/nav rules all come from the enqueued global.css. Nothing
   here redefines a token; everything reads var(--color-*)/var(--font-*)
   from that shared file so the blog can never drift from the main site's
   palette. */

.section {
  background: var(--color-bg);
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--color-marigold);
  color: var(--color-bg-deep);
  font-weight: 800;
  font-size: 1.02rem;
  padding: 1.05rem 1.7rem;
  border-radius: 999px;
  border: 3px solid var(--color-marigold);
  box-shadow: var(--shadow-hard);
  transition: box-shadow var(--dur-fast) var(--ease-out);
}
.btn-primary:hover { box-shadow: 9px 9px 0 rgba(0, 0, 0, 0.6); }

/* ── Blog listing ── */
.blog-hero {
  background: radial-gradient(ellipse 60% 55% at 82% 0%, rgba(216, 174, 85, 0.16), transparent 60%), var(--color-bg-deep);
  color: var(--color-ink);
  padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem);
  text-align: center;
}
.blog-hero .container { max-width: 42rem; }
.blog-hero .eyebrow { display: inline-block; margin-bottom: 1rem; }
.blog-hero h1 { font-size: var(--text-h1); margin-bottom: 1rem; }
.blog-hero-sub { color: var(--color-ink-soft); font-size: var(--text-body-lg); line-height: 1.6; }

.blog-list-section { background: var(--color-bg); }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.blog-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-hard-sm);
  overflow: hidden;
  transition: transform 0.22s var(--ease-bounce), box-shadow 0.22s ease, border-color 0.22s ease;
}
.blog-card:hover {
  transform: translate(-4px, -6px) rotate(-1.4deg);
  box-shadow: 8px 10px 0 rgba(0, 0, 0, 0.6);
  border-color: var(--color-marigold);
}
.blog-card-thumb { aspect-ratio: 16/9; overflow: hidden; }
.blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card-date {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-marigold);
  padding: 1.4rem 1.4rem 0;
}
.blog-card-title {
  font-size: 1.2rem;
  padding: 0.5rem 1.4rem 0;
  color: var(--color-ink);
}
.blog-card-excerpt {
  color: var(--color-ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
  padding: 0.6rem 1.4rem 1.4rem;
}
.blog-empty { color: var(--color-ink-soft); text-align: center; padding: 3rem 0; }
.blog-empty a { color: var(--color-marigold); text-decoration: underline; text-underline-offset: 2px; }

/* ── Archive / search hero (shorter than the blog-index hero) ── */
.blog-hero-sm { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 3rem); }

.blog-search-form {
  display: flex;
  gap: 0.6rem;
  max-width: 26rem;
  margin: 1.5rem auto 0;
}
.blog-search-input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-ink);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.75rem 1.2rem;
}
.blog-search-input:focus { outline: none; border-color: var(--color-marigold); }
.blog-search-submit {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-bg-deep);
  background: var(--color-marigold);
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  cursor: pointer;
}
.blog-search-submit:hover { filter: brightness(1.08); }

.blog-pagination { display: flex; justify-content: center; gap: 1rem; margin-top: 3rem; }
.blog-pagination .page-numbers {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-ink-soft);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}
.blog-pagination .page-numbers.current { color: var(--color-marigold); border-color: var(--color-marigold); }
.blog-pagination .page-numbers:hover { color: var(--color-ink); border-color: var(--color-border-strong); }

/* ── Single post ── */
.single-post-header {
  background: radial-gradient(ellipse 60% 55% at 82% 0%, rgba(216, 174, 85, 0.16), transparent 60%), var(--color-bg-deep);
  color: var(--color-ink);
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3rem);
}
.single-post-header-inner { max-width: 46rem; }
.single-post-header h1 { font-size: var(--text-h1); margin: 0.5rem 0 0.8rem; }
.single-post-meta {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  color: var(--color-ink-soft);
}
.single-post-thumb { max-width: 60rem; margin: -1.5rem auto 0; border-radius: 18px; overflow: hidden; position: relative; z-index: 2; }
.single-post-thumb img { width: 100%; display: block; }

.single-post-body { max-width: 42rem; }
.post-content { color: var(--color-ink-soft); line-height: 1.75; font-size: 1.02rem; }
.post-content h2 { color: var(--color-ink); font-size: var(--text-h3); margin: 2.2rem 0 0.8rem; }
.post-content h3 { color: var(--color-ink); font-size: 1.15rem; margin: 1.8rem 0 0.6rem; }
.post-content p { margin-bottom: 1.2rem; }
.post-content a { color: var(--color-marigold); text-decoration: underline; text-underline-offset: 2px; }
.post-content ul, .post-content ol { margin: 0 0 1.2rem; padding-left: 1.4rem; }
.post-content li { margin-bottom: 0.4rem; }
.post-content img { border-radius: 12px; margin: 1.5rem 0; }
.post-content blockquote {
  border-left: 3px solid var(--color-marigold);
  padding-left: 1.2rem;
  margin: 1.5rem 0;
  color: var(--color-ink);
  font-style: italic;
}
.post-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-surface);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.single-post-cta { background: var(--color-bg-deep); text-align: center; }
.single-post-cta-inner { max-width: 36rem; }
.single-post-cta h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 0.7rem; }
.single-post-cta p { color: var(--color-ink-soft); margin-bottom: 1.8rem; }

.author-bio {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}
.author-bio img { border-radius: 999px; }
.author-bio-name { display: block; font-weight: 800; color: var(--color-ink); margin-bottom: 0.3rem; }
.author-bio-desc { color: var(--color-ink-soft); font-size: 0.92rem; line-height: 1.6; }

.related-posts-section { background: var(--color-surface); }
.related-posts-heading { font-size: var(--text-h3); margin-bottom: 1.5rem; }
.related-posts-section .blog-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* ── 404 ── */
.not-found {
  min-height: 50vh;
  display: flex;
  align-items: center;
  background: radial-gradient(ellipse 60% 55% at 82% 0%, rgba(216, 174, 85, 0.16), transparent 60%), var(--color-bg-deep);
  color: var(--color-ink);
  padding: clamp(4rem, 10vw, 7rem) 0;
}
.not-found .container { max-width: 36rem; }
.not-found h1 { font-size: var(--text-h1); margin: 1rem 0; }
.not-found-sub { color: var(--color-ink-soft); font-size: var(--text-body-lg); margin-bottom: 2rem; }
.not-found-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
.not-found-link { font-weight: 700; color: var(--color-ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.not-found-link:hover { color: var(--color-ink); }

/* Mobile nav toggle needs a working button even without the main site's
   nav.js — CSS-only via html.nav-open, matching global.css's expectations. */
@media (max-width: 760px) {
  .nav-inline { display: none; }
}
