/* ==========================================================================
   NABIL PROFILE — DOODLE SKETCHBOOK STYLES
   Light-blue doodle identity. Interactive storybook experience.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Color palette — light-blue doodle identity */
  --bg-paper:      #f7faff;
  --bg-sky:        #e8f4fd;
  --ink:           #1a3a5c;
  --ink-muted:     #5a7fa0;
  --blue-primary:  #5ba4d4;
  --blue-bright:   #3b8ec8;
  --blue-pale:     rgba(91, 164, 212, 0.12);
  --blue-dim:      rgba(91, 164, 212, 0.06);
  --navy:          #1e3a5f;
  --white:         #ffffff;

  /* Typography */
  --font-heading:  'Literata', Georgia, serif;
  --font-mono:     'DM Mono', 'Courier New', monospace;
  --font-hand:     'Caveat', cursive;

  /* Easing */
  --ease-expo:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth:   cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: none;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-sky);
  color: var(--ink);
  font-family: var(--font-heading);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.9s ease;
}

/* Page entrance fade */
body {
  animation: pageIn 0.7s var(--ease-expo) both;
}

@keyframes pageIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

::selection {
  background: var(--blue-primary);
  color: var(--white);
}

/* --------------------------------------------------------------------------
   3. SVG DEFS ELEMENT (hidden, zero-size)
   -------------------------------------------------------------------------- */
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   4. PAPER TEXTURE OVERLAY
   -------------------------------------------------------------------------- */
.paper-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  opacity: 0.028;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.75" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)"/></svg>');
}

/* --------------------------------------------------------------------------
   5. CUSTOM CURSOR
   -------------------------------------------------------------------------- */
