:root {
  color-scheme: dark;
  --bg: #050608;
  --panel: rgba(12, 15, 20, 0.68);
  --panel-strong: rgba(14, 18, 24, 0.86);
  --line: rgba(215, 238, 255, 0.14);
  --line-strong: rgba(215, 238, 255, 0.28);
  --text: #edf5ff;
  --muted: #9aa8b6;
  --faint: #65717e;
  --accent: #7ee7ff;
  --accent-2: #e9c987;
  --danger: #ff6f9c;
  --dock-height: 86px;
  --header-offset: 72px;
  --radius: 8px;
  --player-art-size: min(56vh, 52vw, 600px);
  --cover-image: radial-gradient(circle at 50% 40%, rgba(126, 231, 255, 0.22), transparent 36%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  padding-bottom: calc(var(--dock-height) + 28px);
  height: 100%;
  overflow-x: clip;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
}

* {
  scrollbar-color: #222 #000;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
  background: #000;
}

*::-webkit-scrollbar-thumb {
  background: #222;
  border-radius: 8px;
}

*::-webkit-scrollbar-thumb:hover {
  background: #333;
}

*::-webkit-scrollbar-track {
  background: #000;
}

main > section:not(.is-active) {
  display: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

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

.ambient-field {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 18%, rgba(126, 231, 255, 0.12), transparent 28%),
    radial-gradient(circle at 76% 12%, rgba(233, 201, 135, 0.08), transparent 24%),
    linear-gradient(180deg, #07090e 0%, #050608 60%, #020304 100%);
}

.cover-atmosphere {
  position: absolute;
  inset: -10%;
  background-image: var(--cover-image);
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  filter: blur(36px) saturate(1.35) brightness(0.72);
  transform: scale(1.06);
  transition: background-image 600ms ease, opacity 600ms ease;
}

.noise,
.grid-horizon {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.noise {
  opacity: 0.16;
  mix-blend-mode: soft-light;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 4px 4px, 4px 4px;
}

.grid-horizon {
  opacity: 0.22;
  background:
    linear-gradient(rgba(126, 231, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 231, 255, 0.06) 1px, transparent 1px);
  background-size: 78px 78px;
  mask-image: linear-gradient(transparent 0%, black 54%, transparent 100%);
  transform: perspective(820px) rotateX(62deg) translateY(32vh) scale(1.8);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: var(--scrollbar-width, 0);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  min-height: 48px;
  padding: 4px max(clamp(16px, 3.5vw, 56px), calc((100vw - 1480px) / 2));
  background: transparent;
  transition: background 320ms ease;
}

.site-header:has(.top-nav a[aria-current="page"]) {
  background: linear-gradient(to bottom, #000 0%, #222224 100%);
}

.site-header .top-nav {
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
}

.site-header:has(.top-nav a[aria-current="page"]) .top-nav {
  opacity: 1;
  pointer-events: auto;
}

.brand,
.top-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  display: block;
  height: 56px;
  width: auto;
  margin-block: -10px -20px;
  transform: translateY(11px);
  filter:
    drop-shadow(0 0 7px rgba(0, 0, 0, 0.95))
    drop-shadow(0 0 14px rgba(0, 0, 0, 0.75))
    drop-shadow(0 0 24px rgba(0, 0, 0, 0.55));
}

.top-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  gap: clamp(6px, 1.2vw, 16px);
  color: var(--muted);
  font-size: 0.72rem;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 4px;
  color: var(--text);
  cursor: pointer;
}

.top-nav a:hover,
.top-nav a:focus-visible,
.top-nav a[aria-current="page"] {
  outline: none;
}

.top-nav a:hover .nav-tile-icon,
.top-nav a:focus-visible .nav-tile-icon {
  animation: hero-icon-spin 1200ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.nav-tile-icon {
  position: relative;
  display: block;
  width: 25px;
  flex-shrink: 0;
}

.nav-tile-icon-img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 240ms ease;
}

.nav-tile-icon-img-hover {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.top-nav a:hover .nav-tile-icon-img,
.top-nav a:focus-visible .nav-tile-icon-img,
.top-nav a[aria-current="page"] .nav-tile-icon-img {
  opacity: 0;
}

.top-nav a:hover .nav-tile-icon-img-hover,
.top-nav a:focus-visible .nav-tile-icon-img-hover,
.top-nav a[aria-current="page"] .nav-tile-icon-img-hover {
  opacity: 1;
}

.top-nav a[aria-current="page"] {
  display: none;
}

.nav-tile-label {
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

main {
  width: min(1480px, calc(100% - clamp(32px, 7vw, 112px)));
  margin: 0 auto;
}

.hero-section {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  padding: var(--header-offset) 0 200px;
  display: grid;
  place-items: center;
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.hero-nav {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  padding: 0;
}

.hero-tile {
  --tile-delay: 0ms;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
  isolation: isolate;
  overflow: visible;
  perspective: 900px;
  border-radius: 0;
  background-color: transparent;
  opacity: 1;
  pointer-events: none;
  animation: hero-tile-enter 2000ms cubic-bezier(0.55, 0, 0.85, 0) backwards;
  animation-delay: var(--tile-delay);
  transition: background-color 320ms ease, box-shadow 320ms ease, backdrop-filter 320ms ease, opacity 700ms ease;
}

.hero-tile-hit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(26px, 3.8vw, 48px);
  padding: clamp(8px, 1.4vw, 16px) clamp(14px, 2vw, 22px);
  pointer-events: none;
  animation: hero-tile-unlock 0ms forwards;
  animation-delay: calc(var(--tile-delay) + 2000ms);
}

.hero-nav:has(.hero-tile-hit:hover) .hero-tile:not(:has(.hero-tile-hit:hover)),
.hero-nav:has(.hero-tile:where(:focus-visible, .is-hovered)) .hero-tile:not(:where(:focus-visible, .is-hovered)) {
  opacity: 0.2;
}

.hero-tile-icon {
  position: relative;
  width: clamp(54px, 6vw, 88px);
  display: block;
  flex-shrink: 0;
  filter:
    drop-shadow(0 0 24px rgba(0, 0, 0, 1))
    drop-shadow(0 0 24px rgba(0, 0, 0, 1))
    drop-shadow(0 0 24px rgba(0, 0, 0, 1))
    drop-shadow(0 0 24px rgba(0, 0, 0, 1));
  transition: filter 320ms ease;
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  backface-visibility: visible;
  will-change: transform, filter;
}

.hero-tile-icon-img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 360ms ease;
}

.hero-tile-icon-img-hover {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.hero-tile:has(.hero-tile-hit:hover) .hero-tile-icon-img,
.hero-tile:where(:focus-visible, .is-hovered) .hero-tile-icon-img {
  opacity: 0;
}

.hero-tile:has(.hero-tile-hit:hover) .hero-tile-icon-img-hover,
.hero-tile:where(:focus-visible, .is-hovered) .hero-tile-icon-img-hover {
  opacity: 1;
}

.hero-tile-label {
  position: relative;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(0.85rem, 1.75vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 1em;
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  text-shadow:
    0 0 24px rgba(0, 0, 0, 1),
    0 0 24px rgba(0, 0, 0, 1),
    0 0 24px rgba(0, 0, 0, 1),
    0 0 24px rgba(0, 0, 0, 1);
  transition: color 320ms ease, text-shadow 320ms ease;
}

.hero-tile:has(.hero-tile-hit:hover) .hero-tile-icon,
.hero-tile:where(:focus-visible, .is-hovered) .hero-tile-icon {
  filter: none;
}

.hero-tile:has(.hero-tile-hit:hover) .hero-tile-label,
.hero-tile:where(:focus-visible, .is-hovered) .hero-tile-label {
  text-shadow: none;
}

.hero-tile-label::before,
.hero-tile-label::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  letter-spacing: inherit;
  text-transform: inherit;
  font: inherit;
  color: inherit;
  white-space: inherit;
  will-change: transform, opacity;
}

.hero-tile:has(.hero-tile-hit:hover) .hero-tile-label::before,
.hero-tile:where(:focus-visible, .is-hovered) .hero-tile-label::before {
  animation: hero-label-burst-up 1200ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-tile:has(.hero-tile-hit:hover) .hero-tile-label::after,
.hero-tile:where(:focus-visible, .is-hovered) .hero-tile-label::after {
  animation: hero-label-burst-down 1200ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-tile:has(.hero-tile-hit:hover) .hero-tile-icon,
.hero-tile:where(:focus-visible, .is-hovered) .hero-tile-icon {
  animation: hero-icon-spin 1200ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-tile:has(.hero-tile-hit:hover),
.hero-tile:where(:focus-visible, .is-hovered) {
  outline: none;
  background-color: rgba(126, 231, 255, 0.02);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 0 rgba(126, 231, 255, 0.18),
    0 10px 32px -12px rgba(0, 0, 0, 0.55);
}

@keyframes hero-tile-enter {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes hero-tile-unlock {
  to { pointer-events: auto; }
}

/**
 * On subsequent returns to home (any visit after the first page load),
 * skip the staggered fade-in. Tiles appear immediately and are already
 * interactive — no waiting through the 5-second cascade again.
 */
.hero-section.no-intro .hero-tile {
  animation: none;
  opacity: 1;
}

.hero-section.no-intro .hero-tile-hit {
  animation: none;
  pointer-events: auto;
}

@keyframes hero-icon-spin {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}

@keyframes hero-label-burst-up {
  0%   { opacity: 1; transform: translate3d(0, 0, 0); }
  100% { opacity: 0; transform: translate3d(0, -100%, 0); }
}

@keyframes hero-label-burst-down {
  0%   { opacity: 1; transform: translate3d(0, 0, 0); }
  100% { opacity: 0; transform: translate3d(0, 100%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-tile,
  .hero-tile-label {
    animation: none;
    opacity: 1;
    transform: none;
    letter-spacing: 1em;
    filter: none;
  }
  .hero-tile-hit {
    animation: none;
    pointer-events: auto;
  }
  .hero-tile-label::before,
  .hero-tile-label::after {
    animation: none;
    opacity: 0;
  }
  .hero-tile:has(.hero-tile-hit:hover) .hero-tile-icon,
  .hero-tile:where(:focus-visible, .is-hovered) .hero-tile-icon {
    animation: none;
    transform: scale(1.04);
  }
}

.hero-bg {
  position: absolute;
  top: -80px;
  bottom: -32px;
  left: calc(50% - 50vw);
  width: 100vw;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 82% at 50% 48%, #000 38%, transparent 92%);
  -webkit-mask-image: radial-gradient(ellipse 70% 82% at 50% 48%, #000 38%, transparent 92%);
}

.hero-bg-layer {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  aspect-ratio: 3280 / 1621;
  background-image: url("../../img/hero-bg.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: saturate(1.06) contrast(1.04);
  transform: translate3d(var(--hero-bg-shift, 0px), 0, 0);
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg-layer {
    transition: none;
  }
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 980px;
  margin-bottom: 20px;
  font-size: clamp(3rem, 8vw, 8.8rem);
  line-height: 0.93;
  letter-spacing: 0;
}

.music-section {
  padding: 16px 0 128px;
  min-height: 100vh;
}

.music-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 0;
  align-items: stretch;
  min-height: min(600px, calc(100vh - 180px));
  width: 100%;
  max-width: 1200px;
  border: 1px solid var(--line-strong);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  background: rgba(6, 8, 11, 0.96);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7), 0 0 80px rgba(126, 231, 255, 0.08);
  overflow: hidden;
}

.art-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vw, 56px);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
}

.art-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--cover-image);
  background-position: center;
  background-size: cover;
  opacity: 0;
  filter: blur(30px) saturate(1.4) brightness(0.7);
  transition: opacity 420ms ease, background-image 420ms ease;
  pointer-events: none;
}

.has-cover .art-panel::before {
  opacity: 0.32;
}

.art-shell {
  position: relative;
  width: 100%;
  max-width: var(--player-art-size);
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 30px 120px rgba(0, 0, 0, 0.68),
    0 0 80px rgba(126, 231, 255, 0.08);
}

.art-shell img,
.art-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.art-shell img {
  object-fit: cover;
  opacity: 0;
  transition: opacity 300ms ease, transform 800ms ease;
}

.has-cover .art-shell img {
  opacity: 1;
}

.is-playing .art-shell img {
  transform: scale(1.018);
}

.art-fallback {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 35% 25%, rgba(126, 231, 255, 0.24), transparent 34%),
    radial-gradient(circle at 72% 68%, rgba(233, 201, 135, 0.16), transparent 32%),
    #0b0f16;
  color: rgba(237, 245, 255, 0.74);
  font-size: clamp(4rem, 9vw, 9rem);
  font-weight: 760;
  transition: opacity 260ms ease;
}

.has-cover .art-fallback {
  opacity: 0;
  pointer-events: none;
}

.now-playing {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 2;
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  width: 24px;
  height: 22px;
  padding: 3px 4px;
  border-radius: 4px;
  background: rgba(5, 6, 8, 0.7);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

body.is-playing .now-playing {
  display: flex;
}

.now-playing i {
  display: block;
  flex: 1 1 0;
  height: 100%;
  min-height: 50%;
  border-radius: 1px;
  background: var(--accent);
  transform-origin: bottom;
  animation: now-playing-bounce 900ms ease-in-out infinite;
}

.now-playing i:nth-child(1) { animation-delay: -120ms; animation-duration: 820ms; }
.now-playing i:nth-child(2) { animation-delay: -460ms; animation-duration: 660ms; }
.now-playing i:nth-child(3) { animation-delay: -260ms; animation-duration: 740ms; }
.now-playing i:nth-child(4) { animation-delay: -540ms; animation-duration: 880ms; }

@keyframes now-playing-bounce {
  0%, 100% { transform: scaleY(0.55); }
  50%      { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .now-playing i {
    animation: none;
    transform: scaleY(0.6);
  }
}

.track-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  padding: clamp(24px, 3vw, 40px);
  border: none;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(8, 10, 14, 0.72), rgba(5, 6, 8, 0.92));
  overflow: auto;
  box-shadow: none;
  backdrop-filter: none;
}

.track-panel > .track-heading {
  flex: 0 0 auto;
}

.track-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.track-heading h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.track-artist {
  margin: 0;
  color: var(--faint);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.track-feature {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.82rem;
}

.track-description {
  flex: 1 1 auto;
  margin: 8px 0 0;
  min-height: 0;
  overflow-y: auto;
  padding-right: 8px;
  color: rgba(237, 245, 255, 0.82);
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.primary-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-button,
.play-button,
.dock-icon,
.dock-play,
.dock-cover-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.icon-button,
.dock-icon {
  display: grid;
  place-items: center;
  width: 48px;
  aspect-ratio: 1;
  border-radius: 50%;
}

.play-button,
.dock-play {
  display: grid;
  place-items: center;
  width: 64px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(126, 231, 255, 0.12);
  border-color: rgba(126, 231, 255, 0.42);
  box-shadow: 0 0 40px rgba(126, 231, 255, 0.16);
}

.icon-button:hover,
.play-button:hover,
.dock-icon:hover,
.dock-play:hover,
.dock-cover-button:hover {
  border-color: rgba(237, 245, 255, 0.48);
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-1px);
}

button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.play-button svg,
.dock-play svg {
  width: 24px;
  height: 24px;
}

.pause-icon,
.is-playing .play-icon {
  display: none;
}

.is-playing .pause-icon {
  display: block;
}

.is-shuffled #shuffleButton,
#shuffleButton[aria-pressed="true"] {
  color: var(--accent);
  border-color: rgba(126, 231, 255, 0.52);
}

.progress-block {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 13px;
  margin-top: 26px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.86rem;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.lyrics-toggle {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(237, 245, 255, 0.32);
  border-radius: var(--radius);
  background: rgba(5, 6, 8, 0.68);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36), 0 0 34px rgba(126, 231, 255, 0.12);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(18px) saturate(1.18);
}

.lyrics-toggle[hidden] {
  display: none;
}

.lyrics-panel {
  position: absolute;
  inset: 14px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(5, 6, 8, 0.76), rgba(12, 14, 19, 0.58));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(22px) saturate(1.14);
}

.lyrics-panel[hidden] {
  display: none;
}

.lyrics-panel::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  background-image: var(--cover-image);
  background-size: cover;
  background-position: center;
  opacity: 0.2;
  filter: blur(28px) saturate(1.25) brightness(0.78);
}

.lyrics-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.lyrics-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.lyrics-copy {
  min-height: 0;
  overflow: auto;
  padding-right: 14px;
  color: rgba(237, 245, 255, 0.86);
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.72;
  white-space: pre-wrap;
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.74rem;
}

.sort-controls span {
  margin-right: 4px;
  color: var(--faint);
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.sort-controls button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
}

.sort-controls button[aria-pressed="true"],
.sort-controls button:hover {
  border-color: rgba(126, 231, 255, 0.46);
  background: rgba(126, 231, 255, 0.1);
  color: var(--text);
}

.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 0;
}

@media (max-width: 480px) {
  .track-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .track-card-title {
    font-size: 0.82rem;
  }

  .track-card-artist {
    font-size: 0.72rem;
  }

  .section-bar-label {
    font-size: 1.05rem;
  }

  .section-intro-toggle {
    padding: 5px 10px;
    gap: 6px;
    font-size: 0.6rem;
    letter-spacing: 0.14em;
  }

  .section-intro-toggle-chevron {
    width: 9px;
    height: 6px;
  }
}

.track-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.track-card:hover,
.track-card.active {
  border-color: rgba(126, 231, 255, 0.48);
  background: rgba(126, 231, 255, 0.075);
}

.track-card-art {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
  background: rgba(255, 255, 255, 0.05);
}

.track-card-art img,
.track-card-art span {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.track-card-art img {
  object-fit: cover;
}

.track-card-art span {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 740;
  background:
    radial-gradient(circle at 35% 25%, rgba(126, 231, 255, 0.2), transparent 32%),
    #0a0d12;
}

.track-card-title,
.track-card-artist {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-card-title {
  font-weight: 680;
}

.track-card-artist {
  color: var(--muted);
  font-size: 0.86rem;
}

.photography-section {
  padding: 12px 0 128px;
  min-height: 100vh;
}

.code-section {
  padding: 12px 0 128px;
  min-height: 100vh;
}

.section-placeholder {
  min-height: 32vh;
  display: grid;
  place-items: center;
  margin-top: 24px;
  padding: 48px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--faint);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.design-section {
  padding: 12px 0 128px;
  min-height: 100vh;
}

.section-fade-in {
  animation: section-fade-in 1400ms ease-out;
}

.section-fade-in-content {
  animation: section-fade-in 1400ms ease-out 500ms backwards;
}

.subsection-fade-in {
  animation: section-fade-in 260ms ease-out;
}

@keyframes section-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .section-fade-in,
  .section-fade-in-content,
  .subsection-fade-in {
    animation: none;
  }
}

.section-bar-shell {
  position: sticky;
  top: var(--header-offset);
  z-index: 15;
  isolation: isolate;
  margin-bottom: 96px;
}

.section-bar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  margin-bottom: 0;
  padding: 16px 0;
}

.section-bar::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: -1;
  background: rgba(5, 6, 8, 0.93);
  border-top: 1px solid #3a3a3a;
  border-bottom: 3px solid var(--accent);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.55);
  clip-path: inset(0 -100px -40px -100px);
}

