/* =============================================================================
   GLOBAL.CSS — Master Design Token System
   Academic Portfolio · Apple-Aesthetic Design Language
   =============================================================================
   Table of Contents:
   1.  Custom Properties (Design Tokens)
   2.  Dark Mode Overrides
   3.  CSS Reset & Base
   4.  Typography Scale
   5.  Global Layout Utilities
   6.  Navigation Bar — Glassmorphism
   7.  Navigation Links & Active States
   8.  Mobile Navigation (Hamburger)
   9.  Page Transition Shell
   10. Scrollbar Styling
   11. Reduced-Motion Accessibility
   ============================================================================= */


/* ─────────────────────────────────────────────────────────────────────────────
   1. DESIGN TOKENS  (Light Mode — Default)
   ───────────────────────────────────────────────────────────────────────────── */

:root {
  /* ── Accent ── */
  /* Single academic blue; cards and surfaces stay neutral. */
  --accent: #0A66C2;
  --accent-hover: #084F96;
  --accent-subtle: rgba(10, 102, 194, 0.08);
  /* Capsule / tag background   */
  --accent-glow: rgba(10, 102, 194, 0.25);
  /* Focus ring                 */

  /* ── Canvas & Surfaces ── */
  --bg-canvas: #FFFFFF;
  /* Page background                  */
  --bg-card: #F5F5F7;
  /* Elevated card surface            */
  --bg-card-hover: #EBEBED;
  /* Card hover lift                  */
  --bg-nav: rgba(255, 255, 255, 0.50);
  /* Nav glass fill (light)  */

  /* ── Typography ── */
  --text-primary: #1D1D1F;
  /* Heading / body copy              */
  --text-secondary: #6E6E73;
  /* Supporting / meta text           */
  --text-tertiary: #AEAEB2;
  /* Placeholder / disabled           */
  --text-inverted: #FFFFFF;
  /* On dark surfaces                 */

  /* ── Borders & Dividers ── */
  --border: rgba(0, 0, 0, 0.08);
  /* Subtle stroke               */
  --border-strong: rgba(0, 0, 0, 0.14);
  /* Visible dividers             */
  --border-nav: rgba(0, 0, 0, 0.06);
  /* Nav bottom hairline          */

  /* ── Shadows ── */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.10), 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-nav: 0 1px 0 var(--border-nav), 0 4px 24px rgba(0, 0, 0, 0.06);

  /* ── Typography Stack ── */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', Consolas, monospace;

  /* ── Type Scale (fluid: clamp(min, preferred, max)) ── */
  --fs-xs: clamp(0.6875rem, 0.66rem + 0.14vw, 0.75rem);
  /* 11–12px   */
  --fs-sm: clamp(0.8125rem, 0.79rem + 0.14vw, 0.875rem);
  /* 13–14px   */
  --fs-base: clamp(0.9375rem, 0.91rem + 0.17vw, 1rem);
  /* 15–16px   */
  --fs-md: clamp(1.0625rem, 1.03rem + 0.20vw, 1.125rem);
  /* 17–18px   */
  --fs-lg: clamp(1.1875rem, 1.10rem + 0.45vw, 1.375rem);
  /* 19–22px   */
  --fs-xl: clamp(1.375rem, 1.20rem + 0.90vw, 1.75rem);
  /* 22–28px   */
  --fs-2xl: clamp(1.75rem, 1.40rem + 1.75vw, 2.5rem);
  /* 28–40px   */
  --fs-3xl: clamp(2.25rem, 1.70rem + 2.75vw, 3.5rem);
  /* 36–56px   */
  --fs-4xl: clamp(2.75rem, 2.00rem + 3.75vw, 4.5rem);
  /* 44–72px   */

  /* ── Font Weights ── */
  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* ── Line Heights ── */
  --lh-tight: 1.15;
  --lh-snug: 1.3;
  --lh-base: 1.6;
  --lh-relaxed: 1.75;

  /* ── Letter Spacing ── */
  --ls-tight: -0.025em;
  --ls-snug: -0.015em;
  --ls-base: 0em;
  --ls-wide: 0.02em;
  --ls-wider: 0.06em;
  --ls-widest: 0.12em;

  /* ── Spacing Scale ── */
  --space-1: 0.25rem;
  /*  4px */
  --space-2: 0.5rem;
  /*  8px */
  --space-3: 0.75rem;
  /* 12px */
  --space-4: 1rem;
  /* 16px */
  --space-5: 1.25rem;
  /* 20px */
  --space-6: 1.5rem;
  /* 24px */
  --space-8: 2rem;
  /* 32px */
  --space-10: 2.5rem;
  /* 40px */
  --space-12: 3rem;
  /* 48px */
  --space-16: 4rem;
  /* 64px */
  --space-20: 5rem;
  /* 80px */
  --space-24: 6rem;
  /* 96px */

  /* ── Border Radius ── */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-pill: 999px;
  --radius-card: 24px;
  /* Every card on every page */

  /* ── Z-Index Scale ── */
  --z-base: 0;
  --z-raised: 10;
  --z-sticky: 100;
  --z-overlay: 200;
  --z-modal: 300;
  --z-toast: 400;

  /* ── Layout ── */
  --nav-height: 60px;
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --container-2xl: 1400px;

  /* ── Transitions — Physical Inertia Easing ── */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  /* Primary: spring feel  */
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  /* Smooth bidirectional  */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Overshoot spring      */

  --transition-fast: all 0.15s var(--ease-out-expo);
  --transition-base: all 0.3s var(--ease-out-expo);
  --transition-slow: all 0.6s var(--ease-out-expo);
  /* Main fluid transition */
  --transition-color: color 0.2s var(--ease-out-expo), background-color 0.2s var(--ease-out-expo), opacity 0.2s var(--ease-out-expo);
}