.cursor-dot {
  position: fixed;
  width: 5px;
  height: 5px;
  background: var(--blue-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  will-change: transform;
  box-shadow: 0 0 8px rgba(91, 164, 212, 0.8);
}

.cursor-ring {
  position: fixed;
  width: 30px;
  height: 30px;
  border: 1.5px solid rgba(91, 164, 212, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  will-change: transform;
  transition:
    width 0.25s var(--ease-expo),
    height 0.25s var(--ease-expo),
    background 0.25s ease,
    border-color 0.25s ease;
}

.cursor-ring.cursor-hover {
  width: 52px;
  height: 52px;
  background: rgba(91, 164, 212, 0.08);
  border-color: transparent;
}

/* --------------------------------------------------------------------------
   6. NAVIGATION
   -------------------------------------------------------------------------- */
.profile-nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.6rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: background 0.4s ease, padding 0.3s ease, border-color 0.4s ease;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.profile-nav.scrolled {
  background: rgba(247, 250, 255, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(91, 164, 212, 0.18);
}

.back-link {
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.back-link:hover {
  color: var(--navy);
  transform: translateX(-4px);
}

.back-arrow-svg {
  flex-shrink: 0;
}

.nav-id {
  color: var(--blue-bright);
  font-family: var(--font-hand);
  font-size: 1rem;
  letter-spacing: 1px;
  text-transform: none;
}

/* --------------------------------------------------------------------------
   7. SCROLL PROGRESS BAR (Horizon Hero inspired)
   -------------------------------------------------------------------------- */
.scroll-bar-wrap {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-hand);
  font-size: 1rem;
  color: var(--ink-muted);
  opacity: 0;
  transition: transform 0.5s var(--ease-expo), opacity 0.4s ease;
  white-space: nowrap;
  pointer-events: none;
}

.scroll-bar-wrap.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.scroll-bar-track {
  width: 120px;
  height: 2px;
  background: rgba(91, 164, 212, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.scroll-bar-fill {
  height: 100%;
  background: var(--blue-primary);
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

.scroll-bar-counter {
  color: var(--blue-bright);
  font-size: 1rem;
  min-width: 3.5rem;
  text-align: right;
}

/* --------------------------------------------------------------------------
   8. PARALLAX DOODLE LAYER
   -------------------------------------------------------------------------- */
.doodle-parallax {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.doodle-layer {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.dp-el {
  position: absolute;
  left: var(--dx);
  top: var(--dy);
}

/* Float animations for doodle elements */
.dp-cloud {
  animation: floatCloud 8s ease-in-out infinite;
}
.dp-cloud.dp-cloud--sm {
  animation: floatCloud 11s ease-in-out infinite reverse;
}
.dp-star {
  animation: spinStar 20s linear infinite;
}
.dp-star.dp-star--sm {
  animation: spinStar 14s linear infinite reverse;
}
.dp-dots {
  animation: floatDots 7s ease-in-out infinite alternate;
}
.dp-squiggle {
  animation: floatDots 9s ease-in-out infinite alternate-reverse;
}

@keyframes floatCloud {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}
@keyframes spinStar {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes floatDots {
  from { transform: translateY(0); }
  to   { transform: translateY(-8px); }
}

/* --------------------------------------------------------------------------
   9. SECTION LAYOUT
   -------------------------------------------------------------------------- */
.fullscreen-section {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 8rem 8%;
  z-index: 2;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--blue-bright);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 1.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.section-label::before {
  content: '';
  display: none;
  width: 1.4rem;
  height: 1px;
  background: var(--blue-primary);
  opacity: 0.55;
  flex-shrink: 0;
}

.absolute-label {
  position: absolute;
  top: 2rem;
  left: 8%;
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   10. DOODLE ANNOTATIONS (Caveat font)
   -------------------------------------------------------------------------- */
.doodle-annot {
  position: absolute;
  pointer-events: none;
}

.annot-text {
  font-family: var(--font-hand);
  font-size: 1rem;
  color: var(--blue-primary);
  line-height: 1.3;
  display: block;
}

.annot-arrow {
  display: block;
  margin-bottom: 0.2rem;
}

.annot-arrow--down {
  margin-bottom: 0;
  margin-top: 0.2rem;
}

/* Annotation positions */
.hero-annot {
  top: 12rem;
  left: 6%;
}

.story-annot {
  bottom: 10rem;
  right: 8%;
  text-align: right;
}

.story-annot .annot-text { color: var(--ink-muted); }

.marginalia {
  right: -2rem;
  top: 50%;
  transform: translateY(-50%);
  border-left: 1px dashed rgba(91, 164, 212, 0.3);
  padding-left: 0.8rem;
  max-width: 120px;
}

.marginalia .annot-text {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.dvd-annot {
  top: 2rem;
  right: 8%;
}

/* --------------------------------------------------------------------------
   11. HERO SECTION
   -------------------------------------------------------------------------- */
.hero-section {
  flex-direction: column;
  text-align: center;
  overflow: hidden;
}

.hero-ambient {
  position: absolute;
  width: 70vw;
  height: 70vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle, rgba(91, 164, 212, 0.18) 0%, transparent 65%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  animation: ambientPulse 10s ease-in-out infinite alternate;
}

@keyframes ambientPulse {
  from { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  to   { transform: translate(-50%, -50%) scale(1.12); opacity: 1; }
}

.hero-content {
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.hero-mono {
  font-family: var(--font-mono);
  color: var(--ink-muted);
  letter-spacing: 4px;
  font-size: 0.68rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   12. HERO TITLE — CHARACTER ANIMATION (Horizon Hero technique)
   -------------------------------------------------------------------------- */
.hero-title {
  font-size: clamp(5rem, 14vw, 11rem);
  line-height: 0.92;
  font-weight: 300;
  letter-spacing: -0.03em;
  color: var(--navy);
  font-family: var(--font-heading);
}

.hero-title .char {
  display: inline-block;
  animation: charReveal 0.7s var(--ease-expo) both;
  animation-delay: calc(var(--i) * 0.07s + 0.25s);
}

@keyframes charReveal {
  from {
    opacity: 0;
    transform: translateY(55px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-style: italic;
  color: var(--ink-muted);
  margin-top: 0.4rem;
}

/* Hero underline — draw-path SVG */
.hero-underline {
  width: clamp(160px, 30vw, 280px);
  height: 14px;
  margin-top: 0.2rem;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeUpIn 1s var(--ease-expo) 1.2s forwards;
}

.scroll-hint {
  font-family: var(--font-hand);
  font-size: 1rem;
  color: var(--ink-muted);
}

@keyframes fadeUpIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 0.7; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   13. DRAW-PATH SVG STROKE ANIMATION
   -------------------------------------------------------------------------- */
.draw-path path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 1.4s var(--ease-expo) var(--delay, 0.1s);
}

.draw-path.is-visible path {
  stroke-dashoffset: 0;
}

/* Email underline — triggered on hover via CSS only (not draw-path class) */
.email-underline {
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 12px;
  pointer-events: none;
  overflow: visible;
}

.email-underline path {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  transition: stroke-dashoffset 0.7s var(--ease-expo);
}

.contact-email:hover .email-underline path {
  stroke-dashoffset: 0;
}

/* --------------------------------------------------------------------------
   14. RULED NOTEBOOK BACKGROUND
   -------------------------------------------------------------------------- */
.ruled-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* --------------------------------------------------------------------------
   15. INTRO & STORY SECTIONS
   -------------------------------------------------------------------------- */
.intro-section,
.story-section {
  flex-direction: column;
}

.story-container {
  max-width: 1100px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.story-text {
  font-size: clamp(1.7rem, 3.2vw, 3.2rem);
  line-height: 1.4;
  font-weight: 300;
  color: var(--ink-muted);
}

.story-text strong {
  color: var(--navy);
  font-weight: 500;
}

.story-text .highlight {
  color: var(--navy);
  font-style: italic;
  position: relative;
  display: inline;
}

.story-text .highlight::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--blue-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s var(--ease-expo);
}

.story-text.is-visible .highlight::after {
  transform: scaleX(1);
  transition-delay: 0.5s;
}

/* code chip inside intro text */
.code-chip {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--blue-pale);
  border: 1px solid rgba(91, 164, 212, 0.25);
  border-radius: 5px;
  padding: 0.1em 0.5em;
  color: var(--blue-bright) !important;
  font-style: normal !important;
  display: inline-block;
}
.code-chip::after { display: none !important; }

/* Corner brackets for story section */
.corner-brk {
  position: absolute;
  width: 44px;
  height: 44px;
  pointer-events: none;
  z-index: 1;
}
.corner-brk--tl { top: 3rem; left: 6%; }
.corner-brk--br { bottom: 3rem; right: 6%; }

/* --------------------------------------------------------------------------
   16. SKILLS SECTION
   -------------------------------------------------------------------------- */
.skills-section {
  flex-direction: column;
}

.skills-container {
  width: 100%;
  max-width: 900px;
}

.skill-row {
  margin-bottom: 3.2rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.skill-name {
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.skill-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.skill-pct {
  color: var(--blue-bright);
  font-weight: 500;
  font-family: var(--font-hand);
  font-size: 1.1rem;
}

.skill-track {
  width: 100%;
  height: 3px;
  background: rgba(91, 164, 212, 0.15);
  border-radius: 3px;
  position: relative;
}

.skill-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-primary), var(--blue-bright));
  width: 0%;
  transition: width 1.8s var(--ease-expo);
  border-radius: 3px;
}

/* Glowing tip dot */
.skill-fill::after {
  content: '';
  position: absolute;
  top: -3px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue-bright);
  box-shadow: 0 0 8px rgba(59, 142, 200, 0.7);
  opacity: 0;
  transition: opacity 0.4s ease 1.4s;
}

.skill-fill[style*="width"]:not([style*="0%"])::after {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   17. MUSIC PLAYER — DOODLE SKETCHBOOK STYLE
   -------------------------------------------------------------------------- */
.song-section {
  flex-direction: column;
}

.song-showcase-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  z-index: 2;
  width: 100%;
  max-width: 820px;
}

/* Player card */
.audio-player-container {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1.5px solid rgba(91, 164, 212, 0.22);
  padding: 2.8rem;
  border-radius: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  width: 100%;
  position: relative;
  overflow: visible;
  box-shadow:
    0 12px 40px rgba(91, 164, 212, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.audio-player-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91, 164, 212, 0.3), transparent);
}

.audio-player-container.playing {
  border-color: rgba(91, 164, 212, 0.4);
  box-shadow:
    0 16px 50px rgba(91, 164, 212, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Album art wrapper */
.album-art-wrap {
  position: relative;
  width: 190px;
  height: 190px;
  flex-shrink: 0;
}

.album-doodle-ring {
  position: absolute;
  inset: -12px;
  width: calc(100% + 24px);
  height: calc(100% + 24px);
  pointer-events: none;
}

/* Vinyl disc */
.album-art {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.12),
    0 0 0 6px rgba(255, 255, 255, 0.5),
    0 0 0 7px rgba(91, 164, 212, 0.12);
  transition: box-shadow 0.5s ease;
  overflow: hidden;
}

.album-art.playing {
  box-shadow:
    0 16px 40px rgba(91, 164, 212, 0.25),
    0 0 0 6px rgba(255, 255, 255, 0.5),
    0 0 0 7px rgba(91, 164, 212, 0.25);
  animation: vinylSpin 8s linear infinite;
}

@keyframes vinylSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Freeze the spin mid-rotation when paused (only applies after .playing was set) */
.album-art.playing.paused-spin {
  animation-play-state: paused;
}


.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  mask-image: radial-gradient(circle at center, rgba(0,0,0,0.9) 28%, black 29%);
  -webkit-mask-image: radial-gradient(circle at center, rgba(0,0,0,0.9) 28%, black 29%);
}

/* Vinyl centre hole */
.album-art::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-paper);
  box-shadow: 0 0 0 2px rgba(91, 164, 212, 0.2);
  z-index: 2;
}

/* Song info */
.song-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.song-title {
  font-size: 2rem;
  font-weight: 400;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.song-artist {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.8rem;
}

/* Progress bar */
.progress-wrapper {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.time-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-muted);
  min-width: 2.8rem;
  flex-shrink: 0;
}
.time-label.time-end { text-align: right; }

.progress-track {
  flex: 1;
  height: 3px;
  background: rgba(91, 164, 212, 0.15);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
  overflow: visible;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-primary), var(--blue-bright));
  border-radius: 3px;
  width: 0%;
  position: relative;
  pointer-events: none;
  transition: width 0.1s linear;
}

.progress-thumb {
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--blue-primary);
  box-shadow: 0 0 6px rgba(91, 164, 212, 0.4);
  transition: transform 0.2s var(--ease-expo);
  pointer-events: none;
}

.progress-track:hover .progress-thumb {
  transform: translateY(-50%) scale(1);
}

/* Play controls */
.player-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1.5px solid var(--blue-primary);
  background: rgba(255, 255, 255, 0.8);
  color: var(--navy);
  font-size: 1rem;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
  flex-shrink: 0;
  position: relative;
}

.play-btn:hover {
  background: var(--blue-pale);
  box-shadow: 0 0 20px rgba(91, 164, 212, 0.3);
  transform: scale(1.06);
}

.play-btn:active { transform: scale(0.95); }

.play-icon,
.pause-icon {
  position: absolute;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.pause-icon { display: none; opacity: 0; }
.play-icon  { display: block; opacity: 1; }
.play-btn.is-playing .play-icon  { display: none; opacity: 0; }
.play-btn.is-playing .pause-icon { display: block; opacity: 1; }

/* Waveform equalizer */
.waveform {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 26px;
}

.bar {
  width: 3px;
  background: var(--blue-primary);
  height: 3px;
  border-radius: 2px;
  opacity: 0.4;
  transition: height 0.1s ease;
}

.playing .bar {
  opacity: 1;
  animation: eqWave 0.8s ease-in-out infinite alternate;
}

.bar:nth-child(1)  { animation-delay: 0.00s; }
.bar:nth-child(2)  { animation-delay: 0.07s; }
.bar:nth-child(3)  { animation-delay: 0.14s; }
.bar:nth-child(4)  { animation-delay: 0.21s; }
.bar:nth-child(5)  { animation-delay: 0.28s; }
.bar:nth-child(6)  { animation-delay: 0.35s; }
.bar:nth-child(7)  { animation-delay: 0.42s; }
.bar:nth-child(8)  { animation-delay: 0.28s; }
.bar:nth-child(9)  { animation-delay: 0.14s; }
.bar:nth-child(10) { animation-delay: 0.07s; }

@keyframes eqWave {
  from { height: 3px; }
  to   { height: 24px; }
}

/* Volume */
.volume-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
}

.volume-icon {
  font-size: 0.9rem;
  color: var(--ink-muted);
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 2px;
  border-radius: 2px;
  background: rgba(91, 164, 212, 0.2);
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue-primary);
  box-shadow: 0 0 5px rgba(91, 164, 212, 0.5);
  cursor: pointer;
}

.volume-slider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue-primary);
  border: none;
  cursor: pointer;
}

/* Song description box */
.song-description-box {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(91, 164, 212, 0.18);
  border-radius: 14px;
  padding: 1.8rem 2rem 1.8rem 2.4rem;
  width: 100%;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.desc-accent-line {
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 4px;
  height: 60%;
}

.song-description-box p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--ink-muted);
  font-style: italic;
  font-weight: 300;
}

/* --------------------------------------------------------------------------
   18. STICKY MINI-PLAYER
   -------------------------------------------------------------------------- */
.mini-player {
  position: fixed;
  bottom: 5.5rem;  /* lifted above the scroll progress bar */
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 998;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(91, 164, 212, 0.25);
  border-radius: 50px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.7rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  box-shadow: 0 8px 32px rgba(91, 164, 212, 0.15), 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.5s var(--ease-expo), opacity 0.4s ease;
  opacity: 0;
  white-space: nowrap;
  max-width: calc(100vw - 3rem);
}

.mini-player.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.mini-cover {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.mini-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.mini-title {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-artist {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--ink-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-play-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--blue-primary);
  background: transparent;
  color: var(--navy);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  cursor: none;
}

.mini-play-btn:hover {
  background: var(--blue-pale);
  box-shadow: 0 0 10px rgba(91, 164, 212, 0.3);
}

.mini-waveform {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 16px;
}

.mini-waveform .bar {
  width: 2px;
  height: 3px;
  background: var(--blue-primary);
  border-radius: 1px;
  opacity: 0.45;
}

.mini-waveform.playing .bar {
  opacity: 1;
  animation: eqWave 0.8s ease-in-out infinite alternate;
}

/* --------------------------------------------------------------------------
   19. LYRICS SECTION
   -------------------------------------------------------------------------- */
.lyrics-section {
  position: relative;
  overflow: hidden;
}

.lyrics-wrapper {
  height: 70vh;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  mask-image: linear-gradient(to bottom, transparent 0%, black 22%, black 78%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 22%, black 78%, transparent 100%);
  overflow: hidden;
}

.lyrics-container {
  position: absolute;
  top: 0;
  width: 100%;
  text-align: center;
  /* JS drives scroll via a pixel-only translateY to keep the active line centred */
  transform: translateY(0);
  transition: transform 0.65s cubic-bezier(0.25, 1, 0.5, 1);
  padding: 0 8%;
}

.lyric-line {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 3.5vw, 2.8rem);
  margin-bottom: 1.6rem;
  opacity: 0.08;
  color: var(--ink-muted);
  transition:
    opacity      0.6s cubic-bezier(0.22, 1, 0.36, 1),
    color        0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform    0.6s cubic-bezier(0.22, 1, 0.36, 1),
    filter       0.6s cubic-bezier(0.22, 1, 0.36, 1),
    text-shadow  0.5s ease;
  transform: scale(0.88);
  filter: blur(4px);
  cursor: default;
  font-weight: 300;
  line-height: 1.3;
}

.lyric-line.lyric-line--near {
  opacity: 0.3;
  filter: blur(1.5px);
  transform: scale(0.94);
  color: var(--ink);
}

.lyric-line.lyric-line--far {
  opacity: 0.14;
  filter: blur(3px);
  transform: scale(0.9);
}

.lyric-line.active {
  opacity: 1;
  transform: scale(1.05);
  filter: blur(0);
  color: var(--navy);
  font-weight: 400;
  text-shadow:
    0 0 20px rgba(91, 164, 212, 0.45),
    0 0 50px rgba(91, 164, 212, 0.18);
  animation: lyricPulse 2.5s ease-in-out infinite;
}

@keyframes lyricPulse {
  0%, 100% { text-shadow: 0 0 20px rgba(91, 164, 212, 0.4); }
  50%       { text-shadow: 0 0 40px rgba(91, 164, 212, 0.7), 0 0 70px rgba(91, 164, 212, 0.2); }
}

/* --------------------------------------------------------------------------
   20. DVD EASTER EGG
   -------------------------------------------------------------------------- */
.dvd-section {
  position: relative;
  overflow: hidden;
}

#dvd-logo {
  position: absolute;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--blue-primary);
  padding: 0.7rem 1.6rem;
  border: 2px solid var(--blue-primary);
  border-radius: 50px;
  text-shadow: 0 0 12px rgba(91, 164, 212, 0.6);
  box-shadow:
    inset 0 0 20px rgba(91, 164, 212, 0.1),
    0 0 16px rgba(91, 164, 212, 0.2);
  user-select: none;
  transition: color 0.3s ease, border-color 0.3s ease;
}

