/* ═══════════════════════════════════════════════════════════
   Analog Array — Blog
   Dark-only, Apple-style. Aligned with analogarray.org.
   ═══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --apple-black:         #000000;
  --apple-white:         #ffffff;
  --apple-near-black:    #1d1d1f;
  --apple-blue:          #0071e3;
  --apple-blue-hover:    #0077ed;
  --apple-link-dark:     #2997ff;

  --text-primary:        rgba(255, 255, 255, 0.94);
  --text-body:           rgba(255, 255, 255, 0.66);
  --text-muted:          rgba(255, 255, 255, 0.46);
  --text-subtle:         rgba(255, 255, 255, 0.32);

  --rule:                rgba(255, 255, 255, 0.08);
  --rule-soft:           rgba(255, 255, 255, 0.05);

  --lab:                 #67c2e9;
  --field:               #7ec78d;
  --grind:               #f0b35a;

  --ease-out-expo:       cubic-bezier(0.16, 1, 0.30, 1);

  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-text:    -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--apple-black);
  color: var(--text-primary);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.52;
  letter-spacing: -0.01em;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--apple-blue);
  outline-offset: 2px;
}

.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--apple-blue); color: #fff;
  font-size: 12px; padding: 8px 16px; z-index: 9999;
  transition: top 0.15s; text-decoration: none;
}
.skip-link:focus { top: 0; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 48px;
  position: relative;
}

/* ═══════════════════════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════════════════════ */
nav.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 52px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex; align-items: center;
  transition: background 0.4s ease, border-color 0.4s ease;
}
nav.site-nav.scrolled {
  background: rgba(0, 0, 0, 0.84);
  border-bottom-color: rgba(255, 255, 255, 0.09);
}

.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 48px;
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 500;
  color: var(--apple-white);
  text-decoration: none;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 9px;
}
.nav-logo-mark { width: 18px; height: 18px; display: block; flex-shrink: 0; }
.nav-logo-sub {
  font-size: 12px;
  color: var(--text-subtle);
  font-weight: 400;
  letter-spacing: 0;
}

.nav-links {
  display: flex; gap: 32px; list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  font-family: var(--font-text);
  font-size: 12px; font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 1px; background: currentColor; opacity: 0.7;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.28s var(--ease-out-expo);
}
.nav-links a:hover,
.nav-links a.active { color: var(--apple-white); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

.nav-right { display: flex; align-items: center; }

.nav-hamburger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; cursor: pointer;
  background: none; border: none; padding: 10px;
}
.nav-hamburger span {
  display: block; width: 18px; height: 1.5px;
  background: var(--apple-white);
  transition: transform 0.3s var(--ease-out-expo), opacity 0.25s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile-overlay {
  display: none; position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  z-index: 99;
  flex-direction: column;
  justify-content: center; align-items: center;
}
.nav-mobile-overlay.open { display: flex; }
.nav-mobile-links {
  list-style: none; display: flex; flex-direction: column;
  align-items: stretch; width: 100%; padding: 0; margin: 0;
}
.nav-mobile-links li { width: 100%; border-bottom: 1px solid rgba(255,255,255,0.08); }
.nav-mobile-links li:first-child { border-top: 1px solid rgba(255,255,255,0.08); }
.nav-mobile-links a {
  display: block; padding: 22px 48px;
  font-family: var(--font-display); font-size: 26px; font-weight: 500;
  color: var(--apple-white); text-decoration: none;
  letter-spacing: -0.02em;
  transition: color 0.2s;
}
.nav-mobile-links a:hover { color: rgba(255,255,255,0.52); }

/* ═══════════════════════════════════════════════════════════
   HOMEPAGE HERO
   ═══════════════════════════════════════════════════════════ */
.hero {
  --hero-shift-x: 0px;
  --hero-shift-y: 0px;
  --hero-glow-x: 82%;
  --hero-glow-y: 18%;
  background: var(--apple-black);
  min-height: 100vh;
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 128px 0 140px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 65% 55% at 18% 82%, rgba(0, 113, 227, 0.075) 0%, transparent 70%),
    radial-gradient(ellipse 45% 35% at var(--hero-glow-x) var(--hero-glow-y), rgba(255, 255, 255, 0.018) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
}
.hero::after {
  content: '';
  position: absolute;
  inset: -6%;
  background: radial-gradient(circle at var(--hero-glow-x) var(--hero-glow-y), rgba(0, 113, 227, 0.13) 0%, rgba(0, 113, 227, 0.045) 16%, transparent 42%);
  opacity: 0.55;
  pointer-events: none; z-index: 0;
  transition: opacity 0.45s ease;
}
.hero-topology {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
  transform: translate3d(var(--hero-shift-x), var(--hero-shift-y), 0) scale(1.01);
  transform-origin: center center;
  will-change: transform, filter;
  filter: drop-shadow(0 0 18px rgba(0, 113, 227, 0.04));
}
.hero[data-hero-active="true"]::after { opacity: 0.8; }
.hero[data-hero-active="true"] .hero-topology {
  filter: drop-shadow(0 0 26px rgba(0, 113, 227, 0.08));
}
@keyframes signalPulse {
  0%, 100% { opacity: 0.12; r: 8; }
  50%       { opacity: 0.04; r: 14; }
}
.hero-topology .node-pulse { animation: signalPulse 5s ease-in-out infinite; }
@keyframes signalPulse2 {
  0%, 100% { opacity: 0.08; }
  50%       { opacity: 0.02; }
}
.hero-topology .node-pulse-2 { animation: signalPulse2 7s ease-in-out infinite 1.5s; }

.hero-copy {
  position: relative; z-index: 1;
  min-width: 0; max-width: 720px;
}

.hero-eyebrow {
  font-family: var(--font-text);
  font-size: 12px; font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 24px;
  letter-spacing: 0.01em;
  display: flex; align-items: center; gap: 14px;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block; width: 28px; height: 1px;
  background: rgba(255,255,255,0.24);
  flex-shrink: 0;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 84px);
  font-weight: 300;
  color: var(--apple-white);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin-bottom: 36px;
}

