/* ============================================================
   Catherine Ireton — Site Styles
   Dark artistic design: near-black bg, warm off-white text,
   muted purple accent, Cormorant Garamond headings
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Inter:wght@300;400;500&display=swap');

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:         #0d0d0e;
  --bg-raised:  #161618;
  --bg-card:    #1a1a1d;
  --border:     rgba(255,255,255,0.07);
  --text:       #e4dfd6;
  --text-muted: #8a8480;
  --accent:     #9b7ecb;       /* muted purple */
  --accent-2:   #c9a84c;       /* warm gold */
  --link:       #b39ee0;
  --ff-head:    'Cormorant Garamond', Georgia, serif;
  --ff-body:    'Inter', system-ui, sans-serif;
  --max-w:      900px;
  --max-w-wide: 1200px;
}

/* ── Base ───────────────────────────────────────────────── */
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--accent); }

img { display: block; max-width: 100%; }

/* ── Nav ────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,14,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
}

.nav-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-brand {
  font-family: var(--ff-head);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text);
}
.nav-brand:hover { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-links .nav-external {
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.3rem 0.85rem;
  border-radius: 2px;
  font-size: 0.8rem;
}
.nav-links .nav-external:hover {
  background: var(--accent);
  color: var(--bg);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: all 0.3s;
}

/* ── Page wrapper ───────────────────────────────────────── */
.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.page-wide {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

/* ── Hero (index) ───────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 440px;
  display: flex;
  align-items: flex-end;
  padding: 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('/images/stage.jpg');
  background-size: cover;
  background-position: center top;
  filter: brightness(0.3);
}

.hero-content {
  position: relative;
  padding: 4rem 2rem 3rem;
  max-width: var(--max-w-wide);
  margin: 0 auto;
  width: 100%;
}

.hero-name {
  font-family: var(--ff-head);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 0.5rem;
}

.hero-role {
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-tagline {
  font-family: var(--ff-head);
  font-style: italic;
  font-size: 1.25rem;
  color: rgba(255,255,255,0.6);
  max-width: 520px;
}

/* ── Section headings ───────────────────────────────────── */
.section-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

h1, h2, h3 { font-family: var(--ff-head); font-weight: 400; line-height: 1.2; }

h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 1rem; }
h3 { font-size: 1.4rem; margin-bottom: 0.75rem; }

p { margin-bottom: 1.2rem; color: var(--text); }
p:last-child { margin-bottom: 0; }

/* ── Divider ────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* ── Bio (index) ────────────────────────────────────────── */
.bio-section { padding: 4rem 2rem; background: var(--bg-raised); }

.bio-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
  align-items: start;
}

.bio-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--border);
}

.bio-text .bio-name {
  font-family: var(--ff-head);
  font-size: 1.8rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.bio-text .bio-title {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

/* ── Section cards (index) ──────────────────────────────── */
.cards-section {
  padding: 4rem 2rem;
  background: var(--bg);
}

.cards-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2rem 1.75rem;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.card-title {
  font-family: var(--ff-head);
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-arrow {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--link);
}

/* ── Bubaki crossover panel ─────────────────────────────── */
.bubaki-section {
  padding: 5rem 2rem;
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.bubaki-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
}

.bubaki-header {
  max-width: 540px;
  margin-bottom: 3rem;
}

.bubaki-header h2 { margin-bottom: 0.75rem; }

.bubaki-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.bubaki-img {
  aspect-ratio: 4/3;
  object-fit: cover;
  filter: grayscale(20%) brightness(0.85);
  transition: filter 0.3s;
  border: 1px solid var(--border);
}
.bubaki-img:hover { filter: grayscale(0%) brightness(1); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border: 1px solid currentColor;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  margin-top: 1.5rem;
}

.btn-accent { color: var(--accent); }
.btn-accent:hover { background: var(--accent); color: var(--bg); }

.btn-gold { color: var(--accent-2); }
.btn-gold:hover { background: var(--accent-2); color: var(--bg); }

/* ── Page header (inner pages) ──────────────────────────── */
.page-header {
  padding: 3.5rem 2rem 0;
  max-width: var(--max-w);
  margin: 0 auto;
}

.page-header h1 { margin-bottom: 0.5rem; }

.page-header .subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--ff-head);
}

/* ── Music page ─────────────────────────────────────────── */
.track-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2.5rem;
}

.track-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2rem;
}

.track-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.track-title {
  font-family: var(--ff-head);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  display: block;
  line-height: 1.2;
}
.track-title:hover { color: var(--accent); }

.track-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.track-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.tag {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
}