.section-bar-label {
  margin: 0;
  color: var(--accent);
  opacity: 0.82;
  font-family: "Bungee", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.5rem, 2.8vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
  transform: translateY(calc(-1 * var(--header-offset) + 48px));
}

.section-intro-wrap {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  overflow: hidden;
  max-height: 0;
  margin: 0;
  filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.55)) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.4));
  transition: max-height 460ms cubic-bezier(0.22, 1, 0.36, 1);
  overscroll-behavior: contain;
}

.section-intro-wrap.open {
  overflow-y: auto;
}

.section-intro {
  padding: 64px 48px 40px;
  border: 2px solid #ffb37e;
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: linear-gradient(180deg, rgba(5, 6, 8, 0.82), rgba(5, 6, 8, 0.74));
  backdrop-filter: blur(18px) saturate(1.16);
  -webkit-backdrop-filter: blur(18px) saturate(1.16);
  color: #ffb37e;
  font-family: "Kalam", cursive;
  font-weight: 300;
  font-size: 1.05rem;
  /**
   * Lock line-height to the previous size (1.15rem * 1.55) so the rhythm
   * stays put when font-size shrinks.
   */
  line-height: 1.7825rem;
}

.section-intro-toggle {
  position: absolute;
  top: 100%;
  left: clamp(16px, 4vw, 48px);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 13px;
  border: 2px solid #ffb37e;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: rgba(5, 6, 8, 0.93);
  color: #ffb37e;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.45);
  transition: color 180ms ease, background 180ms ease;
}

