@font-face {
  font-family: "Quantify";
  src: url("../assets/fonts/Quantify-Bold-v2.6.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

:root {
  --bg: #031521;
  --panel: rgba(5, 35, 49, 0.8);
  --panel-strong: rgba(3, 26, 39, 0.93);
  --text: #effbfa;
  --muted: #8cbcc8;
  --cyan: #2fd3f0;
  --aqua: #4be8ed;
  --coral: #ff659d;
  --pink: #de55b3;
  --foam: #e8f7f4;
  --line: rgba(64, 215, 235, 0.3);
  --pad: clamp(20px, 3.8vw, 72px);
  --title-font: "Quantify", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 49% 42%, rgba(30, 163, 207, 0.18), transparent 34%),
    radial-gradient(circle at 78% 18%, rgba(255, 101, 157, 0.15), transparent 31%),
    linear-gradient(135deg, #041b2a 0%, var(--bg) 48%, #141329 100%);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

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

.title-font {
  font-family: var(--title-font);
  font-weight: 700;
  text-transform: uppercase;
}

.particle-ocean,
.atmosphere,
.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.particle-ocean { z-index: 2; }

.atmosphere {
  z-index: 1;
  background:
    radial-gradient(circle at 18% 18%, rgba(47, 211, 240, 0.18), transparent 34%),
    radial-gradient(circle at 83% 24%, rgba(255, 101, 157, 0.2), transparent 31%),
    radial-gradient(circle at 55% 72%, rgba(222, 85, 179, 0.1), transparent 38%),
    linear-gradient(90deg, rgba(2, 23, 34, 0.24), rgba(10, 36, 50, 0.04) 52%, rgba(15, 18, 39, 0.28));
}

.grain {
  z-index: 4;
  opacity: 0.027;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' seed='19' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  background-size: 512px;
  mix-blend-mode: soft-light;
}

.album-header,
.album-layout,
.album-footer {
  position: relative;
  z-index: 3;
}

.album-header {
  display: grid;
  min-height: 68px;
  padding: 0 var(--pad);
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 20, 27, 0.56);
  backdrop-filter: blur(16px);
}

.back-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.back-link span:first-child { color: var(--aqua); font-size: 17px; }
.back-link:hover { color: var(--text); }

.identity { font-size: 15px; letter-spacing: 0.14em; }

.album-header p {
  justify-self: end;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.album-layout {
  display: grid;
  width: min(1680px, 100%);
  height: calc(100svh - 122px);
  min-height: 0;
  margin: 0 auto;
  padding: clamp(18px, 2.8vh, 28px) var(--pad);
  grid-template-columns: minmax(250px, 310px) minmax(260px, 430px) minmax(250px, 310px);
  column-gap: clamp(28px, 4vw, 72px);
  justify-content: space-between;
  align-items: start;
}

.player-panel,
.album-details { min-width: 0; }

.album-details { grid-column: 1; grid-row: 1; align-content: start; }
.player-panel { grid-column: 3; grid-row: 1; }

.center-visualizer {
  display: block;
  position: fixed;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  pointer-events: none;
}

.player-panel {
  width: 100%;
  max-width: 310px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 92% 6%, rgba(255, 101, 157, 0.018), transparent 44%),
    linear-gradient(145deg, rgba(5, 48, 65, 0.055), rgba(2, 20, 29, 0.08));
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.1), inset 0 1px rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(2px) saturate(1.03);
}

.panel-kicker,
.album-cover figcaption,
.eyebrow,
.streaming__label,
.album-footer {
  font-size: 9px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.panel-kicker {
  display: flex;
  justify-content: space-between;
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.panel-kicker span:first-child { color: var(--aqua); }

.now-playing {
  position: relative;
  display: grid;
  min-height: clamp(126px, 18vh, 156px);
  overflow: hidden;
  padding: clamp(20px, 2.6vw, 34px);
  align-items: end;
}

.spectrum {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.94;
  mix-blend-mode: screen;
}

.now-playing__meta { position: relative; z-index: 1; }

.now-playing__meta p {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.now-playing h1 {
  max-width: 640px;
  margin: 0;
  font-size: clamp(25px, 2.4vw, 38px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  text-shadow: 0 10px 42px rgba(0, 0, 0, 0.55);
}

.transport {
  display: grid;
  padding: 12px 15px;
  grid-template-columns: 30px 46px 30px 1fr;
  gap: 10px;
  align-items: center;
  border-block: 1px solid var(--line);
  background: rgba(1, 8, 12, 0.055);
}

.transport button {
  display: grid;
  padding: 0;
  place-items: center;
  border: 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.transport__skip { width: 30px; height: 30px; color: var(--muted) !important; font-size: 16px; }

.transport__play {
  width: 46px;
  height: 46px;
  border-radius: 50% !important;
  color: #1b0710 !important;
  background: var(--coral) !important;
  box-shadow: 0 0 30px rgba(232, 111, 147, 0.2);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.transport__play:hover { transform: scale(1.05); box-shadow: 0 0 38px rgba(232, 111, 147, 0.36); }
.transport__play span { position: relative; margin-left: 2px; }
.transport__play.is-playing span {
  display: block;
  width: 12px;
  height: 14px;
  margin-left: 0;
}

.transport__play.is-playing span::before,
.transport__play.is-playing span::after {
  position: absolute;
  top: 0;
  width: 4px;
  height: 14px;
  border-radius: 1px;
  background: currentColor;
  content: "";
}

.transport__play.is-playing span::before { left: 0; }
.transport__play.is-playing span::after { right: 0; }

.transport__timeline { min-width: 0; margin-left: 8px; }

input[type="range"] {
  width: 100%;
  height: 3px;
  margin: 0;
  appearance: none;
  border-radius: 2px;
  outline: none;
  background: linear-gradient(to right, var(--coral) var(--progress, 0%), rgba(255, 255, 255, 0.14) var(--progress, 0%));
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; border: 0; border-radius: 50%; background: #fff; }

.transport__time {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

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

.track-list li + li { border-top: 1px solid rgba(166, 229, 231, 0.1); }

.track-button {
  display: grid;
  width: 100%;
  min-height: 36px;
  padding: 8px 15px;
  grid-template-columns: 30px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 0;
  color: var(--muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.track-button:hover { color: var(--text); background: rgba(103, 231, 232, 0.05); }
.track-button.is-active {
  color: var(--text);
  background: linear-gradient(90deg, rgba(47, 211, 240, 0.15), rgba(255, 101, 157, 0.09));
}

.track-button__number { font-size: 9px; letter-spacing: 0.12em; }
.track-button.is-active .track-button__number { color: var(--aqua); }

.track-button__title { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.track-button__duration { font-size: 9px; font-variant-numeric: tabular-nums; }

.album-details {
  display: grid;
  width: 100%;
  max-width: 310px;
  gap: 12px;
  perspective: 760px;
}

.album-cover {
  --cover-tilt-x: 0deg;
  --cover-tilt-y: 0deg;
  --cover-scale: 1;
  --cover-shadow-x: 0px;
  --cover-shadow-y: 18px;
  --cover-foil-x: 50%;
  --cover-foil-y: 50%;
  --cover-foil-angle: 112deg;
  position: relative;
  width: 100%;
  margin: 0;
  transform: rotateX(var(--cover-tilt-x)) rotateY(var(--cover-tilt-y)) scale(var(--cover-scale));
  transform-origin: center;
  transform-style: preserve-3d;
  transition: transform 160ms ease-out, filter 160ms ease-out;
  will-change: transform;
}

.album-cover:hover { --cover-scale: 1.018; }

.album-cover::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  border: 1px solid rgba(220, 235, 220, 0.2);
  box-shadow: inset 0 0 0 10px rgba(3, 17, 23, 0.08);
  content: "";
  pointer-events: none;
}

.album-cover::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  opacity: 0;
  background:
    repeating-linear-gradient(
      var(--cover-foil-angle),
      transparent 0 9%,
      rgba(72, 207, 223, 0.15) 12%,
      rgba(232, 111, 147, 0.16) 17%,
      rgba(220, 235, 220, 0.12) 21%,
      transparent 27% 38%
    );
  background-size: 170% 170%;
  background-position: var(--cover-foil-x) var(--cover-foil-y);
  content: "";
  pointer-events: none;
  filter: blur(5px) saturate(1.3);
  mix-blend-mode: color-dodge;
  transition: opacity 200ms ease;
}

.album-cover:hover::after { opacity: 0.55; }

.album-cover img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(220, 235, 220, 0.28);
  box-shadow:
    var(--cover-shadow-x) var(--cover-shadow-y) 70px rgba(0, 0, 0, 0.42),
    0 0 56px rgba(72, 207, 223, 0.07);
}

.album-cover figcaption {
  position: absolute;
  z-index: 3;
  right: 10px;
  bottom: 10px;
  padding: 7px 9px;
  color: #fff;
  background: rgba(1, 8, 12, 0.68);
  backdrop-filter: blur(10px);
}

.album-copy { padding-top: 2px; }
.album-copy,
.streaming { width: 100%; }
.eyebrow { margin: 0 0 8px; color: var(--aqua); }

.album-copy h2 {
  margin: 0;
  font-size: clamp(27px, 2.35vw, 40px);
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.album-year {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.genre-tags {
  display: flex;
  margin: 8px 0 0;
  padding: 0;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
}

.genre-tags li {
  padding: 3px 6px 2px;
  border: 1px solid var(--line);
  color: var(--foam);
  background: rgba(103, 231, 232, 0.035);
  font-size: 8px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.album-copy__description {
  margin: 12px 0 0;
  color: #abc3c3;
  font-size: clamp(11px, 0.78vw, 13px);
  line-height: 1.5;
}

.album-copy__description strong { color: var(--text); font-weight: 500; }

.streaming { padding-top: 2px; }
.streaming__label { margin: 0 0 7px; color: var(--muted); }

.streaming__grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }

.streaming__grid a,
.bandcamp-link {
  display: grid;
  min-height: 42px;
  padding: 7px 9px;
  grid-template-columns: 18px 1fr auto;
  gap: 9px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  transition: background 170ms ease, color 170ms ease;
}

.streaming__grid a:nth-child(odd) { border-right: 1px solid var(--line); }
.streaming__grid a:hover,
.bandcamp-link:hover { color: #fff; background: rgba(107, 230, 230, 0.08); }

.streaming img { width: 18px; height: 18px; object-fit: contain; }
.streaming b { color: var(--muted); font-size: 13px; font-weight: 400; }

.bandcamp-link { min-height: 49px; border-right: 1px solid var(--line); }
.bandcamp-link span { display: flex; flex-direction: column; gap: 4px; }
.bandcamp-link strong { font-size: 12px; font-weight: 500; }
.bandcamp-link small { color: var(--muted); font-size: 9px; letter-spacing: 0.04em; }

.album-footer {
  display: grid;
  min-height: 54px;
  padding: 7px var(--pad);
  grid-template-columns: minmax(0, 1fr) auto auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(3, 20, 27, 0.68);
  backdrop-filter: blur(16px);
}

.album-footer p { margin: 0; }
.album-footer > .title-font { grid-column: 1; justify-self: start; order: 1; }
.album-footer > p:nth-of-type(2) { grid-column: 4; justify-self: end; order: 4; text-align: right; }
.album-footer__lab { grid-column: 2; order: 2; }
.album-footer__bandcamp { grid-column: 3; order: 3; }

.album-footer .title-font {
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.album-footer__lab,
.album-footer__bandcamp {
  position: relative;
  display: grid;
  width: 172px;
  height: 38px;
  overflow: hidden;
  place-content: center;
  gap: 2px;
  border: 1px solid var(--muted);
  color: var(--muted);
  text-align: center;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.album-footer__lab strong { color: var(--text); font-size: 10px; font-weight: 600; }
.album-footer__lab span { font-size: 8px; }
.album-footer__lab:hover,
.album-footer__bandcamp:hover { border-color: #fff; color: #06100d; background: #fff; }
.album-footer__lab:hover strong { color: #06100d; }

.album-footer__bandcamp > span { position: relative; z-index: 1; color: var(--text); font-size: 11px; pointer-events: none; }
.album-footer__bandcamp:hover > span { color: #06100d; }
button:focus-visible,
a:focus-visible,
input:focus-visible { outline: 2px solid var(--aqua); outline-offset: 3px; }

@media (max-width: 1180px) {
  .album-layout {
    grid-template-columns: minmax(220px, 270px) minmax(190px, 1fr) minmax(220px, 270px);
    column-gap: 24px;
  }
}

@media (max-width: 920px) {
  body { overflow-x: hidden; overflow-y: auto; }
  .album-header { grid-template-columns: 1fr auto; }
  .identity { justify-self: end; }
  .album-header p { display: none; }
  .album-layout { height: auto; min-height: calc(100svh - 116px); grid-template-columns: 1fr; }
  .album-details { grid-column: 1; grid-row: 1; }
  .album-cover { width: min(100%, 460px); }
  .player-panel { grid-column: 1; grid-row: 2; max-width: none; }
}

@media (min-width: 921px) and (max-height: 820px) {
  .album-layout { padding-block: 14px; }
  .album-details { max-width: 248px; }
  .album-cover { width: 100%; }
  .album-details { gap: 9px; }
  .album-copy h2 { font-size: 29px; }
  .album-copy__description { margin-top: 8px; font-size: 10px; line-height: 1.38; }
  .streaming__grid a { min-height: 36px; }
  .bandcamp-link { min-height: 42px; }
  .now-playing { min-height: 112px; }
  .track-button { min-height: 32px; padding-block: 6px; }
}

@media (max-width: 560px) {
  .album-header { min-height: 62px; }
  .back-link span:last-child { display: none; }
  .album-layout { padding-block: 28px 42px; }
  .now-playing { min-height: 160px; padding: 24px 18px; }
  .transport { grid-template-columns: 32px 50px 32px; }
  .transport__play { width: 50px; height: 50px; }
  .transport__timeline { grid-column: 1 / -1; margin: 8px 0 0; }
  .streaming__grid { grid-template-columns: 1fr; }
  .streaming__grid a:nth-child(odd) { border-right: 1px solid var(--line); }
  .album-footer { display: flex; align-items: flex-start; flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
