/* =============================================================================
   🎂 THE KUNAL RAUT EXPERIENCE — MASTER STYLESHEET
   Luxury Black & Gold Theme • Glassmorphism • Cinematic Motion & Typography
   ============================================================================= */

/* --- GOOGLE FONTS IMPORT --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,800;1,600&family=Alex+Brush&display=swap');

/* --- CSS VARIABLES DESIGN SYSTEM --- */
:root {
  /* Color System */
  --bg-primary: #08080a;
  --bg-secondary: #0f1015;
  --bg-tertiary: #161822;
  --bg-glass: rgba(18, 19, 26, 0.75);
  --bg-glass-strong: rgba(12, 13, 18, 0.92);
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);

  /* Gold Palette (Champagne / Luxury Warm Gold) */
  --gold: #d4af37;
  --gold-light: #f5e4b2;
  --gold-dark: #91751e;
  --gold-glow: rgba(212, 175, 55, 0.35);
  --gold-gradient: linear-gradient(135deg, #fcedc5 0%, #d4af37 50%, #9a781b 100%);
  --gold-gradient-soft: linear-gradient(180deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0) 100%);

  /* Accent & Lighting */
  --accent-purple: #7048e8;
  --accent-rose: #f06595;
  --accent-glow: rgba(112, 72, 232, 0.15);

  /* Typography Colors */
  --text-primary: #f8f9fa;
  --text-secondary: #b8bac7;
  --text-muted: #727588;
  --text-gold: #e8ca65;

  /* Borders & Shadows */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-gold: rgba(212, 175, 55, 0.3);
  --border-gold-bright: rgba(212, 175, 55, 0.8);
  --shadow-subtle: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 0 25px rgba(212, 175, 55, 0.2);
  --shadow-gold-strong: 0 0 45px rgba(212, 175, 55, 0.4);

  /* Fonts */
  --font-serif: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-script: 'Alex Brush', cursive, serif;

  /* Layout & Animation Tokens */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 9999px;
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  --container-width: 1300px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

body.locked {
  overflow: hidden;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.25);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* --- SELECTION --- */
::selection {
  background: var(--gold-dark);
  color: #fff;
}

/* --- TOP SCROLL PROGRESS BAR --- */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--gold-gradient);
  z-index: 10000;
  box-shadow: 0 0 10px var(--gold);
  transition: width 0.1s linear;
}

/* --- CUSTOM MAGNETIC CURSOR (DESKTOP) --- */
#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: transform 0.05s ease-out, opacity 0.3s;
}

#cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--gold-glow);
  background: rgba(212, 175, 55, 0.05);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              height 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.3s,
              border-color 0.3s,
              transform 0.15s ease-out;
}

body.cursor-hover #cursor-follower {
  width: 60px;
  height: 60px;
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold);
}

@media (hover: none) and (pointer: coarse) {
  #custom-cursor, #cursor-follower {
    display: none !important;
  }
}

/* --- BACKGROUND CANVAS (STARDUST PARTICLES & FIREWORKS) --- */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
}

#fireworks-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9990;
}

/* --- CINEMATIC INTRO & LOADER SCREEN --- */
#cinematic-loader {
  position: fixed;
  inset: 0;
  background: #050507;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 1.2s;
}

#cinematic-loader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-genesis-orb {
  width: 14px;
  height: 14px;
  background: var(--gold);
  border-radius: 50%;
  margin-bottom: 2.5rem;
  box-shadow: 0 0 40px 15px var(--gold-glow);
  animation: orbPulse 2.5s infinite ease-in-out;
}

@keyframes orbPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 20px 5px var(--gold-glow); }
  50% { transform: scale(1.6); box-shadow: 0 0 50px 18px rgba(212, 175, 55, 0.7); }
}

.loader-quote-container {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.loader-phrase {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  margin-bottom: 0.5rem;
}

.loader-phrase.active {
  opacity: 1;
  transform: translateY(0);
}

.loader-phrase.gold-accent {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  font-size: clamp(1.8rem, 6vw, 3.4rem);
  letter-spacing: 0.15em;
  font-family: var(--font-serif);
}

.loader-progress-box {
  width: min(320px, 80vw);
  margin-top: 2rem;
}

.loader-progress-track {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.loader-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--gold-gradient);
  box-shadow: 0 0 10px var(--gold);
  transition: width 0.2s linear;
}