.section-intro-toggle:hover,
.section-intro-toggle:focus-visible {
  outline: none;
  background: rgba(255, 179, 126, 0.14);
  color: #ffd0aa;
}

.section-intro-toggle-chevron {
  width: 12px;
  height: 8px;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.section-intro-toggle[aria-expanded="true"] .section-intro-toggle-chevron {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .section-intro-wrap,
  .section-intro-toggle-chevron {
    transition: none;
  }
}

body.edit-mode .section-intro-wrap {
  position: static;
  filter: none;
  transition: none;
}

body.edit-mode .section-intro-wrap.open {
  overflow: visible;
  max-height: none !important;
}

.section-intro p {
  margin: 0 0 1em;
}

.section-intro p:last-child {
  margin-bottom: 0;
}

.section-intro.intro-armed .intro-word {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(0.45em);
  transition:
    opacity 400ms ease-out,
    filter 400ms ease-out,
    transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, filter, transform;
}

.section-intro.intro-armed.intro-revealed .intro-word {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .section-intro.intro-armed .intro-word {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }
}

.design-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.design-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.76rem;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.design-filter strong {
  color: var(--faint);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.design-filter:hover,
.design-filter[aria-pressed="true"] {
  border-color: rgba(126, 231, 255, 0.46);
  background: rgba(126, 231, 255, 0.1);
  color: var(--text);
}

.design-filter[aria-pressed="true"] strong {
  color: var(--accent);
}

.design-band + .design-band {
  margin-top: 56px;
}

.design-band-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.design-band-head .section-kicker {
  margin: 0;
}

.design-band-count {
  color: var(--faint);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

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

.design-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  color: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.design-card:hover {
  border-color: rgba(126, 231, 255, 0.5);
  background: rgba(126, 231, 255, 0.08);
  transform: translateY(-2px);
}

.design-card-art {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 22%, rgba(126, 231, 255, 0.16), transparent 38%),
    #0a0d12;
}

.design-card-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.04) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: design-shimmer 1.6s linear infinite;
  pointer-events: none;
}

