/* Art direction: Tech/Finance CEO → Sophisticated, authoritative, innovative
   Palette: Dark-first, deep navy/charcoal surfaces, electric cyan primary accent, gold/amber secondary
   Typography: Clash Display (display) + Inter (body) — geometric precision meets technical clarity
   Density: Spacious — editorial personal site with generous whitespace */

/* ========== TYPE SCALE ========== */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* ========== SPACING ========== */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* ========== FONTS ========== */
  --font-display: 'Clash Display', 'Inter', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;

  /* ========== RADIUS ========== */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* ========== TRANSITIONS ========== */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* ========== CONTENT WIDTHS ========== */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;
}

/* ========== DARK MODE (Default) ========== */
:root, [data-theme="dark"] {
  /* Surfaces — deep navy/charcoal, NOT generic dark gray */
  --color-bg:               #0b0f1a;
  --color-surface:          #101624;
  --color-surface-2:        #151c2e;
  --color-surface-offset:   #131a2a;
  --color-surface-offset-2: #1a2238;
  --color-surface-dynamic:  #1f2942;
  --color-divider:          #1e2740;
  --color-border:           #283350;

  /* Text */
  --color-text:           #e2e4ea;
  --color-text-muted:     #8a90a4;
  --color-text-faint:     #4f5670;
  --color-text-inverse:   #0b0f1a;

  /* Primary Accent — Electric Cyan (blockchain/tech) */
  --color-primary:        #00d4e8;
  --color-primary-hover:  #00b8cc;
  --color-primary-active: #009eb0;
  --color-primary-highlight: #0b2a30;

  /* Secondary Accent — Gold/Amber (finance/value) */
  --color-gold:           #e8a820;
  --color-gold-hover:     #d49818;
  --color-gold-active:    #b88010;
  --color-gold-highlight: #2a2310;

  /* Success */
  --color-success:        #34d399;
  --color-success-hover:  #2abf88;
  --color-success-active: #1f9c6e;
  --color-success-highlight: #102a22;

  /* Error */
  --color-error:          #f87171;
  --color-error-hover:    #ef4444;
  --color-error-active:   #dc2626;
  --color-error-highlight: #2a1515;

  /* Warning */
  --color-warning:        #fbbf24;
  --color-warning-hover:  #f59e0b;
  --color-warning-active: #d97706;
  --color-warning-highlight: #2a2410;

  /* Shadows — dark mode */
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.5);
}

/* ========== LIGHT MODE ========== */
[data-theme="light"] {
  /* Surfaces — cool gray with subtle blue tint */
  --color-bg:               #f4f5f7;
  --color-surface:          #ffffff;
  --color-surface-2:        #f8f9fb;
  --color-surface-offset:   #eef0f4;
  --color-surface-offset-2: #e6e8ee;
  --color-surface-dynamic:  #dde0e8;
  --color-divider:          #d0d4de;
  --color-border:           #c0c5d4;

  /* Text */
  --color-text:           #0f1629;
  --color-text-muted:     #5a6178;
  --color-text-faint:     #9098b0;
  --color-text-inverse:   #f4f5f7;

  /* Primary Accent — Deeper cyan for light mode contrast */
  --color-primary:        #0094a3;
  --color-primary-hover:  #007a88;
  --color-primary-active: #00626e;
  --color-primary-highlight: #d8f4f7;

  /* Secondary — Gold */
  --color-gold:           #c08800;
  --color-gold-hover:     #a87800;
  --color-gold-active:    #906500;
  --color-gold-highlight: #f8f0d8;

  /* Success */
  --color-success:        #059669;
  --color-success-hover:  #047857;
  --color-success-active: #065f46;
  --color-success-highlight: #d1fae5;

  /* Error */
  --color-error:          #dc2626;
  --color-error-hover:    #b91c1c;
  --color-error-active:   #991b1b;
  --color-error-highlight: #fee2e2;

  /* Warning */
  --color-warning:        #d97706;
  --color-warning-hover:  #b45309;
  --color-warning-active: #92400e;
  --color-warning-highlight: #fef3c7;

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0.2 0.01 250 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.01 250 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.01 250 / 0.12);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --color-bg:               #f4f5f7;
    --color-surface:          #ffffff;
    --color-surface-2:        #f8f9fb;
    --color-surface-offset:   #eef0f4;
    --color-surface-offset-2: #e6e8ee;
    --color-surface-dynamic:  #dde0e8;
    --color-divider:          #d0d4de;
    --color-border:           #c0c5d4;
    --color-text:           #0f1629;
    --color-text-muted:     #5a6178;
    --color-text-faint:     #9098b0;
    --color-text-inverse:   #f4f5f7;
    --color-primary:        #0094a3;
    --color-primary-hover:  #007a88;
    --color-primary-active: #00626e;
    --color-primary-highlight: #d8f4f7;
    --color-gold:           #c08800;
    --color-gold-hover:     #a87800;
    --color-gold-active:    #906500;
    --color-gold-highlight: #f8f0d8;
    --color-success:        #059669;
    --color-success-hover:  #047857;
    --color-success-active: #065f46;
    --color-success-highlight: #d1fae5;
    --color-error:          #dc2626;
    --color-error-hover:    #b91c1c;
    --color-error-active:   #991b1b;
    --color-error-highlight: #fee2e2;
    --color-warning:        #d97706;
    --color-warning-hover:  #b45309;
    --color-warning-active: #92400e;
    --color-warning-highlight: #fef3c7;
    --shadow-sm: 0 1px 2px oklch(0.2 0.01 250 / 0.06);
    --shadow-md: 0 4px 12px oklch(0.2 0.01 250 / 0.08);
    --shadow-lg: 0 12px 32px oklch(0.2 0.01 250 / 0.12);
  }
}
