@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;600&display=swap');

/* =========================================================
   ROOT
   ========================================================= */
:root {
  --bg-color: #0b0b0b;
  --accent-color: #9aa0a6;
  --text-color: #f8f8f8;

  --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;

  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

body.modal-open { overflow: hidden; }

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

/* =========================================================
   HEADER
   ========================================================= */
header {
  text-align: center;
  margin-bottom: 2rem;
}

/* Vacation vibe */
.char-name {
font-family: 'Quicksand', sans-serif;
  font-size: 3rem;
  margin: 0;
  color: var(--accent-color);
  letter-spacing: 0.01em;
}

.char-title {
font-family: 'Quicksand', sans-serif;
  font-size: 1.15rem;
  opacity: 0.85;
  margin-top: 0.5rem;
}

/* =========================================================
   FORM SWITCHER
   ========================================================= */
.form-switcher {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

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

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

  transition: transform 0.15s ease;
}

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

.form-btn:hover { transform: scale(1.06); }
.form-btn.active { transform: scale(1.08); }

.form-btn:focus,
.form-btn:focus-visible {
  outline: none;
  box-shadow: 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: 12px;

  display: block;
  box-shadow: none;
  background: transparent;
  border: none;
}

.bio-text {
  flex: 1;
  max-width: 600px;

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

  background: rgba(10, 10, 10, 0.72);
  color: #f3f3f3;

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

  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

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

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

.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.is-hidden { display: none; }

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

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

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

  transition: transform 0.2s ease, filter 0.2s ease;
}

.showcase-btn:hover img {
  transform: scale(1.01);
  filter: brightness(1.03);
}

.showcase-hint {
  font-size: 0.85rem;
  opacity: 0.75;
}

/* =========================================================
   FOOTER — RETURN BUTTON (CANONICAL)
   ========================================================= */
footer {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
}

.back-home img {
  width: 400px;
  height: auto;
  display: block;
  transition: transform 0.25s ease;
}

.back-home img:hover { transform: scale(1.08); }

/* =========================================================
   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(10,10,10,0.35);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;

  backdrop-filter: blur(10px);
  padding: 1rem;

  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
}

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

.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
   ========================================================= */
.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 */
.eq {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 22px;
}

.eq span {
  width: 3px;
  height: 6px;
  background: currentColor;
  border-radius: 2px;
  transform-origin: bottom;
  transition: height 0.08s linear;
}

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

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