.design-card-art.loaded::before {
  display: none;
}

.design-card-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: transform 600ms ease, opacity 280ms ease;
}

.design-card-art.loaded img {
  opacity: 1;
}

@keyframes design-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.design-card:hover .design-card-art img {
  transform: scale(1.04);
}

.design-card-meta {
  display: block;
  padding: 0 12px 12px;
}

.design-card-title {
  display: block;
  font-family: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  word-break: break-word;
}

.design-empty {
  margin: 24px 0;
  color: var(--muted);
}

.design-viewer {
  position: fixed;
  inset: 0;
  z-index: 25;
  padding: calc(var(--dock-height) + 28px);
  background: rgba(2, 3, 5, 0.74);
  backdrop-filter: blur(8px) saturate(1.1);
  animation: design-viewer-fade-in 260ms ease both;
}

.design-viewer-card {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(6, 8, 11, 0.96);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7), 0 0 80px rgba(126, 231, 255, 0.08);
  overflow: hidden;
  animation: design-viewer-zoom-in 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.design-viewer.is-closing {
  animation: design-viewer-fade-out 220ms ease both;
}

.design-viewer.is-closing .design-viewer-card {
  animation: design-viewer-zoom-out 260ms cubic-bezier(0.7, 0, 0.84, 0) both;
}

@keyframes design-viewer-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes design-viewer-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes design-viewer-zoom-in {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes design-viewer-zoom-out {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(0.55); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .design-viewer,
  .design-viewer-card {
    animation: none;
  }
}

.design-viewer[hidden] {
  display: none;
}

.design-viewer-image {
  position: relative;
  display: block;
  margin: 0;
  padding: clamp(24px, 4vw, 56px);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
}

.design-viewer-image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--viewer-cover, none);
  background-size: cover;
  background-position: center;
  opacity: 0.32;
  filter: blur(30px) saturate(1.4) brightness(0.7);
  pointer-events: none;
}

