@font-face {
  font-family: 'Neue Haas Grotesk';
  src: url('fonts/NeueHaasDisplay-Roman.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Haas Grotesk';
  src: url('fonts/NeueHaasDisplay-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Haas Grotesk';
  src: url('fonts/NeueHaasDisplay-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TeX Gyre Heros CN';
  src: url('fonts/texgyreheroscn-regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TeX Gyre Heros CN';
  src: url('fonts/texgyreheroscn-bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --fg: #e8e4dd;
  --fg-muted: rgba(232, 228, 221, 0.6);
  --bg: #111;
  --card-bg: rgba(20, 18, 16, 0.55);
  --card-border: rgba(255, 255, 255, 0.04);
  --card-border-hover: rgba(255, 255, 255, 0.08);
  --card-shadow: none;
  --card-shadow-hover: none;
  --accent: #1a1a1a;
  --sidebar-width: 200px;
  --title-font: 'Oswald', 'TeX Gyre Heros CN', 'Helvetica Neue Condensed', 'Arial Narrow', sans-serif;
  --radius: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Neue Haas Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

.textured {
  color: #fff;
}

/* Full-page blurred background */
.bg-image {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url('img/bg.jpg') center center / cover no-repeat;
  filter: blur(4px) brightness(0.6);
  transform: scale(1.04);
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.1);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
}

/* Entrance animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.glass-card, .nav-link {
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Layout */
.layout {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: 100vh;
}

main {
  flex: 1;
  margin-right: var(--sidebar-width);
  padding: 80px 64px 100px;
  max-width: calc(100% - var(--sidebar-width));
}

/* Cards */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--card-shadow);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  border-color: var(--card-border-hover);
  box-shadow: var(--card-shadow-hover);
}

/* Section label */
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.label-line {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--fg-muted);
}

h2 {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

section { margin-bottom: 48px; }

/* ==================== */
/* PLAYER               */
/* ==================== */

.player-card {
  margin-bottom: 48px;
  padding: 0;
  overflow: hidden;
}

.player-row {
  display: flex;
  align-items: stretch;
}

/* Cover box */
.cover-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
  border-radius: var(--radius) 0 0 0;
}

.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}

.cover-wrap:hover .cover-img {
  transform: scale(1.04);
}

.cover-wrap.playing .cover-img {
  filter: brightness(0.7);
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: inset 0 0 30px rgba(0,0,0,0); }
  50% { box-shadow: inset 0 0 30px rgba(0,0,0,0.08); }
}

.cover-wrap.playing {
  animation: pulseGlow 2s ease-in-out infinite;
}

.cover-play-btn {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  border: none;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: background 0.25s ease, color 0.25s ease;
  z-index: 2;
}

.cover-wrap:hover .cover-play-btn {
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
}

/* Center column */
.player-center {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 36px;
  gap: 20px;
}

.player-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.track-title {
  font-family: var(--title-font);
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 0.95;
  text-transform: uppercase;
}

.track-artist {
  font-family: var(--title-font);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

.track-preview-label {
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(232, 228, 221, 0.35);
  margin-top: 6px;
}

/* Waveform */
.waveform-wrap { position: relative; }

.waveform {
  display: flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 44px;
  cursor: pointer;
}

.wave-bar {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1px;
  transition: background 0.15s ease;
}

.wave-bar.in-range {
  background: rgba(255, 255, 255, 0.3);
}

.wave-bar.in-range.played {
  background: #fff;
}

.waveform-time {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.55rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: rgba(232, 228, 221, 0.35);
}

/* Download buttons */
.download-row {
  display: flex;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.download-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--title-font);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 16px 24px;
  transition: filter 0.3s ease, gap 0.3s ease, background 0.3s ease;
}

.download-btn:hover {
  gap: 14px;
}

.download-btn.bandcamp {
  background: #1da0c3;
  color: #fff;
  border-radius: 0 0 0 var(--radius);
}

.download-btn.bandcamp:hover {
  background: #1ab0d6;
}

.download-btn.listen {
  background: var(--fg);
  color: #111;
  border-radius: 0 0 var(--radius) var(--radius);
}

.download-btn.listen:hover {
  background: #fff;
}

.download-btn.soundcloud {
  background: #ff5500;
  color: #fff;
  border-radius: 0 0 var(--radius) 0;
}

.download-btn.soundcloud:hover {
  background: #e64d00;
}

