/*
 * CSS Custom Properties (Variables)
 * Design System for Portfolio Website
 * Supports light and dark mode theming
 */

:root {
  /* ============================================
     COLOR PALETTE - Light Mode (Default)
     ============================================ */

  /* Background colors */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #fafafa;
  --color-bg-card: #ffffff;

  /* Text colors */
  --color-text-primary: #333333;
  --color-text-secondary: #666666;
  --color-text-tertiary: #999999;
  --color-heading: #000000;

  /* Brand colors */
  --color-link: #3883ff;
  --color-link-hover: #2666cc;
  --color-accent: #3883ff;

  /* Border and divider colors */
  --color-border: #e0e0e0;
  --color-border-light: #f0f0f0;
  --color-divider: #e0e0e0;

  /* UI element colors */
  --color-shadow: rgba(0, 0, 0, 0.1);
  --color-shadow-hover: rgba(0, 0, 0, 0.15);

  /* ============================================
     TYPOGRAPHY
     ============================================ */

  /* Font families */
  --font-heading: 'Inconsolata', monospace;
  --font-body: Georgia, 'Times New Roman', serif;
  --font-mono: 'Inconsolata', 'Courier New', monospace;

  /* Font sizes */
  --font-size-xs: 1.2rem;      /* 12px */
  --font-size-sm: 1.4rem;      /* 14px */
  --font-size-base: 1.6rem;    /* 16px */
  --font-size-lg: 1.8rem;      /* 18px */
  --font-size-xl: 2rem;        /* 20px */
  --font-size-2xl: 2.5rem;     /* 25px */
  --font-size-3xl: 3rem;       /* 30px */
  --font-size-4xl: 4rem;       /* 40px */
  --font-size-5xl: 6rem;       /* 60px */
  --font-size-6xl: 10rem;      /* 100px */

  /* Font weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Line heights */
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* ============================================
     SPACING SCALE (8px base)
     ============================================ */

  --spacing-xs: 0.4rem;        /* 4px */
  --spacing-sm: 0.8rem;        /* 8px */
  --spacing-md: 1.6rem;        /* 16px */
  --spacing-lg: 2.4rem;        /* 24px */
  --spacing-xl: 3.2rem;        /* 32px */
  --spacing-2xl: 4.8rem;       /* 48px */
  --spacing-3xl: 6.4rem;       /* 64px */
  --spacing-4xl: 9.6rem;       /* 96px */

  /* ============================================
     LAYOUT
     ============================================ */

  --max-width-content: 1200px;
  --max-width-text: 800px;
  --nav-height: 70px;

  /* ============================================
     BORDERS & RADIUS
     ============================================ */

  --border-width: 1px;
  --border-width-thick: 2px;
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --border-radius-full: 50%;

  /* ============================================
     SHADOWS
     ============================================ */

  --shadow-sm: 0 1px 3px var(--color-shadow);
  --shadow-md: 0 2px 8px var(--color-shadow);
  --shadow-lg: 0 4px 16px var(--color-shadow);
  --shadow-hover: 0 4px 12px var(--color-shadow-hover);

  /* ============================================
     TRANSITIONS
     ============================================ */

  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease-out;
  --transition-slow: 0.3s ease;

  /* ============================================
     Z-INDEX SCALE
     ============================================ */

  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-tooltip: 1070;
}

/* ============================================
   DARK MODE THEME
   ============================================ */

html.dark-mode {
  /* Background colors */
  --color-bg-primary: #1a1a1a;
  --color-bg-secondary: #0f0f0f;
  --color-bg-card: #242424;

  /* Text colors */
  --color-text-primary: #e0e0e0;
  --color-text-secondary: #b0b0b0;
  --color-text-tertiary: #808080;
  --color-heading: #ffffff;

  /* Brand colors */
  --color-link: #5fa3ff;
  --color-link-hover: #7db8ff;
  --color-accent: #5fa3ff;

  /* Border and divider colors */
  --color-border: #333333;
  --color-border-light: #2a2a2a;
  --color-divider: #333333;

  /* UI element colors */
  --color-shadow: rgba(0, 0, 0, 0.3);
  --color-shadow-hover: rgba(0, 0, 0, 0.4);
}

/* ============================================
   UTILITY: Smooth transitions for theme switching
   ============================================ */

body,
header,
nav,
.card,
a,
button {
  transition: background-color var(--transition-base),
              color var(--transition-base),
              border-color var(--transition-base);
}
