/* ==========================================================================
   TestVibe blog — listing + article layout.
   Shared tokens/components live in /assets/site.css; this file only adds
   the blog card grid and the ~720px article reading measure.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Blog index — header + card grid
   -------------------------------------------------------------------------- */
.blog-hero {
  position: relative;
  padding: 4.25rem 0 3rem;
}
.blog-hero .hero-glow {
  position: absolute;
  inset: -140px -180px auto;
  height: 420px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(46% 52% at 24% 30%, var(--glow-a), transparent 70%),
    radial-gradient(40% 46% at 62% 20%, var(--glow-b), transparent 70%);
  filter: blur(28px);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-bottom: 4.5rem;
}
@media (max-width: 980px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .post-grid { grid-template-columns: 1fr; } }

.post-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: var(--card);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-card);
  padding: 1.6rem 1.5rem 1.5rem;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s var(--ease);
}
.post-card:hover { border-color: var(--line-3); text-decoration: none; }
.post-card .eyebrow { color: var(--primary); }
.post-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--gray-900);
}
.post-card p { flex: 1; font-size: 0.9rem; line-height: 1.6; color: var(--gray-600); }
.post-meta {
  font-size: 0.78rem;
  color: var(--gray-500);
  letter-spacing: 0.01em;
}
.post-meta .sep { margin: 0 0.45rem; color: var(--gray-400); }

/* --------------------------------------------------------------------------
   Article page — byline + reading measure
   -------------------------------------------------------------------------- */
.article-head {
  max-width: 720px;
  margin: 0 auto;
  padding: 3.75rem 0 0.5rem;
}
.article-head .crumb {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gray-500);
  text-decoration: none;
  margin-bottom: 1.6rem;
}
.article-head .crumb:hover { color: var(--primary); }
.article-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--gray-900);
  margin-top: 0.85rem;
}
.article-byline {
  margin-top: 1.15rem;
  font-size: 0.85rem;
  color: var(--gray-500);
}
.article-byline .sep { margin: 0 0.5rem; color: var(--gray-400); }

.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.75rem 0 4.5rem;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--gray-800);
}
.article > * + * { margin-top: 1.15rem; }

.article h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.7rem;
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--gray-900);
  margin-top: 2.9rem;
}
.article h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.28rem;
  line-height: 1.3;
  color: var(--gray-900);
  margin-top: 2.2rem;
}
.article a { color: var(--primary); text-decoration: none; }
.article a:hover { text-decoration: underline; }
.article strong { color: var(--gray-900); font-weight: 600; }

.article ul, .article ol { padding-left: 1.35rem; }
.article li { margin-top: 0.45rem; }
.article li::marker { color: var(--gray-500); }

.article blockquote {
  border-left: 3px solid var(--primary);
  padding: 0.15rem 0 0.15rem 1.1rem;
  color: var(--gray-600);
  font-style: italic;
}

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

/* Inline code */
.article code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--primary);
  background: var(--primary-tint);
  border-radius: 5px;
  padding: 0.1em 0.35em;
  white-space: nowrap;
}

/* Fenced code — always a dark 12px surface, in both themes */
.article pre {
  background: #0b101c;
  border: 1px solid rgba(220, 232, 255, 0.10);
  border-radius: var(--radius-card);
  padding: 1.05rem 1.25rem;
  overflow-x: auto;
  margin-top: 1.35rem;
}
html[data-theme="dark"] .article pre { background: var(--card); border-color: var(--line-1); }
.article pre code {
  display: block;
  background: transparent;
  border-radius: 0;
  padding: 0;
  white-space: pre;
  color: #d7e3fa;
  font-size: 0.84rem;
  line-height: 1.65;
}

/* Screenshots */
.article figure { margin-top: 1.75rem; }
.article figure .frame {
  border: 1px solid var(--border-c);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--shell);
}
.article figure img { display: block; width: 100%; height: auto; }
/* Interim dark-mode treatment for light-theme captures (same as the tour). */
html[data-theme="dark"] .article figure img { filter: brightness(0.88) contrast(1.02); }
.article figcaption {
  margin-top: 0.65rem;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--gray-500);
}

/* Tables */
.article .table-wrap { overflow-x: auto; margin-top: 1.35rem; }
.article table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.55;
}
.article th, .article td {
  text-align: left;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--line-1);
  vertical-align: top;
}
.article th {
  font-weight: 600;
  color: var(--gray-900);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.article td { color: var(--gray-700); }
.article td:first-child { white-space: nowrap; font-weight: 500; color: var(--gray-900); }

/* Article-page CTA band tweak — a little tighter than the homepage one */
.article-cta { padding: 5rem 0 4.5rem; }
