/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Courier New', Courier, monospace;
  background: #000;
  color: #e0e0e0;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 4px;
}

/* ===== AUDIO PROMPT SCREEN ===== */
.audio-prompt {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transition: opacity 1s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.audio-prompt.hidden {
  opacity: 0;
  pointer-events: none;
}

.audio-prompt-text {
  font-size: 1.15rem;
  color: #222;
  letter-spacing: 0.04em;
  text-align: center;
  max-width: 360px;
  line-height: 1.6;
}

.audio-prompt-buttons {
  display: flex;
  gap: 1.5rem;
}

.audio-prompt-btn {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
  letter-spacing: 0.1em;
  padding: 0.6rem 2rem;
  border: 1px solid #222;
  background: transparent;
  color: #222;
  cursor: pointer;
  transition: background 0.4s ease, color 0.4s ease;
}

.audio-prompt-btn:hover {
  background: #222;
  color: #fff;
}

.audio-prompt-btn:focus-visible {
  outline-color: #222;
}

/* ===== NO-AUDIO LOADING INDICATOR ===== */
.loading-indicator {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.loading-indicator.visible {
  opacity: 1;
}

.loading-indicator.hide {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.loading-dots {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.loading-dots span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.85);
  animation: loading-pulse 1.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes loading-pulse {
  0%, 100% {
    opacity: 0.2;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.25);
  }
}

/* ===== FADE-IN OVERLAY ===== */
.overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 1000;
  pointer-events: none;
  transition: opacity 3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.overlay.fade-out {
  opacity: 0;
}

/* ===== SPACE CANVAS ===== */
#space-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0;
  transition: opacity 3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

#space-bg.visible {
  opacity: 1;
}

/* ===== NAVIGATION ===== */
#nav {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  padding: 2.5rem 3rem;
  opacity: 0;
  transition: opacity 2s cubic-bezier(0.22, 0.61, 0.36, 1);
}

#nav.visible {
  opacity: 1;
}

#nav ul {
  list-style: none;
  text-align: right;
}

#nav ul li {
  margin-bottom: 0.6rem;
}

.nav-link {
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: lowercase;
  opacity: 0.5;
  transition: opacity 0.5s cubic-bezier(0.25, 0.1, 0.25, 1), transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
  display: inline-block;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  opacity: 1;
}

.nav-link.active {
  font-weight: bold;
}

/* ===== CUTOUT PHOTO ===== */
#cutout-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
}

.cutout {
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 1s cubic-bezier(.55,.06,.68,.19), opacity 1s ease-in;
}

/* Slow intro grow — stretches over ~28s for a very gradual reveal */
.cutout.slow-grow {
  transition: transform 28s cubic-bezier(0.12, 0.8, 0.2, 1),
  opacity 14s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.cutout-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(150, 120, 255, 0.3));
  border-radius: 50%;
}

/* Cutout entrance animation */
.cutout {
  opacity: 0;
  transform: scale(0.6);
}

.cutout.active {
  opacity: 1;
  transform: scale(1);
}

.cutout.shrink-out {
  opacity: 0;
  transform: scale(0);
}

.cutout.grow-in {
  opacity: 1;
  transform: scale(1);
}

/* ===== SECTIONS WRAPPER ===== */
#sections-wrapper {
  position: fixed;
  inset: 0;
  z-index: 20;
  transition: transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
  opacity: 0;
}

#sections-wrapper.text-visible {
  transition: transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1),
  opacity 2s cubic-bezier(0.22, 0.61, 0.36, 1);
  opacity: 1;
}

.page-section {
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 4rem;
  position: relative;
}

/* ===== SECTION CONTENT ===== */
.section-content {
  max-width: 480px;
  z-index: 25;
}

.section-content.left-text {
  margin-left: 6vw;
}

