/* ===========================================================
   Design Tokens — single source of truth for the whole site.
   VIMAL PORTFOLIO DESIGN SYSTEM — Product Design + AI v3.0.
   Clean white/light canvas (~70%), deep/brand navy typography
   and dark-fill surfaces (~20%), electric blue / violet / cyan
   accents used sparingly (~10%): blue for primary CTAs, links,
   active states and product-design work; violet for AI/creative
   highlights; cyan for engineering/technology highlights. Manrope
   display type paired with Inter body/UI type. Thin borders over
   heavy shadows, 20px card radius, near-invisible navy shadows.
   No purple-heavy interface, no heavy gradients, no glassmorphism.
   Every page links this file first, before any other CSS.
   =========================================================== */

:root {
  /* Backgrounds — page bg is never pure white */
  --bg-page: #F8FAFF;
  --bg-canvas: #F8FAFF;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F2F5FF;
  --bg-muted: #EAF1FF;
  --bg-indigo-tint: #EAF1FF;

  /* Primary — electric blue, the primary CTA / link / active-nav /
     product-design accent. Passes AA as a solid button fill with
     white text (~4.6:1) per the brief's explicit button spec. */
  --primary: #256BF6;
  --primary-hover: #1557D6;
  --primary-active: #103E99;
  --primary-soft: #EAF1FF;
  --primary-rgb: 37, 107, 246;

  /* Secondary — electric violet, the AI / creative / special-highlight
     accent. Decorative + icon/tag/large-text use only — as a solid
     fill with small white label text it falls just under AA (~4.4:1),
     so it never becomes a button background or body-copy color. */
  --secondary: #964FFA;
  --secondary-hover: #7E35E6;
  --secondary-active: #611CB8;
  --secondary-soft: #F2E9FF;
  --secondary-rgb: 150, 79, 250;

  /* Cyan — engineering / technology / small highlight accent.
     Strictly decorative: icons, borders, tints, thin lines, gradient
     stops. Far below AA either as text or as a fill with light text. */
  --cyan: #45D6FB;
  --cyan-soft: #E8FAFF;
  --cyan-rgb: 69, 214, 251;

  /* Accent — brand navy, the dominant AA-safe solid-fill color for
     dark CTA/footer sections, the nav logo mark and anywhere a solid
     fill needs a guaranteed-safe white-text pairing (~13:1). */
  --accent: #102580;
  --accent-hover: #0B1B61;
  --accent-active: #081449;
  --accent-soft: #EAF1FF;
  --accent-rgb: 16, 37, 128;

  /* Success / warning / error */
  --success: #047857;
  --success-soft: #ECFDF5;
  --warning: #D97706;
  --warning-soft: #FFFBEB;
  --warning-text: #92400E;
  --error: #C81E1E;
  --error-soft: #FEF2F2;

  /* Text */
  --text-primary: #080D34;
  --text-heading: #080D34;
  --text-secondary: #4B5575;
  --text-muted: #64708F;
  --text-disabled: #A7AFC4;
  --text-on-brand: #FFFFFF;
  --on-accent: #FFFFFF;

  /* Borders — thin borders preferred over shadows */
  --border-default: #E4E9F5;
  --border-light: #EEF2FC;
  --border-strong: #C9D6F5;

  /* States */
  --focus-ring: rgba(37, 107, 246, 0.28);

  /* Gradients — small/contained decorative use only (stat text-clips,
     progress bars, thin accent rules, a "premium CTA" button variant);
     never a full-card fill, never a loud hero wash. */
  --gradient-primary: linear-gradient(135deg, #256BF6 0%, #964FFA 50%, #45D6FB 100%);
  --gradient-accent: linear-gradient(135deg, #256BF6, #964FFA);
  --gradient-blue-violet: linear-gradient(135deg, #256BF6, #964FFA);
  --gradient-violet-cyan: linear-gradient(135deg, #964FFA, #45D6FB);

  /* Fonts */
  --font-display: 'Manrope', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Spacing (4/8px scale) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-28: 112px;
  --space-30: 120px;

  /* Layout */
  --content-max: 1240px;
  --content-wide: 1320px;
  --content-reading: 720px;
  --gutter-desktop: 40px;
  --gutter-tablet: 28px;
  --gutter-mobile: 20px;
  --nav-height: 78px;

  /* Radius — buttons/pills/small tiles stay restrained; cards use the
     brief's explicit 20px spec. */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-card: 20px;
  --radius-feature: 20px;
  --radius-hero: 20px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* Shadows — thin borders preferred; shadows stay minimal, navy-toned,
     per the brief's explicit card / card-hover values. */
  --shadow-xs: 0 1px 2px rgba(8, 13, 52, 0.04);
  --shadow-card: 0 10px 30px rgba(20, 40, 100, 0.06);
  --shadow-elevated: 0 20px 50px rgba(37, 107, 246, 0.12);
  --shadow-hero: 0 24px 60px rgba(20, 40, 100, 0.10);

  /* Motion */
  --motion-fast: 160ms;
  --motion-default: 220ms;
  --motion-slow: 350ms;
  --ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-hover: 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-reveal: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

@media (max-width: 1023px) {
  :root { --space-section: var(--space-20); }
}
@media (max-width: 767px) {
  :root { --space-section: var(--space-14); }
}

/* ===========================================================
   Dark mode — Product Design + AI Dark
   Deep Navy (#080D34) itself becomes the dark canvas — it was
   already near-black — with surfaces stepped up in lightness from
   there. Electric blue/violet/cyan brighten for contrast, brand-navy
   accent flips to a lighter navy-blue so it still reads as a solid
   fill, shadows switch to true black. Toggled via [data-theme="dark"]
   on <html> — see js/theme.js.
   =========================================================== */
:root[data-theme="dark"] {
  /* Backgrounds */
  --bg-page: #080D34;
  --bg-canvas: #0A1140;
  --bg-surface: #0F1850;
  --bg-subtle: #121C5C;
  --bg-muted: #16226A;
  --bg-indigo-tint: #16294F;

  /* Primary — electric blue, brightened for dark */
  --primary: #5C94FF;
  --primary-hover: #7BA6FF;
  --primary-active: #256BF6;
  --primary-soft: #16294F;
  --primary-rgb: 92, 148, 255;

  /* Secondary — electric violet, brightened for dark */
  --secondary: #AB75FF;
  --secondary-hover: #BD8EFF;
  --secondary-active: #964FFA;
  --secondary-soft: #241A4F;
  --secondary-rgb: 171, 117, 255;

  /* Cyan */
  --cyan: #6FE2FC;
  --cyan-soft: #0F2E3D;
  --cyan-rgb: 111, 226, 252;

  /* Accent — lighter navy-blue so it still reads as a solid fill on dark */
  --accent: #4A63D6;
  --accent-hover: #5A72E0;
  --accent-active: #3A4FC0;
  --accent-soft: #16226A;
  --accent-rgb: 74, 99, 214;
  --on-accent: #FFFFFF;

  /* Success / warning / error */
  --success: #34D399;
  --success-soft: #062B22;
  --warning: #FBBF24;
  --warning-soft: #2E2410;
  --warning-text: #FBBF24;
  --error: #F87171;
  --error-soft: #2E1616;

  /* Text */
  --text-primary: #E7EAF7;
  --text-heading: #F7F9FF;
  --text-secondary: #AEB6D6;
  --text-muted: #7E88B0;
  --text-disabled: #4E588A;
  --text-on-brand: #080D34;

  /* Borders */
  --border-default: #202B66;
  --border-light: #182158;
  --border-strong: #30407F;

  /* States */
  --focus-ring: rgba(92, 148, 255, 0.35);

  /* Gradients stay the same hues; they already read well on dark */
  --gradient-primary: linear-gradient(135deg, #5C94FF 0%, #AB75FF 50%, #6FE2FC 100%);
  --gradient-accent: linear-gradient(135deg, #5C94FF, #AB75FF);
  --gradient-blue-violet: linear-gradient(135deg, #5C94FF, #AB75FF);
  --gradient-violet-cyan: linear-gradient(135deg, #AB75FF, #6FE2FC);

  /* Shadows — true black on dark surfaces */
  --shadow-xs: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-elevated: 0 20px 50px rgba(0, 0, 0, 0.5);
  --shadow-hero: 0 24px 60px rgba(0, 0, 0, 0.55);

  color-scheme: dark;
}