.hero-tagline {
  font-family: var(--font-text);
  font-size: 19px; font-weight: 400;
  color: var(--text-body);
  max-width: 600px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  margin-bottom: 44px;
}

.hero-cta-row {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}

.hero-cta {
  font-family: var(--font-text);
  font-size: 15px; font-weight: 500;
  background: var(--apple-blue); color: #fff;
  padding: 14px 28px; border-radius: 980px;
  border: 1px solid var(--apple-blue);
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  transition: background 0.2s, transform 0.25s var(--ease-out-expo), box-shadow 0.25s, border-color 0.2s;
  letter-spacing: -0.005em;
  box-shadow: 0 2px 12px rgba(0, 113, 227, 0.28);
  white-space: nowrap;
}
.hero-cta:visited { color: #fff; }
.hero-cta:hover {
  background: var(--apple-blue-hover);
  border-color: var(--apple-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 113, 227, 0.42);
}
.hero-cta:active { transform: translateY(0); box-shadow: 0 1px 6px rgba(0,113,227,0.3); }

.hero-link {
  font-family: var(--font-text);
  font-size: 15px; font-weight: 400;
  color: rgba(255,255,255,0.82);
  padding: 14px 24px; border-radius: 980px;
  border: 1px solid rgba(255,255,255,0.16);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s var(--ease-out-expo);
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.hero-link:visited { color: rgba(255,255,255,0.82); }
.hero-link:hover {
  color: var(--apple-white);
  border-color: rgba(255,255,255,0.4);
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.02);
}

.hero-scroll {
  position: absolute; bottom: 44px; right: 48px;
  font-size: 10px; color: var(--text-subtle);
  letter-spacing: 0.2em; text-transform: uppercase;
  writing-mode: vertical-rl;
  display: flex; align-items: center; gap: 12px;
  animation: floatY 3.5s ease-in-out infinite;
}
.hero-scroll::after {
  content: '';
  writing-mode: horizontal-tb;
  display: inline-block;
  width: 1px; height: 32px;
  background: rgba(255,255,255,0.14);
}
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(10px); } }

