/* ===== VARIABLES ===== */
:root {
  --bg: #000000;
  --bg-card: #0a0a0a;
  --bg-card-hover: #141414;
  --surface: #141414;
  --border: #1e1e1e;
  --border-light: #333333;
  --text: #ffffff;
  --text-muted: #999999;
  --text-dim: #555555;
  --accent: #c43e3e;
  --accent-glow: rgba(196, 62, 62, 0.15);
  --accent-2: #a03535;
  --accent-3: #888888;
  --warm: #999999;
  --cool: #777777;
  --green: #bbbbbb;
  --purple: #999999;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-sm: 6px;
  --radius-lg: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) var(--bg);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
}

html {
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }

/* ===== LOADER ===== */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner { text-align: center; }

.vinyl-loader {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
}

.vinyl-disc {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #1a1a1f, #2a2a30, #1a1a1f, #2a2a30, #1a1a1f);
  border: 2px solid var(--border);
  position: absolute;
  top: 10px;
  left: 10px;
  animation: spin 1.5s linear infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vinyl-disc::before {
  content: '';
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.05);
  position: absolute;
}

.vinyl-label {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.vinyl-arm {
  width: 40px;
  height: 3px;
  background: var(--text-dim);
  position: absolute;
  top: 55px;
  right: 0;
  border-radius: 2px;
  transform-origin: right center;
  transform: rotate(-15deg);
}

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

.loader-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ===== NAV ===== */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 12, 0.8);
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid transparent;
  padding: 0 40px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.3s, background 0.3s;
}

#nav.scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 10, 12, 0.95);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-img {
  height: 28px;
  width: auto;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.nav-logo-img:hover {
  opacity: 1;
}

.nav-title {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-subtitle {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
  transition: color 0.2s, background 0.2s;
}

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

.nav-link.active {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

/* ===== HERO ===== */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: var(--accent);
  top: -150px;
  right: -100px;
  opacity: 0.15;
  animation: float-orb 15s ease-in-out infinite;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: var(--purple);
  bottom: -100px;
  left: -100px;
  opacity: 0.1;
  animation: float-orb 20s ease-in-out infinite reverse;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: var(--accent-2);
  top: 40%;
  left: 30%;
  opacity: 0.08;
  animation: float-orb 12s ease-in-out infinite 3s;
}

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.1); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  opacity: 0;
  animation: fade-up 0.8s var(--ease) 0.3s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
}

.hero-line {
  display: block;
  opacity: 0;
  animation: fade-up 0.8s var(--ease) forwards;
}

.hero-line-1 { animation-delay: 0.5s; }
.hero-line-2 { animation-delay: 0.7s; }
.hero-line-3 { animation-delay: 0.9s; }

.hero-line em {
  font-style: italic;
  color: var(--accent);
  text-shadow: 0 0 80px var(--accent-glow);
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  animation: fade-up 0.8s var(--ease) 1.2s forwards;
}

.hero-stat { text-align: center; }

.hero-stat-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.hero-stat-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

.hero-scroll-hint {
  position: fixed;
  bottom: 32px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fade-up 0.8s var(--ease) 1.8s forwards;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}

.hero-scroll-hint.hidden {
  opacity: 0 !important;
}

.hero-scroll-hint span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.scroll-arrow {
  font-size: 1.2rem;
  color: var(--text-dim);
  animation: bounce-down 2s ease-in-out infinite;
}

@keyframes bounce-down {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(8px); opacity: 1; }
}

/* ===== SECTIONS ===== */
.section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 100px 40px;
}

.section-header {
  margin-bottom: 48px;
  position: relative;
  padding-left: 20px;
  border-left: 2px solid var(--text);
}

.section-number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 4px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}

.card:hover {
  border-color: var(--border-light);
  box-shadow: 0 8px 40px rgba(255,255,255,0.03);
}