/* ─────────────────────────────────────────────────────────────────────────────
   2. DARK MODE OVERRIDES  (prefers-color-scheme + [data-theme="dark"])
   ───────────────────────────────────────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
  :root {
    --color-scheme: dark;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* Canvas & Surfaces */
    --bg-canvas: #000000;
    --bg-card: #1D1D1F;
    --bg-card-hover: #2A2A2D;
    --bg-nav: rgba(0, 0, 0, 0.50);

    /* Typography */
    --text-primary: #F5F5F7;
    --text-secondary: #86868B;
    --text-tertiary: #48484A;
    --text-inverted: #1D1D1F;

    /* Borders */
    --border: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.18);
    --border-nav: rgba(255, 255, 255, 0.08);

    /* Shadows — deeper on dark */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.30), 0 1px 2px rgba(0, 0, 0, 0.20);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.40), 0 2px 6px rgba(0, 0, 0, 0.20);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.50), 0 4px 16px rgba(0, 0, 0, 0.30);
    --shadow-nav: 0 1px 0 var(--border-nav), 0 4px 24px rgba(0, 0, 0, 0.40);

    /* Accent on dark */
    --accent: #4C9AFF;
    --accent-hover: #79B3FF;
    --accent-subtle: rgba(76, 154, 255, 0.14);
    --accent-glow: rgba(76, 154, 255, 0.30);
  }
}

/* Explicit dark theme override via JS toggle */
[data-theme="dark"] {
  --bg-canvas: #000000;
  --bg-card: #1D1D1F;
  --bg-card-hover: #2A2A2D;
  --bg-nav: rgba(0, 0, 0, 0.50);
  --text-primary: #F5F5F7;
  --text-secondary: #86868B;
  --text-tertiary: #48484A;
  --text-inverted: #1D1D1F;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.18);
  --border-nav: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.30), 0 1px 2px rgba(0, 0, 0, 0.20);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.40), 0 2px 6px rgba(0, 0, 0, 0.20);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.50), 0 4px 16px rgba(0, 0, 0, 0.30);
  --shadow-nav: 0 1px 0 var(--border-nav), 0 4px 24px rgba(0, 0, 0, 0.40);
  --accent: #4C9AFF;
  --accent-hover: #79B3FF;
  --accent-subtle: rgba(76, 154, 255, 0.14);
  --accent-glow: rgba(76, 154, 255, 0.30);
}

