/* Publication-style podcast blog.
   Reference: mature editorial blogs (archive + masthead + reading measure). */

@font-face {
  font-family: "Geist";
  src: url("https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-sans/Geist-Variable.woff2")
    format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-mono/GeistMono-Variable.woff2")
    format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #0c0d0f;
  --bg-soft: #12141a;
  --surface: #171a21;
  --surface-2: #1e222b;
  --fg: #f2f3f5;
  --fg-2: #c8cdd3;
  --muted: #9aa3b2;
  --faint: #6b7380;
  --accent: #3d9cf0;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-ink: #041018;
  --line: oklch(1 0 0 / 0.09);
  --line-strong: oklch(1 0 0 / 0.14);
  /* Elevation via transparent rings (no solid depth borders) */
  --shadow-border: 0 0 0 1px oklch(1 0 0 / 0.08);
  --shadow-border-hover: 0 0 0 1px oklch(1 0 0 / 0.13);
  --shadow-sm: 0 1px 0 oklch(1 0 0 / 0.04);
  --shadow-md:
    0 0 0 1px oklch(1 0 0 / 0.06),
    0 12px 40px oklch(0 0 0 / 0.35);
  /* Image outline: pure white/black only (never tinted neutrals) */
  --img-outline: oklch(1 0 0 / 0.1);
  /* Concentric scale: outer ≈ inner + padding on nested surfaces */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-series: 30px; /* cover 10 + pad 20 */
  --radius-article: 30px; /* cover 10 + head pad ~20 */
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --wrap: min(1120px, calc(100% - 2.5rem));
  --measure: 42rem;
  --header-h: 64px;
  --player-dock-h: 0px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f6f3;
    --bg-soft: #efece6;
    --surface: #ffffff;
    --surface-2: #f3f1ec;
    --fg: #14161c;
    --fg-2: #3a3f4a;
    --muted: #5c6470;
    --faint: #8a919c;
    --accent: #0b6bcb;
    --accent-soft: color-mix(in srgb, var(--accent) 10%, transparent);
    --accent-ink: #f5faff;
    --line: oklch(0 0 0 / 0.08);
    --line-strong: oklch(0 0 0 / 0.12);
    --shadow-border:
      0 0 0 1px oklch(0 0 0 / 0.06),
      0 1px 2px -1px oklch(0 0 0 / 0.06),
      0 2px 4px 0 oklch(0 0 0 / 0.04);
    --shadow-border-hover:
      0 0 0 1px oklch(0 0 0 / 0.08),
      0 1px 2px -1px oklch(0 0 0 / 0.08),
      0 2px 4px 0 oklch(0 0 0 / 0.06);
    --shadow-sm: 0 1px 0 oklch(0 0 0 / 0.04);
    --shadow-md:
      0 0 0 1px oklch(0 0 0 / 0.05),
      0 14px 36px oklch(0 0 0 / 0.07);
    --img-outline: oklch(0 0 0 / 0.1);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--player-dock-h);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

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

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

/* ========== Site chrome (blog masthead) ========== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: var(--wrap);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--fg);
  min-width: 0;
}

.brand-name {
  font-weight: 650;
  font-size: 1.02rem;
  letter-spacing: -0.03em;
}

.brand-tag {
  font-size: 0.78rem;
  color: var(--faint);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.1rem;
  font-size: 0.9rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  transition-property: color, border-color;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

.site-nav .nav-cta {
  color: var(--accent-ink);
  background: var(--accent);
  border: none;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-weight: 600;
  font-size: 0.84rem;
  text-decoration: none;
  border-bottom: none;
  transition-property: transform, filter;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.site-nav .nav-cta:hover {
  filter: brightness(1.05);
  border-bottom: none;
  color: var(--accent-ink);
}

.site-nav .nav-cta:active {
  transform: scale(0.96);
}

/* ========== Hub / publication home ========== */

.hub-hero {
  padding: 3.25rem 0 2.75rem;
  border-bottom: 1px solid var(--line);
}

.hub-kicker {
  margin: 0 0 0.85rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.hub-hero h1 {
  margin: 0 0 0.9rem;
  font-size: clamp(2.35rem, 5.2vw, 3.5rem);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.08;
  max-width: 14ch;
}

.hub-hero .deck {
  margin: 0;
  max-width: 38rem;
  font-size: 1.12rem;
  color: var(--muted);
  line-height: 1.55;
}

.hub-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--faint);
}