/* --------------------------------------------------------------------------
   21. QUOTE SECTION
   -------------------------------------------------------------------------- */
.quote-section {
  flex-direction: column;
  text-align: center;
  gap: 2rem;
}

.quote-mark {
  width: clamp(50px, 8vw, 80px);
  height: auto;
  opacity: 0.7;
}

.quote-mark--open {
  align-self: flex-start;
  transform: translateX(2rem);
}

.quote-mark--close {
  align-self: flex-end;
  transform: scaleX(-1) translateX(2rem);
}

.massive-quote {
  font-size: clamp(2rem, 4.5vw, 5rem);
  line-height: 1.2;
  font-weight: 300;
  font-style: italic;
  color: var(--navy);
  max-width: 1100px;
  letter-spacing: -0.01em;
}

/* Quote lines — scroll-driven animations (native for Chrome/Safari 26+) */
@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  .quote-line--left {
    display: inline-block;
    animation: slideInLeft linear both;
    animation-timeline: view();
    animation-range: entry 5% cover 45%;
  }
  .quote-line--right {
    display: inline-block;
    animation: slideInRight linear both;
    animation-timeline: view();
    animation-range: entry 15% cover 55%;
  }
  @keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to   { opacity: 1; transform: translateX(0); }
  }
  @keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to   { opacity: 1; transform: translateX(0); }
  }
}

