/* ============================================================
   BLOG — Navy & Gold
   Listing cards use the contract .card (base.css); this file adds
   the blog-specific text treatments, the long-form post typography
   (serif headings, gold links, ~70ch measure), and the article
   list layout. Tokens live in base.css.
   ============================================================ */

/* === LISTING GRID ==============================================
   Fixed-max card width + centered tracks so a nascent blog (1-2 posts)
   reads as intentional cards, not one card stranded in a 1fr void. */
.blog-listing {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 384px));
  justify-content: center;
  gap: var(--space-7);
  margin-top: var(--space-8);
}

/* Each card is a contract .card.card-gold-top — lay it out as a
   column so the "Read article" link always sits at the bottom edge. */
.blog-listing .card {
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-body-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}
.blog-card-meta time {
  color: var(--slate-400);
  font-variant-numeric: tabular-nums;
}

.blog-card-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-3);
}
.blog-card-title a { color: var(--navy-950); }
.blog-card-title a:hover { color: var(--gold-700); }

.blog-card-excerpt {
  font-size: var(--text-body-md);
  color: var(--color-text-secondary);
  line-height: 1.65;
  flex: 1 1 auto;          /* pushes the link to the bottom */
  margin-bottom: var(--space-5);
}

.blog-card-link {
  color: var(--gold-700);
  font-weight: 600;
  font-size: var(--text-body-md);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition), color var(--transition);
}
.blog-card-link:hover { gap: 8px; color: var(--gold-800); }

/* === POST BODY — long-form reading ============================= */
.blog-post-body {
  max-width: 70ch;
  font-size: var(--text-body-lg);
  line-height: 1.8;
  color: var(--color-text-primary);
}

.blog-post-body h2 {
  font-family: var(--font-display);
  font-size: var(--text-display-sm);
  font-weight: 600;
  line-height: 1.2;
  margin: 2em 0 0.6em;
  color: var(--navy-950);
}
.blog-post-body h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 1.6em 0 0.5em;
  color: var(--navy-950);
}

.blog-post-body p { margin: 0 0 1.2em; }

.blog-post-body ul,
.blog-post-body ol {
  margin: 0 0 1.3em 1.4em;
  padding: 0;
}
.blog-post-body li { margin-bottom: 0.5em; }

.blog-post-body a {
  color: var(--gold-700);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.blog-post-body a:hover {
  color: var(--gold-800);
  text-decoration-thickness: 2px;
}

.blog-post-body strong {
  font-weight: 600;
  color: var(--navy-950);
}

.blog-post-body blockquote {
  border-left: 3px solid var(--gold-500);
  background: var(--gold-150);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.6em 0;
  padding: 0.85em 1.25em;
  font-style: italic;
  color: var(--slate-600);
}

/* Tables — wrap in their own horizontal scroll so the page never
   scrolls sideways on narrow screens. */
.blog-post-body table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: var(--text-body-md);
}
.blog-post-body th {
  background: var(--cream);
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid var(--color-border-strong);
  white-space: nowrap;
}
.blog-post-body td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
}
.blog-post-body tr:last-child td { border-bottom: none; }

/* === POST FOOTER ============================================== */
.blog-post-footer {
  max-width: 70ch;
  border-top: 1px solid var(--color-border-strong);
  margin-top: var(--space-9);
  padding-top: var(--space-7);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}
.blog-post-author { flex: 1; min-width: 200px; }
.blog-post-author p { margin: 0; line-height: 1.5; }
.blog-post-author p:first-child { color: var(--navy-950); }
.blog-post-author p:last-child {
  font-size: var(--text-body-sm);
  color: var(--color-text-secondary);
}

/* === POST NAV (back link) ===================================== */
.blog-post-nav {
  max-width: 70ch;
  margin-top: var(--space-7);
}
.blog-post-nav a {
  color: var(--gold-700);
  font-weight: 600;
  font-size: var(--text-body-md);
}
.blog-post-nav a:hover { color: var(--gold-800); }

/* === RESPONSIVE =============================================== */
@media (max-width: 734px) {
  .blog-listing {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
  .blog-card-title { font-size: 1.25rem; }

  .blog-post-body { font-size: var(--text-body-md); }

  .blog-post-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    margin-top: var(--space-7);
    padding-top: var(--space-6);
  }
}
