:root {
  color-scheme: dark;
  --bg: #060706;
  --ink: #f2efe7;
  --muted: #bdb6a8;
  --soft: rgba(242, 239, 231, 0.72);
  --line: rgba(242, 239, 231, 0.18);
  --panel: rgba(9, 11, 10, 0.68);
  --panel-strong: rgba(9, 11, 10, 0.86);
  --gold: #d7bd75;
  --green: #6fd0a2;
  --rose: #cc7f8f;
  --blue: #83a9d6;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: clip;
  background: var(--bg);
  scroll-behavior: smooth;
  overscroll-behavior-x: none;
}

body {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  background:
    radial-gradient(circle at 18% 12%, rgba(111, 208, 162, 0.16), transparent 30rem),
    radial-gradient(circle at 84% 8%, rgba(204, 127, 143, 0.13), transparent 28rem),
    linear-gradient(180deg, #060706 0%, #10100d 46%, #060706 100%);
  color: var(--ink);
  font-family: var(--sans);
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

#visualizer {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100vh;
  opacity: 0.74;
  pointer-events: none;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 85%);
}

.site-head,
main,
.player {
  position: relative;
  z-index: 2;
  max-width: 100%;
}

.site-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: max(0.9rem, env(safe-area-inset-top)) clamp(1rem, 4vw, 2rem) 0.85rem;
  background: linear-gradient(180deg, rgba(6, 7, 6, 0.9), rgba(6, 7, 6, 0));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
}

.brand img {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
  filter: invert(1) sepia(0.2) saturate(1.6) hue-rotate(14deg);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--soft);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.top-nav a {
  padding: 0.55rem 0;
}

main {
  scroll-snap-type: y mandatory;
}

body.snap-free main,
body.snap-free .tracks {
  scroll-snap-type: none;
}

.panel,
.track {
  min-height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hero {
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: end;
  gap: 1.25rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 6.6rem clamp(1.1rem, 5vw, 4rem) 8.6rem;
}

.hero-copy {
  width: min(100%, 32rem);
  min-width: 0;
}

.hero-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.75rem;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
}

.hero-mark img {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
  filter: invert(1) sepia(0.2) saturate(1.6) hue-rotate(14deg);
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-weight: 650;
  line-height: 0.94;
  letter-spacing: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(3.2rem, 16vw, 10rem);
}

#albumTitle {
  width: 100%;
  max-width: calc(100vw - 2.2rem);
  font-size: clamp(2.85rem, 14vw, 5.25rem);
  line-height: 0.92;
}

h2 {
  font-size: clamp(2.35rem, 10vw, 5.5rem);
}

.artist {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: clamp(0.9rem, 2.2vw, 1.2rem);
  letter-spacing: 0.2em;
}