/* Fallback for Firefox */
@supports not ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  .quote-line--left,
  .quote-line--right {
    display: inline-block;
    opacity: 0;
    transition: opacity 0.9s ease, transform 0.9s var(--ease-expo);
  }
  .quote-line--left  { transform: translateX(-50px); }
  .quote-line--right { transform: translateX(50px); transition-delay: 0.15s; }
  .quote-section.is-visible .quote-line--left,
  .quote-section.is-visible .quote-line--right {
    opacity: 1;
    transform: translateX(0);
  }
}

.quote-underline {
  width: clamp(200px, 50vw, 420px);
  height: 12px;
}

/* --------------------------------------------------------------------------
   22. GALLERY — POLAROID CARDS
   -------------------------------------------------------------------------- */
.gallery-section {
  flex-direction: column;
  gap: 3rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  width: 100%;
  max-width: 900px;
}

.polaroid {
  background: var(--white);
  border-radius: 4px;
  padding: 1rem 1rem 2.5rem;
  box-shadow:
    0 4px 20px rgba(91, 164, 212, 0.1),
    0 1px 4px rgba(0, 0, 0, 0.06);
  transition: transform 0.5s var(--ease-expo), box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.polaroid--left  { transform: rotate(-2.5deg); }
.polaroid--center { transform: rotate(0.5deg); }
.polaroid--right { transform: rotate(2deg); }

.polaroid:hover {
  transform: rotate(0deg) scale(1.03) translateY(-6px);
  box-shadow:
    0 12px 36px rgba(91, 164, 212, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.08);
}

.polaroid-img {
  background: var(--bg-sky);
  border-radius: 2px;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.polaroid-sketch {
  width: 80%;
  height: 80%;
}

.polaroid-caption {
  font-family: var(--font-hand);
  font-size: 0.9rem;
  color: var(--ink-muted);
  text-align: center;
  letter-spacing: 0.5px;
}

/* --------------------------------------------------------------------------
   23. CONTACT SECTION
   -------------------------------------------------------------------------- */
.contact-section {
  flex-direction: column;
  text-align: center;
  gap: 1.5rem;
}

/* Contact heading — smaller than hero title */
.contact-section .hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
}

.envelope-doodle {
  width: clamp(80px, 10vw, 120px);
  height: auto;
  opacity: 0.8;
}

.contact-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.contact-email {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  color: var(--blue-bright);
  text-decoration: none;
  padding: 0.8rem 2rem;
  border: 1.5px solid rgba(91, 164, 212, 0.3);
  border-radius: 50px;
  position: relative;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  letter-spacing: 0.5px;
  display: inline-block;
}

.contact-email:hover {
  border-color: var(--blue-primary);
  background: var(--blue-pale);
  box-shadow: 0 0 24px rgba(91, 164, 212, 0.2);
}

.footer-bottom {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-muted);
  letter-spacing: 2px;
  margin-top: 1.5rem;
}

