/* ════════════════════════════════════════════════════
 * itsaryan — Blog Space Layer
 * ────────────────────────────────────────────────────
 *  • Starfield + comet streaks behind the page
 *  • Restored & upgraded card cover visuals
 *  • Per-card "star coords" + constellation strip
 *  • Pretext-powered constellation map in the article aside
 *  • Reading-rhythm polish across the article body
 * ════════════════════════════════════════════════════ */

/* ── Shared palette tokens ─────────────────────────── */
.blog-page,
.blog-article-page {
  --blog-star: rgba(244, 236, 216, 0.85);
  --blog-star-warm: rgba(232, 162, 61, 0.9);
  --blog-star-blue: rgba(111, 177, 255, 0.95);
  --blog-orbit: rgba(74, 159, 255, 0.35);
}

/* ── Starfield backdrop ────────────────────────────── */
.blog-stars {
  position: fixed;
  inset: -10% -5% -10% -5%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.blog-stars__layer {
  position: absolute;
  inset: -20% 0;
  width: 100%;
  height: 220vh;
  will-change: transform;
}

.blog-stars__layer--0 { opacity: 0.55; }
.blog-stars__layer--1 { opacity: 0.7; }
.blog-stars__layer--2 { opacity: 0.85; }

.blog-star {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: var(--c);
  opacity: var(--a);
  box-shadow: 0 0 calc(var(--s) * 2) currentColor;
  color: var(--c);
  animation: blog-twinkle var(--tw) ease-in-out infinite;
}

@keyframes blog-twinkle {
  0%, 100% { opacity: var(--a); transform: scale(1); }
  50%      { opacity: calc(var(--a) * 0.35); transform: scale(0.7); }
}

.blog-stars__comets {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.blog-comet {
  position: absolute;
  width: 180px;
  height: 1.5px;
  background: linear-gradient(90deg, rgba(244, 236, 216, 0), rgba(244, 236, 216, 0.95) 70%, rgba(244, 236, 216, 0));
  border-radius: 999px;
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(244, 236, 216, 0.5));
  transform-origin: right center;
  animation: blog-comet 18s linear infinite;
}

.blog-comet--a { top: 14%; left: -200px; animation-delay: 0s; }
.blog-comet--b { top: 38%; left: -260px; width: 220px; animation-delay: 7s; animation-duration: 22s; }
.blog-comet--c { top: 64%; left: -160px; width: 140px; animation-delay: 13s; animation-duration: 26s; }

@keyframes blog-comet {
  0%   { transform: translate(0, 0) rotate(18deg); opacity: 0; }
  4%   { opacity: 0.9; }
  18%  { opacity: 1; }
  35%  { opacity: 0; transform: translate(125vw, 32vh) rotate(18deg); }
  100% { opacity: 0; transform: translate(125vw, 32vh) rotate(18deg); }
}

@media (prefers-reduced-motion: reduce) {
  .blog-star { animation: none; }
  .blog-comet { display: none; }
}

/* The page background painted with the wash should sit ABOVE the stars
   only as a subtle dimming film, never opaque. */
.blog-page .blue-wash,
.blog-article-page .blue-wash {
  z-index: 1;
}
.blog-page .paper-grid,
.blog-article-page .paper-grid {
  z-index: 2;
}
.blog-page .scroll-progress,
.blog-article-page .scroll-progress {
  z-index: 90;
}
.blog-page .site-main,
.blog-article-page .site-main {
  position: relative;
  z-index: 3;
}

/* ════════════════════════════════════════════════════
 * Blog index — card cover restored & themed
 * ════════════════════════════════════════════════════ */

/* The index page no longer hides the cover behind a pretext-only band.
   We bring back the SVG cover, layer the canvas scene from blog-covers.js
   on top, and add a constellation strip + star coords for personality. */
.blog-card .blog-card__link {
  padding: 0;
  gap: 0;
  min-height: 0;
}

.blog-card .blog-card__visual {
  position: relative;
  display: block;
  width: 100%;
  height: 220px;
  margin: 0;
  border: none;
  border-radius: 22px 22px 0 0;
  overflow: hidden;
  background: radial-gradient(120% 80% at 50% 30%, #0e2444, #050a14 70%);
  isolation: isolate;
  z-index: 1;
}

.blog-card .blog-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease), filter 0.9s var(--ease);
  display: block;
  z-index: 1;
}

