:root {
  --bg: #f3ede2;
  --bg-elevated: #faf6ee;
  --surface: #e9e0cf;
  --surface-hover: #dfd3be;
  --border: #d4c5ad;
  --border-strong: #bfae93;
  --text: #261d15;
  --text-muted: #6b5a4b;
  --accent: #b85634;
  --accent-hover: #964124;
  --ochre: #c89446;
  --sage: #51684e;
  --sage-soft: rgba(81, 104, 78, 0.13);
  --terracotta-soft: rgba(184, 86, 52, 0.09);
  --espresso: #231a13;
  --espresso-light: #31251c;
  --cream: #f4ede1;
  --cream-muted: #bfb09e;
  --shadow-sm: 0 2px 8px rgba(38, 29, 21, 0.05);
  --shadow: 0 12px 32px rgba(38, 29, 21, 0.09);
  --shadow-player: 0 16px 40px rgba(24, 17, 12, 0.34);
  --radius: 14px;
  --player-height: 88px;
}

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

html {
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: calc(var(--player-height) + 3.5rem);
  background:
    radial-gradient(ellipse 70% 50% at 90% -5%, rgba(81, 104, 78, 0.12), transparent 60%),
    radial-gradient(ellipse 65% 45% at 8% 0%, rgba(184, 86, 52, 0.11), transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(200, 148, 70, 0.09), transparent 60%),
    var(--bg);
  position: relative;
}

/* Subtle warm analog paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

.container {
  width: min(860px, calc(100% - 2rem));
  margin: 0 auto;
}

/* Header & Navigation */
.site-header {
  border-bottom: 1px solid rgba(212, 197, 173, 0.75);
  background-color: rgba(243, 237, 226, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.brand-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-strong);
  background: var(--surface);
  box-shadow: 0 2px 6px rgba(38, 29, 21, 0.12);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.brand:hover .brand-avatar {
  transform: scale(1.06);
  border-color: var(--accent);
}

.brand-title {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem;
  background: rgba(233, 224, 207, 0.7);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.nav-link {
  display: inline-block;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link.active,
.nav-link[aria-current="page"] {
  background-color: var(--espresso);
  color: var(--cream);
  box-shadow: 0 2px 8px rgba(35, 26, 19, 0.18);
}

/* Main Content */
.page-content {
  padding: 2.75rem 0 1.5rem;
  animation: pageIn 0.28s ease-out both;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-intro {
  margin-bottom: 2.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
  background: var(--sage-soft);
  border: 1px solid rgba(81, 104, 78, 0.2);
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
}

h1,
h2,
h3 {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  line-height: 1.2;
  margin-top: 0;
  color: var(--text);
}

h1 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
}

.lead {
  color: var(--text-muted);
  font-size: 1.04rem;
  max-width: 72ch;
  margin: 0;
}

/* Track List */
.track-list {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.track-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 28px auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.track-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--ochre));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.track-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--ochre));
  transform-origin: left center;
  transform: scaleX(var(--track-progress, 0));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.track-card:hover {
  border-color: var(--border-strong);
  background-color: #fdfaf4;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.track-card.is-active {
  border-color: rgba(184, 86, 52, 0.55);
  background: linear-gradient(135deg, rgba(184, 86, 52, 0.08), rgba(200, 148, 70, 0.05)), var(--bg-elevated);
  box-shadow: var(--shadow);
}

.track-card.is-active::before,
.track-card.is-active::after {
  opacity: 1;
}

.track-index {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  user-select: none;
}

.track-card.is-active .track-index {
  color: var(--accent);
}

/* Equalizer bars shown when track is actively playing */
.eq-bars {
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: 2.5px;
  height: 16px;
}

.eq-bars span {
  width: 3px;
  border-radius: 2px;
  background-color: var(--accent);
  animation: eqBounce 0.9s ease-in-out infinite alternate;
}

.eq-bars span:nth-child(1) {
  height: 7px;
  animation-delay: 0s;
}

.eq-bars span:nth-child(2) {
  height: 15px;
  animation-delay: 0.22s;
}

.eq-bars span:nth-child(3) {
  height: 10px;
  animation-delay: 0.42s;
}

.track-card.is-playing .track-index-num {
  display: none;
}

.track-card.is-playing .eq-bars {
  display: inline-flex;
}

@keyframes eqBounce {
  0% {
    transform: scaleY(0.35);
  }
  100% {
    transform: scaleY(1);
  }
}

.play-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  line-height: 1;
  border-radius: 50%;
  border: none;
  background: linear-gradient(145deg, var(--accent), #9e4526);
  color: #fffaf5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(184, 86, 52, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.icon-svg {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.icon-play {
  transform: translateX(1px);
}

.play-btn:hover {
  filter: brightness(1.06);
  transform: scale(1.06);
  box-shadow: 0 6px 16px rgba(184, 86, 52, 0.36);
}

.play-btn:active {
  transform: scale(0.96);
}

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

.track-title {
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--text);
  margin: 0 0 0.2rem;
}

.track-details {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.track-blurb {
  font-size: 0.91rem;
  color: var(--text-muted);
  margin: 0.35rem 0 0;
  line-height: 1.45;
  max-width: 58ch;
}

.track-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.track-download {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--sage);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--bg);
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.track-download:hover {
  border-color: var(--sage);
  background: var(--sage);
  color: #fffaf5;
}

.track-download svg {
  width: 13px;
  height: 13px;
}