.section-content h1 {
  font-size: 2.4rem;
  font-weight: 300;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.highlight {
  color: #a78bfa;
  font-weight: 700;
}

.tagline {
  font-size: 0.95rem;
  opacity: 0.6;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.section-content p {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  opacity: 0.85;
}

/* ===== HERO TEXT ===== */
.hero-text {
  position: absolute;
  top: 2.5rem;
  left: 3rem;
  max-width: 300px;
  text-align: left;
}

.hero-text h1 {
  font-size: 1.2rem !important;
  margin-bottom: 0.2rem !important;
  letter-spacing: 0.05em;
}

.hero-text .tagline {
  font-size: 0.8rem !important;
  margin-bottom: 0 !important;
  opacity: 0.6;
}

/* ===== INFO BLOCKS ===== */
.info-block {
  margin-bottom: 2.5rem;
}

.info-block h1 {
  font-size: 1.8rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: inline-block;
  padding-bottom: 0.3rem;
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.experience-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.experience-item p {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 0;
}

.scrollable-content {
  padding-right: 0;
}

/* ===== MUSIC LINKS ===== */
.music-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.music-link {
  font-size: 1rem;
  opacity: 0.7;
  transition: opacity 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
  letter-spacing: 0.05em;
}

.music-link:hover {
  opacity: 1;
}

/* ===== SOCIALS LIST ===== */
.socials-list {
  list-style: none;
  margin-top: 1rem;
}

.socials-list li {
  margin-bottom: 0.8rem;
}

.socials-list a {
  font-size: 1.05rem;
  opacity: 0.7;
  transition: opacity 0.5s cubic-bezier(0.25, 0.1, 0.25, 1), padding-left 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
  display: inline-block;
}

.socials-list a:hover {
  opacity: 1;
  padding-left: 0.5rem;
}

/* ===== INFO SECTION SPECIFIC ===== */
#info .section-content {
  max-width: 1100px;
  width: 95%;
  margin: 2rem auto 0;
}

#info .scrollable-content {
  display: flex;
  flex-wrap: wrap;
  gap: 4rem;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 1rem 1rem 1rem 0;
}

#info .info-block {
  flex: 1 1 300px;
  margin-bottom: 0;
}

#info .info-block h1 {
  border-bottom: 2px solid rgba(167, 139, 250, 0.4);
  width: 100%;
  display: block;
}

/* Responsive overrides for info section */
@media (max-width: 1024px) {
  #info .scrollable-content {
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  #info.page-section {
    align-items: center;
    padding-top: 5rem;
  }
  
  #info .section-content {
    max-width: 100%;
    width: 100%;
    margin-top: 0;
  }

  #info .scrollable-content {
    display: block;
    padding-right: 0;
  }

  #info .info-block {
    margin-bottom: 2rem;
  }
}

@media (max-width: 480px) {
  #info.page-section {
    padding-top: 4rem;
  }
  
  #info .section-content {
    margin-top: 0;
  }
}

/* ===== SECTION TRANSITION CLASSES ===== */
.page-section .section-content {
  opacity: 0;
  visibility: hidden;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) 0.3s, transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) 0.3s, visibility 0.9s step-end;
}

.page-section.visible .section-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) 0.3s, transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) 0.3s, visibility 0s;
}

/* ===== AUDIO PLAYER ===== */
#audio-player-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  justify-content: center;
  padding: 0.75rem 1rem;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 1.5s cubic-bezier(0.22, 0.61, 0.36, 1),
  transform 1.5s cubic-bezier(0.22, 0.61, 0.36, 1);
  pointer-events: none;
}

#audio-player-wrap.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#site-audio {
  width: 320px;
  max-width: 90vw;
  height: 36px;
  filter: invert(1) hue-rotate(180deg) brightness(0.85);
  opacity: 0.75;
  transition: opacity 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

#site-audio:hover {
  opacity: 1;
}

/* ===== LYRICS SUBTITLE OVERLAY ===== */
#lyrics-overlay {
  position: fixed;
  bottom: 60px;
  left: 0;
  right: 0;
  z-index: 150;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding: 0 2rem;
}

#lyrics-text {
  display: inline-block;
  font-size: 1.15rem;
  font-family: 'Courier New', Courier, monospace;
  color: #e0e0e0;
  text-align: center;
  letter-spacing: 0.06em;
  line-height: 1.6;
  padding: 0.5rem 1.2rem;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 6px;
  max-width: 640px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s cubic-bezier(0.22, 0.61, 0.36, 1),
  transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

#lyrics-text.visible {
  opacity: 1;
  transform: translateY(0);
}

#lyrics-text.fade-out {
  opacity: 0;
  transform: translateY(-6px);
}

/* ===== RESPONSIVE ===== */

/* --- Large desktop (1441px +) --- text left, cutout centered, plenty of room */
@media (min-width: 1441px) {
  .section-content {
    max-width: 520px;
  }

  .section-content.left-text {
    margin-left: 8vw;
  }

  .cutout {
    width: 360px;
    height: 360px;
  }
}

