/* Public-facing pages: directory at / and artist landing at /a/<slug>.
   Reuses CSS custom properties from /styles.css (--bg, --panel, --accent
   etc.) but defines its own layout — none of the admin classes apply. */

.public-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
.public-main {
  flex: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 28px 56px;
}

.public-theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 16px;
  line-height: 0;
  display: grid;
  place-items: center;
  z-index: 50;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  box-shadow: var(--shadow-md);
}
.public-theme-toggle:hover {
  background: var(--panel-2);
  border-color: var(--border-strong);
}
.public-theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.public-foot {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--subtle);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.public-foot-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.public-foot-link:hover { color: var(--accent-strong); }
.public-foot-sep { margin: 0 10px; opacity: 0.4; }
.public-foot-tagline { letter-spacing: 0.06em; }

/* ── Directory (/) ─────────────────────────────────────────────── */

.dir-header {
  text-align: center;
  padding: 72px 0 40px;
}
.dir-title {
  margin: 0;
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text);
  line-height: 1;
}
.dir-tagline {
  color: var(--muted);
  margin: 18px auto 0;
  font-size: 16px;
  letter-spacing: 0.01em;
  max-width: 520px;
  line-height: 1.5;
}

.dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.dir-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  display: flex;
  gap: 16px;
  align-items: center;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.18s;
}
.dir-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.dir-card:hover .dir-card-photo {
  box-shadow: 0 0 32px var(--accent-glow-strong);
}
.dir-card-photo {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  background: var(--accent-grad);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 0 18px var(--accent-glow);
  transition: box-shadow 0.18s;
}
.dir-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.dir-card-initial {
  font-size: 30px;
  font-weight: 800;
  color: var(--accent-text);
  letter-spacing: -0.02em;
}
.dir-card-text { flex: 1; min-width: 0; }
.dir-card-name {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dir-card-tagline {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dir-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 80px 24px;
  background: var(--panel);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  font-size: 15px;
}

/* ── Artist page (/a/<slug>) ───────────────────────────────────── */

.artist-page { padding-top: 32px; }

.artist-hero {
  display: flex;
  gap: 28px;
  align-items: flex-end;
  padding: 32px 0 36px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border);
}
.artist-photo {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-lg);
  background: var(--accent-grad);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 48px var(--accent-glow);
}
.artist-photo img { width: 100%; height: 100%; object-fit: cover; }
.artist-initial {
  font-size: 88px;
  font-weight: 800;
  color: var(--accent-text);
  letter-spacing: -0.04em;
}
.artist-meta { flex: 1; min-width: 0; padding-bottom: 8px; }
.artist-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
}
.artist-name {
  margin: 0;
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--text);
}
.artist-tagline {
  color: var(--muted);
  margin: 14px 0 0;
  font-size: 17px;
  line-height: 1.45;
  max-width: 56ch;
}

.artist-bio {
  margin: 0 0 32px;
  max-width: 64ch;
}
.artist-bio p {
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 14px;
}
.artist-bio p:last-child { margin-bottom: 0; }

.artist-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 700;
  margin: 8px 0 16px;
}

.artist-tracks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.artist-tracks-empty {
  color: var(--muted);
  padding: 32px 24px;
  text-align: center;
  background: var(--panel);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
}

.track-row {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  align-items: center;
  transition: background 0.12s, border-color 0.12s;
}
.track-row:hover {
  background: var(--panel);
  border-color: var(--border);
}
.track-cover {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--panel-3), var(--panel-2));
  box-shadow: var(--shadow-sm);
}
.track-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.track-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.track-title {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.track-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.track-link {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  text-decoration: none;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.track-link:hover {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}
.track-links-empty {
  color: var(--subtle);
  font-size: 12px;
  font-style: italic;
}

.artist-socials {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.artist-social {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.artist-social:hover {
  color: var(--accent-text);
  border-color: var(--accent);
  background: var(--accent);
}

/* ── Mobile tweaks ─────────────────────────────────────────────── */

@media (max-width: 720px) {
  .public-main { padding: 24px 18px 40px; }
  .dir-header { padding: 48px 0 28px; }
  .dir-title { font-size: 48px; }
  .dir-tagline { font-size: 15px; }
  .dir-grid { gap: 12px; }
  .dir-card { padding: 16px; gap: 14px; }
  .dir-card-photo { width: 60px; height: 60px; }
  .dir-card-initial { font-size: 26px; }

  .artist-hero {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 20px;
    padding: 24px 0 28px;
    margin-bottom: 28px;
  }
  .artist-photo { width: 140px; height: 140px; }
  .artist-initial { font-size: 60px; }
  .artist-name { font-size: 40px; }
  .artist-tagline { font-size: 15px; }
  .artist-meta { padding-bottom: 0; }
  .artist-eyebrow { margin-bottom: 6px; }

  .artist-bio p { font-size: 15px; }

  .track-row { padding: 10px 12px; gap: 12px; }
  .track-cover { width: 48px; height: 48px; }
  .track-title { font-size: 14px; }
  .track-link { font-size: 11.5px; padding: 4px 10px; }

  .artist-social { padding: 7px 14px; font-size: 12.5px; }
}

@media (max-width: 480px) {
  .dir-title { font-size: 38px; }
  .artist-name { font-size: 32px; }
  .artist-photo { width: 120px; height: 120px; }
  .artist-initial { font-size: 50px; }
}