.hub-meta-row strong {
  color: var(--fg-2);
  font-weight: 600;
}

/* Featured series as magazine cover story */
.section {
  padding: 2.75rem 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.section-head .section-note {
  margin: 0;
  font-size: 0.82rem;
  color: var(--faint);
  font-family: var(--mono);
}

.series-card {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 1.25rem 1.5rem;
  padding: 1.25rem; /* 20px → outer 30 with cover 10 */
  background: var(--surface);
  border-radius: var(--radius-series);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: inherit;
  transition-property: transform, box-shadow;
  transition-duration: 180ms;
  transition-timing-function: ease-out;
}

.series-card:hover {
  transform: translateY(-2px);
  box-shadow:
    var(--shadow-md),
    0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent);
}

.series-card:active {
  transform: scale(0.96);
}

.series-cover {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm); /* 10px; 10+20=30 outer */
  object-fit: cover;
  outline: 1px solid var(--img-outline);
  outline-offset: -1px;
  background: var(--surface-2);
}

.series-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding-block: 0.25rem;
}

.series-label {
  margin: 0 0 0.45rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.series-body h3 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.series-body .blurb {
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
  max-width: 48ch;
  white-space: pre-line;
}

.series-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

/* Buttons */
.btn {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.05rem;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  transition-property: transform, background-color, box-shadow, color, filter;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.btn:active:not(:disabled) {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.btn-secondary {
  background: transparent;
  color: var(--fg);
  box-shadow: var(--shadow-border);
}

.btn-secondary:hover {
  background: color-mix(in srgb, var(--fg) 4%, transparent);
  box-shadow: var(--shadow-border-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--fg-2);
  box-shadow: var(--shadow-border);
}

.btn-ghost:hover {
  background: color-mix(in srgb, var(--fg) 5%, transparent);
  color: var(--fg);
  box-shadow: var(--shadow-border-hover);
}

.btn-ghost[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: none;
}

.btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 2px;
}

.btn-ghost:disabled,
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* About / how strip */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 2rem;
}

.about-card {
  padding: 1.25rem 1.35rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-border);
}

.about-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.about-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* Footer */
.site-footer {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding: 2.25rem 0 2.75rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem 2rem;
}

.footer-brand {
  font-weight: 650;
  letter-spacing: -0.03em;
  margin: 0 0 0.4rem;
}

.footer-copy {
  margin: 0;
  color: var(--faint);
  font-size: 0.88rem;
  max-width: 32ch;
  line-height: 1.5;
}

.footer-col h4 {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--faint);
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.footer-col a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--fg);
}

.footer-bottom {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

/* ========== Show / series page ========== */

.show-page .show-masthead {
  padding: 2rem 0 1.75rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1200px 400px at 10% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 55%),
    var(--bg);
}

.show-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 1.25rem;
  font-size: 0.84rem;
  color: var(--faint);
}

.show-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.show-breadcrumb a:hover {
  color: var(--fg);
}

.show-breadcrumb .sep {
  opacity: 0.5;
}

.show-intro {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 1.5rem 1.75rem;
  align-items: start;
}

.show-cover {
  width: 168px;
  height: 168px;
  border-radius: var(--radius); /* independent hero asset, pad > 24px from page edge */
  object-fit: cover;
  box-shadow: var(--shadow-md);
  outline: 1px solid var(--img-outline);
  outline-offset: -1px;
  background: var(--surface);
}

.show-intro-text h1 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.show-byline {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: var(--faint);
  font-family: var(--mono);
}

.show-intro-text .lead {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 52ch;
  white-space: pre-line;
}

.show-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  align-items: center;
}

.feed-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
  padding: 0.4rem 0.65rem 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-border);
  font-size: 0.78rem;
  min-width: 0;
}

.feed-chip .label {
  font-family: var(--mono);
  color: var(--faint);
  flex-shrink: 0;
}

.feed-chip a {
  font-family: var(--mono);
  color: var(--muted);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.feed-chip a:hover {
  color: var(--accent);
}

/* Reading + archive layout */
.show-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 2rem 2.25rem;
  padding: 2rem 0 3.5rem;
  align-items: start;
}

.reading-col,
.archive-col {
  min-width: 0;
}