[data-theme="light"] {
  --bg-canvas: #FFFFFF;
  --bg-card: #F5F5F7;
  --bg-card-hover: #EBEBED;
  --bg-nav: rgba(255, 255, 255, 0.50);
  --text-primary: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-tertiary: #AEAEB2;
  --text-inverted: #FFFFFF;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --border-nav: rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.10), 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-nav: 0 1px 0 var(--border-nav), 0 4px 24px rgba(0, 0, 0, 0.06);
  --accent: #0A66C2;
  --accent-hover: #084F96;
  --accent-subtle: rgba(10, 102, 194, 0.08);
  --accent-glow: rgba(10, 102, 194, 0.25);
}


/* ─────────────────────────────────────────────────────────────────────────────
   3. CSS RESET & BASE
   ───────────────────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  color-scheme: light dark;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-base);
  color: var(--text-primary);
  background-color: var(--bg-canvas);
  transition: background-color 0.4s var(--ease-out-expo),
    color 0.4s var(--ease-out-expo);
  overflow-x: hidden;
}

/* Padding to account for fixed nav height */
body {
  padding-top: var(--nav-height);
}

img,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

ul,
ol {
  list-style: none;
}

/* ─────────────────────────────────────────────────────────────────────────────
   4. TYPOGRAPHY SCALE
   ───────────────────────────────────────────────────────────────────────────── */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-snug);
  color: var(--text-primary);
}

h1 {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-tight);
}

h2 {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-tight);
}

h3 {
  font-size: var(--fs-2xl);
}

h4 {
  font-size: var(--fs-xl);
}

h5 {
  font-size: var(--fs-lg);
}

h6 {
  font-size: var(--fs-md);
}

p {
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
}

/* Section label — small uppercase eyebrow text */
.eyebrow {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--accent);
}

/* Large display text for hero sections */
.display {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}

/* Gradient text utility */
.text-gradient {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-accent {
  color: var(--accent);
}


/* ─────────────────────────────────────────────────────────────────────────────
   5. LAYOUT UTILITIES
   ───────────────────────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-10);
  }
}

@media (min-width: 1200px) {
  .container {
    padding: 0 var(--space-12);
  }
}

/* Section spacing */
.section {
  padding: var(--space-20) 0;
}

@media (min-width: 768px) {
  .section {
    padding: var(--space-24) 0;
  }
}

/* Flex utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-gap-2 {
  gap: var(--space-2);
}

.flex-gap-4 {
  gap: var(--space-4);
}

.flex-gap-6 {
  gap: var(--space-6);
}

/* Card base */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-8);
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

/* Visually hidden (accessibility) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ─────────────────────────────────────────────────────────────────────────────
   6. NAVIGATION BAR — Glassmorphism
   ───────────────────────────────────────────────────────────────────────────── */

.site-nav {
  /* Fixed to top, full width */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  height: var(--nav-height);

  /* Glassmorphism fill */
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  /* Hairline border + soft shadow */
  border-bottom: 1px solid var(--border-nav);
  box-shadow: var(--shadow-nav);

  /* Smooth theme transitions */
  transition: background 0.4s var(--ease-out-expo),
    border-color 0.4s var(--ease-out-expo),
    box-shadow 0.4s var(--ease-out-expo);
}

/* Nav becomes more opaque as user scrolls */
.site-nav.scrolled {
  background: var(--bg-nav);
  box-shadow: var(--shadow-md);
}

/* Inner layout */
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

@media (min-width: 1024px) {
  .nav-inner {
    padding: 0 var(--space-10);
  }
}

/* ── Brand / Logo mark ── */
.nav-logo {
  display: flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.3s ease;
}

.nav-logo:hover {
  opacity: 0.8;
}

.logo-img {
  height: 32px;
  width: auto;
  display: block;
}

/* Light mode (default) */
.logo-white {
  display: none;
}

/* Dark mode overrides */
[data-theme="dark"] .logo-black {
  display: none;
}

[data-theme="dark"] .logo-white {
  display: block;
}

.nav-brand-title {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  transition: var(--transition-color);
  white-space: nowrap;
}


/* ─────────────────────────────────────────────────────────────────────────────
   7. NAVIGATION LINKS & ACTIVE STATES
   ───────────────────────────────────────────────────────────────────────────── */

/* Desktop nav list */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;

  /* Smooth opacity + color transition */
  transition: color 0.25s var(--ease-out-expo),
    background-color 0.25s var(--ease-out-expo),
    opacity 0.25s var(--ease-out-expo);
}

/* Hover — fade up to full visibility */
.nav-link:hover {
  color: var(--text-primary);
  background-color: var(--border);
}