.loader-progress-text {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.loader-enter-btn {
  margin-top: 2.5rem;
  padding: 1rem 2.5rem;
  background: var(--gold-gradient);
  color: #0c0d12;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: 0 0 35px var(--gold-glow);
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.loader-enter-btn.ready {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  animation: enterPulse 2s infinite ease-in-out;
}

@keyframes enterPulse {
  0%, 100% { box-shadow: 0 0 25px var(--gold-glow); }
  50% { box-shadow: 0 0 45px rgba(212, 175, 55, 0.7); transform: scale(1.03); }
}

.loader-enter-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 50px rgba(212, 175, 55, 0.9);
}

.loader-skip-btn {
  position: absolute;
  bottom: 2rem;
  color: var(--text-muted);
  background: none;
  border: none;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.5rem 1rem;
  transition: color var(--transition-fast);
}

.loader-skip-btn:hover {
  color: var(--gold-light);
}

/* --- FLOATING AUDIO CONTROLLER --- */
#music-controller {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 1.2rem;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-gold);
  transition: all var(--transition-normal);
}

#music-controller:hover {
  border-color: var(--gold);
  box-shadow: 0 0 30px var(--gold-glow);
}

.equalizer-box {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
  width: 22px;
}

.eq-bar {
  flex: 1;
  background: var(--gold-gradient);
  border-radius: 1px;
  height: 4px;
  transition: height 0.15s ease;
}

.music-playing .eq-bar:nth-child(1) { animation: eqAnimation 0.8s infinite ease-in-out alternate; }
.music-playing .eq-bar:nth-child(2) { animation: eqAnimation 1.2s infinite ease-in-out alternate 0.2s; }
.music-playing .eq-bar:nth-child(3) { animation: eqAnimation 0.6s infinite ease-in-out alternate 0.4s; }
.music-playing .eq-bar:nth-child(4) { animation: eqAnimation 1.0s infinite ease-in-out alternate 0.1s; }

@keyframes eqAnimation {
  0% { height: 3px; }
  100% { height: 18px; }
}

.music-info {
  display: flex;
  flex-direction: column;
}

.music-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gold-light);
  text-transform: uppercase;
}

.music-status {
  font-size: 0.62rem;
  color: var(--text-muted);
}

.music-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.music-btn:hover {
  color: var(--gold);
  transform: scale(1.15);
}

/* --- NAVIGATION BAR --- */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.4rem 3rem;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition-normal);
}

#main-nav.scrolled {
  padding: 0.9rem 2.5rem;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-logo-star {
  color: var(--gold);
  font-size: 0.9rem;
  animation: starSpin 8s infinite linear;
}

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

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

.nav-item a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative;
  padding: 0.4rem 0;
  transition: color var(--transition-fast);
}

.nav-item a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 1px;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  transition: width var(--transition-normal);
}

.nav-item a:hover {
  color: var(--text-primary);
}

.nav-item a:hover::after {
  width: 100%;
}

.nav-cta-btn {
  padding: 0.55rem 1.4rem;
  border: 1px solid var(--gold);
  border-radius: var(--radius-pill);
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold-light) !important;
  transition: all var(--transition-normal) !important;
}

.nav-cta-btn:hover {
  background: var(--gold) !important;
  color: #0c0d12 !important;
  box-shadow: 0 0 20px var(--gold-glow);
}

.nav-cta-btn::after {
  display: none !important;
}