.track-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ── Audio player ───────────────────────────────────────── */
.audio-player {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.play-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.play-btn:hover { background: var(--accent); }
.play-btn:hover svg { fill: var(--bg); }

.play-btn svg { fill: var(--accent); width: 14px; height: 14px; margin-left: 2px; }

.player-controls { flex: 1; min-width: 0; }

.player-track-name {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-wrap {
  position: relative;
  height: 3px;
  background: rgba(255,255,255,0.1);
  cursor: pointer;
  margin-bottom: 0.35rem;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.1s linear;
  pointer-events: none;
}

.player-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* Native audio fallback — hidden but accessible */
.audio-native { display: none; }

/* ── Track detail page ──────────────────────────────────── */
.track-detail { max-width: var(--max-w); margin: 0 auto; padding: 3rem 2rem 6rem; }

.track-detail-title {
  font-family: var(--ff-head);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.track-detail-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.section-block { margin-bottom: 2.5rem; }

.section-block h3 {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ── Work archive ───────────────────────────────────────── */
.work-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.work-entry {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.work-entry:hover { background: rgba(255,255,255,0.015); }

.work-year {
  font-family: var(--ff-head);
  font-size: 1.1rem;
  color: var(--text-muted);
  padding-top: 0.1rem;
}

.work-info-title {
  font-family: var(--ff-head);
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.2;
}
.work-entry:hover .work-info-title { color: var(--accent); }

.work-info-role {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.work-info-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.work-info-venue {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  font-style: italic;
}

/* ── Work detail page ───────────────────────────────────── */
.work-detail { max-width: var(--max-w); margin: 0 auto; padding: 3rem 2rem 6rem; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  text-decoration: none;
}
.back-link:hover { color: var(--text); }
.back-link::before { content: '←'; }

/* ── Contact page ───────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.contact-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2rem;
}

.contact-block h3 {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.contact-block p { font-size: 0.95rem; }

.contact-email {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--link);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.1rem;
}
.contact-email:hover { color: var(--accent); border-color: var(--accent); }

.not-available {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.3rem 0.75rem;
  margin-top: 0.75rem;
}

/* ── Bandcamp CTA ───────────────────────────────────────── */
.bandcamp-cta {
  margin-top: 3rem;
  padding: 2.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-align: center;
}

.bandcamp-cta p { color: var(--text-muted); margin-bottom: 1.25rem; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
}

.footer-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-name {
  font-family: var(--ff-head);
  font-size: 1rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.footer-links a:hover { color: var(--text); }

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ── Album section (music page) ─────────────────────────── */
.album-section { margin-bottom: 0; }

.album-header {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}

.album-meta-block { }

.album-title {
  font-family: var(--ff-head);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 400;
  margin-bottom: 0.3rem;
}
.album-title a { color: var(--text); text-decoration: none; }
.album-title a:hover { color: var(--accent); }

.album-subtitle {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.album-desc { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 0; }

.bc-embed {
  width: 300px;
  height: 406px;
  border: 0;
  display: block;
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .album-header {
    grid-template-columns: 1fr;
  }
  .bc-embed { width: 100%; height: 340px; }
}

/* ── Video embed ────────────────────────────────────────── */
.embed-wrap {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
}
.embed-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ── YouTube thumbnail fallback ─────────────────────────── */
.yt-thumb {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin: 1.5rem 0;
  overflow: hidden;
  aspect-ratio: 16/9;
}
.yt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}
.yt-thumb:hover img { opacity: 0.8; }
.yt-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: rgba(0,0,0,0.35);
  pointer-events: none;
}
.yt-thumb-play svg {
  width: 64px;
  height: 64px;
  fill: rgba(255,255,255,0.9);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}
.yt-thumb-play span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.8);
  background: rgba(0,0,0,0.5);
  padding: 0.3rem 0.8rem;
  border-radius: 2px;
}

/* ── Carousel ───────────────────────────────────────────────── */
.carousel {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin: 1.5rem 0;
  user-select: none;
  touch-action: pan-y;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  height: clamp(260px, 55vw, 520px);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: calc(50% - 1.5rem);
  transform: translateY(-50%);
  background: rgba(13,13,14,0.75);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background 0.2s, border-color 0.2s;
  z-index: 2;
  line-height: 1;
}
.carousel-btn:hover { background: rgba(155,126,203,0.3); border-color: var(--accent); }
.carousel-prev { left: 0.75rem; }
.carousel-next { right: 0.75rem; }

.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.carousel-dot.active {
  background: var(--accent);
  transform: scale(1.4);
}

.carousel[data-single] .carousel-btn,
.carousel[data-single] .carousel-dots { display: none; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; gap: 0; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
  }
  .nav-links.open li { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
  .nav-links.open li:last-child { border: none; }
  .nav-toggle { display: flex; }

  .bio-inner { grid-template-columns: 1fr; }
  .bio-avatar { width: 120px; height: 120px; }

  .work-entry { grid-template-columns: 1fr; gap: 0.5rem; }
  .work-year { font-size: 0.85rem; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
  .hero-content { padding: 3rem 1.5rem 2.5rem; }

  .track-card-header { flex-direction: column; }
}

@media (max-width: 480px) {
  .page, .page-header { padding-left: 1.25rem; padding-right: 1.25rem; }
  .hero-content { padding-left: 1.25rem; padding-right: 1.25rem; }
}