/* --- Laptop / small desktop (1025–1440px) --- constrain text to left ~42% */
@media (max-width: 1440px) and (min-width: 1025px) {
  .section-content {
    max-width: 420px;
  }

  .section-content.left-text {
    margin-left: 5vw;
  }

  .cutout {
    width: 300px;
    height: 300px;
  }

  /* Nudge cutout slightly right so it doesn't collide with text */
  #cutout-container {
    left: 55%;
  }
}

/* --- Tablet landscape / small laptop (769–1024px) --- cutout right, text left */
@media (max-width: 1024px) and (min-width: 769px) {
  .section-content {
    max-width: 340px;
  }

  .section-content.left-text {
    margin-left: 4vw;
  }

  .section-content h1 {
    font-size: 2rem;
  }

  .cutout {
    width: 240px;
    height: 240px;
  }

  /* Push cutout to the right side so text on the left is clear */
  #cutout-container {
    left: 62%;
  }

  .page-section {
    padding: 3rem;
  }

  #nav {
    padding: 2rem 2rem;
  }
}

/* --- Tablet portrait (481–768px) --- cutout top-center, text bottom */
@media (max-width: 768px) and (min-width: 481px) {
  .section-content h1 {
    font-size: 1.8rem;
  }

  #nav {
    padding: 1.5rem 1.5rem;
  }

  .cutout {
    width: 180px;
    height: 230px;
  }

  /* Move cutout to the upper portion */
  #cutout-container {
    top: 16%;
    transform: translate(-50%, 0);
  }

  /* Push text below the cutout */
  .page-section {
    padding: 2rem;
    align-items: flex-end;
    padding-bottom: 5rem;
  }

  .section-content {
    max-width: 100%;
  }

  .section-content.left-text {
    margin-left: 2rem;
    margin-right: 2rem;
  }

  .section-content p {
    font-size: 0.9rem;
  }

  .page-section .section-content {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    padding: 1.25rem;
  }

  #lyrics-overlay {
    bottom: 50px;
    padding: 0 1.5rem;
  }

  #lyrics-text {
    font-size: 1rem;
    max-width: 85vw;
  }
}

/* --- Mobile portrait (≤480px) --- cutout small at top, text bottom, scrollable */
@media (max-width: 480px) {
  .section-content h1 {
    font-size: 1.5rem;
  }

  #nav {
    padding: 1rem 1rem;
  }

  .nav-link {
    font-size: 0.85rem;
  }

  .cutout {
    width: 120px;
    height: 150px;
  }

  /* Cutout sits in the top area */
  #cutout-container {
    top: 4%;
    transform: translate(-50%, 0);
  }

  /* Text anchored to bottom */
  .page-section {
    padding: 1.5rem;
    padding-bottom: 4.5rem;
    align-items: flex-end;
  }

  .section-content {
    max-width: 100%;
  }

  .section-content.left-text {
    margin-left: 0.75rem;
    margin-right: 0.75rem;
  }

  .section-content h1 {
    font-size: 1.3rem;
  }

  .section-content p {
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 0.6rem;
  }

  .page-section .section-content {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    padding: 1rem;
  }

  .work-item {
    padding: 0.8rem;
  }

  .work-item h3 {
    font-size: 0.9rem;
  }

  .work-item p {
    font-size: 0.78rem;
  }

  .music-link {
    font-size: 0.9rem;
  }

  .socials-list a {
    font-size: 0.95rem;
  }

  #lyrics-overlay {
    bottom: 45px;
    padding: 0 0.75rem;
  }

  #lyrics-text {
    font-size: 0.85rem;
    max-width: 92vw;
  }
}

/* --- Short viewports (landscape phones) --- extra safety */
@media (max-height: 500px) {
  #cutout-container {
    top: 2%;
    transform: translate(-50%, 0);
  }

  .cutout {
    width: 80px;
    height: 100px;
  }

  .page-section {
    align-items: flex-end;
    padding-bottom: 2rem;
  }

  .page-section .section-content {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    padding: 0.75rem;
  }

  .section-content h1 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
  }

  .section-content p {
    font-size: 0.75rem;
    line-height: 1.4;
    margin-bottom: 0.4rem;
  }

  .tagline {
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
  }
}