.nav-toggle-btn {
  display: none;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Mobile Menu Drawer */
#mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 10, 0.98);
  backdrop-filter: blur(25px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

#mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-links {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.mobile-nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 1.8rem;
  letter-spacing: 0.1em;
  transition: color var(--transition-fast);
}

.mobile-nav-links a:hover {
  color: var(--gold);
}

.mobile-close-btn {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 2rem;
  cursor: pointer;
}

/* --- SECTION GENERAL STYLING --- */
section {
  position: relative;
  z-index: 10;
  padding: 7rem 2rem;
  max-width: 100vw;
}

.section-container {
  max-width: var(--container-width);
  margin: 0 auto;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 4.5rem;
  position: relative;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.2rem;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.section-title.gold {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto;
  font-weight: 300;
}

.gold-divider {
  width: 70px;
  height: 2px;
  background: var(--gold-gradient);
  margin: 1.5rem auto 0 auto;
  position: relative;
  box-shadow: 0 0 10px var(--gold);
}

.gold-divider::after {
  content: '✦';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--gold);
  font-size: 0.8rem;
  background: var(--bg-primary);
  padding: 0 0.5rem;
}

/* --- HERO SECTION --- */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8rem 2rem 5rem 2rem;
  position: relative;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at center, rgba(212, 175, 55, 0.08) 0%, rgba(8, 8, 10, 0.95) 70%, #08080a 100%);
}

.hero-glow-orb {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(600px, 90vw);
  height: min(600px, 90vw);
  background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, rgba(112, 72, 232, 0.05) 50%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  animation: heroGlowPulse 8s infinite alternate ease-in-out;
}

@keyframes heroGlowPulse {
  0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 2vw, 1.25rem);
  font-weight: 600;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.2rem;
}

.hero-title-main {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 8vw, 5.8rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  animation: heroTitleFade 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroTitleFade {
  from { opacity: 0; transform: translateY(20px); letter-spacing: 0.1em; }
  to { opacity: 1; transform: translateY(0); letter-spacing: 0.04em; }
}

.hero-title-name {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 10vw, 6.8rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.06em;
  background: linear-gradient(90deg, #d4af37 0%, #fff7d6 25%, #d4af37 50%, #f3e5ab 75%, #d4af37 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
  margin-bottom: 1.8rem;
  animation: goldShine 5s linear infinite;
  filter: drop-shadow(0 0 35px rgba(212, 175, 55, 0.45));
}

@keyframes goldShine {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.section-title.gold, .final-title-grand {
  background: linear-gradient(90deg, #d4af37 0%, #fff7d6 25%, #d4af37 50%, #f3e5ab 75%, #d4af37 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: goldShine 6s linear infinite;
}

.hero-quote {
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.7;
  max-width: 650px;
  margin: 0 auto 2.8rem auto;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.btn-primary {
  padding: 1.1rem 2.8rem;
  background: var(--gold-gradient);
  color: #0c0d12;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  text-decoration: none;
  box-shadow: 0 0 35px var(--gold-glow);
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 50px rgba(212, 175, 55, 0.65);
}

.btn-secondary {
  padding: 1.1rem 2.4rem;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border: 1px solid var(--border-gold);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--gold);
  color: var(--gold-light);
  transform: translateY(-3px);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition: color var(--transition-fast);
}

.hero-scroll-indicator:hover {
  color: var(--gold-light);
}

.scroll-arrow-box {
  width: 24px;
  height: 40px;
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  position: relative;
}

.scroll-arrow-box::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--gold);
  border-radius: 2px;
  animation: scrollDown 2s infinite ease-in-out;
}

@keyframes scrollDown {
  0% { transform: translate(-50%, 0); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: translate(-50%, 18px); opacity: 0; }
}

/* --- COUNTDOWN SECTION --- */
#countdown-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 5.5rem 2rem;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.countdown-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.2rem;
  text-align: center;
  box-shadow: var(--shadow-subtle);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.countdown-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gold-gradient);
  opacity: 0.7;
}

.countdown-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

.countdown-num {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.4rem;
}

.countdown-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.countdown-celebration-banner {
  display: none;
  text-align: center;
  padding: 2rem;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  margin-top: 2rem;
  box-shadow: var(--shadow-gold);
  animation: bannerPulse 2s infinite alternate ease-in-out;
}

@keyframes bannerPulse {
  0% { box-shadow: 0 0 20px var(--gold-glow); }
  100% { box-shadow: 0 0 50px rgba(212, 175, 55, 0.6); }
}