/* --------------------------------------------------------------------------
   24. SCROLL REVEAL — NATIVE (Chrome 115+ / Safari 26+)
   -------------------------------------------------------------------------- */
@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  .reveal-up {
    /* animation shorthand MUST come before timeline/range overrides */
    animation: revealUp linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 38%;
  }

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

/* --------------------------------------------------------------------------
   25. SCROLL REVEAL — FALLBACK (Firefox, IntersectionObserver)
   -------------------------------------------------------------------------- */
@supports not ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  .reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition:
      opacity   0.9s var(--ease-expo) var(--delay, 0s),
      transform 0.9s var(--ease-expo) var(--delay, 0s);
  }
  .reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   26. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .audio-player-container {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 2rem;
    padding: 2rem;
  }
  .album-art-wrap { width: 160px; height: 160px; }
  .song-details { align-items: center; width: 100%; }
  .player-controls { justify-content: center; }
  .volume-row { justify-content: center; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .marginalia { display: none; }
}

@media (max-width: 600px) {
  .fullscreen-section { padding: 7rem 6%; }
  .cursor-dot, .cursor-ring { display: none; }
  * { cursor: auto; }
  .hero-title { font-size: clamp(3.8rem, 18vw, 6rem); }
  .story-text { font-size: clamp(1.4rem, 5vw, 2rem); }
  .song-title { font-size: 1.5rem; }
  .gallery-grid { grid-template-columns: 1fr; }
  .lyric-line { font-size: clamp(1.1rem, 5vw, 1.8rem); }
  .mini-player { padding: 0.55rem 1rem; gap: 0.7rem; }
  .quote-mark { width: 36px; }
  .corner-brk { display: none; }
  .scroll-bar-wrap { bottom: 1rem; }
  .scroll-bar-track { width: 80px; }
  .hero-annot { display: none; }
  .story-annot { display: none; }
}

