/* Site-wide themes. Colors are "R G B" so Tailwind's opacity modifiers (bg-blue-500/10) keep working.
   The main page maps Tailwind's slate/blue/indigo/white onto these; other pages use the --bg/--text aliases. */
:root, [data-theme="dark"] {
  --s-950: 2 6 23;  --s-900: 15 23 42;  --s-800: 30 41 59;  --s-700: 51 65 85;
  --s-400: 148 163 184; --s-300: 203 213 225; --s-200: 226 232 240; --s-100: 241 245 249;
  --white: 255 255 255;
  --b-300: 147 197 253; --b-400: 96 165 250; --b-500: 59 130 246; --b-600: 37 99 235;
  --i-600: 79 70 229;
  --font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
[data-theme="light"] {
  --s-950: 248 250 252; --s-900: 255 255 255; --s-800: 226 232 240; --s-700: 203 213 225;
  --s-400: 71 85 105;   --s-300: 51 65 85;    --s-200: 30 41 59;    --s-100: 15 23 42;
  --white: 2 6 23;
  --b-300: 29 78 216; --b-400: 37 99 235; --b-500: 59 130 246; --b-600: 37 99 235;
  --i-600: 129 140 248;
  color-scheme: light;
}
[data-theme="oldschool"] {
  --s-950: 0 0 0;     --s-900: 6 18 6;     --s-800: 0 110 0;    --s-700: 0 80 0;
  --s-400: 0 190 0;   --s-300: 40 230 40;  --s-200: 90 255 90;  --s-100: 51 255 51;
  --white: 160 255 160;
  --b-300: 255 200 60; --b-400: 255 176 0; --b-500: 255 176 0; --b-600: 200 130 0;
  --i-600: 0 120 0;
  --font: "Courier New", Courier, monospace;
  color-scheme: dark;
}
[data-theme="simple"] {
  --s-950: 255 255 255; --s-900: 255 255 255; --s-800: 212 212 212; --s-700: 163 163 163;
  --s-400: 82 82 82;    --s-300: 64 64 64;    --s-200: 38 38 38;    --s-100: 23 23 23;
  --white: 0 0 0;
  --b-300: 29 78 216; --b-400: 29 78 216; --b-500: 29 78 216; --b-600: 29 78 216;
  --i-600: 255 255 255;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
/* Mocha: Simple's calm layout in warm paper and coffee browns. */
[data-theme="mocha"] {
  --s-950: 245 239 230; --s-900: 251 247 241; --s-800: 220 203 181; --s-700: 196 169 138;
  --s-400: 112 84 62;   --s-300: 92 64 51;    --s-200: 74 52 40;    --s-100: 59 42 32;
  --white: 43 29 20;
  --b-300: 139 69 19; --b-400: 150 75 30; --b-500: 160 82 45; --b-600: 139 69 19;
  --i-600: 245 239 230;
  --font: Georgia, "Times New Roman", serif;
  color-scheme: light;
}
/* Nord: cool arctic blue-grey, easy on the eyes for long reading. */
[data-theme="nord"] {
  --s-950: 46 52 64;    --s-900: 59 66 82;    --s-800: 76 86 106;   --s-700: 94 105 126;
  --s-400: 216 222 233; --s-300: 229 233 240; --s-200: 236 239 244; --s-100: 236 239 244;
  --white: 255 255 255;
  --b-300: 143 188 187; --b-400: 136 192 208; --b-500: 129 161 193; --b-600: 94 129 172;
  --i-600: 180 142 173;
  color-scheme: dark;
}
/* Sunset: deep plum with warm orange highlights. */
[data-theme="sunset"] {
  --s-950: 26 15 31;    --s-900: 42 23 48;    --s-800: 74 42 79;    --s-700: 99 60 104;
  --s-400: 216 180 200; --s-300: 236 205 222; --s-200: 248 225 236; --s-100: 253 242 248;
  --white: 255 255 255;
  --b-300: 253 186 116; --b-400: 251 146 60; --b-500: 249 115 22; --b-600: 234 88 12;
  --i-600: 219 39 119;
  color-scheme: dark;
}

:root {
  --bg: rgb(var(--s-950)); --card: rgb(var(--s-900)); --border: rgb(var(--s-800)); --text: rgb(var(--s-100));
  --muted: rgb(var(--s-400)); --accent: rgb(var(--b-500)); --accent-soft: rgb(var(--b-500) / .12);
}
body { font-family: var(--font) !important; }

/* Old school: square corners, terminal glow, no soft effects. */
[data-theme="oldschool"] * { border-radius: 0 !important; box-shadow: none !important; backdrop-filter: none !important; }
[data-theme="oldschool"] body { text-shadow: 0 0 4px rgb(var(--s-100) / .45); }
[data-theme="oldschool"] .bg-clip-text { background: none !important; color: rgb(var(--s-100)) !important; -webkit-text-fill-color: currentColor; }

/* Simple and Mocha: no glows, gradients, shadows or hover motion. */
:is([data-theme="simple"], [data-theme="mocha"]) .ambient { display: none; }
:is([data-theme="simple"], [data-theme="mocha"]) * { box-shadow: none !important; backdrop-filter: none !important; }
:is([data-theme="simple"], [data-theme="mocha"]) .bg-clip-text { background: none !important; color: rgb(var(--s-100)) !important; -webkit-text-fill-color: currentColor; }
:is([data-theme="simple"], [data-theme="mocha"]) .card-shine { display: none; }
:is([data-theme="simple"], [data-theme="mocha"]) [class*="hover:-translate-y"]:hover { transform: none !important; }

/* Sunset: the big name glows from cream into orange. */
[data-theme="sunset"] .bg-clip-text { background-image: linear-gradient(to right, rgb(var(--s-100)), rgb(var(--b-300)), rgb(var(--b-500))) !important; }

/* Theme picker added by theme.js */
.theme-pick {
  position: fixed; right: 12px; bottom: 12px; z-index: 50; font: 13px var(--font);
  padding: 6px 10px; border-radius: 10px; cursor: pointer;
  background: rgb(var(--s-900)); color: rgb(var(--s-100)); border: 1px solid rgb(var(--s-800));
}

/* Old school accent is amber, which needs dark text on buttons. */
[data-theme="oldschool"] .btn:not(.ghost) { color: #000 !important; text-shadow: none; }

/* Make the hidden attribute always win, even over display:flex/inline-block rules. */
[hidden] { display: none !important; }