/* Track cards */
.track-card {
  margin-bottom: 48px;
  padding: 0;
  overflow: hidden;
}

.track-row {
  display: flex;
  align-items: stretch;
}

.track-cover {
  width: 200px;
  height: 200px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: var(--radius) 0 0 0;
}

.track-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.track-cover:hover img {
  transform: scale(1.04);
}

.track-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 36px;
  gap: 4px;
}

/* Posts */
.post {
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.post-date {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--fg-muted);
  margin-bottom: 8px;
}

.post h3 {
  font-family: var(--title-font);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--fg);
}

.post p {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--fg-muted);
  margin-bottom: 16px;
}

.post > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
  transition: gap 0.3s ease, opacity 0.3s ease;
}

.post > a:hover {
  gap: 10px;
  opacity: 0.6;
}

/* Contact — mail button */
.contact {
  padding: 0;
  overflow: hidden;
}

.mail-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--title-font);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 22px 32px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--fg);
  border-radius: var(--radius);
  transition: background 0.3s ease, gap 0.3s ease, transform 0.2s ease;
}

.mail-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  gap: 16px;
  transform: translateY(-1px);
}

.mail-btn:active {
  transform: translateY(0);
}

/* Sidebar */
.sidebar {
  position: fixed;
  right: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(20, 18, 16, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.04);
  z-index: 10;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-family: var(--title-font);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 20px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.25s ease, background 0.25s ease, gap 0.3s ease;
}

.nav-link:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-link svg {
  flex-shrink: 0;
  opacity: 0.5;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  gap: 18px;
}

.nav-link:hover svg {
  opacity: 1;
  transform: scale(1.1);
}

/* Thanks */
.thanks { text-align: left; }
.thanks h2 { font-size: 0.68rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 16px; }
.thanks p { font-size: 1rem; font-weight: 300; margin-bottom: 32px; color: var(--fg); }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 400; color: #fff; text-decoration: none; opacity: 0.5; transition: opacity 0.3s ease, gap 0.3s ease; }
.back-link:hover { opacity: 1; gap: 12px; }

/* Responsive */
@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }

  .layout { flex-direction: column; }

  main {
    margin-right: 0;
    max-width: 100%;
    padding: 48px 20px 80px;
  }

  header h1 { font-size: 2.2rem; margin-bottom: 32px; }

  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    width: 100%;
    height: auto;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: row;
    justify-content: center;
    z-index: 20;
  }

  .sidebar nav {
    flex-direction: row;
    width: 100%;
  }

  .nav-link {
    flex: 1;
    justify-content: center;
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 12px;
    font-size: 0.68rem;
    gap: 8px;
  }

  .nav-link:first-child { border-top: none; }
  .nav-link:last-child { border-right: none; }

  /* Player */
  .cover-wrap { width: 140px; height: 140px; }
  .player-center { padding: 16px 20px; gap: 14px; }
  .track-title { font-size: 1.4rem; }
  .track-artist { font-size: 0.8rem; }
  .track-preview-label { font-size: 0.5rem; }
  .waveform { height: 32px; }

  .download-btn { font-size: 0.68rem; padding: 14px 12px; gap: 8px; }
  .download-btn svg { width: 14px; height: 14px; }

  /* Track card */
  .track-cover { width: 140px; height: 140px; }
  .track-info { padding: 16px 20px; }

  /* Mail button */
  .mail-btn { font-size: 0.78rem; padding: 18px 24px; }
}

@media (max-width: 420px) {
  main { padding: 36px 12px 32px; }

  header h1 { font-size: 1.8rem; }

  .cover-wrap { width: 110px; height: 110px; }
  .track-cover { width: 110px; height: 110px; }

  .player-center { padding: 12px 14px; gap: 10px; }
  .track-title { font-size: 1.1rem; }
  .track-artist { font-size: 0.7rem; }
  .waveform { height: 26px; gap: 1px; }

  .download-btn { font-size: 0.6rem; padding: 12px 8px; gap: 6px; }

  .track-info { padding: 12px 14px; }
  .track-info .track-title { font-size: 1.1rem; }

  .mail-btn { font-size: 0.7rem; padding: 16px 16px; gap: 10px; }

  .nav-link { padding: 14px 8px; font-size: 0.6rem; gap: 6px; }
  .nav-link svg { width: 16px; height: 16px; }
}