.blog-card:hover .blog-card__visual img {
  transform: scale(1.06);
  filter: brightness(1.08) saturate(1.18);
}

.blog-card .blog-card__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  background: linear-gradient(180deg, rgba(7, 19, 32, 0) 55%, rgba(7, 19, 32, 0.78) 100%);
  background-size: 100% 100%;
  animation: none;
  pointer-events: none;
}

.blog-card .blog-card__visual::before {
  /* horizon line — feels like an instrument readout over the cover */
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244, 236, 216, 0.55), transparent);
  z-index: 6;
  opacity: 0.7;
}

/* The card content sits under the visual with breathable padding */
.blog-card .blog-card__link > .blog-card__meta,
.blog-card .blog-card__link > h3,
.blog-card .blog-card__link > p,
.blog-card .blog-card__link > .blog-card__bottom,
.blog-card .blog-card__link > .blog-card__constellation {
  padding-left: 1.3rem;
  padding-right: 1.3rem;
}

.blog-card .blog-card__link > .blog-card__meta {
  padding-top: 1.1rem;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.blog-card__coords {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: rgba(111, 177, 255, 0.1);
  border: 1px solid rgba(111, 177, 255, 0.22);
  color: rgba(244, 236, 216, 0.78);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.blog-card__coords::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blog-star-warm);
  box-shadow: 0 0 8px var(--blog-star-warm);
}

.blog-card .blog-card__link > h3 {
  margin-top: 0.55rem;
}

.blog-card .blog-card__link > p {
  margin-bottom: 0.85rem;
}

.blog-card .blog-card__link > .blog-card__bottom {
  padding-bottom: 1.2rem;
  padding-top: 0.4rem;
}

/* Constellation strip inside each card — a tiny hand-drawn star map */
.blog-card__constellation {
  display: block;
  width: 100%;
  height: 56px;
  margin: 0.4rem 0 0.5rem;
  overflow: visible;
}

.blog-card__constellation-lines line {
  stroke: rgba(244, 236, 216, 0.18);
  stroke-width: 0.25;
  stroke-dasharray: 1.4 2.2;
  opacity: 0.8;
}

.blog-card__star {
  fill: var(--blog-star);
  filter: drop-shadow(0 0 1.5px rgba(244, 236, 216, 0.7));
  transform-origin: center;
  transform-box: fill-box;
  animation: card-star-twinkle 5s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.blog-card__star--0 { fill: var(--blog-star-blue); }
.blog-card__star--1 { fill: var(--blog-star-warm); }
.blog-card__star--2 { fill: var(--blog-star); }

@keyframes card-star-twinkle {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.6); }
}

.blog-card:hover .blog-card__constellation-lines line {
  stroke: rgba(111, 177, 255, 0.4);
}

/* Featured card layout — big hero cover at the top with brief beside it */
.blog-card--featured {
  border-radius: 28px;
  min-height: 0;
}

.blog-card--featured .blog-card__link {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  min-height: 0;
  padding: 0;
}

.blog-card--featured .blog-card__visual,
.blog-card--featured .blog-card__visual--hero {
  height: 100%;
  min-height: 360px;
  border-radius: 28px 0 0 28px;
  border: none;
}