/* ═══════════════════════════════════════════════════════════
   SECTION RHYTHM
   ═══════════════════════════════════════════════════════════ */
section { position: relative; z-index: 1; }

.section-block {
  padding: 120px 0;
  border-top: 1px solid var(--rule);
}

.section-eyebrow {
  font-family: var(--font-text);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 56px;
  display: flex; align-items: center; gap: 14px;
}
.section-eyebrow::before {
  content: '';
  display: inline-block; width: 22px; height: 1px;
  background: rgba(255,255,255,0.22);
  flex-shrink: 0;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 300;
  letter-spacing: -0.022em;
  line-height: 1.14;
  color: var(--text-primary);
  margin-bottom: 18px;
  max-width: 640px;
}

.section-sub {
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-body);
  max-width: 560px;
  margin-bottom: 56px;
}

/* ═══════════════════════════════════════════════════════════
   TRACKS (homepage section index)
   ═══════════════════════════════════════════════════════════ */
.tracks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.track-card {
  display: block;
  padding: 36px 32px 36px 0;
  text-decoration: none;
  color: var(--text-primary);
  border-bottom: 1px solid var(--rule);
  transition: background 0.2s, padding-left 0.3s var(--ease-out-expo);
  position: relative;
}
.track-card + .track-card { border-left: 1px solid var(--rule); padding-left: 32px; }
.track-card:visited { color: var(--text-primary); }
.track-card:hover { background: rgba(255,255,255,0.018); }

.track-label {
  font-family: var(--font-text);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--apple-link-dark);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.track-label .track-num {
  color: var(--text-subtle);
  letter-spacing: 0.08em;
}
.track-card.lab .track-label   { color: var(--lab); }
.track-card.field .track-label { color: var(--field); }
.track-card.grind .track-label { color: var(--grind); }

.track-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1.15;
  color: var(--apple-white);
  margin-bottom: 12px;
}
.track-desc {
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-body);
  margin-bottom: 24px;
}
.track-cta {
  font-family: var(--font-text);
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: -0.005em;
  transition: color 0.18s;
}
.track-card:hover .track-cta { color: var(--apple-white); }

/* ═══════════════════════════════════════════════════════════
   POST FEED (latest on homepage / tag pages)
   ═══════════════════════════════════════════════════════════ */
.post-feed {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--rule);
}

.post-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 32px;
  align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--text-primary);
  transition: padding-left 0.3s var(--ease-out-expo);
}
.post-row:visited { color: var(--text-primary); }
.post-row:hover { padding-left: 8px; }
.post-row:hover .post-row-title { color: var(--apple-white); }

.post-row-track {
  font-family: var(--font-text);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--apple-link-dark);
}
.post-row-track.the-lab   { color: var(--lab); }
.post-row-track.the-field { color: var(--field); }
.post-row-track.the-grind { color: var(--grind); }

.post-row-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.018em;
  color: var(--text-primary);
  line-height: 1.3;
  transition: color 0.18s;
}

.post-row-date {
  font-family: var(--font-text);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: -0.005em;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   SECTION / LIST PAGES — page hero + case teasers
   ═══════════════════════════════════════════════════════════ */
.page-main { min-height: 100vh; }

.page-hero {
  padding: 140px 0 72px;
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 85% 0%, rgba(0,113,227,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }

.page-crumbs {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-text);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 32px;
  letter-spacing: 0.005em;
}
.page-crumbs a { color: var(--text-muted); text-decoration: none; transition: color 0.18s; }
.page-crumbs a:visited { color: var(--text-muted); }
.page-crumbs a:hover { color: var(--apple-white); }
.page-crumbs span { color: var(--text-subtle); }

.page-kicker {
  font-family: var(--font-text);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--apple-link-dark);
  margin-bottom: 20px;
}
.page-kicker.the-lab   { color: var(--lab); }
.page-kicker.the-field { color: var(--field); }
.page-kicker.the-grind { color: var(--grind); }

.page-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6.4vw, 76px);
  font-weight: 300;
  letter-spacing: -0.032em;
  line-height: 1.02;
  color: var(--apple-white);
  margin-bottom: 28px;
  max-width: 880px;
}

