:root {
  color-scheme: light;
  --page-bg: linear-gradient(155deg, #edf2ff 0%, #f8f7ff 45%, #eef9f4 100%);
  --card-bg: #ffffff;
  --card-border: rgba(15, 23, 42, 0.08);
  --text: #15171a;
  --muted: #656a72;
  --surface: #f1f3f5;
  --surface-hover: #e8ebee;
  --player-bg: #eceff3;
  --track-bg: #d8dde3;
  --track-fill: #17191c;
  --focus: #2368ff;
  --shadow: 0 24px 70px rgba(34, 42, 62, 0.16);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: linear-gradient(155deg, #07090d 0%, #151820 52%, #0b1512 100%);
  --card-bg: #17191d;
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #f7f7f8;
  --muted: #adafb5;
  --surface: #25272c;
  --surface-hover: #2d3036;
  --player-bg: #111318;
  --track-bg: #3a3e46;
  --track-fill: #f7f7f8;
  --focus: #79a7ff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #eef2ff;
  scrollbar-gutter: stable;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  transition: background 220ms ease, color 220ms ease;
}

button,
a,
input {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.play-glyph,
.player-toggle__play {
  fill: currentColor;
  stroke: none;
}

.page-shell {
  width: 100%;
  padding: max(18px, env(safe-area-inset-top)) 0 max(18px, env(safe-area-inset-bottom));
}

.profile-stack {
  position: relative;
  isolation: isolate;
  width: min(440px, calc(100% - 32px));
  margin: 0 auto;
}

.profile-card {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0;
  padding: 30px 20px 22px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

/* Theme switch - anchored to the avatar, opposite the Play button */
.theme-toggle {
  position: absolute;
  z-index: 5;
  left: -4px;
  bottom: -3px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 3px solid var(--card-bg);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 220ms ease;
}

.theme-toggle:hover {
  background: var(--surface-hover);
}

.theme-toggle:active {
  transform: scale(0.96);
}

.theme-icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon--sun {
  display: none;
}

html[data-theme="dark"] .theme-icon--moon {
  display: none;
}

html[data-theme="dark"] .theme-icon--sun {
  display: block;
}

/* Player - secondary card that slides out from behind the profile card */
.player-shell {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  grid-template-rows: 0fr;
  margin: 0;
  opacity: 0;
  transform: translateY(56px);
  pointer-events: none;
  transition:
    grid-template-rows 360ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease,
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    margin-bottom 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.player-shell.is-open {
  grid-template-rows: 1fr;
  margin-bottom: -55px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.player-shell__inner {
  min-height: 0;
  overflow: hidden;
}

.player {
  width: 100%;
  padding: 14px 14px 72px;
  background: var(--player-bg);
  border: 1px solid var(--card-border);
  border-radius: 28px;
}

.player__header {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  text-align: left;
}

.player__disc {
  position: relative;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: 50%;
  background: #111;
  box-shadow: inset 0 0 0 7px rgba(0, 0, 0, 0.12);
}

.player__disc::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: #151515;
  transform: translate(-50%, -50%);
}

.player__cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: disc-spin 9s linear infinite;
  animation-play-state: paused;
}

.player.is-playing .player__cover {
  animation-play-state: running;
}

.player__meta {
  min-width: 0;
}

.player__eyebrow {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.player__title {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 760;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player__album {
  margin: 1px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player__album[hidden] {
  display: none;
}

.player__controls {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  align-items: center;
  gap: 2px;
  margin: 0;
}

.player__control {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, color 150ms ease;
}

.player__control svg {
  width: 15px;
  height: 15px;
}

.player__control:hover {
  background: var(--surface-hover);
}

.player__control:active {
  transform: scale(0.95);
}

.player__control--primary {
  width: 34px;
  height: 34px;
  background: var(--text);
  color: var(--card-bg);
}

.player__control--primary:hover {
  background: var(--text);
  filter: brightness(0.9);
}

.player__progress {
  width: 100%;
  height: 22px;
  margin: 8px 0 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.player__progress::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--track-fill) 0%, var(--track-fill) var(--progress, 0%), var(--track-bg) var(--progress, 0%), var(--track-bg) 100%);
}

.player__progress::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -6px;
  appearance: none;
  border: 3px solid var(--player-bg);
  border-radius: 50%;
  background: var(--track-fill);
  box-shadow: 0 0 0 1px var(--track-fill);
}

.player__progress::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: var(--track-bg);
}

.player__progress::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--track-fill);
}

.player__progress::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 3px solid var(--player-bg);
  border-radius: 50%;
  background: var(--track-fill);
  box-shadow: 0 0 0 1px var(--track-fill);
}

