:root {
  --in-oklab: ;
  --in-oklch: ;
}

@supports (background: linear-gradient(in oklab, white, black)) {
  :root {
    --in-oklab: in oklab;
    --in-oklch: in oklch;
  }
}

:root,
[data-theme="dark"] {
  --bg-base: #070b18;
  --bg-elevated: #0d1428;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent-primary: #38bdf8;
  --accent-secondary: #6366f1;
  --accent-tertiary: #14b8a6;
  --accent-amber: #f59e0b;

  /* Liquid Glass Surface Tokens */
  --glass-bg: rgba(15, 23, 42, 0.62);
  --glass-bg-hover: rgba(22, 34, 61, 0.76);
  --glass-bg-strong: rgba(11, 17, 34, 0.88);
  --glass-subcard-bg: rgba(255, 255, 255, 0.035);
  --glass-subcard-hover: rgba(255, 255, 255, 0.068);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-border-highlight: rgba(56, 189, 248, 0.35);
  --glass-specular-top: rgba(255, 255, 255, 0.20);
  --glass-shadow: 0 20px 42px -12px rgba(2, 6, 23, 0.65),
                  0 1px 0 0 rgba(255, 255, 255, 0.10) inset;
  --glass-blur: 24px;

  /* Ambient Orbs */
  --orb-1: rgba(56, 189, 248, 0.22);
  --orb-2: rgba(99, 102, 241, 0.18);
  --orb-3: rgba(20, 184, 166, 0.15);

  /* Crisp, Compact Typography Scale (Preventing any oversized text) */
  --font-display: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --text-xs: 11px;
  --text-sm: 12.5px;
  --text-base: 13.5px;
  --text-md: 14.5px;
  --text-lg: 16px;
  --text-xl: clamp(17px, 1.5vw, 20px);
  --text-hero: clamp(22px, 2.3vw, 30px);

  --radius-xl: 18px;
  --radius-lg: 13px;
  --radius-md: 9px;
  --radius-sm: 7px;
  --radius-pill: 9999px;
  --max-width: 1140px;
  --nav-height: 52px;
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg-base: #f1f5f9;
  --bg-elevated: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --accent-primary: #0284c7;
  --accent-secondary: #4f46e5;
  --accent-tertiary: #0d9488;
  --accent-amber: #d97706;

  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-bg-hover: rgba(255, 255, 255, 0.92);
  --glass-bg-strong: rgba(255, 255, 255, 0.94);
  --glass-subcard-bg: rgba(15, 23, 42, 0.028);
  --glass-subcard-hover: rgba(15, 23, 42, 0.055);
  --glass-border: rgba(15, 23, 42, 0.09);
  --glass-border-highlight: rgba(2, 132, 199, 0.35);
  --glass-specular-top: rgba(255, 255, 255, 0.95);
  --glass-shadow: 0 16px 36px -14px rgba(15, 23, 42, 0.08),
                  0 1px 0 0 rgba(255, 255, 255, 0.9) inset;

  --orb-1: rgba(56, 189, 248, 0.18);
  --orb-2: rgba(99, 102, 241, 0.14);
  --orb-3: rgba(20, 184, 166, 0.12);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 20px);
  font-family: var(--font-sans);
  font-size: 14px;
  /* CRITICAL FIX: Prevent iOS Safari / Mobile Browsers from inflating fonts in landscape mode! */
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  font-size: var(--text-base);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 9999;
  padding: 8px 14px;
  background: var(--accent-primary);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 14px;
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
