/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  /*Dark Pallete */
  /* Palette */
  --bg: #0c051d;
  --glow-purple: #7a3cff;
  --mint: #d9fee1;
  --glow-pink: #ff2e93;
  --accent: #ff6bc1;
  --text: #f7eeff; /* soft off-white for main text */

  /* Palette */
  --cream: #f6f2ff;
  --lavender: #bea0ff;
  --mint: #d9fee1;
  --pink: #ffd5f2;
  --navy: #5b21d4;
  --ink: #1b1033; /* "dark purple almost black" for everything else */

  /* Type */
  --font-pixel: "Geist Pixel", sans-serif;
  --font-sans: "Inter", system-ui, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 4.5rem);

  /* How far the greeting + role sit from the left edge (raise to push toward center) */
  --text-inset: clamp(0rem, 6vw, 6rem);

  /* 0 = dark intro backdrop, 1 = light mesh. hero.js fades it in at the bubble pop */
  --mesh: 0;

  /* nav icon (css/nav.css) */
  --nav-size: 48px;
  --nav-gap: clamp(12px, 2vw, 24px);
}

/* ==========================================================================
   Base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  /* no scroll-behavior: smooth — it fights ScrollTrigger's refresh (which jumps
     the scroll position to measure pins) and breaks the scrubbed hero */
  /* body's overflow-x alone doesn't stop sideways panning on phones */
  overflow-x: clip;
}
/* reduced motion: CSS transitions/animations finish instantly (hover lifts, fades, smooth scroll).
   GSAP animations are handled separately in each js file. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ==========================================================================
   Page backdrop
   One fixed layer behind every section, so there are no seams between them.
   Sizes use vmax so the blobs fill big monitors as well as phones.
   ========================================================================== */
body::before,
.backdrop {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100lvh; /* tallest mobile viewport, no gap when the address bar hides */
  z-index: -1;
  pointer-events: none;
}

/* dark intro: soft glows so the hero isn't flat */
body::before {
  background:
    radial-gradient(55vmax 45vmax at 15% 20%, rgb(122 60 255 / 0.35), transparent 70%),
    radial-gradient(50vmax 40vmax at 88% 30%, rgba(178, 46, 255, 0.22), transparent 70%),
    radial-gradient(60vmax 45vmax at 55% 105%, rgba(60, 105, 255, 0.28), transparent 70%),
    var(--bg);
}

/* light mesh used by every section after the pop.
   Each blob is its own element so js/backdrop.js can drift them at different speeds. */
.backdrop {
  opacity: var(--mesh);
  background: var(--cream);
  overflow: hidden;
}
.blob {
  position: absolute;
  /* --x/--y = center, --rx/--ry = radius */
  left: calc(var(--x) - var(--rx));
  top: calc(var(--y) - var(--ry));
  width: calc(var(--rx) * 2);
  height: calc(var(--ry) * 2);
  background: radial-gradient(closest-side, var(--c), transparent 70%);
  will-change: transform;
}
.blob--1 { --x: 18%; --y: 20%; --rx: 48vmax; --ry: 40vmax; --c: rgb(160 120 255 / 0.7); }
.blob--2 { --x: 85%; --y: 18%; --rx: 44vmax; --ry: 36vmax; --c: rgb(130 110 255 / 0.55); }
.blob--3 { --x: 50%; --y: 88%; --rx: 46vmax; --ry: 38vmax; --c: rgb(255 110 195 / 0.55); }
.blob--4 { --x: 76%; --y: 66%; --rx: 38vmax; --ry: 30vmax; --c: rgb(190 255 215 / 0.85); }
.blob--5 { --x: 8%;  --y: 92%; --rx: 36vmax; --ry: 30vmax; --c: rgb(255 150 215 / 0.45); }

h1,
p {
  margin: 0;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}

.defs {
  position: absolute;
}

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 4px;
  border-radius: 4px;
}
/* ==========================================================================
  Global Styles 
  ==========================================================================*/
.section__title {
  position: relative;
  z-index: 1;
  padding-left: var(--text-inset); /* lines up with the hero greeting */
  font-family: var(--font-pixel);
  font-weight: 400;
  color: var(--ink);
  font-size: clamp(4.5rem, 14vw, 13rem);
  line-height: 0.95;
  margin-bottom: clamp(1rem, 3vw, 2.5rem);
}

.glass-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 10px 5px rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

.glass-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.glass-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.8),
    transparent,
    rgba(255, 255, 255, 0.3)
  );
}


/* ---- Scroll cue ---- */
.scroll-cue {
  position: absolute;
  inset-inline: 0;
  margin-inline: auto;
  width: 56px;
  height: 90px;
  bottom: clamp(1rem, 4vh, 2.25rem);
  display: block;
  z-index: 4;
}
.scroll-cue__gems {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  isolation: isolate; /* keeps the glow behind the gems */
}

/* Soft glow behind the gems, faded in on hover / keyboard focus */
.scroll-cue__gems::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -40% -60%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(215, 202, 241, 0.55), rgba(215, 202, 241, 0));
  filter: blur(6px);
  opacity: 0;
  transform: scale(0.85);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
  pointer-events: none;
}

.scroll-cue:hover .scroll-cue__gems::before,
.scroll-cue:focus-visible .scroll-cue__gems::before {
  opacity: 1;
  transform: scale(1);
}

.gem {
  position: absolute;
  left: 0;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 10px 8px rgba(4, 42, 63, 0.18));
}

.gem--lavender {
  top: 0;
}
.gem--pink {
  top: 38px;
}


/* ==========================================================================
   Hidden-until-animated states (only when JS + GSAP are running)
   ========================================================================== */
.js .photo,
.js .role,
.js .scroll-cue {
  visibility: hidden;
}

/* Every role face after the first starts flipped away; hero.js flips them in */
.js .role__face:not(:first-child) {
  transform: rotateX(90deg);
}

/* ==========================================================================
   Small screens
   ========================================================================== */
@media (max-width: 700px) {
  /* 4.5rem minimum made "Experience" wider than a phone */
  .section__title {
    font-size: clamp(2.75rem, 14vw, 4.5rem);
  }
}
