:root {
  --bg: #0f1115;
  --card: #151923;
  --text: #e8ecf1;
  --muted: #9aa3ae;
  --accent: #8ec5ff;
  --chip: #1b2230;

  --flyout-bg: #0f141f;
  --flyout-border: rgba(255,255,255,.12);
  --shadow: 0 20px 50px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }

.container { max-width: 1100px; margin: 0 auto; padding: 18px 16px 64px; }

/* ===== Header =====
   Goal: title aligns with the content column; logo sits further left than text */
.site-header {
  position: sticky; top: 0;
  background: linear-gradient(180deg, rgba(15,17,21,.9), rgba(15,17,21,.6));
  backdrop-filter: blur(6px);
  z-index: 10;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px;      /* same horizontal padding as .container */
  min-height: 132px;       /* room for the logo */
}
.logo {
  position: absolute;
  /* Pull the logo ~112px into the left gutter so it's further left than the text */
  left: calc(16px - 160px); /* 16px is the content padding; 128px = logo width + gap */
  top: 50%;
  transform: translateY(-50%);
  width: 128px;            /* fixed visual width so it doesn't overlap the title */
  height: auto;
  object-fit: contain;
}
.site-title {
  margin: 72px 0 0 12px;
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: .2px;
  /* Title naturally starts at 16px from container edge, aligning with body text */
}

/* ===== Intro / Description ===== */
.intro { margin: 12px 16px 16px; }      /* 16px matches container padding for visual alignment */
.description { margin: 0; color: var(--muted); line-height: 1.7; }

/* ===== Listen chips — with bigger gap to tiles ===== */
.listen { margin: 14px 16px 48px; }
.listen .listen-title { margin: 0 0 10px; font-size: 16px; color: var(--text); }
.listen-links { display: flex; flex-wrap: wrap; gap: 10px; }
.listen-link {
  display: inline-flex; align-items: center; gap: 8px; background: var(--chip);
  border: 1px solid rgba(255,255,255,.08); padding: 8px 12px; border-radius: 999px;
  text-decoration: none; color: var(--text); transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.listen-link:hover { transform: translateY(-1px); background: #1f2937; border-color: rgba(255,255,255,.16); }
.listen-link svg { width: 18px; height: 18px; fill: currentColor; }

/* ===== Tiles grid ===== */
.grid {
  position: relative; overflow: visible;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px,1fr)); gap: 18px;
  padding: 0 16px; /* align grid with the same 16px content inset */
}
.card {
  position: relative; background: var(--card); border-radius: 18px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35); display: flex; flex-direction: column;
}

/* Square episode image */
.thumb-wrap { position: relative; aspect-ratio: 1 / 1; background: #0b0e13; }
.thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.play-btn {
  position: absolute; right: 12px; bottom: 12px; border: none; border-radius: 999px; width: 48px; height: 48px;
  display: grid; place-items: center; font-size: 18px; background: rgba(0,0,0,0.55); color: white; cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}
.play-btn:hover { transform: scale(1.04); background: rgba(0,0,0,0.7); }
.playing .play-btn { background: var(--accent); color: #0a0a0a; }

.meta { padding: 14px 14px 16px; }
.title { margin: 0 0 6px; font-size: 16px; line-height: 1.3; }
.date { margin: 0; color: var(--muted); font-size: 13px; }

/* ===== Floating Shownotes Flyout (used by app.js) ===== */
#notes-flyout {
  position: absolute; top: 0; left: 0; transform: translate(-200%, -200%);
  width: min(440px, 45vw);
  max-height: 70vh; overflow: auto;
  background: var(--flyout-bg); border: 1px solid var(--flyout-border);
  border-radius: 16px; box-shadow: var(--shadow); z-index: 1000;
  opacity: 0; pointer-events: none; transition: opacity .14s ease, transform .14s ease;
}
#notes-flyout.visible { opacity: 1; pointer-events: auto; }
#notes-flyout .notes-flyout-inner { padding: 16px 18px; }
#notes-flyout .notes-flyout-title { margin: 0 0 8px; font-size: 15px; color: var(--muted); }
#notes-flyout .notes-flyout-body a { color: var(--accent); text-decoration: underline; }
#notes-flyout .notes-flyout-body ul,
#notes-flyout .notes-flyout-body ol { padding-left: 20px; margin: 6px 0; }
#notes-flyout .notes-flyout-body p { margin: 8px 0; }

/* ===== Host section: two columns (text left, image right) ===== */
.host {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin: 48px 16px 0;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.host h2 { margin: 0 0 10px; font-size: 22px; }
.host p { margin: 0; color: var(--text); line-height: 1.7; }
.host-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(0,0,0,.35);
}

/* ===== Small screens ===== */
@media (max-width: 640px) {
  .header-inner { min-height: auto; padding: 12px 16px 8px; }
  .logo {
    position: static; transform: none;
    width: auto; height: 90px; margin-bottom: 6px;
  }
  .site-title { font-size: 30px; }
  .grid { padding: 0 12px; }
  .host { grid-template-columns: 1fr; margin: 36px 12px 0; }
  .intro, .listen { margin-left: 12px; margin-right: 12px; }
}