.page-lead {
  font-family: var(--font-text);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-body);
  max-width: 680px;
  margin-bottom: 0;
}

.page-content {
  padding: 96px 0 120px;
}

/* Case-teaser grid (used for image-led section indexes) */
.case-teaser-grid {
  display: grid;
  gap: 96px;
}

.case-teaser {
  display: block;
  text-decoration: none;
  color: var(--text-primary);
}
.case-teaser:visited { color: var(--text-primary); }

.case-teaser-split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.case-teaser:nth-child(even) .case-teaser-split {
  grid-template-columns: 1.1fr 1fr;
}
.case-teaser:nth-child(even) .case-teaser-media { order: 2; }

.case-teaser-copy { min-width: 0; }

.case-teaser-media {
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--rule);
  background: rgba(255,255,255,0.03);
  aspect-ratio: 16 / 11;
}
.case-teaser-media img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.6s var(--ease-out-expo);
}
.case-teaser:hover .case-teaser-media img { transform: scale(1.015); }

.case-teaser-text {
  padding: 36px 36px 36px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.case-teaser-text .case-teaser-copy { max-width: 720px; }

.case-teaser-meta {
  font-family: var(--font-text);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--apple-link-dark);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.case-teaser-meta .case-teaser-date { color: var(--text-muted); }
.case-teaser-meta.the-lab   { color: var(--lab); }
.case-teaser-meta.the-field { color: var(--field); }
.case-teaser-meta.the-grind { color: var(--grind); }

.case-teaser-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 400;
  letter-spacing: -0.022em;
  line-height: 1.1;
  color: var(--apple-white);
  margin-bottom: 20px;
}

.case-teaser-desc {
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-body);
  margin-bottom: 24px;
  max-width: 520px;
}

.case-teaser-cta {
  font-family: var(--font-text);
  font-size: 14px;
  color: var(--apple-link-dark);
  text-decoration: none;
  letter-spacing: -0.005em;
  border-bottom: 1px solid rgba(41,151,255,0.3);
  padding-bottom: 2px;
  transition: color 0.18s, border-color 0.18s;
}
.case-teaser:hover .case-teaser-cta {
  color: var(--apple-white);
  border-color: var(--apple-white);
}

.no-posts {
  font-family: var(--font-text);
  font-size: 15px;
  color: var(--text-muted);
  padding: 40px 0;
}

/* ═══════════════════════════════════════════════════════════
   TAG INDEX
   ═══════════════════════════════════════════════════════════ */
.tag-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
}
.tag-index-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--text-primary);
  transition: color 0.18s;
}
.tag-index-item + .tag-index-item { padding-left: 24px; }
.tag-index-item:visited { color: var(--text-primary); }
.tag-index-item:hover { color: var(--apple-white); }

.tag-index-name {
  font-family: var(--font-text);
  font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--text-primary);
}
.tag-index-count {
  font-family: var(--font-text);
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════════════════
   POST PAGE
   ═══════════════════════════════════════════════════════════ */
.reading-progress-wrap {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 200;
}
.reading-progress {
  height: 100%; width: 0;
  background: var(--apple-blue);
  transition: width 0.1s linear;
}
.section-the-lab   .reading-progress { background: var(--lab); }
.section-the-field .reading-progress { background: var(--field); }
.section-the-grind .reading-progress { background: var(--grind); }

.post-meta {
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-text);
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 32px;
}
.post-meta .post-meta-sep { color: var(--text-subtle); }
.post-meta .post-tag-link {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  padding-bottom: 1px;
  transition: color 0.18s, border-color 0.18s;
}
.post-meta .post-tag-link:hover { color: var(--apple-white); border-color: var(--apple-white); }

.post-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 72px;
  align-items: start;
}
.post-grid.no-sidebar { grid-template-columns: 1fr; }

.post-grid > aside {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 28px;
}