.blog-card--featured .blog-card__content {
  padding: clamp(1.6rem, 4vw, 2.4rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  z-index: 2;
  position: relative;
}

.blog-card--featured .blog-card__content > .blog-card__meta {
  padding: 0;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.blog-card--featured .blog-card__content > .blog-card__constellation {
  margin: 0.2rem 0 0;
  height: 64px;
}

@media (max-width: 900px) {
  .blog-card--featured .blog-card__link {
    grid-template-columns: 1fr;
  }
  .blog-card--featured .blog-card__visual {
    min-height: 220px;
    border-radius: 28px 28px 0 0;
  }
}

/* No-cover variant centers a synthetic starfield via the constellation */
.blog-card--featured--no-cover .blog-card__visual {
  display: block;
  background:
    radial-gradient(60% 50% at 50% 50%, rgba(74, 159, 255, 0.18), transparent 70%),
    linear-gradient(135deg, #0a1b35, #060d1b);
}

/* Remove the old "Latest" pill on the featured card — replaced by the
   constellation strip + coords pill which feels native to the theme. */
.blog-card--featured::before {
  content: "TRANSMISSION 001";
  top: 1rem;
  left: 1rem;
  background: rgba(7, 19, 32, 0.6);
  color: var(--blog-star-warm);
  border: 1px solid rgba(232, 162, 61, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: none;
  font-size: 0.55rem;
  letter-spacing: 0.18em;
}

/* ── Subtle space frame around index hero copy ───── */
.blog-index__head {
  position: relative;
  z-index: 4;
}

.blog-index__head .eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.blog-index__head .eyebrow::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blog-star-warm);
  box-shadow: 0 0 12px var(--blog-star-warm);
  animation: card-star-twinkle 3s ease-in-out infinite;
}

/* ════════════════════════════════════════════════════
 * Article hero cover restored
 * ════════════════════════════════════════════════════ */
.blog-article__cover {
  position: relative;
  isolation: isolate;
  background: radial-gradient(120% 80% at 50% 30%, #0e2444, #050a14 70%);
}

.blog-article__cover img {
  position: relative;
  z-index: 1;
}

.blog-article__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 19, 32, 0) 50%, rgba(7, 19, 32, 0.62) 100%);
  background-size: 100% 100%;
  animation: none;
}

.blog-article__cover::before {
  /* corner crosshair marks */
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 6;
  border: 1px solid rgba(244, 236, 216, 0.12);
  border-radius: 18px;
  pointer-events: none;
  background:
    linear-gradient(transparent 0, transparent 50%, transparent 50%) no-repeat,
    radial-gradient(circle at 0 0, rgba(232, 162, 61, 0.7) 2px, transparent 3px) no-repeat,
    radial-gradient(circle at 100% 0, rgba(232, 162, 61, 0.7) 2px, transparent 3px) no-repeat,
    radial-gradient(circle at 0 100%, rgba(232, 162, 61, 0.7) 2px, transparent 3px) no-repeat,
    radial-gradient(circle at 100% 100%, rgba(232, 162, 61, 0.7) 2px, transparent 3px) no-repeat;
  background-size: auto, 30px 30px, 30px 30px, 30px 30px, 30px 30px;
  background-position: 0 0, 6px 6px, calc(100% - 6px) 6px, 6px calc(100% - 6px), calc(100% - 6px) calc(100% - 6px);
}

/* ════════════════════════════════════════════════════
 * Article aside — constellation map
 * ════════════════════════════════════════════════════ */
.blog-constellation {
  display: grid;
  gap: 0.7rem;
  padding: 0.9rem 0.9rem 0.7rem;
  border: 1px solid rgba(111, 177, 255, 0.2);
  border-radius: 14px;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(74, 159, 255, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(7, 19, 32, 0.55), rgba(7, 19, 32, 0.3));
  margin-bottom: 0.2rem;
}

.blog-constellation__hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
}

