/* ============================================
   🍎 iOS Glassmorphism Design Tokens
   Dark + Liquid Glass Light Theme
   ============================================ */

:root {
  /* ── Background ── */
  --bg-primary: #050510;
  --bg-secondary: #0f0520;
  --bg-tertiary: #061222;

  /* ── Glass ── */
  --glass-bg-1: rgba(255, 255, 255, 0.04);
  --glass-bg-2: rgba(255, 255, 255, 0.08);
  --glass-bg-3: rgba(255, 255, 255, 0.12);
  --glass-bg-4: rgba(255, 255, 255, 0.18);

  --glass-border-1: rgba(255, 255, 255, 0.08);
  --glass-border-2: rgba(255, 255, 255, 0.14);
  --glass-border-3: rgba(255, 255, 255, 0.22);
  --glass-border-4: rgba(255, 255, 255, 0.30);

  --glass-blur-1: blur(12px);
  --glass-blur-2: blur(20px);
  --glass-blur-3: blur(24px);
  --glass-blur-4: blur(30px);

  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --glass-shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --glass-shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);

  /* ── Text ── */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.75);
  --text-muted: rgba(255, 255, 255, 0.45);
  --text-accent: rgba(255, 255, 255, 0.6);

  /* ── Accents (iOS) ── */
  --accent-blue: #0A84FF;
  --accent-purple: #5E5CE6;
  --accent-pink: #BF5AF2;
  --accent-green: #30D158;
  --accent-orange: #FF9F0A;
  --accent-red: #FF453A;
  --accent-teal: #64D2FF;

  /* ── Gradients ── */
  --gradient-primary: linear-gradient(135deg, #0A84FF, #5E5CE6, #BF5AF2);
  --gradient-accent: linear-gradient(135deg, #0A84FF, #5E5CE6);
  --gradient-warm: linear-gradient(135deg, #FF9F0A, #FF453A);
  --gradient-cool: linear-gradient(135deg, #64D2FF, #0A84FF);
  --gradient-text: linear-gradient(135deg, #0A84FF 0%, #5E5CE6 50%, #BF5AF2 100%);
  --gradient-bg: linear-gradient(135deg, #050510 0%, #0f0520 50%, #061222 100%);

  /* ── Orb colors ── */
  --orb-1: rgba(10, 132, 255, 0.35);
  --orb-2: rgba(94, 92, 230, 0.35);
  --orb-3: rgba(191, 90, 242, 0.3);
  --orb-4: rgba(100, 210, 255, 0.2);

  /* ── Noise overlay ── */
  --noise-opacity: 0.015;

  /* ── Card highlights ── */
  --card-highlight: rgba(255, 255, 255, 0.15);
  --card-highlight-static: rgba(255, 255, 255, 0.12);

  /* ── Liquid glass tokens ── */
  --liquid-highlight-top: rgba(255, 255, 255, 0.12);
  --liquid-highlight-bottom: rgba(255, 255, 255, 0.03);
  --liquid-caustic: rgba(255, 255, 255, 0.25);
  --liquid-caustic-bright: rgba(255, 255, 255, 0.4);
  --liquid-surface-top: rgba(255, 255, 255, 0.06);

  /* ── Scrollbar ── */
  --scrollbar-thumb: rgba(255, 255, 255, 0.08);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.15);

  /* ── Avatar ── */
  --avatar-bg: linear-gradient(135deg, #0a1628, #1a0a2e);

  /* ── Project overlay ── */
  --project-overlay-bg: linear-gradient(to bottom, transparent 0%, rgba(5,5,16,0.4) 50%, rgba(5,5,16,0.85) 100%);

  /* ── Button glow ── */
  --btn-primary-shadow: 0 4px 20px rgba(10, 132, 255, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
  --btn-primary-shadow-hover: 0 8px 30px rgba(10, 132, 255, 0.5), inset 0 1px 0 rgba(255,255,255,0.2);

  /* ── Selection ── */
  --selection-bg: rgba(10, 132, 255, 0.3);

  /* ── Typography ── */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;

  --fs-display: clamp(2.5rem, 6vw, 4.5rem);
  --fs-h1: clamp(1.75rem, 4vw, 3rem);
  --fs-h2: clamp(1.4rem, 3vw, 2.25rem);
  --fs-h3: clamp(1.15rem, 2vw, 1.5rem);
  --fs-h4: clamp(1rem, 1.5vw, 1.2rem);
  --fs-body: clamp(0.9rem, 1vw, 1rem);
  --fs-small: 0.85rem;
  --fs-caption: 0.75rem;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  --lh-tight: 1.2;
  --lh-normal: 1.6;
  --lh-relaxed: 1.75;

  --ls-tight: -0.03em;
  --ls-normal: 0;
  --ls-wide: 0.05em;
  --ls-wider: 0.1em;

  /* ── Spacing ── */
  --space-2xs: 0.125rem;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 0.75rem;
  --space-lg: 1.25rem;
  --space-xl: 1.75rem;
  --space-2xl: 2.5rem;
  --space-3xl: 3.5rem;
  --space-4xl: 5rem;
  --space-5xl: 6rem;

  /* ── Radius ── */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* ── Transitions ── */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --duration-fast: 0.15s;
  --duration-normal: 0.3s;
  --duration-slow: 0.5s;
  --duration-slower: 0.8s;

  /* ── Z-Index ── */
  --z-background: -1;
  --z-default: 1;
  --z-card: 10;
  --z-nav: 100;
  --z-overlay: 200;
  --z-modal: 300;
  --z-cursor: 9999;

  /* ── Container ── */
  --container-max: 1100px;
  --container-padding: clamp(1rem, 4vw, 2rem);

  /* ── Nav ── */
  --nav-height: 64px;
  --nav-height-scrolled: 52px;
}

/* ══════════════════════════════════════════════
   ✨ LIQUID GLASS — LIGHT THEME
   Inspired by Apple Vision Pro / visionOS
   ══════════════════════════════════════════════ */
[data-theme="light"] {
  /* ── Background — soft warm gradient with depth ── */
  --bg-primary: #f0f0f5;
  --bg-secondary: #e8e0f0;
  --bg-tertiary: #e0e8f5;

  /* ── Liquid Glass — translucent with color tint ── */
  --glass-bg-1: rgba(255, 255, 255, 0.45);
  --glass-bg-2: rgba(255, 255, 255, 0.55);
  --glass-bg-3: rgba(255, 255, 255, 0.65);
  --glass-bg-4: rgba(255, 255, 255, 0.80);

  --glass-border-1: rgba(255, 255, 255, 0.60);
  --glass-border-2: rgba(255, 255, 255, 0.70);
  --glass-border-3: rgba(255, 255, 255, 0.80);
  --glass-border-4: rgba(255, 255, 255, 0.90);

  --glass-blur-1: blur(16px);
  --glass-blur-2: blur(24px);
  --glass-blur-3: blur(30px);
  --glass-blur-4: blur(40px);

  /* ── Luxury layered shadows with color ── */
  --glass-shadow:
    0 2px 4px rgba(0, 0, 0, 0.02),
    0 8px 24px rgba(0, 0, 0, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 -1px 0 rgba(0, 0, 0, 0.04) inset;
  --glass-shadow-lg:
    0 4px 8px rgba(0, 0, 0, 0.03),
    0 16px 48px rgba(0, 0, 0, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 -1px 0 rgba(0, 0, 0, 0.05) inset;
  --glass-shadow-sm:
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;

  /* ── Text — rich dark tones ── */
  --text-primary: #1a1a2e;
  --text-secondary: #3a3a5c;
  --text-muted: #8888aa;
  --text-accent: #5a5a7c;

  /* ── Accents — vivid on light ── */
  --accent-blue: #0066FF;
  --accent-purple: #6C63FF;
  --accent-pink: #C558F0;
  --accent-green: #28CD51;
  --accent-orange: #FF8C00;
  --accent-red: #FF3333;
  --accent-teal: #00B4D8;

  /* ── Gradients ── */
  --gradient-primary: linear-gradient(135deg, #0066FF, #6C63FF, #C558F0);
  --gradient-accent: linear-gradient(135deg, #0066FF, #6C63FF);
  --gradient-text: linear-gradient(135deg, #0066FF 0%, #6C63FF 50%, #C558F0 100%);
  --gradient-bg: linear-gradient(140deg, #e8e0f5 0%, #f0e8f5 25%, #e0ecf8 50%, #f0e0f0 75%, #e0f0f8 100%);

  /* ── Rich colorful orbs for liquid feel ── */
  --orb-1: rgba(0, 102, 255, 0.20);
  --orb-2: rgba(108, 99, 255, 0.18);
  --orb-3: rgba(197, 88, 240, 0.16);
  --orb-4: rgba(0, 180, 216, 0.14);

  /* ── Noise — very subtle grain ── */
  --noise-opacity: 0.025;

  /* ── Card highlights — prismatic top edge ── */
  --card-highlight: rgba(255, 255, 255, 0.95);
  --card-highlight-static: rgba(255, 255, 255, 0.90);

  /* ── Scrollbar ── */
  --scrollbar-thumb: rgba(0, 0, 0, 0.10);
  --scrollbar-thumb-hover: rgba(0, 0, 0, 0.18);

  /* ── Avatar ── */
  --avatar-bg: linear-gradient(135deg, #dde0ff, #f0ddf8);

  /* ── Project overlay ── */
  --project-overlay-bg: linear-gradient(to bottom, transparent 0%, rgba(240,240,245,0.3) 50%, rgba(240,240,245,0.9) 100%);

  /* ── Button glow ── */
  --btn-primary-shadow: 0 4px 20px rgba(0, 102, 255, 0.30), inset 0 1px 0 rgba(255,255,255,0.25);
  --btn-primary-shadow-hover: 0 8px 30px rgba(0, 102, 255, 0.45), inset 0 1px 0 rgba(255,255,255,0.35);

  /* ── Selection ── */
  --selection-bg: rgba(0, 102, 255, 0.2);
}
