/* ============================================================
   PärPod — parpod.net
   ============================================================ */

:root {
  --bg: #0a0810;
  --bg-card: #13101a;
  --bg-accent: #110e18;
  --text: #ddd6e8;
  --text-muted: #8a7d9c;
  --text-light: #5a4f6d;
  --pink: #ff2d78;
  --pink-hot: #ff0055;
  --pink-soft: #ff6ba6;
  --pink-pale: #ffb3d1;
  --pink-glow: rgba(255, 45, 120, 0.12);
  --pink-glow-strong: rgba(255, 45, 120, 0.25);
  --lilac: #b896ff;
  --lilac-soft: rgba(184, 150, 255, 0.1);
  --thread-bg: #17122a;
  --thread-text: #b896ff;
  --border: #241d32;
  --border-light: #1c1628;
  --code-bg: #120e1a;
  --connection-line: #322650;

  --font-sans: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'Space Mono', 'SF Mono', monospace;

  --max-width: 72rem;
  --content-width: 46rem;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #3a1a40;
  color: var(--pink-pale);
}

a { color: var(--pink-soft); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--pink); }
img { max-width: 100%; display: block; }

/* ---- Header ---- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 8, 16, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.8rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
}
.site-logo:hover { color: var(--text); }

.logo-mark {
  width: 1.8rem;
  height: 1.8rem;
  background: var(--pink);
  color: white;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
}

.site-nav { display: flex; gap: 0.15rem; }

.site-nav a {
  color: var(--text-light);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.7rem;
  border-radius: 3px;
  text-transform: uppercase;
  font-family: var(--font-mono);
  transition: all 0.15s;
}

.site-nav a:hover, .site-nav a.active {
  color: var(--pink);
  background: var(--pink-glow);
}

/* ============================================================
   HOME
   ============================================================ */

/* ---- Hero: brutalist, left-aligned, huge ---- */
.hero {
  padding: 10vh 2rem 4rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-inner {
  padding-left: 3rem;
  border-left: 3px solid var(--pink);
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.88;
  color: var(--text);
  margin-bottom: 2rem;
}

.hero-stats {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.stat-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--pink);
}

/* ---- Thread strip: horizontal scroll, not a grid ---- */
.home-threads {
  padding: 0 2rem 3rem;
  max-width: var(--max-width);
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.home-threads::-webkit-scrollbar { display: none; }

.threads-strip {
  display: flex;
  gap: 0.4rem;
  padding-bottom: 0.5rem;
  min-width: min-content;
}

.thread-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--thread-bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--thread-text);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s;
}

.thread-chip:hover {
  border-color: var(--pink);
  color: var(--pink-soft);
  background: var(--pink-glow);
}

.chip-count {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: var(--lilac-soft);
  color: var(--lilac);
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  min-width: 1.4rem;
  text-align: center;
}

.chip-name { font-size: 0.82rem; }

/* ---- Featured: broken grid, not uniform ---- */
.home-featured {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.lead-piece {
  padding: 3rem 0 3rem 3rem;
  border-left: 3px solid var(--pink);
  margin-bottom: 3rem;
  max-width: 40rem;
}

.lead-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pink);
  margin-bottom: 0.8rem;
  display: flex;
  gap: 1rem;
}

.lead-source { color: var(--text-light); }

.lead-piece h2 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.8rem;
}

.lead-piece h2 a { color: var(--text); }
.lead-piece h2 a:hover { color: var(--pink-soft); }

.lead-piece p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 34rem;
}

.lead-connections {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-light);
}

/* Mosaic: deliberately uneven */
.home-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.mosaic-item {
  background: var(--bg-card);
  padding: 1.5rem;
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mosaic-item:hover {
  background: var(--bg-accent);
}

.mosaic-item:first-child {
  grid-column: span 2;
  grid-row: span 2;
  padding: 2.5rem;
}

.mosaic-type {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
}

.mosaic-piece .mosaic-type { color: var(--pink); }

.mosaic-item h3 {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

.mosaic-item:first-child h3 {
  font-size: 1.4rem;
}

.mosaic-item h3 a { color: var(--text); }
.mosaic-item h3 a:hover { color: var(--pink-soft); }

.mosaic-item p {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.mosaic-item:first-child p {
  font-size: 0.92rem;
  max-width: 28rem;
}

/* ---- Bottom links ---- */
.home-everything {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem 6rem;
  display: flex;
  gap: 0.4rem;
}

.everything-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  transition: all 0.2s;
}

.everything-link:hover {
  border-color: var(--pink);
  color: var(--pink);
  background: var(--pink-glow);
}

/* ============================================================
   CARDS (list pages)
   ============================================================ */

.content-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card {
  background: var(--bg-card);
  padding: 1.5rem;
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border: none;
  border-radius: 0;
}

.card:hover {
  background: var(--bg-accent);
}

.card h3 {
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 600;
}

.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--pink-soft); }

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-category, .card-series {
  color: var(--pink);
}

.card-ep, .card-duration, .card-source {
  color: var(--text-light);
}

.card-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.card-threads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.thread-pill {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  color: var(--lilac);
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: all 0.15s;
}

.thread-pill:hover {
  border-color: var(--pink);
  color: var(--pink-soft);
}

.card-connections {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-light);
  margin-top: auto;
  padding-top: 0.5rem;
}

/* ---- Section titles (list pages) ---- */
.section-title {
  max-width: var(--max-width);
  margin: 0 auto 1.5rem;
  padding: 0 2rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--pink);
  font-family: var(--font-mono);
}

