body, html {
  margin: 0;
  padding: 0;
  background: #fefefe;
  overflow-y: auto;
  overflow-x: hidden;
  height: auto;
}

/* ── Intro overlay ─────────────────────────────────────── */
#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse 65% 65% at center,
    rgba(255, 236, 243, 0.93) 0%,
    rgba(255, 244, 248, 0.72) 45%,
    rgba(255, 252, 254, 0.18) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 1;
  transition: opacity 3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: all;
  cursor: default;
}

#intro-overlay.fading {
  opacity: 0;
  pointer-events: none;
}

#intro-text {
  text-align: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: #d4527a;
  padding: 2rem;
  max-width: 80vw;
  user-select: none;
  -webkit-user-select: none;
}

.intro-line1 {
  margin: 0 0 0.3em;
  font-size: clamp(1.4rem, 3.5vw, 2.8rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.04em;
  color: #c4607a;
  opacity: 0.9;
}

.intro-line2 {
  margin: 0 0 0.3em;
  font-size: clamp(3.5rem, 10vw, 8rem);
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #e0547a;
}

.intro-line3 {
  margin: 0;
  font-size: clamp(1.2rem, 2.8vw, 2.2rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.12em;
  color: #b86070;
  opacity: 0.8;
}

#viewport {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#gallery {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
}

.media {
  position: absolute;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  user-select: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.media:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}


.media img,
.media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
#navbar {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  height: 60px;
  z-index: 9999;
  pointer-events: auto;
}

#navbar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(0);
  transition: transform 0.5s ease;
  position: relative;
}

#nav-content {
  display: flex;
  align-items: center;
  position: relative;
  gap: -100px;
  transition: gap 0.5s ease;
}

#nav-core {
  width: 60px;
  height: 60px;
  background: rgba(253, 240, 244, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  z-index: 2;
  position: relative;
  transform-origin: right center; /* flip direction */
  transition:
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.5s ease,
    padding 0.4s ease;
}
#navbar.expanded #nav-core {
  margin-right: -70px;
}

#nav-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: transform 0.4s ease;
}

#nav-toggle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

#nav-panel {
  height: 60px;
  background: rgba(255, 230, 239, 0.5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 30px;
  opacity: 0;
  width: 0;
  overflow: hidden;
  transform-origin: left center;
  transition:
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.5s ease;
}

/* Show panel when navbar is expanded */
#navbar.expanded #nav-panel {
  opacity: 1;
  width: 140px;
}

/* Rotate toggle button */
#nav-toggle.rotate-open {
  animation: spinClockwise 0.6s ease-out forwards;
}
#nav-toggle.rotate-close {
  animation: spinCounter 0.6s ease-out forwards;
}

@keyframes spinClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes spinCounter {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

.nav-btn {
  width: 40px;
  height: 40px;
  object-fit: contain;
  cursor: pointer;
  pointer-events: auto;
}


#loading-screen {
  position: fixed;
  z-index: 99999;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #fff1f8, #ffe6fa);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  transition: opacity 0.6s ease;
}

#loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 24px 32px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.loading-icon {
  width: 72px;
  height: 72px;
  animation: spin 2.4s linear infinite;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.1));
  opacity: 0.9;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.progress-wrapper {
  width: 220px;
  height: 10px;
  background: #fff;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 0 6px #ffd0ec;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #ff8ec7, #ffc6ec);
  transition: width 0.2s ease;
  border-radius: 999px;
}

.loading-text {
  font-size: 0.95rem;
  color: #cc2a7f;
  font-weight: 500;
  animation: fadeIn 1.5s ease-in-out infinite alternate;
  text-align: center;
  letter-spacing: 0.2px;
}

@keyframes fadeIn {
  from { opacity: 0.5; }
  to { opacity: 1; }
}
#lightbox {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#lightbox.visible {
  opacity: 1;
  pointer-events: auto;
}

#lightbox-content {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: zoomIn 0.3s ease;
  border-radius: 20px;
  overflow: visible;
  margin: 40px auto;
  max-width: 100%;
  max-height: 100%;
}

#lightbox-content img,
#lightbox-content video {
  max-width: 80vw;
  max-height: 80vh;
  height: auto;
  width: auto;
  object-fit: contain;
  border-radius: 20px;
  background: black;
}


@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0.6;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