.countdown-celebration-banner.active {
  display: block;
}

/* --- "THIS IS KUNAL" PROFILE SECTION --- */
#profile-section {
  padding: 8rem 2rem;
}

.profile-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4.5rem;
  align-items: center;
}

.profile-visual {
  position: relative;
}

.profile-portrait-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-gold);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px var(--gold-glow);
  background: var(--bg-tertiary);
}

.profile-portrait-frame img, .profile-portrait-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.profile-portrait-frame:hover img {
  transform: scale(1.05);
}

.profile-portrait-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  background: linear-gradient(145deg, #181924, #0d0e14);
}

.profile-floating-badge {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  padding: 1.2rem 1.6rem;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 25px var(--gold-glow);
  animation: floatBadge 4.5s infinite ease-in-out;
}

@keyframes floatBadge {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}

.photo-card::after, .joke-card::after, .open-when-card::after, .stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle 280px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(212, 175, 55, 0.18), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 4;
}

.photo-card:hover::after, .joke-card:hover::after, .open-when-card:hover::after, .stat-card:hover::after {
  opacity: 1;
}

.badge-icon {
  font-size: 2rem;
}

.badge-text-top {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold-light);
}

.badge-text-bottom {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.profile-roles-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.role-tag {
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.role-tag:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.08);
}

.profile-quote-card {
  padding: 1.8rem 2rem;
  background: rgba(212, 175, 55, 0.04);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.6;
}

.profile-bio {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  font-weight: 300;
}

/* --- STATS COUNTERS --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.stat-card {
  padding: 1.5rem 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: center;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- 50+ PHOTO MEMORY GALLERY --- */
#gallery-section {
  padding: 8rem 2rem;
  background: var(--bg-secondary);
}

.gallery-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
  margin-bottom: 3.5rem;
}

.gallery-search-box {
  position: relative;
  width: min(450px, 90vw);
}

.gallery-search-input {
  width: 100%;
  padding: 0.9rem 1.4rem 0.9rem 3rem;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  outline: none;
  transition: all var(--transition-normal);
}

.gallery-search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 25px var(--gold-glow);
}

.gallery-search-icon {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 1.1rem;
}

.gallery-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.filter-tab {
  padding: 0.55rem 1.3rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-tab:hover {
  color: var(--text-primary);
  border-color: var(--border-gold);
}

.filter-tab.active {
  background: var(--gold-gradient);
  color: #0c0d12;
  font-weight: 600;
  border-color: transparent;
  box-shadow: 0 0 20px var(--gold-glow);
}

/* Responsive Masonry Grid */
.masonry-gallery {
  column-count: 4;
  column-gap: 1.5rem;
  width: 100%;
}

@media (max-width: 1200px) {
  .masonry-gallery { column-count: 3; }
}
@media (max-width: 768px) {
  .masonry-gallery { column-count: 2; column-gap: 1rem; }
}
@media (max-width: 480px) {
  .masonry-gallery { column-count: 1; }
}

.photo-card {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.photo-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--gold);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 30px var(--gold-glow);
  z-index: 5;
}

.photo-card img, .photo-card-placeholder {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.photo-card:hover img {
  transform: scale(1.08);
}

.photo-card-placeholder {
  aspect-ratio: 4/3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.8rem;
  text-align: center;
  position: relative;
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(8, 8, 10, 0.95) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.photo-card:hover .photo-overlay {
  opacity: 1;
}

.photo-category-tag {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 0.3rem;
}

.photo-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 0.3rem;
}

.photo-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.photo-view-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.35rem 0.8rem;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.gallery-load-more-wrap {
  text-align: center;
  margin-top: 4rem;
}

/* --- FULLSCREEN LIGHTBOX --- */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 7, 0.96);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
  padding: 2rem;
}

#lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 1000px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-media-box {
  max-height: 70vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-gold);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9), 0 0 50px var(--gold-glow);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-media-box img, .lightbox-fallback-view {
  max-height: 70vh;
  max-width: 85vw;
  object-fit: contain;
}

.lightbox-fallback-view {
  width: 600px;
  height: 450px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
}

