/* Design System Variables */

:root {
  /* Light Mode Colors (Default) */
  --background: #ffffff;
  --background-secondary: #fafafa;
  --background-tertiary: #f5f5f5;

  --text-primary: #171717;
  --text-secondary: #737373;
  --text-tertiary: #a3a3a3;

  --border: #e5e5e5;
  --border-hover: #d4d4d4;

  /* Accent Colors */
  --accent-from: #667eea;
  --accent-to: #764ba2;
  --accent-gradient: linear-gradient(135deg, var(--accent-from) 0%, var(--accent-to) 100%);
  --accent-gradient-hover: linear-gradient(135deg, #5568d3 0%, #63408a 100%);

  /* Status Colors */
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;

  /* Type Scale (Fluid Typography) */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.825rem + 0.25vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.375vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.35rem + 0.75vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.7rem + 1.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 2rem + 2.5vw, 5rem);

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

  /* Spacing System */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  --spacing-4xl: 6rem;

  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --container-max: 1280px;
  --container-padding: 1.5rem;
}

/* Dark Mode */
[data-theme="dark"] {
  --background: #0a0a0a;
  --background-secondary: #171717;
  --background-tertiary: #262626;

  --text-primary: #fafafa;
  --text-secondary: #a3a3a3;
  --text-tertiary: #737373;

  --border: #262626;
  --border-hover: #404040;

  /* Shadows for dark mode */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6);
}

/* Smooth color transitions for theme switching */
*,
*::before,
*::after {
  transition: background-color 200ms ease,
              color 200ms ease,
              border-color 200ms ease,
              box-shadow 200ms ease;
}

/* Disable transitions for elements that shouldn't transition */
button,
a,
input,
textarea,
select {
  transition: background-color var(--transition-base),
              color var(--transition-base),
              border-color var(--transition-base),
              transform var(--transition-base),
              box-shadow var(--transition-base),
              opacity var(--transition-base);
}
