/**
 * ============================================================
 *  CSS / PAGES / BLOG
 *  Styles for blog/index.html (the filterable grid) and every
 *  individual post page. Previously duplicated as an inline
 *  <style> block inside blog/index.html AND separately inside
 *  every single one of the 39 post files — identical CSS,
 *  pasted 40 times. Now here once.
 * ============================================================
 */


/* ── BLOG INDEX ─── */
.blog-hero {
  padding: 5rem 2.5rem 4rem;
  border-bottom: 1px solid var(--border);
  max-width: 1200px; margin: 0 auto;
}
.blog-hero h1 {
  font-family: var(--display);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 400; line-height: 1.02;
  letter-spacing: -0.04em; color: var(--ink);
  margin-top: 1rem; margin-bottom: 1.25rem;
}
.blog-hero h1 em { font-style: italic; color: var(--accent); }
.blog-hero-sub {
  font-size: 1rem; color: var(--muted);
  line-height: 1.7; max-width: 480px;
}

.blog-filters {
  max-width: 1200px; margin: 0 auto;
  padding: 1.75rem 2.5rem;
  display: flex; align-items: center; gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.filter-btn {
  padding: 0.4rem 1rem; border-radius: 100px;
  border: 1px solid var(--border); background: transparent;
  font-size: 0.75rem; font-weight: 500; color: var(--muted);
  cursor: pointer; transition: all 0.2s; font-family: var(--body);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--ink); border-color: var(--ink); color: var(--cream);
}

.blog-grid {
  max-width: 1200px; margin: 0 auto;
  padding: 3rem 2.5rem 6rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.post-card.featured {
  grid-column: span 3;
  display: grid; grid-template-columns: 5fr 7fr;
  gap: 0;
}

.post-card {
  border: 1px solid var(--border);
  border-radius: 1.5rem; overflow: hidden;
  background: var(--card);
  display: flex; flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
  text-decoration: none; color: inherit;
}
.post-card:hover { border-color: var(--ink); transform: translateY(-3px); }

.post-thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, hsl(38,30%,88%), hsl(22,40%,80%));
  display: flex; align-items: flex-end;
  padding: 1.5rem;
  position: relative; overflow: hidden;
}
.post-card.featured .post-thumb { aspect-ratio: auto; min-height: 320px; }
.post-thumb-tag {
  display: inline-flex;
  padding: 0.3rem 0.75rem; border-radius: 100px;
  background: rgba(249,244,235,0.9); backdrop-filter: blur(4px);
  font-size: 0.65rem; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink);
}
.post-thumb::before {
  content: attr(data-num);
  position: absolute; bottom: -0.5rem; right: 1rem;
  font-family: var(--display); font-size: 8rem; font-style: italic;
  color: rgba(26,42,51,0.07); line-height: 1; pointer-events: none;
}

.post-body {
  padding: 1.75rem;
  display: flex; flex-direction: column; gap: 0.65rem;
  flex: 1;
}
.post-meta {
  display: flex; align-items: center; gap: 1rem;
  font-size: 0.68rem; color: var(--muted); letter-spacing: 0.04em;
}
.post-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.post-title {
  font-family: var(--display);
  font-size: 1.25rem; font-weight: 400;
  line-height: 1.25; letter-spacing: -0.02em; color: var(--ink);
}
.post-card.featured .post-title { font-size: 1.7rem; }
.post-excerpt {
  font-size: 0.85rem; color: var(--muted); line-height: 1.65;
  flex: 1;
}
.post-link {
  margin-top: 0.5rem;
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.78rem; font-weight: 500; color: var(--accent);
  text-decoration: none; transition: gap 0.2s;
}
.post-link svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }
.post-card:hover .post-link { gap: 0.6rem; }

.blog-empty {
  grid-column: span 3; text-align: center;
  padding: 5rem 2rem; color: var(--muted);
}
.blog-empty p { font-family: var(--display); font-size: 1.5rem; font-style: italic; }

@media (max-width: 900px) {
  .blog-hero { padding: 3rem 1.25rem 2.5rem; }
  .blog-filters { padding: 1.25rem 1.25rem; }
  .blog-grid { grid-template-columns: 1fr 1fr; padding: 2rem 1.25rem 4rem; }
  .post-card.featured { grid-column: span 2; grid-template-columns: 1fr; }
  .blog-empty { grid-column: span 2; }
}
@media (max-width: 580px) {
  .blog-grid { grid-template-columns: 1fr; }
  .post-card.featured { grid-column: span 1; }
  .blog-empty { grid-column: span 1; }
}

/* ── INDIVIDUAL POST PAGES ── */

/* ── BLOG POST STYLES ─── */
.post-header {
  max-width: 760px; margin: 0 auto;
  padding: 5rem 2.5rem 3rem;
}
.post-header .eyebrow { margin-bottom: 1.5rem; }
.post-title {
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 3.75rem);
  font-weight: 400; line-height: 1.05;
  letter-spacing: -0.03em; color: var(--ink);
  margin-bottom: 1.25rem;
}
.post-title em { font-style: italic; color: var(--accent); }
.post-subtitle {
  font-size: 1.1rem; color: var(--muted);
  line-height: 1.65; margin-bottom: 2rem;
}
.post-byline {
  display: flex; align-items: center; gap: 1rem;
  font-size: 0.78rem; color: var(--muted);
  padding-top: 1.5rem; border-top: 1px solid var(--border);
}
.post-byline-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.post-byline-name { font-weight: 500; color: var(--ink); }

.post-content {
  max-width: 760px; margin: 0 auto;
  padding: 3rem 2.5rem 6rem;
}

.post-footer {
  max-width: 760px; margin: 0 auto;
  padding: 3rem 2.5rem 6rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  gap: 2rem; flex-wrap: wrap;
}
.post-footer-label {
  font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 0.75rem;
}
.post-cta-block { flex: 1; min-width: 200px; }
.post-next {
  border: 1px solid var(--border); border-radius: 1.25rem;
  padding: 1.25rem 1.5rem; text-decoration: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  transition: border-color 0.2s, background 0.2s; color: inherit;
}
.post-next:hover { border-color: var(--ink); background: #fff; }
.post-next-title { font-family: var(--display); font-size: 1rem; font-style: italic; color: var(--ink); }
.post-next svg { width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2; flex-shrink: 0; }

@media (max-width: 768px) {
  .post-header { padding: 3rem 1.25rem 2rem; }
  .post-content { padding: 2rem 1.25rem 4rem; }
  .post-footer { padding: 2rem 1.25rem 4rem; flex-direction: column; }
}