/* About Page */
.about-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.25rem;
  align-items: start;
}

.profile-frame {
  margin: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.75rem 1.1rem;
  box-shadow: var(--shadow);
  transform: rotate(-1.2deg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-frame:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 0 18px 36px rgba(38, 29, 21, 0.14);
}

.profile-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  background: var(--surface);
  filter: sepia(0.08) contrast(1.02);
}

.about-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.about-card h2 {
  font-size: 1.45rem;
  margin-bottom: 0.85rem;
}

.about-card p:last-child {
  margin-bottom: 0;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
  display: grid;
  gap: 0.65rem;
}

.info-list li {
  padding: 0.7rem 1rem;
  background: var(--surface);
  border-left: 3px solid var(--sage);
  border-radius: 0 8px 8px 0;
  font-size: 0.93rem;
}

.info-list strong {
  color: var(--text);
}

/* Persistent Music Player — Floating Espresso Dock */
.persistent-player {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(860px, calc(100% - 1.5rem));
  z-index: 30;
  background: linear-gradient(180deg, var(--espresso-light), var(--espresso));
  color: var(--cream);
  border: 1px solid rgba(200, 148, 70, 0.28);
  border-radius: 18px;
  box-shadow: var(--shadow-player), inset 0 1px 0 rgba(255, 245, 230, 0.08);
  backdrop-filter: blur(12px);
}

.player-inner {
  display: grid;
  grid-template-columns: minmax(180px, 1.25fr) 2fr auto;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--player-height);
  padding: 0.75rem 1.25rem;
}

.now-playing {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.vinyl-disc {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
  background:
    radial-gradient(circle, transparent 36%, rgba(255, 245, 230, 0.08) 37%, transparent 40%),
    radial-gradient(circle, transparent 54%, rgba(255, 245, 230, 0.06) 55%, transparent 58%),
    #140f0b;
  border: 1.5px solid rgba(200, 148, 70, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  animation: vinylSpin 14s linear infinite;
  animation-play-state: paused;
}

.persistent-player.is-playing .vinyl-disc {
  animation-play-state: running;
}

.vinyl-label {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(200, 148, 70, 0.5);
}

.vinyl-spindle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--espresso);
  border: 1px solid rgba(244, 237, 225, 0.6);
}

@keyframes vinylSpin {
  to {
    transform: rotate(360deg);
  }
}

.now-playing-text {
  min-width: 0;
}

.now-playing-label {
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ochre);
}

.now-playing-title {
  font-weight: 600;
  font-size: 0.94rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing-artist {
  font-size: 0.78rem;
  color: var(--cream-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.player-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.ctrl-btn {
  background: rgba(244, 237, 225, 0.05);
  border: 1px solid rgba(244, 237, 225, 0.18);
  color: var(--cream);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  padding: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.ctrl-btn .icon-svg {
  width: 14px;
  height: 14px;
}

.ctrl-btn-primary .icon-svg {
  width: 16px;
  height: 16px;
}

.ctrl-btn:hover {
  background-color: rgba(244, 237, 225, 0.14);
  border-color: rgba(244, 237, 225, 0.42);
  transform: scale(1.05);
}

.ctrl-btn:active {
  transform: scale(0.95);
}

.ctrl-btn-primary {
  width: 42px;
  height: 42px;
  background: linear-gradient(145deg, var(--accent), #994223);
  border-color: rgba(255, 245, 230, 0.22);
  box-shadow: 0 4px 14px rgba(184, 86, 52, 0.42);
}

.ctrl-btn-primary:hover {
  background: linear-gradient(145deg, #c6603c, var(--accent));
  border-color: rgba(255, 245, 230, 0.35);
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  color: var(--cream-muted);
}

/* Custom tactile range sliders */
.seek-bar,
.volume-bar {
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--ochre) var(--fill, 0%),
    rgba(244, 237, 225, 0.18) var(--fill, 0%),
    rgba(244, 237, 225, 0.18) 100%
  );
  outline: none;
  cursor: pointer;
}

.seek-bar {
  flex: 1;
  min-width: 100px;
}

.seek-bar::-webkit-slider-thumb,
.volume-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--accent);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  transition: transform 0.12s ease;
}

.seek-bar:hover::-webkit-slider-thumb,
.volume-bar:hover::-webkit-slider-thumb {
  transform: scale(1.2);
}

.seek-bar::-moz-range-thumb,
.volume-bar::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--accent);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  transition: transform 0.12s ease;
}

.player-volume {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--cream-muted);
}

.mute-btn {
  background: transparent;
  border: none;
  color: var(--cream-muted);
  padding: 0;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease;
}

.mute-btn:hover {
  color: var(--cream);
}

.mute-btn svg {
  width: 17px;
  height: 17px;
}

.volume-bar {
  width: 76px;
}

@media (max-width: 720px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .profile-frame {
    max-width: 240px;
    transform: none;
  }

  .persistent-player {
    bottom: 0;
    left: 0;
    transform: none;
    width: 100%;
    border-radius: 16px 16px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }

  .player-inner {
    grid-template-columns: 1fr;
    gap: 0.55rem;
    padding: 0.75rem 1rem;
  }

  .player-volume {
    display: none;
  }

  body {
    padding-bottom: 155px;
  }

  .track-card {
    grid-template-columns: auto 1fr;
    padding: 0.95rem 1rem;
  }

  .track-index {
    display: none;
  }

  .track-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

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