.sidebar-card { padding: 0; }
.sidebar-label {
  font-family: var(--font-text);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.spec-list { list-style: none; padding: 0; margin: 0; }
.spec-row {
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 4px;
}
.spec-row:last-child { border-bottom: 1px solid var(--rule); }
.spec-key {
  font-family: var(--font-text);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.spec-val {
  font-family: var(--font-text);
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
}

.toc-card #TableOfContents { font-family: var(--font-text); }
.toc-card #TableOfContents ul { list-style: none; padding: 0; margin: 0; }
.toc-card #TableOfContents li {
  padding: 8px 0;
  border-top: 1px solid var(--rule);
}
.toc-card #TableOfContents li:first-child { border-top: none; }
.toc-card #TableOfContents a {
  font-size: 13px;
  color: var(--text-body);
  text-decoration: none;
  line-height: 1.45;
  display: block;
  transition: color 0.18s;
}
.toc-card #TableOfContents a:hover { color: var(--apple-white); }
.toc-card #TableOfContents ul ul { padding-left: 12px; margin-top: 6px; }
.toc-card #TableOfContents ul ul li { border-top: none; padding: 4px 0; }
.toc-card #TableOfContents ul ul a { font-size: 12px; color: var(--text-muted); }

/* ── Body ───────────────────────────────────────────────────── */
.post-body { min-width: 0; }

.post-body p,
.post-body li {
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.62;
  color: var(--text-body);
}
.post-body p { margin-bottom: 22px; max-width: 680px; }

.post-body h2,
.post-body h3,
.post-body h4 {
  font-family: var(--font-display);
  color: var(--apple-white);
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1.2;
}
.post-body h2 {
  font-size: clamp(24px, 2.8vw, 30px);
  margin: 56px 0 18px;
}
.post-body h3 {
  font-size: 21px;
  margin: 40px 0 14px;
  letter-spacing: -0.018em;
}
.post-body h4 {
  font-size: 16px;
  margin: 32px 0 10px;
  letter-spacing: -0.012em;
}

.post-body ul,
.post-body ol {
  padding-left: 24px;
  margin-bottom: 22px;
  max-width: 680px;
}
.post-body li { margin-bottom: 6px; }
.post-body li::marker { color: var(--text-muted); }

.post-body table {
  width: 100%;
  max-width: 760px;
  border-collapse: collapse;
  margin: 30px 0;
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-body);
  border: 1px solid var(--rule);
  overflow-wrap: anywhere;
}
.post-body th,
.post-body td {
  padding: 11px 14px;
  border: 1px solid var(--rule);
  vertical-align: top;
  text-align: left;
}
.post-body th {
  color: var(--text-primary);
  font-weight: 600;
  background: rgba(255,255,255,0.06);
}
.post-body tr:nth-child(even) td { background: rgba(255,255,255,0.025); }

.post-body strong { color: var(--text-primary); font-weight: 600; }
.post-body em { color: var(--text-primary); }

.post-body blockquote {
  margin: 32px 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--apple-link-dark);
  background: rgba(41,151,255,0.04);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.5;
  color: var(--text-primary);
  max-width: 680px;
}
.post-body blockquote p { font-size: inherit; color: inherit; max-width: none; margin: 0; }
.post-body blockquote p + p { margin-top: 12px; }

.post-body pre {
  background: #0a0a0a;
  color: var(--text-primary);
  padding: 22px 26px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  margin: 28px 0;
  border: 1px solid var(--rule);
}
.post-body :not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(255,255,255,0.06);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--rule);
  color: var(--text-primary);
}
.post-body pre code {
  background: none;
  padding: 0;
  border: none;
  color: inherit;
  font-size: inherit;
}

.post-body picture,
.post-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 32px 0;
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: rgba(255,255,255,0.02);
  cursor: zoom-in;
}
.post-body picture img { margin: 0; border: none; border-radius: inherit; }

.post-body a {
  color: var(--apple-link-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(41,151,255,0.35);
  padding-bottom: 1px;
  transition: color 0.18s, border-color 0.18s;
}
.post-body a:hover { color: var(--apple-white); border-color: var(--apple-white); }

.post-body hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 48px 0;
}