.cover-wrap {
  width: min(72vw, 24rem);
  justify-self: center;
  align-self: center;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.cover {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.primary-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: min(100%, 22rem);
  min-height: 3.35rem;
  border: 1px solid rgba(215, 189, 117, 0.52);
  border-radius: 999px;
  background: rgba(215, 189, 117, 0.13);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.essay-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: min(100%, 22rem);
  min-height: 2.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(242, 239, 231, 0.055);
  color: var(--soft);
  font-family: var(--mono);
  font-size: 0.73rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.play-glyph {
  font-size: 0.9rem;
}

.tracks {
  scroll-snap-type: y mandatory;
}

.track {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1.2rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 6.1rem clamp(1rem, 5vw, 4rem) 8.9rem;
}

.track-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.track-title {
  align-self: end;
  max-width: 48rem;
  min-width: 0;
  margin: 0;
  font-size: clamp(2rem, 9.4vw, 6.7rem);
  font-weight: 660;
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.track-media {
  position: relative;
  align-self: center;
  justify-self: center;
  width: min(78vw, 21rem);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.track-media img,
.track-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.track-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 0 42%, rgba(255, 255, 255, 0.08), transparent 58% 100%),
    radial-gradient(circle at 72% 18%, rgba(111, 208, 162, 0.2), transparent 30%);
  mix-blend-mode: screen;
  opacity: 0.7;
}

.liner {
  width: min(100%, 39rem);
  color: var(--soft);
  font-size: clamp(0.98rem, 2.5vw, 1.15rem);
  line-height: 1.5;
}

.liner-card,
.lyrics-card {
  max-width: 38rem;
  padding: 1rem;
  border: 1px solid rgba(242, 239, 231, 0.16);
  background: linear-gradient(145deg, rgba(9, 11, 10, 0.58), rgba(9, 11, 10, 0.24));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.lyrics-card {
  margin-top: 0.75rem;
  border-color: rgba(215, 189, 117, 0.22);
  background: linear-gradient(145deg, rgba(23, 20, 13, 0.58), rgba(9, 11, 10, 0.22));
}

.liner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.liner-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.1rem, 4.2vw, 1.65rem);
  line-height: 1.05;
}

.liner-card p {
  margin: 0.75rem 0 0;
}

.liner-more {
  color: rgba(242, 239, 231, 0.86);
}

.note-toggle,
.lyrics-toggle {
  margin-top: 0.9rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  cursor: pointer;
}

.lyrics-toggle {
  margin-top: 0;
}

.note-toggle::after,
.lyrics-toggle::after {
  content: " +";
}

.note-toggle[aria-expanded="true"]::after,
.lyrics-toggle[aria-expanded="true"]::after {
  content: " -";
}

.lyrics-body {
  max-height: min(42svh, 24rem);
  margin-top: 0.85rem;
  overflow: auto;
  padding-right: 0.35rem;
  color: rgba(242, 239, 231, 0.88);
  font-family: var(--mono);
  font-size: clamp(0.82rem, 2.5vw, 0.98rem);
  line-height: 1.65;
}

.lyrics-body p {
  margin: 0 0 1rem;
}

.lyrics-body p:last-child {
  margin-bottom: 0;
}

.lyrics-body::-webkit-scrollbar {
  width: 0.35rem;
}

.lyrics-body::-webkit-scrollbar-thumb {
  background: rgba(215, 189, 117, 0.38);
}

.track-actions {
  display: flex;
  gap: 0.7rem;
  margin-top: 1.15rem;
}

.track-play {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(242, 239, 231, 0.08);
  cursor: pointer;
}

.track-play.is-current {
  border-color: rgba(111, 208, 162, 0.72);
  background: rgba(111, 208, 162, 0.16);
}

.blog {
  padding: 6.3rem clamp(1rem, 5vw, 4rem) 9rem;
}

.blog-list {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.blog-post {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.blog-post h3 {
  margin: 0 0 0.35rem;
  font-size: 1.3rem;
}

.blog-post time {
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.blog-post p {
  max-width: 42rem;
  color: var(--soft);
  line-height: 1.55;
}

.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  display: grid;
  gap: 0.7rem;
  padding: 0.75rem 0.75rem max(0.75rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--panel-strong);
  backdrop-filter: blur(24px) saturate(1.12);
  -webkit-backdrop-filter: blur(24px) saturate(1.12);
  box-shadow: 0 -12px 44px rgba(0, 0, 0, 0.48);
}

.player-main {
  display: grid;
  grid-template-columns: auto auto auto 1fr;
  align-items: center;
  gap: 0.55rem;
}

.icon-btn,
.play-btn {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
}

.icon-btn {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  color: var(--muted);
  font-size: 1.45rem;
  line-height: 1;
}

.play-btn {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border-color: rgba(215, 189, 117, 0.55);
  background: rgba(215, 189, 117, 0.14);
  font-size: 0.9rem;
}

.now {
  min-width: 0;
  padding-left: 0.3rem;
  cursor: pointer;
}

.now p,
.now span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now p {
  margin: 0;
  font-weight: 650;
}

.now span {
  margin-top: 0.18rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.scrub {
  display: grid;
  grid-template-columns: 2.7rem 1fr 2.7rem;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.scrub input {
  width: 100%;
  accent-color: var(--gold);
}

.essay-opened {
  overflow: hidden;
}

.essay-shell {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  background: rgba(3, 4, 3, 0.58);
}

.essay-shell[hidden] {
  display: none;
}

.essay-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(111, 208, 162, 0.15), transparent 30rem),
    radial-gradient(circle at 84% 20%, rgba(215, 189, 117, 0.11), transparent 26rem),
    rgba(3, 4, 3, 0.78);
}

.essay-reader {
  position: relative;
  z-index: 1;
  width: min(100%, 78rem);
  height: min(100%, 100svh);
  justify-self: center;
  overflow: auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: rgba(7, 8, 7, 0.92);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
}

.essay-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: max(0.85rem, env(safe-area-inset-top)) clamp(1rem, 4vw, 2rem) 0.85rem;
  border-bottom: 1px solid rgba(242, 239, 231, 0.12);
  background: rgba(7, 8, 7, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.essay-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.15em;
}

.essay-brand img {
  filter: invert(1);
}

.essay-close {
  min-height: 2.35rem;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(242, 239, 231, 0.06);
  color: var(--soft);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.essay-layout {
  display: grid;
  gap: 1.25rem;
  padding: 1rem clamp(1rem, 4vw, 2rem) 8rem;
}

.essay-nav {
  position: sticky;
  top: 4.4rem;
  z-index: 1;
  overflow-x: auto;
  margin: 0 -1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(242, 239, 231, 0.1);
  background: rgba(7, 8, 7, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.essay-nav p {
  margin: 0 0 0.55rem;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

#essayChapters {
  display: flex;
  gap: 0.65rem;
}

#essayChapters a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  max-width: 18rem;
  min-height: 2.3rem;
  padding: 0 0.8rem;
  border: 1px solid rgba(242, 239, 231, 0.12);
  border-radius: 999px;
  background: rgba(242, 239, 231, 0.045);
  color: var(--soft);
  font-family: var(--mono);
  font-size: 0.68rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#essayChapters span {
  color: var(--gold);
}

.essay-copy {
  width: min(100%, 45rem);
}

.essay-copy h2 {
  font-size: clamp(2.6rem, 13vw, 6.8rem);
}

.essay-subtitle,
.chapter-subtitle {
  margin: 0.65rem 0 0;
  color: var(--gold);
  font-family: var(--mono);
  font-size: clamp(0.82rem, 2.6vw, 1rem);
  letter-spacing: 0.08em;
}

.essay-body {
  margin-top: 2rem;
}

.essay-chapter {
  scroll-margin-top: 8rem;
  padding: 2.1rem 0;
  border-top: 1px solid rgba(242, 239, 231, 0.13);
}

.essay-chapter:first-child {
  border-top: 0;
  padding-top: 0;
}

.essay-chapter h3 {
  max-width: 38rem;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.75rem, 7vw, 3.5rem);
  line-height: 1;
  letter-spacing: 0;
}

.essay-chapter p {
  margin: 1rem 0 0;
  color: rgba(242, 239, 231, 0.82);
  font-size: clamp(1rem, 2.6vw, 1.18rem);
  line-height: 1.72;
}

@media (min-width: 780px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 30rem);
    grid-template-rows: 1fr auto;
    align-items: center;
  }

  .hero-copy {
    align-self: end;
  }

  #albumTitle {
    max-width: 100%;
    font-size: clamp(4.6rem, 7.2vw, 7.2rem);
    white-space: nowrap;
    overflow-wrap: normal;
  }

  .cover-wrap {
    grid-row: 1 / 3;
    grid-column: 2;
    justify-self: end;
    align-self: center;
  }

  .primary-play {
    grid-column: 1;
    justify-self: start;
  }

  .essay-open {
    grid-column: 1;
    justify-self: start;
  }

  .track {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 26rem);
    grid-template-rows: auto 1fr auto;
    column-gap: clamp(2rem, 7vw, 6rem);
  }

  .track-kicker,
  .track-title,
  .liner {
    grid-column: 1;
  }

  .track-media {
    grid-column: 2;
    grid-row: 1 / 4;
    width: min(32vw, 25rem);
  }

  .player {
    left: 50%;
    right: auto;
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    width: min(42rem, calc(100vw - 2rem));
    padding: 0.75rem;
    border: 1px solid var(--line);
    box-shadow: 0 16px 54px rgba(0, 0, 0, 0.52);
    transform: translateX(-50%);
  }

  .essay-layout {
    grid-template-columns: 17rem minmax(0, 1fr);
    align-items: start;
    padding-top: 2rem;
  }

  .essay-nav {
    top: 5.2rem;
    overflow-x: visible;
    margin: 0;
    padding: 0;
    border-bottom: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  #essayChapters {
    display: grid;
    gap: 0.45rem;
  }

  #essayChapters a {
    width: 100%;
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  main,
  .tracks {
    scroll-snap-type: none;
  }

  #visualizer {
    opacity: 0.28;
  }
}

@media (max-width: 380px) {
  .player-main {
    grid-template-columns: auto auto auto minmax(0, 1fr);
  }

  .icon-btn {
    width: 2.15rem;
    height: 2.15rem;
  }

  .play-btn {
    width: 2.65rem;
    height: 2.65rem;
  }
}
