:root { --bg: #07080D; --panel: #11141D; --line: #1C2030; --line2: #2A2F40; --text: #F2F2F0; --muted: #A9ADB8; --dim: #8A8F9E; --accent: #F5C400; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--text); }
a:hover { color: var(--accent); }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 32px; }

.hero { background-image: linear-gradient(180deg, rgba(7,8,13,.35) 0%, rgba(7,8,13,.75) 70%, var(--bg) 100%), url(cover.jpg); background-size: cover; background-position: center 30%; }
.nav { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; padding-top: 28px; padding-bottom: 28px; }
.logo img { height: 40px; display: block; }
.nav nav { display: flex; gap: 24px; font-size: 14px; flex-wrap: wrap; }
.nav nav a, .foot a { text-decoration: none; }

.intro { padding-top: 112px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 28px; }
.intro h1 { margin: 0; line-height: 0; }
.intro h1 img { width: min(560px, 100%); height: auto; filter: drop-shadow(0 0 28px rgba(255,255,255,.35)); }
.intro p { margin: 0; font-size: 20px; line-height: 1.5; max-width: 520px; color: #D8D8D4; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid rgba(242,242,240,.5); text-decoration: none; font-size: 14px; font-weight: 500; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
.btn.primary:hover { color: var(--bg); filter: brightness(1.08); }

.label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.label.accent { color: var(--accent); }
.label.rule { padding-bottom: 12px; border-bottom: 1px solid var(--line2); }

.latest { padding: 24px 0 72px; display: flex; flex-direction: column; gap: 16px; }
.latest h2 { margin: 8px 0 0; font-size: 30px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.latest h2 a, .ep .title { text-decoration: none; }
.meta { margin: 0; font-size: 15px; color: var(--muted); }
.sum { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted); }

.video { position: relative; aspect-ratio: 16 / 9; background: var(--panel); border: 1px solid #23283A; border-radius: 8px; overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video.empty { display: flex; align-items: center; justify-content: center; color: var(--dim); text-decoration: none; }

.links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.links a { color: #C9CCD4; }
.links a:hover { color: var(--accent); }
.links.big { font-size: 15px; font-weight: 500; gap: 20px; padding: 8px 0 8px; }

#episodes { padding-bottom: 72px; }
.ep { display: grid; grid-template-columns: 72px minmax(0, 1fr) 64px; gap: 16px; align-items: baseline; padding: 20px 8px; border-bottom: 1px solid var(--line); }
.ep:hover { background: var(--panel); }
.ep .body { display: flex; flex-direction: column; gap: 6px; }
.ep .title { font-size: 19px; font-weight: 600; line-height: 1.3; }
.ep .guest { font-size: 14px; color: var(--muted); }
.date, .len { font-size: 13px; color: var(--dim); }
.len { text-align: right; }
.more { display: inline-block; margin-top: 24px; font-size: 14px; font-weight: 500; }

.about { padding-bottom: 72px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.about img { width: 200px; height: 200px; border-radius: 8px; object-fit: cover; flex: none; }
.about > div { flex: 1 1 320px; display: flex; flex-direction: column; gap: 12px; }
.about .big { margin: 0; font-size: 22px; line-height: 1.4; font-weight: 500; }

.episode { padding-top: 16px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 16px; }
.episode h1 { margin: 0; font-size: clamp(30px, 5vw, 44px); line-height: 1.15; letter-spacing: -.015em; }
.back { font-size: 14px; color: var(--muted); text-decoration: none; }
.notes { font-size: 16px; line-height: 1.7; color: #D2D4DA; border-top: 1px solid var(--line2); padding-top: 24px; overflow-wrap: anywhere; }
.notes p { margin: 0 0 12px; }
.notes a { color: #C9CCD4; }
.notes a.ts { color: var(--accent); text-decoration: none; font-variant-numeric: tabular-nums; }
.pager { display: flex; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--line2); font-size: 14px; }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-top: 28px; padding-bottom: 40px; border-top: 1px solid var(--line2); font-size: 13px; color: var(--dim); }
.social { display: flex; gap: 20px; flex-wrap: wrap; }

@media (max-width: 600px) {
  .wrap { padding: 0 20px; }
  .intro { padding-top: 64px; padding-bottom: 64px; }
  .ep { grid-template-columns: minmax(0, 1fr) auto; }
  .ep .date { grid-column: 1 / -1; }
}

/* Episode cards */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding-top: 24px; }
.card { background: var(--panel); border: 1px solid #1E2333; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.card:hover { border-color: #3A4058; transform: translateY(-2px); }
.thumb { position: relative; aspect-ratio: 16 / 9; display: flex; flex-direction: column; justify-content: space-between; padding: 18px; text-decoration: none;
  background-image: linear-gradient(180deg, rgba(7,8,13,.15), rgba(7,8,13,.55)), url(cover.jpg); background-size: 260%; }
.thumb-title { font-weight: 800; font-size: clamp(20px, 2.6vw, 27px); line-height: 1.05; text-transform: uppercase; color: var(--accent); letter-spacing: -.005em; text-shadow: 0 2px 12px rgba(0,0,0,.6); text-wrap: balance; max-width: 92%; }
.thumb:hover .thumb-title { color: var(--accent); }
.thumb-tag { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.thumb-tag b { font-weight: 800; border-right: 1px solid rgba(255,255,255,.6); padding-right: 8px; margin-right: 4px; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-meta { font-size: 13px; color: var(--dim); }
.card .title { font-size: 18px; font-weight: 600; line-height: 1.3; text-decoration: none; }
.card .guest { font-size: 14px; color: var(--muted); }
.card .links { margin-top: auto; padding-top: 8px; }
@media (max-width: 680px) { .cards { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Deep space layer ---------- */
html { background: #04050A; }
body { background: transparent; position: relative; }
body::before { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60vw 45vh at 85% 10%, rgba(64, 112, 196, .22), transparent 70%),
    radial-gradient(50vw 50vh at 5% 55%, rgba(38, 120, 150, .16), transparent 70%),
    radial-gradient(45vw 40vh at 70% 90%, rgba(170, 92, 60, .14), transparent 70%),
    radial-gradient(40vw 30vh at 30% 25%, rgba(110, 80, 170, .10), transparent 70%),
    #04050A; }
.starfield { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }

/* Hero: high-res nebula, slow drift, fading into the starfield */
.hero { position: relative; overflow: hidden; background: none; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -4%; z-index: -1;
  background: url(sky-top.jpg) 38% 40% / cover no-repeat;
  animation: drift 40s ease-in-out infinite alternate; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(4,5,10,.25) 0%, rgba(4,5,10,.35) 55%, #04050A 100%),
              radial-gradient(70% 60% at 20% 60%, rgba(4,5,10,.55), transparent 70%); }
@keyframes drift { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.08) translate(-1.5%, 1%); } }

/* Glass panels so the stars show through */
.card { background: rgba(14, 17, 28, .62); border-color: rgba(120, 140, 200, .14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.card:hover { border-color: rgba(245, 196, 0, .45); box-shadow: 0 10px 40px -12px rgba(80, 120, 220, .35); }
.thumb { background-image: linear-gradient(180deg, rgba(4,5,10,.05), rgba(4,5,10,.55)), url(sky-pillars.jpg); background-size: 320%; }
.card:nth-child(even) .thumb { background-image: linear-gradient(180deg, rgba(4,5,10,.05), rgba(4,5,10,.55)), url(sky-top.jpg); }
.video { background: rgba(14, 17, 28, .7); box-shadow: 0 30px 80px -30px rgba(60, 110, 220, .45); }
.video.poster { background: linear-gradient(rgba(4,5,10,.25), rgba(4,5,10,.35)), url(sky-pillars.jpg) center 40% / cover; }
.notes { background: rgba(14, 17, 28, .45); border: 1px solid rgba(120, 140, 200, .12); border-radius: 10px; padding: 24px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.foot { border-top-color: rgba(120, 140, 200, .18); }

@media (prefers-reduced-motion: reduce) { .hero::before { animation: none; } .card { transition: none; } }

/* Descriptions, guest bios, chapters */
.card-desc { margin: 4px 0 0; font-size: 14px; line-height: 1.55; color: #B9BDC8; }
.panel { background: rgba(14, 17, 28, .5); border: 1px solid rgba(120, 140, 200, .12); border-radius: 10px; padding: 22px 24px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; flex-direction: column; gap: 12px; }
.panel p { margin: 0; font-size: 16px; line-height: 1.7; color: #D2D4DA; }
.guests .bio { border-left: 2px solid var(--accent); padding-left: 14px; }
.chapters { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.chapters li a, .chapters li > span { display: flex; gap: 16px; padding: 9px 0; border-bottom: 1px solid rgba(120, 140, 200, .1); text-decoration: none; font-size: 15px; color: #D2D4DA; }
.chapters li a:hover { color: var(--accent); }
.chapters .ts { color: var(--accent); font-variant-numeric: tabular-nums; min-width: 64px; }
.extlinks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 15px; }

/* Nebular logo */
.nav nav { align-items: center; }
.neb img { height: 15px; width: auto; display: block; opacity: .9; }
.neb:hover img { opacity: 1; filter: drop-shadow(0 0 8px rgba(245,196,0,.5)); }
.foot { align-items: center; }
.neb-foot { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--dim); }
.neb-foot img { height: 20px; width: auto; display: block; }
.neb-foot:hover { color: var(--text); }

/* ---------- Top bar: panel hanging from the top edge ---------- */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding: 0 clamp(12px, 2.5vw, 44px); pointer-events: none; }
.shell { pointer-events: auto; max-width: 1600px; margin: 0 auto; height: 72px; padding: 0 clamp(20px, 4vw, 64px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center;
  background: rgba(10, 12, 22, .55); border: 1px solid rgba(255, 255, 255, .10); border-top: 0;
  border-radius: 0 0 28px 28px;
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 16px 50px -20px rgba(0, 0, 0, .7), inset 0 -1px 0 rgba(255, 255, 255, .04);
  transition: background .35s, height .35s; }
.shell .logo { justify-self: start; opacity: 0; transform: translateX(-10px); pointer-events: none; transition: opacity .4s, transform .4s; }
.shell .logo img { height: 30px; width: auto; display: block; }
.links-nav { display: flex; align-items: center; gap: 40px; font-family: Sora, Inter, sans-serif; font-weight: 600; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; }
.links-nav a { text-decoration: none; color: rgba(255, 255, 255, .88); white-space: nowrap; }
.links-nav a:hover { color: var(--accent); }
.bar-cta { justify-self: end; display: inline-flex; align-items: center; min-height: 42px; padding: 0 20px; border-radius: 12px;
  background: var(--accent); color: #07080D; text-decoration: none; font-family: Sora, Inter, sans-serif; font-weight: 600; font-size: 14px; }
.bar-cta:hover { color: #07080D; filter: brightness(1.08); }
.topbar.docked .shell { background: rgba(8, 10, 18, .78); }
.topbar.docked .logo { opacity: 1; transform: none; pointer-events: auto; }
.intro { padding-top: 150px; }
.episode { padding-top: 112px; }
@media (max-width: 760px) {
  .shell { grid-template-columns: auto minmax(0, 1fr) auto; height: 60px; border-radius: 0 0 20px 20px; padding: 0 16px; gap: 12px; }
  .links-nav { gap: 16px; font-size: 11px; letter-spacing: .08em; justify-content: center; }
  .shell .logo img { height: 22px; }
  .bar-cta { min-height: 36px; padding: 0 12px; font-size: 12px; }
}
@media (max-width: 460px) { .links-nav a:nth-child(3) { display: none; } }
@media (prefers-reduced-motion: reduce) { .shell .logo { transition: none; } }

/* Wider layout so episodes can sit three across */
main.wrap { max-width: 1240px; }
main.wrap > .latest, main.wrap > .about { max-width: 880px; margin-left: auto; margin-right: auto; }
@media (min-width: 1100px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Real deep space (Webb's First Deep Field) ---------- */
body::before { background:
    linear-gradient(180deg, rgba(3,4,8,.35), rgba(3,4,8,.55)),
    url(deep-field.jpg) center / cover no-repeat, #03040A; }
.starfield { display: none; }

/* Black hole band */
.horizon { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 0 120px; max-width: none !important; }
.horizon .bh { width: min(1100px, 120%); height: auto; display: block; margin: 0 auto -60px; filter: drop-shadow(0 0 60px rgba(255,170,60,.18)); animation: hover 14s ease-in-out infinite alternate; }
.horizon-copy { position: relative; max-width: 640px; display: flex; flex-direction: column; gap: 14px; }
.horizon .big { margin: 0; font-family: Sora, Inter, sans-serif; font-weight: 600; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; letter-spacing: -.01em; }
@keyframes hover { from { transform: translateY(0) scale(1); } to { transform: translateY(-10px) scale(1.015); } }
@media (prefers-reduced-motion: reduce) { .horizon .bh { animation: none; } }

/* Calmer background: deep field kept faint, only the brightest stars come through */
body::before { background:
    radial-gradient(120% 90% at 50% 40%, rgba(3,4,8,.80), rgba(3,4,8,.93) 70%),
    url(deep-field.jpg) center / cover no-repeat, #03040A;
  filter: saturate(.75); }

/* ---------- Space layer: plain deep black + stars canvas + sparse nebulae ---------- */
body::before { background:
    radial-gradient(70vw 50vh at 80% 0%, rgba(40, 70, 140, .16), transparent 70%),
    radial-gradient(60vw 50vh at 0% 100%, rgba(120, 60, 40, .10), transparent 70%),
    #03040A; filter: none; }
.stars { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }
.cosmos { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.cosmos img { position: absolute; top: 0; height: auto; mix-blend-mode: screen; will-change: transform; filter: saturate(1.1); }
@media (max-width: 700px) { .cosmos img { width: 380px !important; } }
.horizon { padding: 80px 0 120px; }
.neb-inline { height: .72em; width: auto; display: inline-block; vertical-align: baseline; margin: 0 .08em; transform: translateY(.02em); }
.links-nav .neb img { height: 13px; width: auto; display: block; }