.card-wide {
  margin-bottom: 24px;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.card-header h3 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-header-sub {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.card-toggle-group {
  display: flex;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.card-toggle {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 4px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.card-toggle.active {
  background: var(--accent);
  color: white;
}

/* Big number cards */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.card-big-number {
  text-align: center;
  padding: 32px 20px;
  position: relative;
  overflow: hidden;
}

.card-big-number::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.card-big-number:hover::before { opacity: 1; }

.card-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.card-big-value {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}

.card-sublabel {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== CHART CONTAINERS ===== */
.chart-container {
  height: 320px;
  position: relative;
  overflow: visible;
}

.chart-container svg {
  overflow: visible;
}

@media (max-width: 600px) {
  .chart-container { height: 260px; }
}

/* ===== CANVAS CHARTS - SVG based ===== */
.chart-container svg {
  width: 100%;
  height: 100%;
}

/* ===== ARTISTS PODIUM ===== */
.artists-podium {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.podium-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease);
}

.podium-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(255, 255, 255, 0.1);
}

.podium-rank {
  position: absolute;
  top: 8px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 4px;
}

.podium-rank.gold { color: var(--accent-3); background: rgba(255, 194, 71, 0.1); }
.podium-rank.silver { color: #b0b0b0; background: rgba(176, 176, 176, 0.1); }
.podium-rank.bronze { color: var(--accent-2); background: rgba(255, 120, 73, 0.1); }

.podium-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--accent);
  border: 2px solid var(--border);
  transition: border-color 0.3s;
  overflow: hidden;
}

.podium-avatar.has-img {
  padding: 0;
}

.podium-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.podium-card:hover .podium-avatar {
  border-color: var(--accent);
}

.podium-name {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.podium-sub {
  font-size: 0.68rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.podium-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
}

.podium-bar-wrap {
  width: 100%;
  height: 3px;
  background: var(--surface);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}

.podium-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
  transition: width 1s var(--ease);
}

/* ===== HORIZONTAL BARS ===== */
.horizontal-bars {
  max-height: 700px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
}

.h-bar-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1.2fr) minmax(0, 1fr) 54px;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.2s;
}

.h-bar-row:hover { background: rgba(255,255,255,0.02); }

.h-bar-rank {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  text-align: right;
}

.h-bar-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.h-bar-thumb {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.h-bar-name-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.h-bar-name {
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.h-bar-sub {
  font-size: 0.65rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.h-bar-track {
  height: 6px;
  background: var(--surface);
  border-radius: 3px;
  overflow: hidden;
}

.h-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.8s var(--ease);
}

.h-bar-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
}

/* ===== ALBUMS GRID ===== */
.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.album-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.4s var(--ease);
  cursor: default;
}

.album-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.album-art {
  aspect-ratio: 1;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--text-dim);
  position: relative;
  overflow: hidden;
}

.album-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
}

.album-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(10,10,12,0.8));
  pointer-events: none;
}

.album-rank-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  background: rgba(10, 10, 12, 0.8);
  backdrop-filter: blur(8px);
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--accent);
}

.album-info {
  padding: 14px;
}

.album-title {
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-artist {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-count {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  margin-top: 6px;
}

/* ===== TRACKS TABLE ===== */
.tracks-table {
  overflow-x: auto;
}

.track-row {
  display: grid;
  grid-template-columns: 36px 1fr 1fr 80px 60px;
  gap: 16px;
  align-items: center;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.2s;
}

.track-row:hover {
  background: rgba(255,255,255,0.02);
}

.track-row.track-header {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 4px;
}

.track-rank {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: center;
}

.track-name {
  font-weight: 500;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-album {
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-align: right;
}

/* ===== YEARLY BREAKDOWN ===== */
.yearly-breakdown {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.year-row {
  display: grid;
  grid-template-columns: 60px 1fr 100px;
  gap: 16px;
  align-items: center;
}

.year-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.year-bar-outer {
  height: 28px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.year-bar-inner {
  height: 100%;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 1.2s var(--ease);
  position: relative;
}

.year-bar-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 60%);
}

.year-count {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
}

.year-top-artist {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ===== HEATMAP ===== */
.heatmap-container {
  overflow-x: auto;
}

.heatmap-grid {
  display: grid;
  grid-template-columns: 40px repeat(24, 1fr);
  gap: 3px;
  min-width: 600px;
}

.heatmap-header {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-dim);
  text-align: center;
  padding: 4px 0;
}

.heatmap-day-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
}

.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--surface);
  transition: transform 0.15s, opacity 0.3s;
  cursor: default;
  position: relative;
  min-height: 16px;
}