.col-label {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--faint);
  font-weight: 600;
}

/* Current episode as article */
.article-card {
  background: var(--surface);
  border-radius: var(--radius-article); /* 30 = cover 10 + head pad 20 */
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.article-head {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 1rem 1.15rem;
  padding: 1.25rem 1.35rem 1.1rem; /* ~20px */
  border-bottom: 1px solid var(--line); /* structural divider */
}

.article-cover {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-sm); /* 10 */
  object-fit: cover;
  outline: 1px solid var(--img-outline);
  outline-offset: -1px;
  background: var(--surface-2);
}

.article-kicker {
  margin: 0 0 0.3rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

.article-title {
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.article-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--faint);
  font-family: var(--mono);
}

.article-body {
  padding: 1.25rem 1.4rem 1.5rem;
}

.article-body .prose {
  margin: 0;
  color: var(--fg-2);
  font-size: 1.02rem;
  line-height: 1.7;
  max-width: var(--measure);
  white-space: pre-line;
}

/* Player dock styles live in player.css (compact in-article bar) */

/* Archive list (blog index) */
.archive-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem; /* 6px shell so row thumbs sit concentrically */
  background: var(--surface);
  border-radius: var(--radius-lg); /* 22 ≈ thumb 6 + row pad 10 + shell 6 */
  box-shadow: var(--shadow-md);
  overflow: hidden;
  max-height: min(78vh, 860px);
  overflow-y: auto;
}

.ep-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0.85rem;
  align-items: start;
  padding: 0.75rem 0.7rem; /* ~12px */
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius); /* 14; 6+8 shell feel inside list */
  cursor: pointer;
  background: transparent;
  transition-property: background-color, box-shadow;
  transition-duration: 120ms;
  transition-timing-function: ease-out;
  border-left: 3px solid transparent;
}

.ep-item:last-child {
  border-bottom: none;
}

.ep-item:hover {
  background: color-mix(in srgb, var(--fg) 3.5%, transparent);
}

.ep-item:focus-visible {
  background: color-mix(in srgb, var(--fg) 3.5%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent);
  outline: none;
}

.ep-item.active {
  background: var(--accent-soft);
  border-left-color: var(--accent); /* state border kept */
}

.ep-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-xs); /* 6 */
  object-fit: cover;
  background: var(--surface-2);
  outline: 1px solid var(--img-outline);
  outline-offset: -1px;
}

.ep-thumb.placeholder {
  background: linear-gradient(135deg, var(--accent-soft), var(--surface-2));
}

.ep-body {
  min-width: 0;
}

.ep-num {
  margin: 0 0 0.2rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--faint);
  font-weight: 500;
}

.ep-item.active .ep-num {
  color: var(--accent);
}

.ep-body h3 {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.ep-desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ep-side {
  display: grid;
  gap: 0.35rem;
  justify-items: end;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--faint);
  padding-top: 0.15rem;
}

.ep-cap {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 900px) {
  .show-layout {
    grid-template-columns: 1fr;
  }

  .archive-list {
    max-height: none;
  }

  .series-card {
    grid-template-columns: 120px 1fr;
    gap: 1rem 1.15rem;
    padding: 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand-col {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  :root {
    --wrap: min(100% - 1.35rem, 1120px);
    --header-h: 56px;
  }

  .brand-tag {
    display: none;
  }

  .hub-hero {
    padding: 2.25rem 0 2rem;
  }

  .series-card {
    grid-template-columns: 1fr;
  }

  .series-cover {
    max-width: 200px;
  }

  .show-intro {
    grid-template-columns: 1fr;
  }

  .show-cover {
    width: 112px;
    height: 112px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .article-head {
    grid-template-columns: 64px 1fr;
  }

  .article-cover {
    width: 64px;
    height: 64px;
  }

  .ep-item {
    grid-template-columns: 48px 1fr;
  }

  .ep-side {
    display: none;
  }

  .ep-thumb {
    width: 48px;
    height: 48px;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .series-card,
  .btn,
  .ep-item,
  .site-nav a,
  .site-nav .nav-cta {
    transition-duration: 0.01ms !important;
  }
  .series-card:active,
  .btn:active:not(:disabled),
  .site-nav .nav-cta:active {
    transform: none;
  }
  .series-card:hover {
    transform: none;
  }
}
