/* ──────────────────────────────────────────────────────────────
   blog.css — the blog index: page header, filter bar, featured
   article, and the article card grid. Article bodies use article.css.
   ────────────────────────────────────────────────────────────── */

.blog-wrap {
  padding-top: calc(var(--nav-height) + var(--space-page-y));
  padding-bottom: var(--space-section);
}

/* ── Page header ── */
.page-header {
  padding-inline: 0;
  margin-bottom: 2.5rem;
}

.page-header-label {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.page-header-label::before {
  content: "# ";
  color: var(--teal-dim);
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 7vw, 2.75rem);
  color: var(--text);
  margin-bottom: 0.75rem;
}

.page-header-lead {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: var(--prose-max);
  margin-bottom: 0.5rem;
}

.page-header-sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ── Filter bar ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 2rem;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  min-height: 2rem;
  cursor: pointer;
  transition:
    color var(--duration-fast),
    border-color var(--duration-fast),
    background var(--duration-fast);
}

.filter-btn.active {
  color: var(--on-teal);
  background: var(--teal);
  border-color: var(--teal);
}

@media (hover: hover) {
  .filter-btn:not(.active):hover {
    color: var(--teal);
    border-color: var(--teal-dim);
  }
}

/* ── Featured article ── */
.featured-article {
  display: grid;
  gap: 1.5rem;
  position: relative;
  background: var(--panel);
  border: 1px solid var(--teal-line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--duration-fast);
}

@media (hover: hover) {
  .featured-article:hover {
    border-color: var(--teal);
  }
}

.featured-label {
  position: absolute;
  top: -0.65rem;
  left: 1.25rem;
  font-size: 0.6rem;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--on-teal);
  background: var(--teal);
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.5rem;
}

.featured-meta {
  font-size: 0.66rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}

.featured-title {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 4.5vw, 1.6rem);
  color: var(--text);
  margin-bottom: 0.75rem;
}

.featured-excerpt {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.featured-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.featured-tag {
  font-size: 0.64rem;
  color: var(--teal);
  background: var(--teal-wash);
  border: 1px solid var(--teal-line);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.5rem;
}

.featured-read {
  font-size: var(--text-xs);
  color: var(--teal);
}

.featured-visual {
  align-self: center;
}

/* ── Article grid ── */
.articles-grid {
  display: grid;
  gap: 1rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--duration-fast);
}

@media (hover: hover) {
  .article-card:not(.coming-soon):hover {
    border-color: var(--teal-dim);
  }
}

.article-card.coming-soon {
  border-style: dashed;
  opacity: 0.72;
}

.article-tag {
  font-size: 0.66rem;
  color: var(--teal);
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}

.article-title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.article-excerpt {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  gap: 0.4rem;
  font-size: 0.66rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.article-read {
  margin-top: auto;
  font-size: var(--text-xs);
  color: var(--teal);
}

/* Empty state — the terminal signature stands in for the grid */
.articles-empty {
  grid-column: 1 / -1;
  max-width: 34rem;
}

/* ── Tablet (640px+) ── */
@media (min-width: 40rem) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Desktop (900px+) ── */
@media (min-width: 56.25rem) {
  .featured-article {
    grid-template-columns: 1.25fr 0.75fr;
    align-items: center;
    padding: 2rem;
    gap: 2.5rem;
  }

  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