.lightbox-details {
  text-align: center;
  margin-top: 1.5rem;
  max-width: 700px;
}

.lightbox-counter {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.lightbox-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.lightbox-caption {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 300;
}

.lightbox-close-btn {
  position: absolute;
  top: 2rem;
  right: 2.5rem;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 2rem;
  cursor: pointer;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.lightbox-close-btn:hover {
  color: var(--gold);
  transform: scale(1.2);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-glass);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lightbox-nav-btn:hover {
  background: var(--gold);
  color: #0c0d12;
  box-shadow: 0 0 20px var(--gold-glow);
}

.lightbox-prev-btn { left: 2rem; }
.lightbox-next-btn { right: 2rem; }

/* --- CINEMATIC MEMORY SLIDESHOW ("MEMORIES IN MOTION") --- */
#slideshow-section {
  padding: 8rem 2rem;
  background: #06070a;
}

.slideshow-theater {
  position: relative;
  max-width: 1000px;
  aspect-ratio: 16/9;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-gold);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), 0 0 50px var(--gold-glow);
  background: var(--bg-tertiary);
}

.slideshow-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slideshow-slide.active {
  opacity: 1;
}

.slideshow-slide img, .slideshow-slide-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: kenBurns 12s infinite alternate ease-in-out;
}

@keyframes kenBurns {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.12) translate(-1%, -1%); }
}

.slideshow-slide-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
}

.slideshow-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 8, 10, 0.2) 0%, rgba(8, 8, 10, 0.85) 90%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem;
}

.slideshow-caption-title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.slideshow-caption-desc {
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  color: var(--text-secondary);
  max-width: 600px;
  font-weight: 300;
}

.slideshow-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}

.slideshow-progress-line {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 2rem;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.slideshow-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--gold-gradient);
  box-shadow: 0 0 10px var(--gold);
}

.slideshow-buttons-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.slideshow-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.slideshow-btn:hover {
  background: var(--gold);
  color: #0c0d12;
  box-shadow: 0 0 15px var(--gold-glow);
}

/* --- FUNNY INSIDE JOKES & "THINGS ONLY WE UNDERSTAND" --- */
#jokes-section {
  padding: 8rem 2rem;
  background: var(--bg-primary);
}

.jokes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}

@media (max-width: 992px) {
  .jokes-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .jokes-grid { grid-template-columns: 1fr; }
}

.joke-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.joke-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), var(--shadow-gold);
}

.joke-icon {
  font-size: 2.5rem;
}

.joke-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
}

.joke-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-weight: 300;
}

/* --- "OPEN WHEN..." PERSONAL CARDS --- */
#open-when-section {
  padding: 8rem 2rem;
  background: var(--bg-secondary);
}

.open-when-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.open-when-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.open-when-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold-gradient-soft);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.open-when-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--gold);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), var(--shadow-gold);
}

.open-when-card:hover::before {
  opacity: 1;
}

.open-when-icon {
  font-size: 2.8rem;
  margin-bottom: 1.2rem;
  display: block;
  transition: transform var(--transition-fast);
}

.open-when-card:hover .open-when-icon {
  transform: scale(1.15);
}

.open-when-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.open-when-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

.open-when-cta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--gold-light);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Modal for Open When & Secret Messages */
.luxury-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 7, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.luxury-modal.active {
  opacity: 1;
  visibility: visible;
}

.luxury-modal-content {
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  max-width: 650px;
  width: 100%;
  padding: 3.5rem 3rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), 0 0 50px var(--gold-glow);
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.8rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--gold);
}

.modal-header-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.modal-header-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 1.8rem;
  line-height: 1.3;
}

.modal-body-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.9;
  font-weight: 300;
  white-space: pre-line;
}

/* --- SECRET SURPRISE SECTION --- */
#secret-section {
  padding: 8rem 2rem;
  background: radial-gradient(circle at center, #14111f 0%, #08080a 70%);
  text-align: center;
}

.secret-trigger-box {
  max-width: 600px;
  margin: 0 auto;
  padding: 4rem 3rem;
  background: var(--bg-glass);
  border: 1px dashed var(--border-gold);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-gold);
}