.design-viewer-img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100% - 2 * clamp(24px, 4vw, 56px));
  max-height: calc(100% - 2 * clamp(24px, 4vw, 56px));
  border-radius: var(--radius);
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.68), 0 0 80px rgba(126, 231, 255, 0.08);
  opacity: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  will-change: transform, opacity;
}

.design-viewer-img.is-entering {
  animation: viewer-zoom-fade-in 3000ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.design-viewer-img.is-leaving {
  animation: viewer-fade-out 400ms ease forwards;
}

@keyframes viewer-zoom-fade-in {
  from { opacity: 0; transform: translate(-50%, -50%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes viewer-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .design-viewer-img.is-entering,
  .design-viewer-img.is-leaving {
    animation: none;
  }
  .design-viewer-img.is-current {
    opacity: 1;
  }
}

.design-viewer-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(24px, 3vw, 40px);
  border-left: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 10, 14, 0.72), rgba(5, 6, 8, 0.92));
  overflow: auto;
}

.design-viewer-details h3 {
  margin: 0;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.05;
}

.design-viewer-counter {
  margin: 0;
  color: var(--faint);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.design-viewer-description {
  margin: 8px 0 0;
  color: rgba(237, 245, 255, 0.82);
  font-size: 0.98rem;
  line-height: 1.6;
}

.design-viewer-description[hidden] {
  display: none;
}

.design-viewer-close,
.design-viewer-nav {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(5, 6, 8, 0.78);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.design-viewer-close:hover {
  border-color: rgba(126, 231, 255, 0.6);
  background: rgba(126, 231, 255, 0.14);
  transform: translateY(-1px);
}

.design-viewer-nav,
.design-viewer-nav:hover,
.design-viewer-nav:focus,
.design-viewer-nav:focus-visible,
.design-viewer-nav:active {
  background: rgb(5, 6, 8);
  backdrop-filter: none;
  border-color: var(--line-strong);
}

.design-viewer-nav:hover {
  transform: translateY(-1px);
}

.design-viewer-close {
  top: 18px;
  right: calc(min(360px, 30vw) + 18px);
}

.design-viewer-nav {
  top: 50%;
  transform: translateY(-50%);
}

.design-viewer-nav.prev {
  left: 20px;
}

.design-viewer-nav.next {
  right: calc(min(360px, 30vw) + 20px);
}

.design-viewer-nav:hover {
  transform: translateY(calc(-50% - 1px));
}

.design-viewer-nav svg,
.design-viewer-close svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

body.design-viewer-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .section-bar {
    flex-wrap: wrap;
  }

  .design-filter-bar {
    justify-content: flex-start;
  }

  .design-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
  }

  .design-viewer {
    padding: 16px;
  }

  .design-viewer-card {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1.4fr) minmax(0, 1fr);
  }

  .design-viewer-details {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .design-viewer-close {
    top: 14px;
    right: 14px;
  }

  .design-viewer-nav.next {
    right: 14px;
  }
}

body:not(.has-played) {
  padding-bottom: 28px;
}

body:not(.has-played) .dock-player,
body.dock-dismissed .dock-player {
  display: none;
}

.music-panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 29;
  background: rgba(2, 4, 7, 0.62);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
}

.music-panel-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.music-panel {
  position: fixed;
  left: 50%;
  bottom: calc(var(--dock-height) + 16px);
  z-index: 31;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(1120px, calc(100% - 24px));
  max-height: 0;
  overflow: hidden;
  background: transparent;
  transform: translateX(-50%);
  transition: max-height 420ms cubic-bezier(0.22, 1, 0.36, 1),
              padding 420ms cubic-bezier(0.22, 1, 0.36, 1);
  isolation: isolate;
  pointer-events: none;
  padding: 0 20px;
}

.music-panel.open {
  max-height: calc(100dvh - var(--dock-height) - 24px);
  pointer-events: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.music-panel .music-stage {
  margin: 0;
  flex: 0 0 auto;
}

.music-panel-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(5, 6, 8, 0.78);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.music-panel-close:hover,
.music-panel-close:focus-visible {
  border-color: rgba(126, 231, 255, 0.6);
  background: rgba(126, 231, 255, 0.14);
  transform: translateY(-1px);
  outline: none;
}

.music-panel-close svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.dock-close {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 200ms ease, color 200ms ease;
  z-index: 1;
}

.dock-close:hover,
.dock-close:focus-visible {
  opacity: 1;
  color: var(--text);
  outline: none;
}

.dock-close svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.dock-player {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 30;
  display: grid;
  grid-template-columns: 58px minmax(160px, 1fr) 40px 48px 40px 40px minmax(220px, 0.9fr);
  align-items: center;
  gap: 10px;
  width: min(1120px, calc(100% - 24px));
  min-height: var(--dock-height);
  padding: 12px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #2a2f36 0%, #0e1115 100%);
  box-shadow: 0 18px 80px rgba(0, 0, 0, 0.55);
  transform: translateX(-50%);
  isolation: isolate;
  overflow: hidden;
}

.dock-cover-button {
  position: relative;
  width: 58px;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border-radius: 6px;
}

.dock-cover-button img,
.dock-cover-button > #dockFallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.dock-cover-button img {
  object-fit: cover;
  opacity: 0;
}

.has-cover .dock-cover-button img {
  opacity: 1;
}

.dock-cover-button > #dockFallback {
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #0c1118;
  font-size: 0.8rem;
  font-weight: 760;
  transition: opacity 180ms ease;
}

.has-cover .dock-cover-button > #dockFallback {
  opacity: 0;
  pointer-events: none;
}

.dock-meta {
  min-width: 0;
}

.dock-meta strong,
.dock-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dock-meta span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.84rem;
}

.dock-icon,
.dock-play {
  width: 40px;
}

.dock-play {
  width: 48px;
}

