:root {
  --night: #090a0e;
  --navy: #171c31;
  --paper: #eee4df;
  --orange: #ff6b32;
  --teal: #34aaa4;
  --mist: #9aa6bd;
  --display-sans: "Segoe UI Variable Display", "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; overflow-x: clip; scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--paper);
  background-color: var(--mist);
  background-image: linear-gradient(rgba(238, 228, 223, .04), rgba(23, 28, 49, .08)), url("assets/diama-background.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  font-family: var(--display-sans);
}

body.profile-open { overflow: hidden; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr minmax(270px, 340px);
  align-items: center;
  gap: clamp(1.2rem, 3vw, 3.4rem);
  padding: 0 clamp(1.2rem, 4vw, 4rem);
  background: rgba(7, 8, 12, .94);
  box-shadow: 0 1px 0 rgba(238, 228, 223, .18), 0 14px 38px rgba(7, 8, 12, .18);
  backdrop-filter: blur(16px) saturate(80%);
  -webkit-backdrop-filter: blur(16px) saturate(80%);
}

.brand { display: inline-flex; align-items: baseline; gap: .55rem; color: var(--paper); text-decoration: none; white-space: nowrap; }
.brand strong { color: var(--orange); font-size: 1.55rem; font-weight: 540; letter-spacing: -.065em; }
.brand span { font-size: .74rem; font-weight: 700; letter-spacing: .09em; }

.primary-nav { display: flex; align-items: center; gap: 1.4rem; min-width: 0; }
.primary-nav a, .primary-nav span { color: rgba(238, 228, 223, .48); font-size: .8rem; font-weight: 700; letter-spacing: .02em; text-decoration: none; white-space: nowrap; }
.primary-nav a[aria-current="page"] { color: var(--paper); }

.filter-control { position: relative; }
.filter-toggle {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem .8rem .65rem 1rem;
  border: 1px solid rgba(238, 228, 223, .45);
  border-radius: 3px;
  color: var(--paper);
  background: transparent;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 720;
  text-align: left;
  transition: border-color .2s ease, color .2s ease;
}
.filter-toggle:hover, .filter-toggle[aria-expanded="true"] { border-color: var(--orange); color: var(--orange); }
.filter-toggle svg { width: 24px; height: 24px; flex: none; }

.filter-popover {
  position: absolute;
  top: calc(100% + .6rem);
  right: 0;
  width: min(340px, calc(100vw - 2rem));
  max-height: min(620px, calc(100vh - 100px));
  overflow: hidden;
  padding: 1rem;
  background: rgba(7, 8, 12, .97);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  backdrop-filter: blur(18px);
}

.genre-search { display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: .6rem; padding: .25rem 0 .8rem; border-bottom: 1px solid rgba(238, 228, 223, .22); color: var(--teal); }
.genre-search svg { width: 18px; height: 18px; }
.genre-search input { min-width: 0; border: 0; outline: 0; color: var(--paper); background: transparent; font-size: .84rem; font-weight: 600; }
.genre-search input::placeholder { color: rgba(238, 228, 223, .52); opacity: 1; }

.genre-list { max-height: min(510px, calc(100vh - 175px)); display: grid; gap: .05rem; margin: .65rem 0 0; padding: 0; overflow-y: auto; list-style: none; scrollbar-color: rgba(238, 228, 223, .3) transparent; scrollbar-width: thin; }
.genre-list button { width: 100%; min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .35rem .2rem; border: 0; color: rgba(238, 228, 223, .72); background: transparent; cursor: pointer; text-align: left; font-size: .82rem; font-weight: 650; }
.genre-list button:hover { color: var(--teal); }
.genre-list button[aria-current="true"] { color: var(--orange); }
.genre-total { font-size: .68rem; opacity: .55; }
.genre-no-results { padding: .6rem 0; color: rgba(238, 228, 223, .58); font-size: .82rem; }

.roster-page { width: min(1320px, 100%); min-height: calc(100vh - 76px); margin: 0 auto; padding: clamp(2rem, 5vw, 4.5rem) clamp(1.2rem, 4vw, 4rem) 5rem; }
.roster-intro {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(280px, .65fr);
  align-items: end;
  gap: 2rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.6rem);
  padding: clamp(1.2rem, 2.5vw, 2rem);
  background: rgba(7, 8, 12, .76);
  box-shadow: 0 18px 48px rgba(7, 8, 12, .18);
  backdrop-filter: blur(12px) saturate(78%);
}
.eyebrow { margin: 0 0 .45rem; color: var(--orange); font-size: .72rem; font-weight: 760; letter-spacing: .12em; text-transform: uppercase; }
.roster-intro h1 { margin: 0; color: var(--paper); font-size: clamp(3.2rem, 7vw, 6.4rem); font-weight: 690; line-height: .84; letter-spacing: -.07em; }
.roster-intro > p { max-width: 50ch; margin: 0; color: rgba(238, 228, 223, .78); font-size: clamp(.95rem, 1.25vw, 1.08rem); line-height: 1.55; }