.secret-lock-icon {
  font-size: 3.5rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
  animation: lockGlow 3s infinite alternate ease-in-out;
}

@keyframes lockGlow {
  0% { transform: scale(1); filter: drop-shadow(0 0 10px var(--gold-glow)); }
  100% { transform: scale(1.1); filter: drop-shadow(0 0 30px var(--gold)); }
}

/* Typewriter Secret Modal */
.typewriter-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--text-primary);
}

/* --- PERSONAL BIRTHDAY LETTER (3D ENVELOPE) --- */
#letter-section {
  padding: 8rem 2rem;
  background: var(--bg-secondary);
}

.envelope-wrapper {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  perspective: 1200px;
}

.envelope-card {
  background: linear-gradient(145deg, #1b1c28, #10111a);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), var(--shadow-gold);
  text-align: center;
  position: relative;
  transition: all var(--transition-normal);
}

.wax-seal {
  width: 70px;
  height: 70px;
  background: radial-gradient(circle, #d4af37 0%, #91751e 100%);
  border-radius: 50%;
  margin: 0 auto 1.8rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 0 30px var(--gold-glow);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.wax-seal:hover {
  transform: scale(1.1) rotate(10deg);
}

.letter-paper {
  display: none;
  background: #fdfbf7;
  color: #1a1a1a;
  border-radius: var(--radius-md);
  padding: 3.5rem 3rem;
  margin-top: 2rem;
  text-align: left;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
  animation: letterSlideDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes letterSlideDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

.letter-paper-header {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: #8c6d1f;
  margin-bottom: 1.8rem;
  border-bottom: 2px dashed rgba(140, 109, 31, 0.2);
  padding-bottom: 1rem;
}

.letter-paper-body {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 2;
  color: #2c2d30;
  white-space: pre-line;
}

.letter-paper-signature {
  margin-top: 2.5rem;
  font-family: var(--font-script);
  font-size: 2.4rem;
  color: #8c6d1f;
  text-align: right;
}

/* --- BIRTHDAY CAKE & CANDLE BLOWOUT INTERACTION --- */
#cake-section {
  padding: 8rem 2rem;
  background: radial-gradient(circle at center, #151320 0%, #08080a 80%);
  text-align: center;
}

.cake-interactive-box {
  max-width: 550px;
  margin: 0 auto;
  position: relative;
  cursor: pointer;
  padding: 3rem 2rem;
}

.cake-svg-wrap {
  width: 260px;
  height: 260px;
  margin: 0 auto 2rem auto;
  position: relative;
  transition: transform var(--transition-normal);
}

.cake-svg-wrap:hover {
  transform: scale(1.05);
}

.candle-flame {
  transform-origin: center bottom;
  animation: flameFlicker 1s infinite alternate ease-in-out;
  filter: drop-shadow(0 0 15px #ffa500);
}

@keyframes flameFlicker {
  0% { transform: scale(1) rotate(-2deg); opacity: 0.9; }
  100% { transform: scale(1.2) rotate(2deg); opacity: 1; filter: drop-shadow(0 0 25px #ff4500); }
}

.candles-blown .candle-flame {
  display: none !important;
}

.cake-instruction {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-top: 1rem;
}

.wish-granted-banner {
  display: none;
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--gold);
  margin-top: 1.5rem;
  animation: wishReveal 0.8s ease forwards;
}

@keyframes wishReveal {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* --- POLAROID MEMORY WALL --- */
#memory-wall-section {
  padding: 8rem 2rem;
  background: var(--bg-secondary);
}

.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
  max-width: var(--container-width);
  margin: 0 auto;
}

.polaroid-card {
  background: #ffffff;
  padding: 1rem 1rem 2.8rem 1rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
  cursor: pointer;
  position: relative;
}

.polaroid-card:nth-child(even) {
  transform: rotate(3deg);
}

.polaroid-card:nth-child(odd) {
  transform: rotate(-3deg);
}

.polaroid-card:nth-child(3n) {
  transform: rotate(1.5deg);
}

.polaroid-card:hover {
  transform: scale(1.1) rotate(0deg) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 30px var(--gold-glow);
  z-index: 20;
}

.polaroid-img-wrap {
  aspect-ratio: 1/1;
  overflow: hidden;
  background: #1a1a1a;
  border-radius: 4px;
}

.polaroid-img-wrap img, .polaroid-img-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.polaroid-caption {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: #222;
  text-align: center;
  margin-top: 1rem;
  line-height: 1;
}

/* --- FINAL CINEMATIC MOVIE ENDING --- */
#final-scene-section {
  padding: 10rem 2rem 8rem 2rem;
  background: #030305;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.final-quote-lead {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.final-title-grand {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 9vw, 6.5rem);
  font-weight: 800;
  line-height: 1.1;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.final-message-box {
  max-width: 750px;
  margin: 0 auto 3.5rem auto;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  line-height: 1.9;
  font-weight: 300;
}

/* --- FOOTER --- */
#main-footer {
  padding: 5rem 2rem 3rem 2rem;
  background: #060608;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.8rem;
}

.footer-dedication {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.footer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* --- MEMORY MODE (FULLSCREEN IMMERSION) --- */
body.memory-mode #main-nav,
body.memory-mode #music-controller,
body.memory-mode #scroll-progress,
body.memory-mode .hero-actions,
body.memory-mode .hero-scroll-indicator,
body.memory-mode .gallery-controls,
body.memory-mode .gallery-load-more-wrap,
body.memory-mode #quiz-section,
body.memory-mode #jokes-section,
body.memory-mode #main-footer {
  display: none !important;
}

#memory-mode-exit-btn {
  display: none;
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 99999;
  padding: 0.8rem 1.8rem;
  background: var(--gold-gradient);
  color: #0c0d12;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-pill);
  box-shadow: 0 0 30px var(--gold-glow);
  cursor: pointer;
}

body.memory-mode #memory-mode-exit-btn {
  display: block;
}

/* --- ACCESSIBILITY & PREFERS-REDUCED-MOTION --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =============================================================================
   📱 MASTER MOBILE RESPONSIVENESS SYSTEM (320px - 992px)
   ============================================================================= */

/* Safe Area & Mobile Basics */
html, body {
  overflow-x: hidden !important;
  width: 100%;
  max-width: 100vw;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* Tablet & Smaller (<= 992px) */
@media (max-width: 992px) {
  #main-nav {
    padding: 1rem 1.5rem;
  }
  
  .nav-links {
    display: none !important;
  }
  
  .nav-toggle-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-glass);
    border: 1px solid var(--border-gold);
    color: var(--gold);
    font-size: 1.4rem;
    box-shadow: var(--shadow-gold);
    cursor: pointer;
  }

  .profile-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .profile-visual {
    display: flex;
    justify-content: center;
  }

  .profile-portrait-frame {
    max-width: 320px;
    margin: 0 auto;
  }

  .profile-info {
    text-align: center;
  }

  .profile-roles-wrap {
    justify-content: center;
  }

  .jokes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.4rem;
  }

  .open-when-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.4rem;
  }
}