.blog-constellation__eyebrow {
  font: 800 0.62rem var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.blog-constellation__stat {
  font: 700 0.6rem var(--font-mono);
  letter-spacing: 0.08em;
  color: rgba(111, 177, 255, 0.85);
}

.blog-constellation__toggle {
  display: none;
}

.blog-constellation__viewport {
  position: relative;
  height: 380px;
  border-radius: 10px;
  border: 1px solid rgba(244, 236, 216, 0.08);
  background:
    radial-gradient(circle at 30% 18%, rgba(111, 177, 255, 0.16), transparent 50%),
    radial-gradient(circle at 75% 78%, rgba(232, 68, 61, 0.12), transparent 55%),
    linear-gradient(180deg, #051022, #060c17);
  overflow: hidden;
}

.blog-constellation__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bc-orbit {
  fill: none;
  stroke: rgba(244, 236, 216, 0.07);
  stroke-width: 0.45;
  stroke-dasharray: 1.5 2.5;
}

.bc-orbit-draw {
  fill: none;
  stroke: url(#bc-orbit);
  stroke-width: 0.7;
  stroke-linecap: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  transition: stroke-dashoffset 1.6s var(--ease, ease-out);
}

.blog-constellation.is-drawn .bc-orbit-draw {
  stroke-dashoffset: 0;
}

.bc-star-g {
  cursor: pointer;
  transition: transform 0.3s var(--ease, ease-out);
  outline: none;
}

.bc-star-g:focus-visible {
  filter: drop-shadow(0 0 4px var(--blog-star-blue));
}

.bc-star {
  fill: var(--blog-star);
  transition: fill 0.3s var(--ease, ease-out), transform 0.3s var(--ease, ease-out);
  transform-origin: center;
  transform-box: fill-box;
}

.bc-star--head { fill: var(--blog-star-warm); }
.bc-star--quote { fill: #ff9a8a; }

.bc-halo {
  fill: rgba(244, 236, 216, 0.05);
  transition: fill 0.3s var(--ease, ease-out), r 0.3s;
}

.bc-star-g.is-passed .bc-star {
  fill: rgba(111, 177, 255, 0.7);
}

.bc-star-g.is-active .bc-star {
  fill: var(--blog-star-blue);
  transform: scale(1.4);
}

.bc-star-g.is-active .bc-halo {
  fill: rgba(111, 177, 255, 0.18);
}

.bc-star-g:hover .bc-star {
  transform: scale(1.35);
}

.bc-cursor {
  fill: var(--blog-star-blue);
  filter: drop-shadow(0 0 4px var(--blog-star-blue));
  transition: cx 0.5s var(--ease, ease-out), cy 0.4s linear;
  animation: bc-cursor-pulse 2s ease-in-out infinite;
}

@keyframes bc-cursor-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

.bc-sections {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.2rem;
}

.bc-section {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s;
  color: var(--muted);
}

.bc-section:hover {
  background: rgba(111, 177, 255, 0.06);
  border-color: rgba(111, 177, 255, 0.18);
}

.bc-section.is-active {
  background:
    linear-gradient(90deg, rgba(232, 162, 61, 0.12), rgba(111, 177, 255, 0.06) 80%);
  border-color: rgba(232, 162, 61, 0.28);
  color: var(--ink);
}

.bc-section__num {
  font: 800 0.6rem var(--font-mono);
  letter-spacing: 0.06em;
  color: rgba(232, 162, 61, 0.78);
}

.bc-section.is-active .bc-section__num {
  color: var(--blog-star-warm);
}

.bc-section__label {
  font: 600 0.78rem var(--font-main);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bc-section__lines {
  font: 700 0.55rem var(--font-mono);
  letter-spacing: 0.05em;
  color: var(--muted-2);
  text-transform: uppercase;
}

.blog-constellation__hint {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.1rem;
  font: 600 0.62rem var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--muted-2);
}

.bc-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blog-star-blue);
  box-shadow: 0 0 8px var(--blog-star-blue);
  animation: card-star-twinkle 2.2s ease-in-out infinite;
}

.blog-flow .bc-flash {
  animation: bc-flash 1.4s ease-out;
}

@keyframes bc-flash {
  0%   { background: rgba(111, 177, 255, 0.18); }
  100% { background: transparent; }
}

@media (max-width: 1000px) {
  .blog-constellation {
    display: grid;
    grid-template-columns: minmax(74px, 0.32fr) minmax(0, 1fr);
    gap: 0.65rem;
    padding: 0.85rem;
    margin-bottom: 0;
    border-radius: 18px;
    background:
      radial-gradient(90% 70% at 0% 0%, rgba(111, 177, 255, 0.16), transparent 68%),
      radial-gradient(80% 90% at 100% 100%, rgba(232, 162, 61, 0.12), transparent 62%),
      linear-gradient(135deg, rgba(7, 19, 32, 0.9), rgba(12, 16, 34, 0.78));
  }

  .blog-constellation__hd,
  .blog-constellation__hint {
    grid-column: 1 / -1;
  }

  .blog-constellation__hd {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
  }

  .blog-constellation__eyebrow {
    font-size: 0.56rem;
    letter-spacing: 0.14em;
  }

  .blog-constellation__stat {
    font-size: 0.56rem;
  }

  .blog-constellation__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0.32rem 0.58rem;
    border: 1px solid rgba(111, 177, 255, 0.24);
    border-radius: 999px;
    background: rgba(111, 177, 255, 0.1);
    color: var(--blog-star-blue);
    font: 800 0.56rem var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .blog-constellation__viewport {
    grid-column: 1;
    height: 176px;
    min-height: 176px;
    border-radius: 14px;
  }

  .bc-sections {
    grid-column: 2;
    align-content: start;
    max-height: 176px;
    overflow: auto;
    padding-right: 0.15rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .bc-section {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.42rem;
    padding: 0.44rem 0.5rem;
  }

  .bc-section__label {
    font-size: 0.72rem;
  }

  .bc-section__lines {
    grid-column: 2;
    margin-top: -0.25rem;
    font-size: 0.5rem;
  }

  .blog-constellation:not(.is-expanded) .blog-constellation__hint {
    display: none;
  }

  .blog-constellation.is-expanded {
    grid-template-columns: 1fr;
  }

  .blog-constellation.is-expanded .blog-constellation__viewport,
  .blog-constellation.is-expanded .bc-sections {
    grid-column: 1;
  }

  .blog-constellation.is-expanded .blog-constellation__viewport {
    height: min(58vh, 430px);
    min-height: 320px;
  }

  .blog-constellation.is-expanded .bc-sections {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 520px) {
  .blog-constellation {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .blog-constellation__hd {
    grid-template-columns: 1fr auto;
  }

  .blog-constellation__stat {
    display: none;
  }

  .blog-constellation__viewport,
  .bc-sections {
    max-height: 168px;
  }

  .blog-constellation__viewport {
    height: 168px;
    min-height: 168px;
  }

  .bc-section {
    padding-left: 0.42rem;
    padding-right: 0.42rem;
  }

  .bc-section__num {
    font-size: 0.54rem;
  }
}

/* ════════════════════════════════════════════════════
 * Article reading polish — space-program touches
 * ════════════════════════════════════════════════════ */

.blog-article__hero {
  position: relative;
}

.blog-article__hero .section-label {
  position: relative;
  z-index: 2;
}

.blog-article__hero .section-label::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 0.55rem;
  border-radius: 50%;
  background: var(--blog-star-warm);
  box-shadow: 0 0 10px var(--blog-star-warm);
  animation: card-star-twinkle 2.4s ease-in-out infinite;
  vertical-align: middle;
}

/* H2 anchor markers — a small star at the leading edge of every section
   heading evokes the cover-art aesthetic without crowding the text. */
.blog-article-page .blog-flow h2 {
  padding-left: 1.8rem;
}

.blog-article-page .blog-flow h2::before {
  /* repurposes the existing bar into a vertical orbit ring */
  width: 6px;
  height: 6px;
  top: 2.05rem;
  left: 0;
  border-radius: 50%;
  background: var(--blog-star-warm);
  box-shadow:
    0 0 0 4px rgba(232, 162, 61, 0.12),
    0 0 12px rgba(232, 162, 61, 0.55);
  opacity: 1;
}

.blog-article-page .blog-flow h2::after {
  top: 1.95rem;
  left: 1rem;
  color: rgba(232, 162, 61, 0.75);
}

@media (max-width: 680px) {
  .blog-article-page .blog-flow h2 { padding-left: 1.4rem; }
  .blog-article-page .blog-flow h2::before { top: 1.55rem; }
  .blog-article-page .blog-flow h2::after { top: 1.45rem; left: 0.85rem; }
}

/* Blockquote restyle — feels like a transmission readout */
.blog-article-page .blog-flow blockquote {
  border: 1px solid rgba(111, 177, 255, 0.18);
  background:
    radial-gradient(60% 100% at 0% 50%, rgba(74, 159, 255, 0.08), transparent 70%),
    linear-gradient(135deg, rgba(7, 19, 32, 0.55), rgba(13, 30, 55, 0.4));
  padding: 1.6rem 1.6rem 1.6rem 2.4rem;
}

.blog-article-page .blog-flow blockquote::before {
  content: "◐";
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--blog-star-warm);
  opacity: 0.8;
  top: 0.9rem;
  left: 0.9rem;
}

.blog-article-page .blog-flow blockquote::after {
  content: "TRANSMISSION";
  position: absolute;
  top: 0.6rem;
  right: 0.9rem;
  font: 800 0.55rem var(--font-mono);
  letter-spacing: 0.18em;
  color: rgba(232, 162, 61, 0.55);
}

/* Drop cap restyled as a sealed-envelope monogram */
.blog-article-page .blog-flow > p:first-child::first-letter {
  color: var(--blog-star-warm);
  text-shadow: 0 0 24px rgba(232, 162, 61, 0.35);
}

/* End-of-note dot becomes a small star */
.blog-flow__end-dot {
  background: var(--blog-star-warm);
  box-shadow: 0 0 12px var(--blog-star-warm);
}

/* Reading spine retired — constellation map replaced it */

/* ── Hover affordance on whole card ─────────────── */
.blog-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
    rgba(13, 24, 44, 0.78);
}

.blog-card:hover {
  border-color: rgba(232, 162, 61, 0.35);
  box-shadow:
    0 36px 80px rgba(0, 0, 0, 0.65),
    0 0 60px rgba(232, 162, 61, 0.14);
}

.blog-card--featured:hover {
  border-color: rgba(232, 162, 61, 0.45);
  box-shadow:
    0 50px 120px rgba(0, 0, 0, 0.7),
    0 0 80px rgba(232, 162, 61, 0.18);
}

/* ── Card spotlight tinted warm gold ─────────────── */
.blog-card__spotlight {
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(232, 162, 61, 0.16), rgba(111, 177, 255, 0.06) 30%, transparent 55%);
}

/* ── Toolbar acquires a small star tick ─────────── */
.blog-toolbar::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blog-star-blue);
  box-shadow: 0 0 10px var(--blog-star-blue);
  margin-left: 0.1rem;
  margin-right: 0.1rem;
  align-self: center;
  animation: card-star-twinkle 4s ease-in-out infinite;
}