.dock-progress {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.dock-time {
  font-variant-numeric: tabular-nums;
  font-size: 0.74rem;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .hero-nav {
    width: 100%;
    gap: 0;
  }
  .hero-tile-label {
    font-size: clamp(0.88rem, 3.2vw, 1.3rem);
  }
  .hero-tile-icon {
    width: clamp(44px, 12vw, 68px);
  }

  .music-stage {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    min-height: auto;
  }

  .art-shell {
    width: min(var(--player-art-size), 100%);
    min-width: 0;
    min-height: 0;
    aspect-ratio: 1;
  }

  .lyrics-panel {
    position: fixed;
    inset: 16px 16px calc(var(--dock-height) + 32px) 16px;
    z-index: 50;
  }

  .icon-button {
    width: 40px;
  }

  .play-button {
    width: 52px;
  }

  .dock-player {
    grid-template-columns: 48px minmax(0, 1fr) 42px 42px 42px 42px;
  }

  .dock-cover-button {
    width: 48px;
  }

  .dock-progress {
    display: none;
  }

  .top-nav {
    position: static;
    transform: none;
    flex: 1 1 0;
    min-width: 0;
    justify-content: flex-start;
    gap: clamp(8px, 1.8vw, 16px);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .top-nav::-webkit-scrollbar {
    display: none;
  }

  .top-nav a {
    flex-shrink: 0;
  }
}

@media (max-width: 640px) {
  main {
    width: min(100% - 28px, 1480px);
  }

  .top-nav {
    position: static;
    transform: none;
    flex: 1 1 0;
    min-width: 0;
    justify-content: flex-start;
    gap: 14px;
    font-size: 0.62rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .top-nav::-webkit-scrollbar {
    display: none;
  }

  .top-nav a {
    flex-shrink: 0;
  }

  .nav-tile-icon {
    width: 20px;
  }

  .section-intro {
    font-size: 0.95rem;
    line-height: 1.55rem;
  }

  h1 {
    font-size: clamp(2.55rem, 15vw, 4rem);
  }

  .queue-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .music-stage {
    grid-template-columns: 1fr;
    overflow: visible;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .art-shell {
    width: min(74vh, 100%);
  }

  .track-panel {
    max-height: none;
    overflow: visible;
    padding-inline: clamp(18px, 3vw, 30px);
    background: transparent;
    border-left: none;
    border-top: 1px solid var(--line-strong);
  }

  .track-description {
    flex: 0 0 auto;
    overflow: visible;
    max-width: none;
  }

  #shuffleButton {
    display: none;
  }

  .dock-player {
    grid-template-columns: 48px minmax(0, 1fr) 42px 42px 42px;
  }

  .music-panel {
    left: 0;
    right: 0;
    top: 0;
    bottom: calc(var(--dock-height) + 16px);
    width: 100%;
    max-width: 100%;
    padding: 0;
    transform: none;
    max-height: none;
    transition: opacity 240ms ease;
  }

  .music-panel:not(.open) {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }

  .music-panel.open {
    visibility: visible;
    opacity: 1;
    max-height: none;
  }

  .music-panel-close {
    position: fixed;
    top: 10px;
    right: 10px;
  }

  .music-panel:not(.open) .music-panel-close {
    display: none;
  }

  .music-panel:has(.lyrics-panel:not([hidden])) .music-panel-close {
    display: none;
  }
}

/**
 * "Enter edit mode" button — only injected on local hostnames by the
 * inline bootstrap in index.html. Mirrors the position and shape of
 * the in-edit-mode "Exit edit mode" toolbar button so the two are
 * visually consistent.
 */
.edit-enter-button {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 160ms ease, color 160ms ease, transform 120ms ease;
}

.edit-enter-button svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.edit-enter-button:hover,
.edit-enter-button:focus-visible {
  opacity: 1;
  color: var(--text);
  outline: none;
}

.edit-enter-button:active {
  transform: translateY(1px);
}

/**
 * Photography viewer — same lightbox shell as the design viewer, but laid
 * out as two stacked rows: full-resolution photo on top, optional caption
 * (with title + counter) underneath. Reuses the design-card thumbnail
 * styling for the grid.
 */
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 25;
  padding: calc(var(--dock-height) + 28px);
  background: rgba(2, 3, 5, 0.74);
  backdrop-filter: blur(8px) saturate(1.1);
  animation: design-viewer-fade-in 260ms ease both;
}

.photo-viewer[hidden] {
  display: none;
}

.photo-viewer-card {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(6, 8, 11, 0.96);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7), 0 0 80px rgba(126, 231, 255, 0.08);
  overflow: hidden;
  animation: design-viewer-zoom-in 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.photo-viewer.is-closing {
  animation: design-viewer-fade-out 220ms ease both;
}

.photo-viewer.is-closing .photo-viewer-card {
  animation: design-viewer-zoom-out 260ms cubic-bezier(0.7, 0, 0.84, 0) both;
}

@media (prefers-reduced-motion: reduce) {
  .photo-viewer,
  .photo-viewer-card {
    animation: none;
  }
}

.photo-viewer-image {
  position: relative;
  display: block;
  margin: 0;
  padding: clamp(24px, 4vw, 56px);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
}

.photo-viewer-image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--viewer-cover, none);
  background-size: cover;
  background-position: center;
  opacity: 0.32;
  filter: blur(30px) saturate(1.4) brightness(0.7);
  pointer-events: none;
}

.photo-viewer-img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100% - 2 * clamp(24px, 4vw, 56px));
  max-height: calc(100% - 2 * clamp(24px, 4vw, 56px));
  border-radius: var(--radius);
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.68), 0 0 80px rgba(126, 231, 255, 0.08);
  opacity: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  will-change: transform, opacity;
}

.photo-viewer-img.is-entering {
  animation: viewer-zoom-fade-in 3000ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.photo-viewer-img.is-leaving {
  animation: viewer-fade-out 400ms ease forwards;
}

@media (prefers-reduced-motion: reduce) {
  .photo-viewer-img.is-entering,
  .photo-viewer-img.is-leaving {
    animation: none;
  }
  .photo-viewer-img.is-current {
    opacity: 1;
  }
}

.photo-viewer-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(20px, 2.5vw, 32px) clamp(24px, 4vw, 56px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 10, 14, 0.72), rgba(5, 6, 8, 0.92));
  overflow: auto;
  max-height: 36vh;
}