/* Standard Mobile & Small Tablets (<= 768px) */
@media (max-width: 768px) {
  section {
    padding: 5rem 1.2rem;
  }

  .section-container {
    padding: 0;
  }

  /* Cinematic Loader */
  #cinematic-loader {
    padding: 1.5rem;
  }

  .loader-phrase {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
    letter-spacing: 0.15em;
  }

  .loader-phrase.gold-accent {
    font-size: clamp(1.6rem, 7vw, 2.5rem);
  }

  .loader-enter-btn {
    width: 100%;
    max-width: 280px;
    padding: 0.9rem 1.8rem;
    font-size: 0.82rem;
    justify-content: center;
  }

  /* Floating Music Controller */
  #music-controller {
    bottom: 1.2rem;
    right: 1.2rem;
    padding: 0.45rem 0.9rem;
    gap: 0.6rem;
    max-width: calc(100vw - 2.4rem);
  }

  .music-info {
    display: none;
  }

  /* Hero Section */
  #hero {
    padding: 6.5rem 1.2rem 4rem 1.2rem;
    min-height: 90svh;
  }

  .hero-tagline {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
  }

  .hero-title-main {
    font-size: clamp(2rem, 8vw, 3.8rem);
    letter-spacing: 0.15em;
  }

  .hero-title-name {
    font-size: clamp(2.4rem, 10vw, 4.8rem);
    margin-bottom: 1.2rem;
  }

  .hero-quote {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 2rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    gap: 0.9rem;
    margin: 0 auto;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.5rem;
  }

  .hero-scroll-indicator {
    display: none;
  }

  /* Stats Grid */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .stat-card {
    padding: 1.2rem 0.8rem;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  /* Gallery Section & Filter Ribbon */
  #gallery-section {
    padding: 5rem 1rem;
  }

  .gallery-controls {
    gap: 1.2rem;
    margin-bottom: 2rem;
    width: 100%;
  }

  .gallery-search-box {
    width: 100%;
  }

  .gallery-filter-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    justify-content: flex-start;
    padding: 0.4rem 0.2rem 0.8rem 0.2rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .gallery-filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .filter-tab {
    flex-shrink: 0;
    padding: 0.5rem 1.1rem;
    font-size: 0.72rem;
  }

  .masonry-gallery {
    column-count: 2;
    column-gap: 0.8rem;
  }

  .photo-card {
    margin-bottom: 0.8rem;
  }

  .photo-overlay {
    padding: 1rem 0.8rem;
  }

  .photo-title {
    font-size: 0.95rem;
  }

  /* Fullscreen Lightbox */
  #lightbox {
    padding: 0.8rem;
  }

  .lightbox-content {
    max-height: 95vh;
    width: 100%;
  }

  .lightbox-media-box {
    max-height: 55vh;
    width: 100%;
  }

  .lightbox-media-box img {
    max-height: 55vh;
    max-width: 95vw;
  }

  .lightbox-nav-btn {
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
  }

  .lightbox-prev-btn { left: 0.5rem; }
  .lightbox-next-btn { right: 0.5rem; }
  .lightbox-close-btn { top: 0.5rem; right: 0.5rem; width: 44px; height: 44px; }

  /* Slideshow */
  .slideshow-theater {
    height: clamp(280px, 45vh, 420px);
  }

  .slideshow-caption-title {
    font-size: 1.2rem;
  }

  .slideshow-caption-desc {
    font-size: 0.85rem;
  }

  /* Inside Jokes & Open When */
  .jokes-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .open-when-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  /* Personal Letter & Envelope */
  .envelope-card {
    padding: 2.2rem 1.5rem;
  }

  .letter-paper {
    padding: 2rem 1.4rem;
  }

  .letter-paper-header {
    font-size: 1.4rem;
  }

  .letter-paper-body {
    font-size: 0.95rem;
    line-height: 1.8;
  }

  .letter-paper-signature {
    font-size: 1.8rem;
  }

  /* Birthday Cake */
  .cake-svg-wrap {
    width: 200px;
    height: 200px;
  }

  /* Polaroid Wall */
  .polaroid-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.4rem;
  }

  .polaroid-caption {
    font-size: 1.2rem;
  }

  /* Final Scene */
  #final-scene-section {
    padding: 6rem 1.2rem 5rem 1.2rem;
  }

  .final-title-grand {
    font-size: clamp(2.4rem, 8vw, 4rem);
  }

  .final-message-box {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
  }

  /* Footer */
  .footer-actions {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    margin: 0 auto 2.5rem auto;
  }

  .footer-actions .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

/* Ultra Small Mobile Screens (<= 480px) */
@media (max-width: 480px) {
  .masonry-gallery {
    column-count: 1;
  }

  .polaroid-grid {
    grid-template-columns: 1fr;
  }

  .hero-title-name {
    font-size: clamp(2.2rem, 11vw, 3.4rem);
  }

  .section-title {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  .section-subtitle {
    font-size: 0.9rem;
  }

  .luxury-modal-content {
    padding: 2rem 1.2rem;
    width: 94vw;
  }
}