/* ============================================================
   SINGLE PAGE
   ============================================================ */

.single {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
}

.single-header {
  margin-bottom: 3rem;
  padding-left: 2rem;
  border-left: 3px solid var(--pink);
}

.single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.meta-series, .meta-category { color: var(--pink); }
.meta-episode, .meta-date, .meta-source, .meta-reading { color: var(--text-light); }

.single h1 {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--text);
}

.single-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 1rem;
  font-style: normal;
}

.single-threads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 2rem;
}

/* ---- Audio player ---- */
.audio-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  margin-bottom: 2rem;
}

.play-btn {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 2px solid var(--pink);
  background: transparent;
  color: var(--pink);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.play-btn:hover {
  background: var(--pink);
  color: white;
}

.player-info {
  display: flex;
  gap: 0.75rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-light);
  flex-shrink: 0;
}

.player-progress {
  flex: 1;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  overflow: hidden;
  cursor: pointer;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--pink);
  transition: width 0.1s linear;
}

.tts-player { border-color: var(--lilac-soft); }
.tts-player .play-btn { border-color: var(--lilac); color: var(--lilac); }
.tts-player .play-btn:hover { background: var(--lilac); color: var(--bg); }

/* ---- Prose ---- */
.single-body {
  font-size: 1rem;
  line-height: 1.8;
}

.single-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 3rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text);
}

.single-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--lilac);
}

.single-body p { margin-bottom: 1.25rem; }

.single-body blockquote {
  border-left: 2px solid var(--pink);
  padding: 0.5rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  background: none;
}

.single-body pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 1.5rem 0;
}

.single-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--pink-soft);
}

.single-body pre code { color: var(--text); }

.single-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.85rem;
}

.single-body th, .single-body td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.single-body th {
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  font-family: var(--font-mono);
}

.single-body ul, .single-body ol { margin: 0 0 1.25rem 1.5rem; }
.single-body li { margin-bottom: 0.3rem; }
.single-body li::marker { color: var(--pink); }
.single-body strong { font-weight: 600; color: var(--text); }

.single-body hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 3rem 0;
}

/* ---- Connections ---- */
.connections {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.connections-title {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--pink);
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}

.connections-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.connections-list li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
  transition: all 0.15s;
}

.connections-list li:hover {
  border-left-color: var(--pink);
}

.connection-link { font-weight: 600; font-size: 0.9rem; }
.connection-missing { color: var(--text-light); font-style: italic; }
.connection-reason { font-size: 0.75rem; color: var(--text-light); line-height: 1.4; }

/* ============================================================
   LIST PAGES
   ============================================================ */

.list-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
}

.list-header {
  margin-bottom: 3rem;
  padding-left: 2rem;
  border-left: 3px solid var(--pink);
}

.list-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.list-description {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  max-width: 30rem;
}

/* Thread list page */
.thread-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.thread-grid-large { gap: 0.5rem; }

.thread-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  background: var(--thread-bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--thread-text);
  font-size: 0.85rem;
  transition: all 0.15s;
}

.thread-card:hover {
  border-color: var(--pink);
  color: var(--pink-soft);
}

.thread-name { font-weight: 600; }

.thread-count {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  opacity: 0.5;
}

/* Series page */
.thread-page .content-grid { margin-top: 1rem; }

/* ============================================================
   TAXONOMY: SERIES
   ============================================================ */

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  padding: 2.5rem 2rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 3rem;
}

.footer-about p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }
.footer-meta { margin-top: 0.25rem; font-size: 0.75rem !important; color: var(--text-light) !important; }

.footer-label {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--pink);
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
}

.footer-feeds ul { list-style: none; }
.footer-feeds li { font-size: 0.82rem; line-height: 1.8; }

/* ---- Feeds page ---- */
.feeds-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.15s;
  background: var(--bg-card);
}

.feed-item:hover { border-color: var(--pink); }

.feed-icon {
  width: 2rem;
  height: 2rem;
  background: var(--pink);
  color: white;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.65rem;
  flex-shrink: 0;
}

.feed-info h3 { font-size: 0.92rem; font-weight: 600; }
.feed-info p { font-size: 0.75rem; color: var(--text-muted); }

/* ---- 404 ---- */
.hero-title + .hero-sub { color: var(--text-muted); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  html { font-size: 16px; }
  .header-inner { padding: 0.6rem 1rem; }
  .site-nav a { font-size: 0.65rem; padding: 0.3rem 0.4rem; }
  .hero { padding: 6vh 1.25rem 2rem; }
  .hero-inner { padding-left: 1.5rem; }
  .hero-title { font-size: 3.5rem; }
  .home-threads { padding: 0 1.25rem 2rem; }
  .home-featured { padding: 0 1.25rem 3rem; }
  .lead-piece { padding-left: 1.5rem; }
  .home-mosaic { grid-template-columns: 1fr; }
  .home-mosaic .mosaic-item:first-child { grid-column: auto; grid-row: auto; padding: 1.5rem; }
  .home-mosaic .mosaic-item:first-child h3 { font-size: 1.1rem; }
  .home-everything { padding: 0 1.25rem 4rem; flex-wrap: wrap; }
  .content-grid { padding: 0 1.25rem; grid-template-columns: 1fr; }
  .single { padding: 2rem 1.25rem 3rem; }
  .single-header { padding-left: 1.2rem; }
  .single h1 { font-size: 1.8rem; }
  .list-page { padding: 2rem 1.25rem 3rem; }
  .list-header { padding-left: 1.2rem; }
  .footer-inner { flex-direction: column; gap: 1.5rem; }
}