.photo-viewer-details .eyebrow {
  margin-bottom: 0;
}

.photo-viewer-details-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.photo-viewer-details h3 {
  margin: 0;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.05;
}

.photo-viewer-counter {
  margin: 0;
  color: var(--faint);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.photo-viewer-caption {
  margin: 0;
  color: rgba(237, 245, 255, 0.82);
  font-size: 0.98rem;
  line-height: 1.6;
}

.photo-viewer-caption[hidden] {
  display: none;
}

.photo-viewer-close,
.photo-viewer-nav {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(5, 6, 8, 0.78);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.photo-viewer-close:hover {
  border-color: rgba(126, 231, 255, 0.6);
  background: rgba(126, 231, 255, 0.14);
  transform: translateY(-1px);
}

.photo-viewer-nav,
.photo-viewer-nav:hover,
.photo-viewer-nav:focus,
.photo-viewer-nav:focus-visible,
.photo-viewer-nav:active {
  background: rgb(5, 6, 8);
  backdrop-filter: none;
  border-color: var(--line-strong);
}

.photo-viewer-nav:hover {
  transform: translateY(-1px);
}

.photo-viewer-close {
  top: 18px;
  right: 18px;
}

.photo-viewer-nav {
  top: 50%;
  transform: translateY(-50%);
}

.photo-viewer-nav.prev {
  left: 20px;
}

.photo-viewer-nav.next {
  right: 20px;
}

.photo-viewer-nav:hover {
  transform: translateY(calc(-50% - 1px));
}

.photo-viewer-nav svg,
.photo-viewer-close svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

body.photo-viewer-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .photo-viewer {
    padding: 16px;
  }

  .photo-viewer-details {
    max-height: 40vh;
  }

  .photo-viewer-close {
    top: 14px;
    right: 14px;
  }

  .photo-viewer-nav.prev {
    left: 14px;
  }

  .photo-viewer-nav.next {
    right: 14px;
  }
}

/**
 * Code viewer — adapted from photo-viewer but with a 2-column card:
 * 33% details on the left, image on the right. Falls back to a stacked
 * layout on narrow screens.
 */
.code-viewer {
  position: fixed;
  inset: 0;
  z-index: 25;
  padding: calc(var(--dock-height) + 28px);
  background: rgba(2, 3, 5, 0.74);
  backdrop-filter: blur(8px) saturate(1.1);
  animation: design-viewer-fade-in 260ms ease both;
}

.code-viewer[hidden] {
  display: none;
}

.code-viewer-card {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 33% minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(6, 8, 11, 0.96);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7), 0 0 80px rgba(126, 231, 255, 0.08);
  overflow: hidden;
  animation: design-viewer-zoom-in 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.code-viewer.is-closing {
  animation: design-viewer-fade-out 220ms ease both;
}

.code-viewer.is-closing .code-viewer-card {
  animation: design-viewer-zoom-out 260ms cubic-bezier(0.7, 0, 0.84, 0) both;
}

@media (prefers-reduced-motion: reduce) {
  .code-viewer,
  .code-viewer-card {
    animation: none;
  }
}

.code-viewer-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(24px, 3vw, 40px) clamp(24px, 3vw, 40px);
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 10, 14, 0.72), rgba(5, 6, 8, 0.92));
  overflow: auto;
  min-width: 0;
}

.code-viewer-details .eyebrow {
  margin-bottom: 0;
}

.code-viewer-details-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.code-viewer-details h3 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  line-height: 1.1;
}

.code-viewer-counter {
  margin: 0;
  color: var(--faint);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.code-viewer-caption {
  margin: 0;
  color: rgba(237, 245, 255, 0.82);
  font-size: 0.98rem;
  line-height: 1.6;
}

.code-viewer-caption[hidden] {
  display: none;
}

.code-viewer-image {
  position: relative;
  display: block;
  margin: 0;
  padding: clamp(24px, 4vw, 56px);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
}

.code-viewer-image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--viewer-cover, none);
  background-size: cover;
  background-position: center;
  opacity: 0.32;
  filter: blur(30px) saturate(1.4) brightness(0.7);
  pointer-events: none;
}

.code-viewer-img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100% - 2 * clamp(24px, 4vw, 56px));
  max-height: calc(100% - 2 * clamp(24px, 4vw, 56px));
  border-radius: var(--radius);
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.68), 0 0 80px rgba(126, 231, 255, 0.08);
  opacity: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  will-change: transform, opacity;
}

