/* ───────────────────────────────────────────────────────────────────
   BLOG TYPOGRAPHY · The Giga Library reading layer.
   Long-form prose; serif body for narrative; mono for system voice.
   ─────────────────────────────────────────────────────────────────── */

@import url('../styles.css');

.blog-page{
  background: transparent;
  background-image:
    radial-gradient(1200px 900px at 12% -10%, rgba(91,61,245,0.14) 0%, transparent 60%),
    radial-gradient(900px 700px at 95% 8%, rgba(20,224,255,0.08) 0%, transparent 65%),
    linear-gradient(180deg, var(--void) 0%, #050624 50%, var(--void) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* ─── BLOG INDEX ───────────────────────────────────────────────── */
.blog-hero{ padding: 180px 0 100px; position: relative; }
.blog-hero h1{
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(48px, 6.8vw, 96px); letter-spacing: -0.02em; line-height: 0.96;
  color: var(--ink);
}
.blog-hero p{ margin-top: 28px; font-size: clamp(17px, 1.4vw, 22px); color: var(--silver); max-width: 72ch; line-height: 1.5; }

.blog-toc{
  margin-top: 80px;
  border-top: 1px solid var(--line);
}
.blog-toc__filter{
  display: flex; gap: 12px; padding: 24px 0; flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.blog-toc__filter button{
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 8px 16px; border-radius: 100px;
  background: transparent; color: var(--silver); border: 1px solid var(--line-strong);
  cursor: pointer; transition: all 200ms;
}
.blog-toc__filter button[data-active="true"]{ background: var(--cyan); color: var(--void); border-color: var(--cyan); }
.blog-toc__filter button:hover{ color: var(--ink); border-color: var(--cyan); }

.blog-card{
  display: grid; grid-template-columns: 100px 1fr 240px;
  gap: 40px; align-items: center;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
  transition: background 240ms;
  position: relative;
}
.blog-card:hover{
  background: linear-gradient(95deg, rgba(20,224,255,0.04) 0%, transparent 100%);
}
.blog-card:hover .blog-card__title{ color: var(--cyan); }
.blog-card__num{ font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.18em; color: var(--dust); }
.blog-card__title{
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(22px, 2.4vw, 32px); letter-spacing: -0.01em; color: var(--ink);
  line-height: 1.15; transition: color 200ms;
  text-wrap: balance;
}
.blog-card__sub{ margin-top: 10px; font-family: var(--font-serif); font-style: italic; font-size: 17px; color: var(--silver); line-height: 1.4; max-width: 60ch; }
.blog-card__meta{ margin-top: 14px; display: flex; gap: 18px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dust); }
.blog-card__meta em{ font-style: normal; color: var(--cyan); }
.blog-card__cta{
  text-align: right;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.blog-card__arrow{
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 16px; color: var(--ink);
  transition: all 240ms;
}
.blog-card:hover .blog-card__arrow{ background: var(--cyan); color: var(--void); transform: translateX(4px); }
@media (max-width: 800px){
  .blog-card{ grid-template-columns: 60px 1fr; gap: 18px; }
  .blog-card__cta{ display: none; }
}

/* ─── ARTICLE ──────────────────────────────────────────────────── */
.article{ padding: 120px 0 140px; }

/* Glassmorphic reading column (Andy directive 2026-06-22).
   The middle reading panel is the visual focus: a see-through dark-glass
   column that blends into the galactic .blog-page background behind it, with
   the glass thickened and darkened behind the running text for readability and
   a subtle 3D border (a lit top hairline, a deep bottom inset for thickness, a
   violet-tinted inset glow, and an outer drop shadow lifting the column off the
   galaxy). The centered max-width plus the side padding leave the galaxy peeking
   around the outside edges. WDC palette only, zero green. NO overflow clip here:
   the inline .figure blocks intentionally bleed wider than the text via negative
   margins and must stay visible over the glass. */
.article__inner{
  position: relative;
  max-width: 824px;
  margin: 0 auto;
  padding: 56px clamp(28px, 4vw, 60px) 72px;
  border-radius: var(--r-5);
  background:
    linear-gradient(
      180deg,
      rgba(6, 8, 30, 0.62),
      rgba(3, 4, 18, 0.74) 42%,
      rgba(2, 3, 13, 0.82)
    ),
    rgba(8, 10, 34, 0.30);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
  backdrop-filter: blur(20px) saturate(135%);
  border: 1px solid var(--line-strong);
  box-shadow:
    inset 0 1px 0 rgba(220, 228, 255, 0.16),
    inset 0 -1px 0 rgba(2, 3, 13, 0.7),
    inset 0 26px 70px -46px rgba(176, 107, 255, 0.26),
    0 30px 90px -34px rgba(2, 3, 13, 0.78);
}
/* The text column sits above the column's own glass; inline figures bleed past
   it and the hero figure above stays full-bleed. */
.article__inner > *{ position: relative; }
.article__inner--wide{ max-width: 1044px; }

@media (max-width: 900px){
  /* Narrow viewports: ease the glass padding and radius so it does not crowd
     the edges; the figures' -16px bleed still clears the lighter inset. */
  .article{ padding: 96px 0 100px; }
  .article__inner{
    padding: 36px 20px 48px;
    border-radius: var(--r-4);
  }
}

.article__back{
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--silver); margin-bottom: 40px;
}
.article__back:hover{ color: var(--cyan); }

.article__kicker{
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 24px;
  display: inline-flex; align-items: center; gap: 12px;
}
.article__kicker::before{ content:""; width: 36px; height: 1px; background: var(--cyan); }
.article__title{
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(40px, 5.2vw, 72px); letter-spacing: -0.022em; line-height: 1.02;
  color: var(--ink); text-wrap: balance;
}
.article__deck{
  margin-top: 32px;
  font-family: var(--font-serif); font-style: italic; font-weight: 500;
  font-size: clamp(20px, 2vw, 28px); line-height: 1.4;
  color: var(--silver); text-wrap: balance;
  max-width: 60ch;
}
.article__meta{
  margin-top: 40px;
  padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 32px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dust);
}
.article__meta em{ font-style: normal; color: var(--moon); }
.article__meta-block{ display: flex; flex-direction: column; gap: 4px; }

.article__body{
  margin-top: 80px;
  font-family: var(--font-serif);
  font-size: 19px; line-height: 1.75; color: #e2e5fa;
  letter-spacing: 0.005em;
}
.article__body p{ margin: 0 0 1.4em; text-wrap: pretty; }
.article__body p:first-of-type::first-letter{
  font-family: var(--font-display); font-weight: 800;
  float: left; font-size: 5em; line-height: 0.85;
  padding: 0.12em 0.16em 0 0;
  background: linear-gradient(160deg, var(--cyan), var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.article__body h2{
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.014em; line-height: 1.1;
  color: var(--ink);
  margin: 3em 0 1em;
  text-wrap: balance;
}
.article__body h2::before{
  content: "§"; color: var(--cyan); font-weight: 400; opacity: 0.7; margin-right: 12px;
}
.article__body h3{
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(22px, 2vw, 28px);
  color: var(--ink);
  margin: 2em 0 0.6em;
}
.article__body em{ color: #f0d8b0; font-style: italic; }
.article__body strong{ color: var(--ink); font-weight: 600; font-family: var(--font-body); }
.article__body code{
  font-family: var(--font-mono); font-size: 0.86em;
  background: rgba(20,224,255,0.08); border: 1px solid rgba(20,224,255,0.18);
  padding: 1px 6px; border-radius: 4px;
  color: var(--cyan); letter-spacing: 0.02em;
}
.article__body blockquote{
  margin: 2em 0;
  padding: 28px 36px;
  border-left: 3px solid var(--violet);
  background: linear-gradient(95deg, rgba(176,107,255,0.06) 0%, transparent 100%);
  font-family: var(--font-serif); font-style: italic; font-size: 1.05em;
  color: var(--moon);
  border-radius: 0 var(--r-3) var(--r-3) 0;
}
.article__body ul, .article__body ol{
  margin: 1em 0 1.4em;
  padding-left: 1.4em;
}
.article__body li{ margin: 0.4em 0; line-height: 1.65; }
.article__body ul li::marker{ color: var(--cyan); }
.article__body ol li::marker{ color: var(--violet); font-family: var(--font-mono); font-size: 0.9em; }
.article__body a{ color: var(--cyan); border-bottom: 1px solid rgba(20,224,255,0.4); transition: all 200ms; }
.article__body a:hover{ color: var(--ink); border-bottom-color: var(--ink); }
.article__body hr{
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  margin: 3em 0;
}

/* ─── ANIMATION FIGURE ─────────────────────────────────────────── */
.figure{
  margin: 3em -120px;
  position: relative;
  border-radius: var(--r-5);
  overflow: hidden;
  background: linear-gradient(160deg, rgba(20,22,60,0.85) 0%, rgba(2,3,13,0.95) 100%);
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 120px rgba(2,3,13,0.7), inset 0 0 80px rgba(91,61,245,0.06);
}
@media (max-width: 900px){ .figure{ margin: 2em -16px; } }
.figure__viewport{
  position: relative;
  aspect-ratio: 16 / 9;
  background: #04051a;
  overflow: hidden;
}
.figure__viewport canvas, .figure__viewport svg{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.figure__caption{
  padding: 18px 28px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  background: rgba(2,3,13,0.6);
}
.figure__caption-text{
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em; color: var(--silver); line-height: 1.5;
}
.figure__caption-text em{ font-style: normal; color: var(--cyan); text-transform: uppercase; letter-spacing: 0.18em; font-size: 10px; margin-right: 12px; }
.figure__scrubber{
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 11px; color: var(--dust);
  white-space: nowrap;
}
.figure__scrubber button{
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(20,224,255,0.10); border: 1px solid rgba(20,224,255,0.3);
  color: var(--cyan); cursor: pointer;
  font-family: var(--font-mono); font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: all 200ms;
}
.figure__scrubber button:hover{ background: var(--cyan); color: var(--void); }
.figure__progress{
  width: 120px; height: 4px;
  background: rgba(255,255,255,0.06); border-radius: 100px;
  overflow: hidden;
  position: relative;
}
.figure__progress-bar{
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  border-radius: 100px;
}

/* ─── ARTICLE FOOTER ───────────────────────────────────────────── */
.article-footer{
  margin-top: 100px;
  padding-top: 60px;
  border-top: 1px solid var(--line);
}
.article-nav{
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  margin-bottom: 60px;
}
@media (max-width: 700px){ .article-nav{ grid-template-columns: 1fr; } }
.article-nav__link{
  display: flex; flex-direction: column; gap: 8px;
  padding: 24px;
  background: rgba(20,22,60,0.4);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  transition: all 240ms;
}
.article-nav__link:hover{ background: rgba(20,224,255,0.06); border-color: var(--cyan); transform: translateY(-2px); }
.article-nav__dir{ font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--dust); }
.article-nav__title{ font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--ink); line-height: 1.25; }
.article-nav__link--next{ text-align: right; }

/* drop cap reset for h2 articles */
.article__body h2 + p::first-letter{
  all: unset;
}