.artist-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.75rem, 1.5vw, 1.2rem); }
.artist-tile {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 0;
  padding: 0;
  color: var(--paper);
  background: var(--night);
  box-shadow: 0 20px 44px rgba(7, 8, 12, .3);
  cursor: pointer;
  isolation: isolate;
}
.artist-tile img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transform: scale(1.015); filter: saturate(.9) brightness(.84); transition: transform .75s cubic-bezier(.16, 1, .3, 1), filter .45s ease; }
.artist-tile[data-artist="andresestr3s"] img { object-position: 50% 42%; }
.artist-tile[data-artist="firefly-light"] img { object-position: 50% 48%; }
.artist-tile[data-artist="kinychbeat"] img { object-position: 63% center; }
.artist-tile[data-artist="n4tura"] img { object-position: 50% 54%; }
.artist-tile::before { position: absolute; inset: 0; z-index: -1; content: ""; background: linear-gradient(180deg, rgba(7,8,12,.08) 20%, rgba(7,8,12,.25) 58%, rgba(7,8,12,.9) 100%); transition: background .35s ease; }
.tile-index { position: absolute; top: 1rem; left: 1rem; color: rgba(238, 228, 223, .74); font-size: .68rem; font-weight: 760; letter-spacing: .12em; }
.tile-copy { position: absolute; right: 1.1rem; bottom: 1.15rem; left: 1.1rem; text-align: center; transform: translateY(1.55rem); transition: transform .48s cubic-bezier(.16, 1, .3, 1); }
.artist-name { display: block; font-size: clamp(1.45rem, 2.7vw, 2.25rem); font-weight: 760; line-height: .98; letter-spacing: -.045em; text-wrap: balance; }
.artist-genres { display: block; margin-top: .55rem; color: rgba(238, 228, 223, .74); font-size: .7rem; font-weight: 650; line-height: 1.35; opacity: 0; transition: opacity .3s ease; }
.artist-tile:hover img, .artist-tile:focus-visible img { transform: scale(1.075); filter: saturate(1.03) brightness(.94); }
.artist-tile:hover::before, .artist-tile:focus-visible::before { background: linear-gradient(180deg, rgba(7,8,12,.03) 18%, rgba(7,8,12,.18) 52%, rgba(7,8,12,.94) 100%); }
.artist-tile:hover .tile-copy, .artist-tile:focus-visible .tile-copy { transform: translateY(0); }
.artist-tile:hover .artist-genres, .artist-tile:focus-visible .artist-genres { opacity: 1; }
.empty-state { margin: 4rem 0; padding: 2rem; color: var(--paper); background: rgba(7, 8, 12, .75); text-align: center; }