.code-viewer-img.is-entering {
  animation: viewer-zoom-fade-in 3000ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.code-viewer-img.is-leaving {
  animation: viewer-fade-out 400ms ease forwards;
}

@media (prefers-reduced-motion: reduce) {
  .code-viewer-img.is-entering,
  .code-viewer-img.is-leaving {
    animation: none;
  }
  .code-viewer-img.is-current {
    opacity: 1;
  }
}

.code-viewer-close,
.code-viewer-nav {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(5, 6, 8, 0.78);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.code-viewer-close:hover {
  border-color: rgba(126, 231, 255, 0.6);
  background: rgba(126, 231, 255, 0.14);
  transform: translateY(-1px);
}

.code-viewer-nav,
.code-viewer-nav:hover,
.code-viewer-nav:focus,
.code-viewer-nav:focus-visible,
.code-viewer-nav:active {
  background: rgb(5, 6, 8);
  backdrop-filter: none;
  border-color: var(--line-strong);
}

.code-viewer-nav:hover {
  transform: translateY(-1px);
}

.code-viewer-close {
  top: 18px;
  right: 18px;
}

.code-viewer-nav {
  top: 50%;
  transform: translateY(-50%);
}

.code-viewer-nav.prev {
  left: 20px;
}

.code-viewer-nav.next {
  right: 20px;
}

.code-viewer-nav:hover {
  transform: translateY(calc(-50% - 1px));
}

.code-viewer-nav svg,
.code-viewer-close svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

body.code-viewer-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .code-viewer {
    padding: 16px;
  }

  .code-viewer-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .code-viewer-details {
    border-right: none;
    border-top: 1px solid var(--line);
    max-height: 40vh;
    order: 2;
  }

  .code-viewer-image {
    order: 1;
  }

  .code-viewer-close {
    top: 14px;
    right: 14px;
  }

  .code-viewer-nav.prev {
    left: 14px;
  }

  .code-viewer-nav.next {
    right: 14px;
  }
}

/**
 * .rich-text — shared rules for markdown-rendered HTML inside the design,
 * photography, and code detail panels. The host element supplies size,
 * color, and line-height; .rich-text only handles spacing and the per-tag
 * treatment (lists, headings, links, code, blockquote, image, hr).
 *
 * First/last-child margin collapse keeps tight visual rhythm against the
 * panel edges regardless of which markdown element appears at the top or
 * bottom of the rendered output.
 */
.rich-text > * {
  margin: 0 0 0.85em;
}

.rich-text > *:last-child {
  margin-bottom: 0;
}

.rich-text > *:first-child {
  margin-top: 0;
}

.rich-text h1,
.rich-text h2,
.rich-text h3,
.rich-text h4 {
  margin: 1.25em 0 0.45em;
  color: var(--text);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.rich-text > h1:first-child,
.rich-text > h2:first-child,
.rich-text > h3:first-child,
.rich-text > h4:first-child {
  margin-top: 0;
}

.rich-text h1 { font-size: 1.18rem; }
.rich-text h2 {
  font-size: 1.06rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.rich-text h3 { font-size: 0.98rem; color: var(--text); }
.rich-text h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.rich-text p {
  margin: 0 0 0.85em;
}

.rich-text a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(126, 231, 255, 0.35);
  text-underline-offset: 3px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.rich-text a:hover,
.rich-text a:focus-visible {
  color: var(--text);
  text-decoration-color: var(--accent);
}

.rich-text strong {
  color: var(--text);
  font-weight: 600;
}

.rich-text em {
  font-style: italic;
  color: rgba(237, 245, 255, 0.92);
}

.rich-text ul,
.rich-text ol {
  margin: 0 0 0.85em;
  padding-left: 1.35em;
}

.rich-text li {
  margin: 0.18em 0;
}

.rich-text li::marker {
  color: var(--accent);
}

.rich-text ul ul,
.rich-text ol ol,
.rich-text ul ol,
.rich-text ol ul {
  margin: 0.2em 0 0.2em;
}

.rich-text hr {
  margin: 1.1em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.rich-text blockquote {
  margin: 0 0 0.85em;
  padding: 0.4em 0 0.4em 0.95em;
  border-left: 2px solid var(--accent);
  color: rgba(237, 245, 255, 0.72);
  font-style: italic;
}

.rich-text blockquote > *:last-child {
  margin-bottom: 0;
}

.rich-text code {
  padding: 0.08em 0.38em;
  border-radius: 4px;
  background: rgba(126, 231, 255, 0.08);
  border: 1px solid rgba(126, 231, 255, 0.18);
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  white-space: pre-wrap;
  word-break: break-word;
}

.rich-text pre {
  margin: 0 0 0.85em;
  padding: 0.85em 1em;
  border-radius: var(--radius);
  background: rgba(5, 6, 8, 0.6);
  border: 1px solid var(--line);
  overflow-x: auto;
  line-height: 1.5;
}

.rich-text pre code {
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: rgba(237, 245, 255, 0.92);
  font-size: 0.86rem;
  white-space: pre;
  word-break: normal;
}

.rich-text img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.5em 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

/**
 * Phone-only treatment for the design / photography / code viewers.
 * Placed at the end of the file so it wins over the per-viewer base rules
 * defined earlier — media queries don't add specificity, so source order
 * decides between equally-specific selectors.
 *
 * The viewer becomes the single scroll container; the card stacks image
 * over details and grows to content height so the two regions scroll
 * together as one unit. The image shrink-wraps to its natural aspect,
 * capped at 45vh, instead of filling a fixed cell.
 */
@media (max-width: 640px) {
  .design-viewer,
  .photo-viewer,
  .code-viewer {
    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.has-played:not(.dock-dismissed) .design-viewer,
  body.has-played:not(.dock-dismissed) .photo-viewer,
  body.has-played:not(.dock-dismissed) .code-viewer {
    padding-bottom: calc(var(--dock-height) + 32px);
  }

  .design-viewer-card,
  .photo-viewer-card,
  .code-viewer-card {
    height: auto;
    min-height: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    border-radius: 0;
    border-left: none;
    border-right: none;
    overflow: visible;
  }

  .design-viewer-image,
  .photo-viewer-image,
  .code-viewer-image {
    height: auto;
    min-height: 0;
    padding: clamp(12px, 3vw, 20px);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .design-viewer-img,
  .photo-viewer-img,
  .code-viewer-img {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 45vh;
    display: block;
    opacity: 1;
    animation: none;
  }

  .design-viewer-img:not(.is-current),
  .photo-viewer-img:not(.is-current),
  .code-viewer-img:not(.is-current) {
    display: none;
  }

  .design-viewer-img.is-entering,
  .design-viewer-img.is-leaving,
  .photo-viewer-img.is-entering,
  .photo-viewer-img.is-leaving,
  .code-viewer-img.is-entering,
  .code-viewer-img.is-leaving {
    animation: none;
    transform: none;
    opacity: 1;
  }

  .design-viewer-details,
  .photo-viewer-details,
  .code-viewer-details {
    max-height: none;
    overflow: visible;
    border-left: none;
    border-right: none;
    border-top: 1px solid var(--line);
    order: 2;
  }

  .code-viewer-image {
    order: 1;
  }

  .design-viewer-close,
  .photo-viewer-close,
  .code-viewer-close {
    top: 10px;
    right: 10px;
  }

  .design-viewer-nav,
  .photo-viewer-nav,
  .code-viewer-nav {
    top: max(22vh, 120px);
    transform: translateY(-50%);
  }

  .design-viewer-nav:hover,
  .photo-viewer-nav:hover,
  .code-viewer-nav:hover {
    transform: translateY(calc(-50% - 1px));
  }

  .design-viewer-nav.prev,
  .photo-viewer-nav.prev,
  .code-viewer-nav.prev {
    left: 10px;
  }

  .design-viewer-nav.next,
  .photo-viewer-nav.next,
  .code-viewer-nav.next {
    right: 10px;
  }
}
