/* =========================================================
   The Doting Baker — Blog
   ========================================================= */

[hidden] { display: none !important; }

/* nav on blog pages */
.nav__menu a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- Blog home ---------- */
.blog-hero {
  padding: calc(var(--nav-h) + 70px) 0 50px;
  text-align: center;
  background:
    radial-gradient(circle at 85% 0%, rgba(199, 162, 107, 0.14), transparent 40%),
    var(--lavender);
}
.blog-hero__title {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  color: var(--plum-deep);
  margin: 0 auto 18px;
  max-width: 16ch;
}
.blog-hero__title em { color: var(--plum-soft); }
.blog-hero__lead { max-width: 580px; margin: 0 auto; color: var(--muted); }

.blog-list { padding: 56px 0 100px; }

.tag-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}
.tag {
  padding: 8px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--plum-deep);
  text-transform: capitalize;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.tag:hover { border-color: var(--lavender-2); background: var(--lavender); }
.tag.is-active { background: var(--plum); border-color: var(--plum); color: var(--white); }

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.post-card__media {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(150deg, var(--lavender), var(--blush));
}
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.post-card:hover .post-card__media img { transform: scale(1.05); }
.post-card__ph { font-size: 2rem; color: var(--gold); }
.post-card__body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 26px; }
.post-card__meta {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--plum-soft);
}
.post-card__title { font-size: 1.6rem; margin-bottom: 10px; }
.post-card__title a { color: var(--plum-deep); text-decoration: none; }
.post-card__title a:hover { color: var(--plum-soft); }
.post-card__excerpt { margin: 0 0 18px; flex: 1; color: var(--muted); font-size: 0.95rem; line-height: 1.65; }
.post-card__more {
  margin-top: auto;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--plum);
  text-decoration: none;
}
.post-card__more span { display: inline-block; transition: transform 0.3s var(--ease); }
.post-card__more:hover span { transform: translateX(5px); }

.post-card--skeleton {
  min-height: 380px;
  border: 0;
  background: linear-gradient(100deg, var(--lavender) 30%, #faf6fc 50%, var(--lavender) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.blog-empty {
  grid-column: 1 / -1;
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
}
.blog-empty h1 { font-size: 2.4rem; color: var(--plum-deep); margin-bottom: 10px; }
.blog-empty p { margin: 0 0 24px; }

/* ---------- Article ---------- */
.article { padding: calc(var(--nav-h) + 48px) 0 80px; }
.article__container { max-width: 780px; }
.article__back {
  display: inline-block;
  margin-bottom: 30px;
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
}
.article__back:hover { color: var(--plum); }

.article__head { margin-bottom: 34px; }
.article__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.article__tags a {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--lavender);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--plum);
  text-decoration: none;
}
.article__tags a:hover { background: var(--lavender-2); }
.article__title { font-size: clamp(2.3rem, 5vw, 3.6rem); color: var(--plum-deep); margin-bottom: 18px; }
.article__excerpt { margin: 0 0 22px; font-size: 1.2rem; font-weight: 300; line-height: 1.6; color: #4a4252; }
.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--muted);
}

.article__cover { margin: 0 0 44px; }
.article__cover img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.article__loading { display: grid; gap: 16px; }
.skeleton {
  border-radius: 10px;
  background: linear-gradient(100deg, var(--lavender) 30%, #faf6fc 50%, var(--lavender) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.skeleton--title { height: 56px; width: 85%; }
.skeleton--line { height: 20px; width: 50%; }
.skeleton--image { height: 360px; margin-top: 16px; }

.article-cta {
  padding: 56px 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--plum-deep), var(--plum));
}
.article-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.article-cta h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); }
.article-cta h2 em { color: #e9d6f5; }
.article-cta .eyebrow { margin-bottom: 8px; }

.related { padding: 80px 0 100px; }
.related__title { font-size: 2.2rem; color: var(--plum-deep); margin-bottom: 32px; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; }
  .blog-hero { padding: calc(var(--nav-h) + 44px) 0 36px; }
  .article { padding-top: calc(var(--nav-h) + 28px); }
  .article__excerpt { font-size: 1.08rem; }
  .article-cta .btn { width: 100%; }
}
