/* ── Series navigation box ────────────────────────────────────── */
.series-nav {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid #f06400;
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  margin: 1.5rem 0 2rem;
}
.series-nav-title {
  color: #f06400;
  font-weight: 700;
  font-size: 0.82em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.series-nav > p {
  color: #cccccc;
  font-size: 0.95em;
  margin: 0 0 0.9rem;
}
.series-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}
.series-nav-list li {
  padding: 0.55rem 0 0.55rem 1.1rem;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.2rem;
}
.series-nav-list li.is-current {
  border-left-color: #f06400;
}
.series-nav-list a,
.series-nav-list .series-nav-here {
  display: block;
  font-weight: 700;
  font-size: 0.95em;
  line-height: 1.45;
  text-decoration: none;
}
.series-nav-list a {
  color: #ffffff;
  transition: color 0.2s ease;
}
.series-nav-list a:hover {
  color: #f06400;
}
.series-nav-list .series-nav-here {
  color: #f06400;
}
.series-nav-list .series-nav-blurb {
  display: block;
  color: #888888;
  font-size: 0.88em;
  line-height: 1.5;
  margin-top: 0.15rem;
}
.series-nav-list li.is-current .series-nav-here::after {
  content: "You are here";
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid rgba(240, 100, 0, 0.35);
  border-radius: 999px;
  background: rgba(240, 100, 0, 0.1);
  color: #f06400;
  font-size: 0.72em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

/* ── "Read Part N →" call to action ───────────────────────────── */
.series-cta {
  margin: 1rem 0 0.5rem;
}
.series-cta a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  background: rgba(240, 100, 0, 0.1);
  border: 1px solid rgba(240, 100, 0, 0.28);
  color: #f06400;
  font-weight: 700;
  font-size: 0.92em;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.series-cta a:hover {
  background: rgba(240, 100, 0, 0.18);
  border-color: rgba(240, 100, 0, 0.5);
  transform: translateX(2px);
}

/* ── Prev/next pager closing each part ────────────────────────── */
.series-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2.5rem 0 1rem;
  padding-top: 1.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.series-pager-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1.1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.series-pager-prev {
  align-items: flex-start;
  text-align: left;
}
.series-pager-next {
  align-items: flex-end;
  text-align: right;
  background: rgba(240, 100, 0, 0.08);
  border-color: rgba(240, 100, 0, 0.28);
}
.series-pager-link:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}
.series-pager-next:hover {
  background: rgba(240, 100, 0, 0.16);
  border-color: rgba(240, 100, 0, 0.5);
  transform: translateX(2px);
}
.series-pager-prev:hover {
  transform: translateX(-2px);
}
.series-pager-label {
  font-size: 0.75em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888888;
}
.series-pager-next .series-pager-label {
  color: #f06400;
}
.series-pager-title {
  font-size: 0.95em;
  font-weight: 700;
  line-height: 1.4;
  color: #ffffff;
}
.series-pager-next .series-pager-title {
  color: #f06400;
}
@media (max-width: 600px) {
  .series-pager {
    grid-template-columns: 1fr;
  }
  .series-pager-next,
  .series-pager-prev {
    align-items: flex-start;
    text-align: left;
  }
}

/* ── Display equations (KaTeX) ────────────────────────────────── */
.math-display {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.6rem 0;
  margin: 1.2rem 0 !important;
  text-align: center;
}
.katex {
  font-size: 1.05em;
}
.math-display .katex-display {
  margin: 0;
}

/* ── Code blocks — Prism overrides ────────────────────────────── */
pre[class*="language-"] > code {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  color: inherit !important;
  font-size: inherit !important;
}
pre[class*="language-"] {
  background: #0d1117 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  margin: 1rem 0 1.2rem !important;
  padding: 1rem 1.2rem !important;
  font-size: 0.87rem !important;
  line-height: 1.7 !important;
}

/* ── Figures: static PNGs, click to zoom ──────────────────────── */
/* The exported figures are 1500-2600px wide and would otherwise fill the whole
   1120px text column -- the near-square chaos scatter alone would stand ~1030px
   tall and swamp the page. Cap both axes so every figure sits as a consistent,
   centred block regardless of its aspect ratio; the lightbox (95vw/95vh) still
   serves the full-resolution view on click. */
.blog-figure img {
  cursor: zoom-in;
  max-width: min(100%, 800px);
  max-height: 620px;
  width: auto;
  height: auto;
}

/* Data tables in this series are dense; tighten them up a little.
   The site-wide uppercase transform is dropped here: these headers carry Greek
   letters and cased metric names, and uppercasing renders "ρ" as "Ρ" -- visually
   a Latin "P" -- while flattening labels like "KLD, WikiText-2 ctx512". */
.blog-table thead th {
  padding: 11px 13px;
  font-size: 0.85em;
  text-transform: none;
  letter-spacing: 0.02em;
}
.blog-table tbody td {
  padding: 11px 13px;
  font-size: 0.88em;
  white-space: nowrap;
}
