:root {
  --bg: #faf8f4;
  --ink: #141414;
  --muted: #8a8a8a;
  --line: rgba(0, 0, 0, 0.08);
  --music: #ff4d5a;
  --podcasts: #2bd6a0;
  --films: #3d85ff;
  --accent: var(--ink);
}

/* each tab gets its color plus a faint tint of it as the background; home stays cream */
body.music { --accent: var(--music); --bg: #fff3f2; }
body.podcasts { --accent: var(--podcasts); --bg: #effbf6; }
body.films { --accent: var(--films); --bg: #e8efff; }

body.home { --bg: #ffffff; }

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }

/* ---- header and tabs ---- */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px clamp(16px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

nav { display: flex; gap: 6px; flex-wrap: wrap; }

nav a {
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}

nav a:hover { background: rgba(0, 0, 0, 0.05); }
nav a.music[aria-current="page"] { background: var(--music); color: white; }
nav a.podcasts[aria-current="page"] { background: var(--podcasts); color: var(--ink); }
nav a.films[aria-current="page"] { background: var(--films); color: white; }

/* ---- page content ---- */

main {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px clamp(16px, 5vw, 56px) 72px;
}

h1 {
  font-size: clamp(36px, 6vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 8px;
}

h1::after {
  content: "";
  display: block;
  width: 56px;
  height: 6px;
  margin-top: 16px;
  border-radius: 3px;
  background: var(--accent);
}

.intro { color: var(--muted); margin: 0 0 40px; }

.list { display: grid; gap: 24px; max-width: 760px; }

.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.card iframe { display: block; width: 100%; border: 0; border-radius: 12px; }
.card-soundcloud iframe { height: 300px; }
.card-soundcloud-profile iframe,
.card-soundcloud-set iframe { height: 450px; }
.card-spotify iframe { height: 232px; }
.card-insighttimer iframe { height: 455px; border-radius: 16px; }
.card-instagram iframe { height: 640px; background: #fafafa; }
.card-title { margin: 0 0 10px; font-size: 17px; }

.empty { color: var(--muted); }

/* ---- sections within a page, e.g. an EP and loose songs ---- */

.group { display: contents; }
.group > * { grid-column: 1 / -1; } /* headings span the full width, even in the films grid */
.group + .group h2 { margin-top: 32px; }

.group h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.group-note { margin: -12px 0 0; color: var(--muted); }
.group-roles { margin: -12px 0 0; }

/* ---- self-hosted tracks ---- */

/* white card with a stripe in the tab's color, lifted off the tinted background */
.track {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: white;
  border-left: 5px solid var(--accent);
  border-radius: 16px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.25s, transform 0.25s;
}

/* ---- album card: cover, shared progress bar, tracklist ---- */

.album {
  display: flex;
  gap: 24px;
  padding: 20px;
  background: white;
  border-left: 5px solid var(--accent);
  border-radius: 16px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.25s, transform 0.25s;
}

.album-cover {
  width: 220px;
  height: 220px;
  flex-shrink: 0;
  border-radius: 10px;
  object-fit: cover;
}

/* until the cover image is added, show a soft block in the tab's tint */
.album-cover.missing { background: var(--bg); font-size: 0; }

.album-body { flex: 1; min-width: 0; }
.album-head { display: flex; align-items: center; gap: 14px; }
.album-head h2 { margin: 0; font-size: 22px; letter-spacing: -0.01em; }
.album-note { margin: 0; color: var(--muted); font-size: 14px; }

.album-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.album-progress .bar { flex: 1; }

.tracklist { list-style: none; margin: 0; padding: 0; }

.tracklist li {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
}

.tracklist li:hover { background: rgba(0, 0, 0, 0.04); }
.tracklist li.active { background: var(--bg); font-weight: 700; }
.tracklist .num { color: var(--muted); text-align: right; }
.tracklist li.active .num { color: var(--accent); }
.tracklist .dur { color: var(--muted); font-size: 13px; }

.album + .group h2 { margin-top: 32px; }

/* an embedded player inside the same white card as the EP */
.framed {
  padding: 20px;
  background: white;
  border-left: 5px solid var(--accent);
  border-radius: 16px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
}

.framed h2 { margin: 0; font-size: 22px; letter-spacing: -0.01em; }
.framed .album-note { margin: 0 0 14px; }
.framed .list { max-width: none; }
.group + .framed { margin-top: 8px; }

@media (max-width: 640px) {
  .album { flex-direction: column; }
  .album-cover { width: 100%; height: auto; aspect-ratio: 1; }
}

/* ---- films from the bucket ---- */

.film {
  padding: 12px;
  background: white;
  border-left: 5px solid var(--accent);
  border-radius: 16px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.25s, transform 0.25s;
}

.film video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: #000;
}

.film .card-title { margin: 12px 4px 4px; line-height: 1.3; }
.film .empty { margin: 4px; font-size: 14px; }

/* the track loaded in the now playing bar */
.album.current,
.film.current,
.track.current {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  transform: translateY(-5px) scale(1.01);
}

.track .cover { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }

.play {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: transform 0.15s;
}

.play:hover { transform: scale(1.06); }

/* play triangle, or two pause bars while playing */
.play::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 17px;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent white;
}

.playing .play::before {
  left: 18px;
  width: 5px;
  height: 18px;
  border: 0;
  background: white;
  box-shadow: 10px 0 0 white;
}

.track-body { flex: 1; min-width: 0; }

.track-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.track-title { font-weight: 700; line-height: 1.3; }
.track-note { color: var(--muted); font-size: 14px; flex-shrink: 0; }

/* on a phone there's no room side by side, so the show name goes under the episode title */
@media (max-width: 640px) {
  .track-head { flex-direction: column; gap: 2px; }
  .track-note { flex-shrink: 1; }
}

.roles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.role {
  padding: 2px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  font-size: 12px;
  font-weight: 500;
}

.description { margin: 0 0 12px; color: #555; font-size: 15px; }

.bar { height: 6px; border-radius: 3px; background: rgba(0, 0, 0, 0.07); cursor: pointer; }
.fill { width: 0; height: 100%; border-radius: 3px; background: var(--accent); }

.time { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: 13px; }

/* 15-second skip buttons in the now playing bar: a circular arrow with "15" inside */
.skip {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.15s;
}

.skip:hover { color: var(--accent); }

.skip svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip text {
  fill: currentColor;
  stroke: none;
  font-family: inherit;
  font-size: 7.5px;
  font-weight: 700;
  text-anchor: middle;
}

/* ---- home ---- */

.hero h1 { font-size: clamp(64px, 14vw, 160px); margin: 0; }
.hero h1::after { display: none; }

.tagline {
  margin: 4px 0 0;
  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.tiles {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 40px;
}

.tile {
  display: flex;
  align-items: flex-end;
  min-height: 180px;
  padding: 24px;
  border-radius: 20px;
  font-size: 28px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s;
}

.tile:hover { transform: translateY(-4px); }
.tile.music { background: var(--music); color: white; }
.tile.podcasts { background: var(--podcasts); color: var(--ink); }
.tile.films { background: var(--films); color: white; }

/* ---- now playing bar ---- */

.now-playing {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 10px;
  border-radius: 999px;
  background: white;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
  z-index: 10;
}

.now-playing[hidden] { display: none; }
.now-playing .play { width: 44px; height: 44px; }
.now-playing .play::before { left: 17px; top: 13px; }
.now-playing.playing .play::before { left: 14px; top: 13px; }
.np-body { flex: 1; min-width: 0; }
.np-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-jump { font-size: 13px; color: var(--muted); }

body.has-player footer { padding-bottom: 96px; }

/* ---- footer ---- */

footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px clamp(16px, 5vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

footer a { color: var(--ink); font-weight: 500; }
