/* ============================================================
   THEME SYSTEM — CSS Variables for Dark & Light
   ============================================================ */

:root {
  /* Shared / structural tokens */
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 36px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --font-base: 'Vazirmatn', 'Segoe UI', Tahoma, system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  --header-h: 72px;
  --maxw: 1200px;
}

/* -------------------- DARK THEME (default) -------------------- */
[data-theme="dark"] {
  --accent: #D7FF28;
  --accent-rgb: 215, 255, 40;
  --accent-contrast: #0c0d08;
  --accent-soft: rgba(215, 255, 40, 0.12);

  --bg: #0a0b0d;
  --bg-elev: #121317;
  --bg-elev-2: #1a1c22;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.07);

  --text: #f2f4f5;
  --text-muted: #a7adb4;
  --text-faint: #6c727a;

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.65);
  --shadow-accent: 0 18px 50px rgba(215, 255, 40, 0.18);

  --backdrop: rgba(4, 5, 6, 0.7);
  --glass: rgba(18, 19, 23, 0.6);
}

/* -------------------- LIGHT THEME -------------------- */
[data-theme="light"] {
  --accent: #FFB347;
  --accent-rgb: 255, 179, 71;
  --accent-contrast: #3a2300;
  --accent-soft: rgba(255, 179, 71, 0.16);

  --bg: #f6f7f9;
  --bg-elev: #ffffff;
  --bg-elev-2: #ffffff;
  --surface: rgba(15, 17, 21, 0.03);
  --surface-strong: rgba(15, 17, 21, 0.06);

  --text: #14161a;
  --text-muted: #5a616b;
  --text-faint: #9aa1ab;

  --border: rgba(15, 17, 21, 0.08);
  --border-strong: rgba(15, 17, 21, 0.16);

  --shadow-sm: 0 4px 14px rgba(20, 22, 26, 0.08);
  --shadow-md: 0 14px 40px rgba(20, 22, 26, 0.12);
  --shadow-lg: 0 30px 80px rgba(20, 22, 26, 0.16);
  --shadow-accent: 0 18px 50px rgba(255, 179, 71, 0.28);

  --backdrop: rgba(40, 42, 48, 0.45);
  --glass: rgba(255, 255, 255, 0.65);
}

/* Theme transition on the root for smooth toggling */
html {
  transition: background-color 0.45s var(--ease-soft), color 0.45s var(--ease-soft);
}

/* Theme toggle icon visibility */
[data-theme="dark"] .theme-icon--light { display: none; }
[data-theme="dark"] .theme-icon--dark  { display: inline; }
[data-theme="light"] .theme-icon--dark  { display: none; }
[data-theme="light"] .theme-icon--light { display: inline; }
