@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Libre+Baskerville:wght@400;700&display=swap');

/* =========================================================
   ROOT / THEME
   ========================================================= */

:root {
  --bg-color: #0c0c0c;
  --accent-color: #d8d8d8;
  --text-color: #969696;

  --music-bg: rgba(0,0,0,0.6);
  --music-fg: var(--accent-color);
}

/* =========================================================
   BASE PAGE
   ========================================================= */

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-color);
  color: var(--text-color);

  font-family: 'Inter', sans-serif;

  display: flex;
  justify-content: center;
  padding: 2rem;
}

body.modal-open {
  overflow: hidden;
}

.character-page {
  width: 100%;
  max-width: 1100px;
}

/* =========================================================
   HEADER
   ========================================================= */

header {
  text-align: center;
  margin-bottom: 2rem;
}

/* NAME — label / product / exhibit */
.char-name {
  font-family: 'Inter', sans-serif;
  font-size: 2.6rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;

  color: var(--accent-color);
}

/* TITLE — uncanny valley */
.char-title {
  font-family: 'Libre Baskerville', serif;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.025em;
  opacity: 0.85;
  margin-top: 0.6rem;
}

/* =========================================================
   FORM SWITCHER
   ========================================================= */

.form-switcher {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.form-btn {
  background: none;
  border: none;
  width: 48px;
  height: 48px;
  padding: 0;

  cursor: pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.form-btn img {
  width: 100%;
  height: auto;
  display: block;
}

/* No rings, no fantasy highlight */
.form-btn.active {
  transform: scale(1.05);
}

.form-btn:focus,
.form-btn:focus-visible {
  outline: none;
}

/* =========================================================
   BIO SECTION
   ========================================================= */

.bio-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;

  max-width: 1000px;
  margin: 0 auto;
}

.portrait-wrapper img {
  width: 400px;
  height: auto;
  border-radius: 10px;

  background: transparent;
  border: none;
}

/* Bio panel — museum placard */
.bio-text {
  flex: 1;
  max-width: 600px;

  line-height: 1.6;
  font-size: 0.95rem;

  background: rgba(15, 15, 15, 0.72);
  color: #eaeaea;

  padding: 1.2rem 1.5rem;
  border-radius: 8px;

  border: 1px solid rgba(255,255,255,0.08);
}

.bio-text h3 {
  font-family: 'Libre Baskerville', serif;
  font-weight: 400;
  margin-top: 1rem;
  color: var(--accent-color);
}

.bio-text p {
  margin: 0.4rem 0;
}

.bio-text a {
  color: var(--accent-color);
  text-decoration: underline;
}

.bio-text a:hover {
  opacity: 0.9;
}

/* =========================================================
   SHOWCASE
   ========================================================= */

.showcase {
  margin: 2.25rem auto 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.showcase-btn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.showcase-btn img {
  width: min(820px, 92vw);
  height: auto;

  border-radius: 12px;
  display: block;

  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.showcase-hint {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* =========================================================
   FOOTER
   ========================================================= */

footer {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
}

.back-home img {
  width: 400px;
  height: auto;
  display: block;
}

/* =========================================================
   MODAL / LIGHTBOX
   ========================================================= */

.img-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 20000;
}

.img-modal.is-open {
  display: block;
}

.img-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
}

.img-modal__content {
  position: relative;
  margin: 4vh auto;

  width: min(1200px, 94vw);

  background: rgba(12,12,12,0.35);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;

  padding: 1rem;
}

.img-modal__content img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.img-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;

  width: 40px;
  height: 40px;

  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);

  background: rgba(0,0,0,0.5);
  color: #fff;

  cursor: pointer;
  font-size: 18px;
}

/* =========================================================
   MUSIC WIDGET (you already have JS for this)
   ========================================================= */
.music-widget{
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--music-bg);
  color: var(--music-fg);
  padding: 0.6rem 0.8rem;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  z-index: 9999;
}

.music-toggle{
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
}

.music-toggle img{
  width: 100%;
  height: auto;
  display: none;
}

.music-toggle.playing .icon-pause{ display: block; }
.music-toggle:not(.playing) .icon-play{ display: block; }

.music-info{
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  line-height: 1.1;
}

.track-title{ font-weight: 600; }
.track-origin{ opacity: 0.75; }

/* EQ sizes tuned to stay inside the widget */
.eq{
  display:flex;
  gap:4px;
  align-items:flex-end;
  height:22px;
}
.eq span{
  width:2px;
  height:6px;
  background: currentColor;
  border-radius: 2px;
  transform-origin: bottom;
  transition: height 0.08s linear;
}

/* =========================================================
   TRANSITION (forms.js toggles this)
   ========================================================= */
@keyframes fadeBlur {
  from { opacity: 0.6; filter: blur(8px); }
  to   { opacity: 1; filter: none; }
}

body.fade-blur {
  animation: fadeBlur 0.45s ease;
}