/* ════════════════════════════════════════════════════
 * Mobile refinements
 * ════════════════════════════════════════════════════ */
@media (max-width: 680px) {
  .blog-card .blog-card__visual { height: 180px; border-radius: 18px 18px 0 0; }
  .blog-card .blog-card__link > .blog-card__meta,
  .blog-card .blog-card__link > h3,
  .blog-card .blog-card__link > p,
  .blog-card .blog-card__link > .blog-card__bottom,
  .blog-card .blog-card__link > .blog-card__constellation {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .blog-card .blog-card__link > .blog-card__meta { padding-top: 0.85rem; }
  .blog-card .blog-card__link > .blog-card__bottom { padding-bottom: 0.95rem; }
  .blog-card__constellation { height: 44px; }
  .blog-card--featured .blog-card__visual { min-height: 200px; border-radius: 20px 20px 0 0; }
  .blog-card--featured .blog-card__content { padding: 1.2rem; gap: 0.65rem; }

  .blog-stars { inset: -5% 0; }
  .blog-stars__layer { height: 280vh; }

  .blog-article-page .blog-flow blockquote::after { display: none; }
}

@media (max-width: 420px) {
  .blog-card .blog-card__visual { height: 160px; }
  .blog-card__coords { font-size: 0.52rem; padding: 0.15rem 0.42rem; }
}

/* ════════════════════════════════════════════════════
 * Reading spine — hidden (constellation map replaces it)
 * ════════════════════════════════════════════════════ */
.blog-spine {
  display: none !important;
}

/* ════════════════════════════════════════════════════
 * Scroll reveal for article paragraphs
 * ════════════════════════════════════════════════════ */
.flow-block {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.flow-block.is-visible {
  opacity: 1;
  transform: none;
}

/* H2 headings rise with a slightly longer arc */
h2.flow-block {
  transition-duration: 0.75s;
  transform: translateY(24px);
}

h2.flow-block.is-visible {
  transform: none;
}

/* Blockquotes slide in from slightly further and with a subtle scale */
blockquote.flow-block {
  transition-duration: 0.8s;
  transform: translateY(22px) scale(0.99);
}

blockquote.flow-block.is-visible {
  transform: none;
}

/* ════════════════════════════════════════════════════
 * Punchy single-line paragraphs (Pretext-detected)
 * ════════════════════════════════════════════════════ */
.blog-flow__punchy {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.45;
  letter-spacing: -0.006em;
}

/* If a punchy line immediately follows another, the pair reads as a
   couplet — give it a tad more space to breathe */
.blog-flow__punchy + .blog-flow__punchy {
  margin-top: -0.55rem;
}

/* ════════════════════════════════════════════════════
 * Reading rhythm strip — retired
 * The left gutter rail pulled too much attention away
 * from the article, so it stays hidden even if JS
 * still appends it.
 * ════════════════════════════════════════════════════ */
.blog-rhythm-strip {
  display: none !important;
}

.blog-flow:hover .blog-rhythm-strip {
  display: none !important;
}

.rhythm-seg {
  display: none !important;
}

.rhythm-seg--head  { background: rgba(244, 236, 216, 0.4); flex: 0 0 6px !important; }
.rhythm-seg--quote { background: #ff9a8a; }
.rhythm-seg--d0    { background: var(--blog-star-blue); }
.rhythm-seg--d1    { background: #4a9fff; }
.rhythm-seg--d2    { background: var(--blog-star-warm); }
.rhythm-seg--d3    { background: #e8443d; }

/* Active-paragraph highlight: the rhythm strip bead matching the
   focused paragraph gets a glow. The focus-line JS already adds
   .is-focused to the active block; we use sibling/parent selectors
   to reach the strip's segment. Since we can't do that from CSS alone
   (the strip is appended to the flow), we add a JS class instead. */
.rhythm-seg.is-active {
  filter: brightness(1.6) drop-shadow(0 0 4px currentColor);
  transform: scaleX(1.8);
  transform-origin: left center;
}

@media (max-width: 1000px) {
  .blog-rhythm-strip { display: none; }
}

/* ════════════════════════════════════════════════════
 * Reduced motion: keep the visual but kill the loops
 * ════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .blog-card__star,
  .blog-index__head .eyebrow::after,
  .blog-article__hero .section-label::after,
  .blog-toolbar::before,
  .bc-cursor {
    animation: none;
  }

  .flow-block {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