.heatmap-cell:hover {
  transform: scale(1.3);
  z-index: 2;
}

.heatmap-cell[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 10;
}

.heatmap-cell:hover[data-tooltip]::after {
  opacity: 1;
}

/* ===== PATTERNS ROW ===== */
.patterns-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.card-half {
  min-width: 0;
}

/* ===== BAR CHART (canvas-free SVG) ===== */
.bar-chart-svg { width: 100%; height: 100%; }

.bar-chart-svg .bar-rect {
  transition: opacity 0.2s;
  cursor: default;
}

.bar-chart-svg .bar-rect:hover {
  opacity: 0.8;
}

.bar-chart-svg .axis-label {
  fill: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 9px;
}

.bar-chart-svg .grid-line {
  stroke: var(--border);
  stroke-width: 0.5;
  stroke-dasharray: 3,3;
}

.bar-chart-svg .chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bar-chart-svg .area-fill {
  fill: url(#areaGradient);
}

.bar-chart-svg .dot {
  fill: var(--accent);
  stroke: var(--bg-card);
  stroke-width: 2;
}

/* ===== YOY CHART ===== */
.yoy-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.yoy-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: opacity 0.2s;
}

.yoy-legend-item:hover { opacity: 0.8; }

.yoy-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ===== FOOTER ===== */
#footer {
  border-top: 1px solid var(--border);
  padding: 32px 40px;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-logo-img {
  height: 20px;
  width: auto;
  opacity: 0.7;
}

.footer-info {
  display: flex;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ===== ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== VIEW TOGGLE BAR ===== */
.view-toggle-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 3px;
  width: fit-content;
}

.view-toggle {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  padding: 6px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.view-toggle:hover { color: var(--text); }

.view-toggle.active {
  background: var(--accent);
  color: var(--bg);
}

.albums-view {
  display: none;
}

.albums-view.active {
  display: block;
}

/* ===== ALBUMS SHELF (horizontal scroll) ===== */
.albums-shelf {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.albums-shelf::-webkit-scrollbar { height: 6px; }
.albums-shelf::-webkit-scrollbar-track { background: var(--bg); }
.albums-shelf::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

.shelf-item {
  flex: 0 0 140px;
  scroll-snap-align: start;
  text-align: center;
}

.shelf-cover {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--text-dim);
  margin-bottom: 8px;
  position: relative;
  border: 1px solid var(--border);
  transition: border-color 0.3s, transform 0.3s var(--ease);
}

.shelf-cover:hover {
  border-color: var(--border-light);
  transform: scale(1.04);
}

.shelf-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.shelf-rank {
  position: absolute;
  bottom: 6px;
  right: 6px;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--accent);
  z-index: 2;
}

.shelf-title {
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.shelf-artist {
  font-size: 0.62rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.shelf-count {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--accent);
  margin-top: 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .overview-grid { grid-template-columns: repeat(2, 1fr); }
  .artists-podium { grid-template-columns: repeat(3, 1fr); }
  .patterns-row { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; gap: 16px; }
  .hero-stat-divider { display: none; }
  .nav-links { display: none; }
  .section { padding: 60px 20px; }
}

@media (max-width: 600px) {
  .overview-grid { grid-template-columns: 1fr 1fr; }
  .artists-podium { grid-template-columns: repeat(2, 1fr); }
  .albums-grid { grid-template-columns: repeat(2, 1fr); }
  .h-bar-row { grid-template-columns: 20px 1fr 50px; }
  .h-bar-track { display: none; }
  .h-bar-thumb { width: 24px; height: 24px; }
}