.player__status {
  min-height: 17px;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

@keyframes disc-spin {
  to { transform: rotate(360deg); }
}

/* Profile */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar-wrap {
  position: relative;
  width: 128px;
  height: 128px;
}

.avatar {
  width: 128px;
  height: 128px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.player-toggle {
  position: absolute;
  right: -4px;
  bottom: -3px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 3px solid var(--card-bg);
  border-radius: 50%;
  background: var(--text);
  color: var(--card-bg);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: transform 160ms ease, border-color 220ms ease, background 220ms ease, color 220ms ease;
}

.player-toggle:hover {
  transform: scale(1.05);
}

.player-toggle:active {
  transform: scale(0.97);
}

.player-toggle__close {
  display: none;
}

.player-toggle.is-open .player-toggle__play {
  display: none;
}

.player-toggle.is-open .player-toggle__close {
  display: block;
}

/* Prompt attached to the right side of the avatar Play button */
.listen-callout {
  position: absolute;
  z-index: 4;
  left: calc(100% + 7px);
  bottom: 6px;
  padding: 5px 7px;
  border-radius: 8px;
  background: var(--text);
  color: var(--card-bg);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.16);
  font-size: 10px;
  font-weight: 760;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  pointer-events: none;
  transform-origin: 0 50%;
  transition: opacity 160ms ease, transform 160ms ease;
}

.listen-callout::after {
  content: "";
  position: absolute;
  left: -4px;
  top: 50%;
  width: 8px;
  height: 8px;
  background: var(--text);
  border-radius: 1px;
  transform: translateY(-50%) rotate(45deg);
}

.player-toggle.is-open ~ .listen-callout {
  opacity: 0;
  transform: translateY(4px) scale(0.94);
}

.profile-title {
  margin: 18px 0 4px;
  font-size: clamp(27px, 8vw, 31px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.profile-bio {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 16px;
}

/* Link buttons */
.links {
  display: grid;
  gap: 11px;
}

.button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 0;
  border-radius: 13px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 720;
  line-height: 1.25;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
  transition: transform 150ms ease, filter 150ms ease, box-shadow 150ms ease;
}

.button::after {
  content: "";
  width: 24px;
  height: 1px;
}

.button:hover {
  filter: brightness(0.93);
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.13);
}

.button:active {
  transform: translateY(0);
}

.icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  justify-self: start;
}

/* Integrated LittleLink brand variants used by this page */
.button-email {
  color: #fff;
  background: #2457f5;
}

.button-x {
  color: #fff;
  background: #000;
}

.button-instagram {
  color: #fff;
  background: linear-gradient(-135deg, #1400c8, #b900b4, #f50000);
}

.button-tiktok {
  color: #fff;
  background: #000;
}

.button-spotify {
  color: #191414;
  background: #1db954;
}

.button-spotify-alt {
  color: #fff;
  background: #191414;
}

.button-spotify-alt .icon {
  content: url("../images/icons/spotify-alt.svg");
}

.button-youtube,
.button-youtube-music {
  color: #fff;
  background: #ff0000;
}

.button-amazon-music {
  color: #000;
  background: #25d1da;
}

.button-apple-music {
  color: #fff;
  background: #000;
}

.button-apple-music-alt {
  color: #fff;
  background: linear-gradient(to bottom, #fb5c74, #fa233b);
}

.button-apple-music-alt .icon {
  content: url("../images/icons/apple-music-alt.svg");
}

.button-soundcloud {
  color: #fff;
  background: #ff5500;
}

.button-deezer {
  color: #0f0d13;
  background: #fff;
  box-shadow: inset 0 0 0 1px #a238ff, 0 2px 0 rgba(0, 0, 0, 0.08);
}

.button-deezer-alt {
  color: #fff;
  background: #a238ff;
}

.button-deezer-alt .icon {
  content: url("../images/icons/deezer.svg");
}

.button-tidal {
  color: #fff;
  background: #100f0d;
}

/* Credits */
.profile-footer {
  margin-top: 22px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.03em;
}

.profile-footer a {
  color: inherit;
  text-decoration: none;
}

.profile-footer a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 480px) {
  .page-shell {
    padding-top: max(32px, env(safe-area-inset-top));
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }

  .profile-card {
    padding-right: 26px;
    padding-bottom: 26px;
    padding-left: 26px;
  }

  .player {
    padding-right: 26px;
    padding-left: 26px;
  }
}

@media (max-width: 350px) {
  .profile-stack {
    width: calc(100% - 20px);
  }

  .profile-card {
    padding-right: 14px;
    padding-left: 14px;
    border-radius: 22px;
  }

  .player {
    padding-right: 14px;
    padding-left: 14px;
    border-radius: 22px;
  }

  .button {
    padding-right: 10px;
    padding-left: 10px;
    font-size: 15px;
  }
}


@media (max-width: 359px) {
  .player {
    padding-right: 10px;
    padding-left: 10px;
  }

  .player__header {
    grid-template-columns: 50px minmax(0, 1fr) auto;
    gap: 7px;
  }

  .player__disc {
    width: 50px;
    height: 50px;
  }

  .player__control {
    width: 26px;
    height: 26px;
  }

  .player__control--primary {
    width: 31px;
    height: 31px;
  }

  .player__control svg {
    width: 14px;
    height: 14px;
  }
}

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