@media (max-width: 480px) {
  .progress-wrapper { flex-wrap: nowrap; }
  .volume-slider { width: 80px; }
}

/* --------------------------------------------------------------------------
   27. REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  body { animation: none; }
  .reveal-up { opacity: 1 !important; transform: none !important; }
  .quote-line--left,
  .quote-line--right { opacity: 1 !important; transform: none !important; }
  .draw-path path { stroke-dashoffset: 0 !important; }
  .dp-cloud, .dp-star, .dp-dots, .dp-squiggle { animation: none !important; }
  .hero-title .char { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
}

/* --------------------------------------------------------------------------
   SVG Player Icons (play / pause / volume — replaces emoji)
   -------------------------------------------------------------------------- */
.play-icon,
.pause-icon {
  position: absolute;
  width: 22px;
  height: 22px;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.pause-icon { display: none; opacity: 0; }
.play-icon  { display: block; opacity: 1; }
.play-btn.is-playing .play-icon  { display: none; opacity: 0; }
.play-btn.is-playing .pause-icon { display: block; opacity: 1; }

.mini-icon {
  width: 16px;
  height: 16px;
  pointer-events: none;
  display: block;
}

/* ==========================================================================
   PUSHEEN FLOATING CATS — Hero section
   Organic float + squish/pinch effect (dicubit-cubit)
   ========================================================================== */

.pusheen-float {
  position: absolute;
  pointer-events: none;
  user-select: none;
  opacity: 0.88;
  z-index: 2;
  will-change: transform;
  image-rendering: auto;
}

@keyframes pusheenFloat1 {
  0%   { transform: translate(0px,   0px)  rotate(-4deg) scaleX(1.00) scaleY(1.00); }
  12%  { transform: translate(14px, -18px) rotate( 2deg) scaleX(0.91) scaleY(1.10); }
  25%  { transform: translate(22px, -8px)  rotate( 6deg) scaleX(1.08) scaleY(0.93); }
  38%  { transform: translate(10px,  12px) rotate( 1deg) scaleX(0.95) scaleY(1.06); }
  50%  { transform: translate(-8px,  18px) rotate(-5deg) scaleX(1.06) scaleY(0.94); }
  63%  { transform: translate(-18px,  4px) rotate(-8deg) scaleX(0.93) scaleY(1.08); }
  75%  { transform: translate(-10px,-14px) rotate(-3deg) scaleX(1.04) scaleY(0.96); }
  88%  { transform: translate(  6px,-20px) rotate( 3deg) scaleX(0.96) scaleY(1.05); }
  100% { transform: translate(0px,   0px)  rotate(-4deg) scaleX(1.00) scaleY(1.00); }
}

@keyframes pusheenFloat2 {
  0%   { transform: translate(0px,   0px)  rotate( 5deg) scaleX(1.00) scaleY(1.00); }
  10%  { transform: translate(-12px,-22px) rotate(-2deg) scaleX(1.09) scaleY(0.92); }
  22%  { transform: translate(-20px, -6px) rotate(-7deg) scaleX(0.92) scaleY(1.09); }
  35%  { transform: translate(-8px,  14px) rotate(-1deg) scaleX(1.05) scaleY(0.95); }
  48%  { transform: translate( 10px, 20px) rotate( 4deg) scaleX(0.94) scaleY(1.07); }
  60%  { transform: translate( 18px,  2px) rotate( 9deg) scaleX(1.08) scaleY(0.93); }
  72%  { transform: translate( 12px,-16px) rotate( 5deg) scaleX(0.96) scaleY(1.04); }
  86%  { transform: translate(-4px, -24px) rotate(-3deg) scaleX(1.03) scaleY(0.97); }
  100% { transform: translate(0px,   0px)  rotate( 5deg) scaleX(1.00) scaleY(1.00); }
}

@keyframes pusheenFloat3 {
  0%   { transform: translate( 0px,   0px) rotate(-6deg) scaleX(1.00) scaleY(1.00); }
  15%  { transform: translate( 18px, -12px) rotate( 1deg) scaleX(0.93) scaleY(1.08); }
  30%  { transform: translate( 8px,  -24px) rotate( 7deg) scaleX(1.07) scaleY(0.94); }
  45%  { transform: translate(-14px, -10px) rotate( 3deg) scaleX(0.97) scaleY(1.04); }
  60%  { transform: translate(-22px,   8px) rotate(-4deg) scaleX(1.05) scaleY(0.95); }
  75%  { transform: translate(-6px,   22px) rotate(-9deg) scaleX(0.91) scaleY(1.10); }
  90%  { transform: translate( 12px,  10px) rotate(-2deg) scaleX(1.06) scaleY(0.93); }
  100% { transform: translate( 0px,   0px) rotate(-6deg) scaleX(1.00) scaleY(1.00); }
}

@keyframes pusheenFloat4 {
  0%   { transform: translate(  0px,  0px) rotate( 8deg) scaleX(1.00) scaleY(1.00); }
  8%   { transform: translate( -8px,-16px) rotate( 3deg) scaleX(1.10) scaleY(0.91); }
  18%  { transform: translate(-16px, -4px) rotate(-2deg) scaleX(0.91) scaleY(1.10); }
  28%  { transform: translate(-6px,  12px) rotate(-6deg) scaleX(1.04) scaleY(0.96); }
  40%  { transform: translate(  8px, 18px) rotate(-1deg) scaleX(0.95) scaleY(1.06); }
  52%  { transform: translate( 16px,  6px) rotate( 5deg) scaleX(1.07) scaleY(0.93); }
  64%  { transform: translate(  6px,-10px) rotate( 9deg) scaleX(0.93) scaleY(1.08); }
  76%  { transform: translate(-10px,-18px) rotate( 6deg) scaleX(1.02) scaleY(0.98); }
  88%  { transform: translate( -4px,  4px) rotate( 2deg) scaleX(0.97) scaleY(1.03); }
  100% { transform: translate(  0px,  0px) rotate( 8deg) scaleX(1.00) scaleY(1.00); }
}

.pusheen-float--1 {
  width: 110px;
  top: calc(50% - 140px);
  left: calc(50% - 320px);
  animation: pusheenFloat1 6.8s ease-in-out infinite;
}

.pusheen-float--2 {
  width: 90px;
  top: calc(50% - 80px);
  left: calc(50% + 230px);
  animation: pusheenFloat2 8.2s ease-in-out infinite;
  animation-delay: -3.1s;
}

.pusheen-float--3 {
  width: 70px;
  top: calc(50% - 200px);
  left: calc(50% + 150px);
  animation: pusheenFloat3 7.4s ease-in-out infinite;
  animation-delay: -5.7s;
}

.pusheen-float--4 {
  width: 80px;
  top: calc(50% + 80px);
  left: calc(50% - 220px);
  animation: pusheenFloat4 9.1s ease-in-out infinite;
  animation-delay: -1.9s;
}

@media (max-width: 768px) {
  .pusheen-float--3,
  .pusheen-float--4 { display: none; }

  .pusheen-float--1 {
    width: 70px;
    top: calc(50% - 180px);
    left: calc(50% - 180px);
  }
  .pusheen-float--2 {
    width: 60px;
    top: calc(50% - 50px);
    left: calc(50% + 120px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pusheen-float { animation: none !important; }
}