/**
 * Bridge: portfolio legacy --color-*  ↔  Steel Minimalism
 * Surfaces per data-theme so section CSS does not collapse.
 */

/* Layout always (independent of theme) */
:root {
  --container-max: 1200px;
  --container-narrow: 680px;
  --container-content: 760px;
  --container-padding: 28px;

  --spacing-xs: var(--space-1, 0.375rem);
  --spacing-sm: var(--space-2, 0.625rem);
  --spacing-md: var(--space-4, 1rem);
  --spacing-lg: var(--space-6, 1.5rem);
  --spacing-xl: var(--space-8, 2rem);
  --spacing-2xl: var(--space-10, 2.5rem);
  --spacing-3xl: var(--space-12, 3.25rem);
  --spacing-4xl: var(--space-16, 5.5rem);
  --spacing-5xl: var(--space-20, 7rem);
}

/* ========== DEFAULT DARK ========== */
[data-theme="dark"] {
  --color-bg-primary: #07090c;
  --color-bg-secondary: #0d1117;
  --color-bg-card: #0d1117;
  --color-bg-tertiary: #131924;
  --color-bg-elevated: #192031;

  --color-surface-subtle: rgba(255, 255, 255, 0.025);
  --color-surface-hover: rgba(255, 255, 255, 0.05);
  --color-surface-active: rgba(59, 130, 246, 0.08);

  --color-text-primary: #eef2f7;
  --color-text-secondary: #8fa4bc;
  --color-text-muted: #5a7080;
  --color-text-faint: #364454;

  --color-accent-primary: var(--color-blue-500, #3b82f6);
  --color-accent-hover: var(--color-blue-400, #60a5fa);
  --color-accent-active: var(--color-blue-600, #2563eb);
  --color-accent-subtle: rgba(59, 130, 246, 0.1);
  --color-accent-glow: rgba(59, 130, 246, 0.2);

  --color-border-subtle: rgba(255, 255, 255, 0.055);
  --color-border-strong: rgba(255, 255, 255, 0.1);
  --color-border-accent: rgba(59, 130, 246, 0.3);
  --color-divider: rgba(255, 255, 255, 0.055);

  --bg-primary: #07090c;
  --bg-secondary: #0d1117;
  --bg-card: #1a1f2e;
  --bg-elevated: #192031;
  --text-primary: #eef2f7;
  --text-secondary: #8fa4bc;
  --text-muted: #5a7080;
}

/* ========== HIGH CONTRAST ========== */
[data-theme="high-contrast"] {
  --color-bg-primary: #000000;
  --color-bg-secondary: #0a0a0a;
  --color-bg-card: #000000;
  --color-bg-tertiary: #111111;
  --color-bg-elevated: #111111;

  --color-surface-subtle: rgba(255, 255, 255, 0.1);
  --color-surface-hover: rgba(255, 255, 255, 0.16);
  --color-surface-active: rgba(255, 255, 0, 0.2);

  --color-text-primary: #ffffff;
  --color-text-secondary: #ffffff;
  --color-text-muted: #e8e8e8;
  --color-text-faint: #cccccc;

  --color-accent-primary: #ffff00;
  --color-accent-hover: #ffff66;
  --color-accent-active: #e6e600;
  --color-accent-subtle: rgba(255, 255, 0, 0.18);
  --color-accent-glow: rgba(255, 255, 0, 0.3);

  --color-border-subtle: #ffffff;
  --color-border-strong: #ffffff;
  --color-border-accent: #ffff00;
  --color-divider: #ffffff;

  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-card: #000000;
  --bg-elevated: #111111;
  --text-primary: #ffffff;
  --text-secondary: #ffffff;
  --text-muted: #e8e8e8;
}

/* ========== LOW VISION (dark + stronger type contrast) ========== */
[data-theme="low-vision"] {
  --color-bg-primary: #07090c;
  --color-bg-secondary: #0d1117;
  --color-bg-card: #0d1117;
  --color-bg-tertiary: #131924;
  --color-bg-elevated: #192031;

  --color-surface-subtle: rgba(255, 255, 255, 0.06);
  --color-surface-hover: rgba(255, 255, 255, 0.1);
  --color-surface-active: rgba(96, 165, 250, 0.15);

  --color-text-primary: #ffffff;
  --color-text-secondary: #dbe4f0;
  --color-text-muted: #b0c0d0;
  --color-text-faint: #8fa4bc;

  --color-accent-primary: #60a5fa;
  --color-accent-hover: #93c5fd;
  --color-accent-active: #3b82f6;
  --color-accent-subtle: rgba(96, 165, 250, 0.18);
  --color-accent-glow: rgba(96, 165, 250, 0.3);

  --color-border-subtle: rgba(255, 255, 255, 0.2);
  --color-border-strong: rgba(255, 255, 255, 0.35);
  --color-border-accent: rgba(96, 165, 250, 0.65);
  --color-divider: rgba(255, 255, 255, 0.2);

  --bg-primary: #07090c;
  --bg-secondary: #0d1117;
  --bg-card: #0d1117;
  --bg-elevated: #192031;
  --text-primary: #ffffff;
  --text-secondary: #dbe4f0;
  --text-muted: #b0c0d0;
}

/* ========== REDUCED MOTION (same surfaces as dark) ========== */
[data-theme="reduced-motion"] {
  --color-bg-primary: #07090c;
  --color-bg-secondary: #0d1117;
  --color-bg-card: #0d1117;
  --color-bg-tertiary: #131924;
  --color-bg-elevated: #192031;

  --color-surface-subtle: rgba(255, 255, 255, 0.025);
  --color-surface-hover: rgba(255, 255, 255, 0.05);
  --color-surface-active: rgba(59, 130, 246, 0.08);

  --color-text-primary: #eef2f7;
  --color-text-secondary: #8fa4bc;
  --color-text-muted: #5a7080;
  --color-text-faint: #364454;

  --color-accent-primary: var(--color-blue-500, #3b82f6);
  --color-accent-hover: var(--color-blue-400, #60a5fa);
  --color-accent-active: var(--color-blue-600, #2563eb);
  --color-accent-subtle: rgba(59, 130, 246, 0.1);
  --color-accent-glow: rgba(59, 130, 246, 0.2);

  --color-border-subtle: rgba(255, 255, 255, 0.055);
  --color-border-strong: rgba(255, 255, 255, 0.1);
  --color-border-accent: rgba(59, 130, 246, 0.3);
  --color-divider: rgba(255, 255, 255, 0.055);

  --bg-primary: #07090c;
  --bg-secondary: #0d1117;
  --bg-card: #1a1f2e;
  --bg-elevated: #192031;
  --text-primary: #eef2f7;
  --text-secondary: #8fa4bc;
  --text-muted: #5a7080;
}