/* Active / current page — neutral capsule */
.nav-link.active,
.nav-link[aria-current="page"] {
  color: var(--accent);
  background-color: var(--accent-subtle);
  font-weight: var(--fw-semibold);
}

.nav-link.active:hover,
.nav-link[aria-current="page"]:hover {
  background-color: var(--accent-subtle);
  color: var(--accent-hover);
}

/* Dot-indicator variant (beneath the link) */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 4px;
  height: 4px;
  border-radius: var(--radius-pill);
  background-color: var(--accent);
  transition: transform 0.3s var(--ease-out-expo),
    opacity 0.3s var(--ease-out-expo);
  opacity: 0;
}

.nav-link.active::after,
.nav-link[aria-current="page"]::after {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

/* ── Nav right controls (theme toggle + mobile trigger) ── */
.nav-controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* Theme toggle button */
.btn-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border: 1px solid var(--border);
  transition: var(--transition-base);
}

.btn-theme-toggle:hover {
  color: var(--text-primary);
  background-color: var(--bg-card);
  border-color: var(--border-strong);
}

.btn-theme-toggle svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.5s var(--ease-spring);
}

.btn-theme-toggle:hover svg {
  transform: rotate(15deg);
}

/* Icon visibility toggling */
.icon-sun {
  display: none;
}

.icon-moon {
  display: block;
}

[data-theme="dark"] .icon-sun {
  display: block;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun {
    display: block;
  }

  :root:not([data-theme="light"]) .icon-moon {
    display: none;
  }
}


/* ─────────────────────────────────────────────────────────────────────────────
   8. MOBILE NAVIGATION (hamburger + off-canvas drawer)
   ───────────────────────────────────────────────────────────────────────────── */

/* Show desktop nav links only on wide screens */
.nav-links-desktop {
  display: none;
}

@media (min-width: 768px) {
  .nav-links-desktop {
    display: flex;
  }
}

/* Hamburger button */
.btn-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  transition: var(--transition-base);
}

.btn-menu:hover {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border-strong);
}

.btn-menu svg {
  width: 20px;
  height: 20px;
}

/* Hide hamburger on desktop */
@media (min-width: 768px) {
  .btn-menu {
    display: none;
  }
}

/* Mobile drawer overlay */
.nav-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: calc(var(--z-sticky) - 1);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-out-expo),
    visibility 0.35s var(--ease-out-expo);
  backdrop-filter: blur(2px);
}

.nav-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Mobile drawer panel */
.nav-drawer {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  padding: var(--space-4) var(--space-6);
  box-shadow: var(--shadow-lg);

  /* Slide-down animation */
  transform: translateY(-110%);
  opacity: 0;
  transition: transform 0.45s var(--ease-out-expo),
    opacity 0.30s var(--ease-out-expo),
    background 0.4s var(--ease-out-expo);
}

.nav-drawer.open {
  transform: translateY(0);
  opacity: 1;
}

/* Mobile drawer link list */
.nav-drawer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2) 0;
}

.nav-drawer-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-base);
}

.nav-drawer-link:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-drawer-link.active,
.nav-drawer-link[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-subtle);
  font-weight: var(--fw-semibold);
}

.nav-drawer-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-drawer-link.active svg,
.nav-drawer-link[aria-current="page"] svg {
  opacity: 1;
}

.nav-drawer-divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-3) 0;
}


/* ─────────────────────────────────────────────────────────────────────────────
   9. PAGE TRANSITION SHELL
   ───────────────────────────────────────────────────────────────────────────── */

.page-wrapper {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease-out-expo),
    transform 0.5s var(--ease-out-expo);
}

.page-wrapper.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Scroll Reveal Classes ── */
.will-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
  will-change: opacity, transform;
}

.will-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}


/* ─────────────────────────────────────────────────────────────────────────────
   10. SCROLLBAR STYLING
   ───────────────────────────────────────────────────────────────────────────── */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}


/* ─────────────────────────────────────────────────────────────────────────────
   11. REDUCED-MOTION ACCESSIBILITY
   ───────────────────────────────────────────────────────────────────────────── */

@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;
  }

  .page-wrapper {
    opacity: 1;
    transform: none;
  }

  .will-reveal,
  .anim-element {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}