/**
 * variables.css
 * Design System Tokens — Three-layer: Primitive → Semantic → Component
 * Brand: HIEU.DEV — Modern Dark, Technical, Professional
 */

/* ─── Google Fonts ──────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── Primitive Tokens ──────────────────────────────────────────────────────── */
:root {
  /* Color Primitives */
  --_blue-50: #EFF6FF;
  --_blue-100: #DBEAFE;
  --_blue-200: #BFDBFE;
  --_blue-400: #60A5FA;
  --_blue-500: #3B82F6;
  --_blue-600: #2563EB;
  --_blue-700: #1D4ED8;

  --_sky-400: #38BDF8;
  --_sky-500: #0EA5E9;

  --_indigo-400: #818CF8;
  --_indigo-500: #6366F1;
  --_indigo-600: #4F46E5;

  --_slate-50: #F8FAFC;
  --_slate-100: #F1F5F9;
  --_slate-200: #E2E8F0;
  --_slate-300: #CBD5E1;
  --_slate-400: #94A3B8;
  --_slate-500: #64748B;
  --_slate-600: #475569;
  --_slate-700: #334155;
  --_slate-800: #1E293B;
  --_slate-850: #172032;
  --_slate-900: #0F172A;
  --_slate-950: #080D17;

  --_green-400: #4ADE80;
  --_green-500: #22C55E;

  --_amber-400: #FBBF24;
  --_red-500: #EF4444;

  /* Typography Primitives */
  --_font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --_font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  /* Spacing Primitives */
  --_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 */
  --_space-32: 8rem;     /* 128px */
}

/* ─── Semantic Tokens ───────────────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-primary: var(--_slate-950);
  --bg-secondary: var(--_slate-900);
  --bg-surface: #111C2F;
  --bg-surface-hover: #17233A;
  --bg-elevated: #0F1A2E;

  /* Text */
  --text-primary: var(--_slate-50);
  --text-secondary: var(--_slate-400);
  --text-muted: var(--_slate-500);
  --text-on-accent: #FFFFFF;

  /* Brand Colors */
  --color-primary: var(--_sky-400);
  --color-primary-hover: var(--_sky-500);
  --color-accent: var(--_indigo-500);
  --color-accent-hover: var(--_indigo-600);
  --color-success: var(--_green-400);
  --color-warning: var(--_amber-400);
  --color-error: var(--_red-500);

  /* Borders */
  --border-color: rgba(148, 163, 184, 0.12);
  --border-color-hover: rgba(148, 163, 184, 0.25);
  --border-color-accent: rgba(56, 189, 248, 0.3);

  /* Typography */
  --font-sans: var(--_font-sans);
  --font-mono: var(--_font-mono);

  /* Font Sizes */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */
  --text-7xl: 4.5rem;      /* 72px */

  /* Font Weights */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Line Heights */
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* Spacing Scale */
  --space-xs: var(--_space-1);
  --space-sm: var(--_space-2);
  --space-md: var(--_space-4);
  --space-lg: var(--_space-6);
  --space-xl: var(--_space-8);
  --space-2xl: var(--_space-12);
  --space-3xl: var(--_space-16);
  --space-4xl: var(--_space-24);

  /* Border Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);
  --shadow-glow-primary: 0 0 30px rgba(56, 189, 248, 0.15);
  --shadow-glow-accent: 0 0 30px rgba(99, 102, 241, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1440px;

  /* Z-index */
  --z-base: 0;
  --z-raised: 10;
  --z-overlay: 100;
  --z-navbar: 1000;
  --z-modal: 2000;
}

/* ─── Component Tokens ──────────────────────────────────────────────────────── */
:root {
  /* Button */
  --btn-primary-bg: var(--color-primary);
  --btn-primary-bg-hover: var(--color-primary-hover);
  --btn-primary-text: #0C1B2E;
  --btn-secondary-bg: transparent;
  --btn-secondary-border: var(--border-color-accent);
  --btn-secondary-text: var(--color-primary);

  /* Card */
  --card-bg: var(--bg-surface);
  --card-bg-hover: var(--bg-surface-hover);
  --card-border: var(--border-color);
  --card-border-hover: var(--border-color-hover);
  --card-radius: var(--radius-lg);

  /* Badge */
  --badge-dev-bg: rgba(56, 189, 248, 0.1);
  --badge-dev-text: var(--_sky-400);
  --badge-dev-border: rgba(56, 189, 248, 0.2);

  --badge-it-bg: rgba(99, 102, 241, 0.1);
  --badge-it-text: var(--_indigo-400);
  --badge-it-border: rgba(99, 102, 241, 0.2);

  --badge-hw-bg: rgba(74, 222, 128, 0.1);
  --badge-hw-text: var(--_green-400);
  --badge-hw-border: rgba(74, 222, 128, 0.2);

  /* Form */
  --input-bg: rgba(15, 23, 42, 0.8);
  --input-border: var(--border-color);
  --input-border-focus: var(--color-primary);
  --input-text: var(--text-primary);
  --input-placeholder: var(--text-muted);

  /* Navbar */
  --nav-bg: rgba(8, 13, 23, 0.85);
  --nav-height: 70px;
}