/* ── Post footer / nav ────────────────────────────────────── */
.post-footer {
  margin-top: 96px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.post-footer-back {
  font-family: var(--font-text);
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: -0.005em;
  transition: color 0.18s;
}
.post-footer-back:hover { color: var(--apple-white); }

.post-nav {
  display: flex; gap: 24px; flex-wrap: wrap;
  justify-content: flex-end;
  font-family: var(--font-text);
  font-size: 13px;
}
.post-nav-link {
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: -0.005em;
  transition: color 0.18s;
  max-width: 240px;
  text-align: right;
}
.post-nav-link.prev { text-align: left; }
.post-nav-link:hover { color: var(--apple-white); }

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
footer.site-footer {
  background: var(--apple-black);
  border-top: 1px solid var(--rule);
  padding: 28px 0;
}
.footer-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 48px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
}
.footer-left, .footer-right {
  font-family: var(--font-text);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: -0.005em;
}
.footer-right { display: flex; align-items: center; gap: 10px; }
.footer-right a { color: var(--text-muted); text-decoration: none; transition: color 0.15s; }
.footer-right a:visited { color: var(--text-muted); }
.footer-right a:hover { color: var(--apple-white); }
.footer-sep { color: var(--text-subtle); }

/* ═══════════════════════════════════════════════════════════
   LIGHTBOX
   ═══════════════════════════════════════════════════════════ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  z-index: 300;
  cursor: zoom-out;
}
.lightbox-img {
  max-width: min(1200px, 100%);
  max-height: calc(100vh - 96px);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 22px; right: 22px;
  width: 42px; height: 42px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.6);
  color: var(--apple-white);
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}
.lightbox-close:hover {
  background: rgba(0,0,0,0.85);
  border-color: rgba(255,255,255,0.4);
  transform: scale(1.05);
}

/* ═══════════════════════════════════════════════════════════
   FADE-IN
   ═══════════════════════════════════════════════════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
  will-change: opacity, transform;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .hero-scroll { animation: none; }
  .hero::after { display: none; }
  .hero-topology { transform: none; filter: none; }
  .hero-topology .node-pulse,
  .hero-topology .node-pulse-2 { animation: none; }
  .fade-in { transition: none; opacity: 1; transform: none; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .post-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .post-grid > aside { position: static; }

  .case-teaser-split,
  .case-teaser:nth-child(even) .case-teaser-split {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .case-teaser:nth-child(even) .case-teaser-media { order: 0; }

  .tracks-grid { grid-template-columns: 1fr; }
  .track-card + .track-card { border-left: none; padding-left: 0; }
  .track-card { padding-right: 0; }
}

@media (max-width: 768px) {
  .container,
  .nav-inner,
  .footer-inner {
    padding: 0 24px;
  }

  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-logo-sub { display: none; }

  .hero { padding: 112px 0 88px; min-height: 88vh; }
  .hero-topology { display: none; }
  .hero-scroll { display: none; }

  .section-block { padding: 84px 0; }
  .section-eyebrow { margin-bottom: 40px; }
  .section-sub { margin-bottom: 40px; }

  .page-hero { padding: 116px 0 56px; }
  .page-content { padding: 72px 0 96px; }
  .case-teaser-grid { gap: 56px; }

  .post-row {
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 22px 0;
  }
  .post-row-track {
    grid-column: 1 / -1;
    margin-bottom: 4px;
  }
  .post-row-date { font-size: 11px; }

  .post-body p,
  .post-body li { font-size: 16px; }
  .post-body table {
    display: block;
    overflow-x: auto;
    min-width: 100%;
  }
  .post-body h2 { margin-top: 44px; }

  .post-footer { flex-direction: column; align-items: flex-start; }
  .post-nav { justify-content: flex-start; }
  .post-nav-link { text-align: left; }

  .footer-inner { flex-direction: column; align-items: flex-start; }

  .hero-cta-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-cta, .hero-link { justify-content: center; min-height: 44px; }
}

@media (max-width: 480px) {
  .container,
  .nav-inner,
  .footer-inner { padding: 0 20px; }
  .nav-mobile-links a { padding: 20px 24px; font-size: 22px; }
  .hero-tagline { font-size: 17px; }
  .hero-eyebrow { font-size: 11px; }
}
