/* ===================================
   Antikythera Technologies — Brand Tokens
   Single source of truth for ALL design tokens
   =================================== */

:root {
  /* ── Background Colors ── */
  --tn-bg-primary: #1a1b26;
  --tn-bg-secondary: #24283b;
  --tn-bg-tertiary: #414868;
  --tn-bg-float: #16161e;
  --tn-bg-highlight: #292e42;

  /* ── Text Colors ── */
  --tn-text-primary: #c0caf5;
  --tn-text-secondary: #a9b1d6;
  --tn-text-muted: #565f89;
  --tn-text-dim: #565f89;
  --tn-text-dark: #414868;

  /* ── Accent Colors ── */
  --tn-blue: #7aa2f7;
  --tn-cyan: #7dcfff;
  --tn-teal: #73daca;
  --tn-green: #9ece6a;
  --tn-yellow: #e0af68;
  --tn-orange: #ff9e64;
  --tn-red: #f7768e;
  --tn-purple: #bb9af7;
  --tn-pink: #ff8fa3;
  --tn-magenta: #c678dd;

  /* ── Glass Morphism Alpha Backgrounds ── */
  --glass-bg: rgba(26, 27, 38, 0.7);
  --glass-bg-primary: rgba(26, 27, 38, 0.7);
  --glass-bg-secondary: rgba(36, 40, 59, 0.6);
  --glass-bg-light: rgba(192, 202, 245, 0.05);
  --glass-bg-dark: rgba(26, 27, 38, 0.9);

  /* ── Glass Borders ── */
  --glass-border: rgba(192, 202, 245, 0.1);
  --glass-border-light: rgba(192, 202, 245, 0.2);
  --glass-border-hover: rgba(255, 255, 255, 0.2);
  --glass-border-active: rgba(122, 162, 247, 0.3);

  /* ── Core Gradients (Tokyo Night palette) ── */
  --tn-gradient-primary: linear-gradient(135deg, #7aa2f7 0%, #bb9af7 100%);
  --tn-gradient-secondary: linear-gradient(135deg, #7dcfff 0%, #73daca 100%);
  --tn-gradient-accent: linear-gradient(135deg, #ff9e64 0%, #e0af68 100%);

  /* ── Extended Gradients (Tokyo Night palette) ── */
  --gradient-professional: linear-gradient(135deg, #7aa2f7 0%, #bb9af7 100%);
  --gradient-modern: linear-gradient(135deg, #7dcfff 0%, #7aa2f7 100%);
  --gradient-premium: linear-gradient(135deg, #bb9af7 0%, #ff8fa3 100%);
  --gradient-dark: linear-gradient(135deg, rgba(26, 27, 38, 0.9) 0%, rgba(36, 40, 59, 0.8) 100%);

  /* ── Neon Effects ── */
  --neon-blue: #00d9ff;
  --neon-purple: #ff00ff;
  --neon-pink: #ff8fa3;

  /* ── Neon / Enhanced Gradients ── */
  --gradient-neon: linear-gradient(135deg, #7aa2f7 0%, #bb9af7 33%, #ff8fa3 66%, #7dcfff 100%);
  --gradient-cyber: linear-gradient(135deg, #00d9ff 0%, #ff00ff 100%);
  --gradient-matrix: linear-gradient(135deg, #7aa2f7 0%, #73daca 50%, #9ece6a 100%);
  --animated-gradient: linear-gradient(-45deg, #1a1b26, #24283b, #7aa2f7, #bb9af7, #1a1b26);

  /* ── Shadows (Tokyo Night rgba) ── */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.4);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.37);
  --shadow-hover: 0 16px 48px rgba(122, 162, 247, 0.25);
  --shadow-premium: 0 20px 60px rgba(187, 154, 247, 0.3);

  /* ── Themed Shadows (--tn- prefix) ── */
  --tn-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --tn-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --tn-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --tn-shadow-glow: 0 0 20px rgba(122, 162, 247, 0.3);

  /* ── Glow Effects ── */
  --glow-blue: 0 0 20px rgba(122, 162, 247, 0.3);
  --glow-cyan: 0 0 20px rgba(125, 207, 255, 0.3);
  --glow-purple: 0 0 20px rgba(187, 154, 247, 0.3);
  --glow-pink: 0 0 20px rgba(255, 143, 163, 0.3);

  /* ── Blur Values ── */
  --blur-sm: 8px;
  --blur-md: 16px;
  --blur-lg: 24px;
  --blur-xl: 32px;
  --blur-standard: blur(12px);
  --blur-intense: blur(20px);
  --blur-subtle: blur(8px);

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

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

  /* ── Z-Index Layers ── */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-tooltip: 500;

  /* ── Transitions ── */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  --transition-spring: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --tn-transition-fast: 0.2s ease;
  --tn-transition-normal: 0.3s ease;
  --tn-transition-slow: 0.5s ease;

  /* ── Typography — Font Stacks ── */
  --font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI',
               'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, 'Courier New', monospace;
  --font-display: 'Orbitron', var(--font-sans);

  /* ── Typography — Fluid Sizes ── */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.375vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.35rem + 0.75vw, 1.875rem);
  --text-3xl: clamp(1.875rem, 1.65rem + 1.125vw, 2.25rem);
  --text-4xl: clamp(2.25rem, 1.95rem + 1.5vw, 3rem);
  --text-5xl: clamp(3rem, 2.5rem + 2.5vw, 4rem);

  /* ── Typography — Line Heights ── */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 1.75;

  /* ── Typography — Letter Spacing ── */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* ── Typography — Font Weights ── */
  --font-thin: 100;
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  --font-black: 900;

  /* ═══════════════════════════════════
     Backward-Compatible Aliases
     Map legacy variable names to Tokyo Night values
     ═══════════════════════════════════ */

  /* Convention B — Accent aliases (was Tailwind, now Tokyo Night) */
  --accent-primary: #7aa2f7;
  --accent-secondary: #bb9af7;
  --accent-tertiary: #7dcfff;
  --accent-success: #9ece6a;
  --accent-warning: #e0af68;
  --accent-danger: #f7768e;

  /* Convention D — Bare semantic names (fixes blog-post.css, admin.css) */
  --primary: #7aa2f7;
  --primary-dark: #5d85e8;
  --secondary: #bb9af7;
  --accent: #7dcfff;
  --danger: #f7768e;
  --success: #9ece6a;
  --bg-primary: #1a1b26;
  --bg-secondary: #24283b;
  --text-primary: #c0caf5;
  --text-secondary: #a9b1d6;
  --border-color: rgba(192, 202, 245, 0.1);
  --radius: 0.5rem;
  --tag-bg: rgba(122, 162, 247, 0.1);

  /* Convention E — --color-* namespace (fixes admin sub-pages) */
  --color-blue: #7aa2f7;
  --color-purple: #bb9af7;
  --color-green: #9ece6a;
  --color-red: #f7768e;
  --color-bg: #1a1b26;
  --color-text: #c0caf5;
  --color-text-primary: #c0caf5;
  --color-text-secondary: #a9b1d6;
  --color-text-dim: #565f89;

  /* Convention F — Card & gradient aliases (fixes admin login) */
  --gradient-primary: linear-gradient(135deg, #7aa2f7 0%, #bb9af7 100%);
  --gradient-blue-purple: linear-gradient(135deg, #7aa2f7 0%, #bb9af7 100%);
  --gradient-mesh: radial-gradient(at 20% 80%, rgba(122, 162, 247, 0.15) 0%, transparent 50%),
                   radial-gradient(at 80% 20%, rgba(187, 154, 247, 0.15) 0%, transparent 50%),
                   radial-gradient(at 40% 40%, rgba(125, 207, 255, 0.1) 0%, transparent 50%),
                   #1a1b26;
  --card-bg-gradient: linear-gradient(135deg, rgba(36, 40, 59, 0.8) 0%, rgba(26, 27, 38, 0.9) 100%);
  --card-border: rgba(192, 202, 245, 0.1);
  --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
}
