/* ─── Blog shared ──────────────────────────────────────────────── */

.blog-loading,
.blog-empty,
.blog-error {
  color: var(--muted);
  font-size: 1rem;
  padding: 24px 0;
  margin: 0;
}

.blog-error {
  color: var(--clay);
}

/* Active nav link on blog pages */
.nav-active {
  color: var(--clay) !important;
  border-bottom: 2px solid var(--clay);
}

/* ─── Blog hero ────────────────────────────────────────────────── */

.blog-hero {
  background: linear-gradient(180deg, #ede5d5, var(--paper));
  border-bottom: 1px solid var(--line);
  padding-bottom: 56px;
  padding-top: 120px;
}

.blog-heading {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 20px;
  text-wrap: balance;
}

.blog-intro {
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.8;
  max-width: 640px;
  margin-bottom: 0;
}

/* ─── Blog section (list container) ───────────────────────────── */

.blog-section {
  padding-top: 64px;
}

/* ─── Blog card grid ───────────────────────────────────────────── */

.blog-list {
  display: grid;
  gap: 36px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 220ms ease, transform 220ms ease;
}

.blog-card:hover {
  box-shadow: 0 12px 40px rgba(38, 37, 37, 0.13);
  transform: translateY(-3px);
}

/* Cover */

.card-cover-link {
  display: block;
}

.card-cover {
  aspect-ratio: 16 / 9;
  display: block;
  overflow: hidden;
}

.card-cover img {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms ease;
  width: 100%;
}

.blog-card:hover .card-cover img {
  transform: scale(1.04);
}

.card-cover--placeholder {
  background: linear-gradient(135deg, var(--grass) 0%, var(--lime) 100%);
}

/* Card body */

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  padding: 24px;
}

.card-date {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin: 0;
  text-transform: uppercase;
}

.card-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
}

.card-title a {
  color: var(--ink);
  text-decoration: none;
}

.card-title a:hover {
  color: var(--clay);
}

.card-excerpt {
  color: var(--muted);
  flex: 1;
  font-size: 0.96rem;
  line-height: 1.75;
  margin: 0;
}

.card-read-more {
  color: var(--clay);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin-top: 8px;
  text-decoration: none;
  transition: color 160ms ease;
}

.card-read-more:hover {
  color: var(--clay-dark);
}

/* ─── Single post wrapper ──────────────────────────────────────── */

.post-wrapper {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 120px;
}

.back-link {
  color: var(--clay);
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin-bottom: 36px;
  text-decoration: none;
  transition: color 160ms ease;
}

.back-link:hover {
  color: var(--clay-dark);
}

/* Post header */

.post-header {
  margin-bottom: 36px;
}

.post-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-bottom: 16px;
  text-wrap: balance;
}

.post-date {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin: 0;
  text-transform: uppercase;
}

/* Post cover image */

.post-cover {
  border-radius: 4px;
  margin-bottom: 48px;
  overflow: hidden;
}

.post-cover img {
  aspect-ratio: 21 / 9;
  display: block;
  object-fit: cover;
  width: 100%;
}

/* ─── Post body typography ─────────────────────────────────────── */

.post-body {
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1.85;
  max-width: 68ch;
}

.post-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-top: 2.4em;
}

.post-body h3 {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 2em;
}

.post-body p {
  margin-bottom: 1.6em;
}

.post-body ul,
.post-body ol {
  margin-bottom: 1.6em;
  padding-left: 1.5em;
}

.post-body li {
  margin-bottom: 0.5em;
}

.post-body a {
  border-bottom: 1px solid var(--clay);
  color: var(--clay-dark);
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease;
}

.post-body a:hover {
  border-color: var(--clay-dark);
  color: var(--ink);
}

.post-body blockquote {
  border-left: 4px solid var(--lime);
  color: var(--muted);
  font-style: italic;
  margin: 2em 0;
  padding: 0.5em 1.5em;
}

.post-body img {
  border-radius: 4px;
  display: block;
  height: auto;
  margin: 2em 0;
  max-width: 100%;
}

.post-body pre {
  background: var(--ink);
  border-radius: 4px;
  color: var(--lime);
  font-size: 0.88rem;
  overflow-x: auto;
  padding: 20px 24px;
}

.post-body code {
  background: rgba(38, 37, 37, 0.08);
  border-radius: 3px;
  font-size: 0.88em;
  padding: 2px 6px;
}

.post-body pre code {
  background: none;
  padding: 0;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.5em 0;
}

/* ─── Responsive ───────────────────────────────────────────────── */

@media (max-width: 920px) {
  .blog-hero {
    padding-top: 96px;
  }

  .blog-list {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
  }

  .post-wrapper {
    padding-top: 96px;
  }

  .post-body {
    font-size: 1.05rem;
  }
}

@media (max-width: 560px) {
  .blog-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .post-body {
    font-size: 1rem;
  }

  .post-title {
    font-size: clamp(2rem, 12vw, 3rem);
  }
}
