/* ==========================================================================
   Blog — index + article styles
   Uses the same design tokens as the landing page (see tokens.css).
   ========================================================================== */

/* ---------- Shared page shell ---------- */
.blog-page {
  padding-top: calc(var(--header-h) + var(--s-16));
  padding-bottom: var(--s-24);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(225, 6, 0, 0.08), transparent 70%),
    var(--bg);
  min-height: 100vh;
}

@media (min-width: 768px) {
  .blog-page { padding-top: calc(var(--header-h) + var(--s-20)); }
}

.blog-container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--container-px);
}

/* ---------- Blog index — hero ---------- */
.blog-hero {
  text-align: center;
  max-width: 44rem;
  margin: 0 auto var(--s-16);
}

.blog-hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-variation-settings: 'wdth' 100, 'opsz' 96;
  letter-spacing: -0.035em;
  line-height: var(--lh-tight);
  font-size: var(--fs-5xl);
  margin-bottom: var(--s-4);
}

.blog-hero__sub {
  font-size: var(--fs-lg);
  color: var(--text-muted);
  line-height: var(--lh-relaxed);
}

/* ---------- Blog index — grid ---------- */
.blog-grid {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1080px) {
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Post card ---------- */
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  transition: border-color var(--t-base), transform var(--t-base), box-shadow var(--t-base);
  height: 100%;
}

.post-card:hover {
  border-color: var(--red);
  transform: translateY(-2px);
  box-shadow: var(--glow-red-soft);
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--fs-xs);
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--s-4);
}

.post-card__tag {
  color: var(--red);
  font-weight: 700;
}

.post-card__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-dim);
}

.post-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: 'wdth' 100, 'opsz' 48;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-size: var(--fs-2xl);
  margin-bottom: var(--s-3);
  color: var(--white);
}

.post-card__excerpt {
  color: var(--text-muted);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--s-6);
  flex-grow: 1;
}

.post-card__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--red);
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
}

.post-card__cta svg {
  width: 16px;
  height: 16px;
  transition: transform var(--t-base);
}

.post-card:hover .post-card__cta svg {
  transform: translateX(3px);
}

/* ---------- Empty state (for when no other posts yet) ---------- */
.blog-empty {
  border: 1px dashed var(--border-soft);
  border-radius: var(--r-lg);
  padding: var(--s-10);
  text-align: center;
  color: var(--text-muted);
}

/* ==========================================================================
   Article — long-form reading layout
   ========================================================================== */

.article {
  padding-top: calc(var(--header-h) + var(--s-12));
  padding-bottom: var(--s-24);
  background: var(--bg);
}

@media (min-width: 768px) {
  .article { padding-top: calc(var(--header-h) + var(--s-16)); }
}

.article__container {
  width: 100%;
  max-width: 44rem;
  margin-inline: auto;
  padding-inline: var(--container-px);
}

/* Breadcrumb */
.article__breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-xs);
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: var(--s-6);
}

.article__breadcrumb a {
  color: var(--text-muted);
  transition: color var(--t-base);
}

.article__breadcrumb a:hover { color: var(--red); }

.article__breadcrumb-sep { color: var(--text-faint); }

/* Article header */
.article__header {
  margin-bottom: var(--s-10);
  padding-bottom: var(--s-8);
  border-bottom: 1px solid var(--border);
}

.article__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: var(--s-4);
}

.article__eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px var(--red-glow);
}

.article__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-variation-settings: 'wdth' 100, 'opsz' 96;
  letter-spacing: -0.035em;
  line-height: var(--lh-tight);
  font-size: var(--fs-4xl);
  margin-bottom: var(--s-5);
}

@media (min-width: 768px) {
  .article__title { font-size: var(--fs-5xl); }
}

.article__dek {
  font-size: var(--fs-lg);
  color: var(--text-muted);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--s-6);
}

.article__meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--fs-sm);
  color: var(--text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

.article__meta strong {
  color: var(--text);
  font-weight: 500;
}

.article__meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-faint);
}

/* Article body — prose */
.prose {
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.75;
}

.prose > * + * { margin-top: var(--s-6); }

.prose p {
  color: #e6e6e6;
}

.prose h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: 'wdth' 100, 'opsz' 48;
  letter-spacing: -0.02em;
  font-size: var(--fs-3xl);
  line-height: 1.2;
  margin-top: var(--s-16);
  margin-bottom: var(--s-2);
  color: var(--white);
}

.prose h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: 'wdth' 100, 'opsz' 32;
  letter-spacing: -0.015em;
  font-size: var(--fs-xl);
  line-height: 1.3;
  margin-top: var(--s-10);
  margin-bottom: var(--s-2);
  color: var(--white);
}

.prose a {
  color: var(--red);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--t-base);
}

.prose a:hover { color: var(--red-hover); }

.prose strong { color: var(--white); font-weight: 700; }
.prose em { color: #f0f0f0; }

.prose ul, .prose ol {
  padding-left: 1.5rem;
  color: #e6e6e6;
}

.prose ul { list-style: none; }
.prose ul li {
  position: relative;
  padding-left: 1rem;
  margin-top: var(--s-2);
}
.prose ul li::before {
  content: '';
  position: absolute;
  left: -0.25rem;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}

.prose ol { list-style: decimal; }
.prose ol li {
  padding-left: 0.5rem;
  margin-top: var(--s-2);
}
.prose ol li::marker {
  color: var(--red);
  font-weight: 700;
}

.prose blockquote {
  border-left: 3px solid var(--red);
  padding: var(--s-2) var(--s-6);
  margin-block: var(--s-8);
  font-size: var(--fs-xl);
  line-height: 1.5;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 500;
  font-style: normal;
  letter-spacing: -0.01em;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.15em 0.4em;
  border-radius: 0.35em;
  color: #fff0ef;
}

.prose img,
.prose figure {
  margin-block: var(--s-8);
  border-radius: var(--r-md);
  overflow: hidden;
}

.prose figure figcaption {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  text-align: center;
  margin-top: var(--s-3);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin-block: var(--s-12);
}

/* Callout box */
.callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  padding: var(--s-6);
  border-radius: var(--r-md);
  margin-block: var(--s-8);
}

.callout__label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: var(--s-2);
}

.callout p { margin: 0; }

/* Author bio */
.article__author {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-top: var(--s-16);
  padding-top: var(--s-8);
  border-top: 1px solid var(--border);
}

.article__author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #3a3a3a 0%, #1a1a1a 60%, #0a0a0a 100%);
  border: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.article__author-name {
  font-weight: 700;
  color: var(--white);
}

.article__author-bio {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin-top: 2px;
}

/* Post CTA — end of article */
.article__cta {
  margin-top: var(--s-16);
  padding: var(--s-10);
  background:
    linear-gradient(180deg, rgba(225, 6, 0, 0.06), transparent 60%),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-align: center;
}

.article__cta-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-variation-settings: 'wdth' 100, 'opsz' 64;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-size: var(--fs-3xl);
  margin-bottom: var(--s-3);
}

.article__cta-sub {
  color: var(--text-muted);
  margin-bottom: var(--s-6);
  max-width: 32rem;
  margin-inline: auto;
}

/* Related posts */
.article__related {
  margin-top: var(--s-20);
}

.article__related-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: 'wdth' 100, 'opsz' 32;
  letter-spacing: -0.02em;
  font-size: var(--fs-2xl);
  margin-bottom: var(--s-6);
}

.article__related-grid {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .article__related-grid { grid-template-columns: repeat(2, 1fr); }
}