.profile-layer { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: clamp(1rem, 4vw, 4rem); overflow: auto; color: var(--paper); background: rgba(7, 8, 12, .9); backdrop-filter: blur(20px) saturate(80%); opacity: 0; visibility: hidden; transition: opacity .28s ease, visibility .28s ease; }
.profile-layer.is-open { opacity: 1; visibility: visible; }
.profile-content { width: min(1050px, 100%); display: grid; grid-template-columns: minmax(280px, 470px) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5.5rem); align-items: center; }
.profile-photo { width: 100%; aspect-ratio: 1; box-shadow: 0 30px 70px rgba(0,0,0,.42); }
.profile-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.profile-photo[data-artist="andresestr3s"] img { object-position: 50% 42%; }
.profile-photo[data-artist="firefly-light"] img { object-position: 50% 48%; }
.profile-photo[data-artist="kinychbeat"] img { object-position: 63% center; }
.profile-photo[data-artist="n4tura"] img { object-position: 50% 54%; }
.profile-copy { min-width: 0; }
.profile-kicker { margin: 0 0 .65rem; color: var(--orange); font-size: .72rem; font-weight: 760; letter-spacing: .13em; text-transform: uppercase; }
.profile-copy h2 { margin: 0; font-size: clamp(3.4rem, 8vw, 7rem); font-weight: 650; line-height: .85; letter-spacing: -.07em; }
.profile-bio { max-width: 62ch; margin: 1.5rem 0; color: rgba(238,228,223,.88); font-size: 1rem; line-height: 1.62; }
.profile-label { margin: 1.35rem 0 .65rem; color: var(--mist); font-size: .7rem; font-weight: 760; letter-spacing: .13em; text-transform: uppercase; }
.profile-genres, .social-links { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.profile-genres li { padding: .45rem .58rem; border: 1px solid rgba(154,166,189,.62); font-size: .75rem; }
.social-links a { min-height: 42px; display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .7rem; border-bottom: 1px solid rgba(238,228,223,.46); color: var(--paper); text-decoration: none; font-size: .78rem; font-weight: 700; }
.social-links a:hover { color: var(--orange); border-color: var(--teal); }
.social-links svg { width: 16px; height: 16px; flex: none; }
.close-profile { position: fixed; top: 1.4rem; right: 1.5rem; z-index: 90; width: 48px; height: 48px; border: 1px solid rgba(238,228,223,.5); border-radius: 50%; color: var(--paper); background: rgba(7,8,12,.45); cursor: pointer; font-size: 1.45rem; }

@media (max-width: 900px) {
  .topbar { grid-template-columns: auto 1fr minmax(230px, 300px); gap: 1rem; }
  .primary-nav span { display: none; }
  .artist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { background-attachment: scroll; }
  .topbar { position: sticky; min-height: 112px; grid-template-columns: 1fr auto; grid-template-rows: 52px 52px; gap: 0 1rem; padding: 0 1rem; }
  .brand { grid-column: 1; grid-row: 1; }
  .primary-nav { grid-column: 2; grid-row: 1; }
  .filter-control { grid-column: 1 / -1; grid-row: 2; align-self: start; }
  .filter-toggle { min-height: 42px; }
  .filter-popover { position: fixed; top: 108px; right: 1rem; left: 1rem; width: auto; }
  .roster-page { min-height: calc(100vh - 112px); padding: 1rem 1rem 4rem; }
  .roster-intro { grid-template-columns: 1fr; gap: 1rem; padding: 1.2rem; }
  .roster-intro h1 { font-size: clamp(3.4rem, 20vw, 5rem); }
  .roster-intro > p { font-size: .92rem; }
  .artist-grid { grid-template-columns: 1fr; gap: .85rem; }
  .tile-copy { transform: translateY(0); }
  .artist-genres { opacity: 1; }
  .profile-content { grid-template-columns: 1fr; padding-top: 4rem; }
  .profile-photo { max-width: 470px; margin: 0 auto; }
  .profile-copy h2 { font-size: clamp(3rem, 18vw, 5.2rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .artist-tile img, .tile-copy, .artist-genres, .profile-layer { transition: none; }
}
