/* The landing page uses Tailwind's dark palette. Remap its surfaces and text
   for light mode while leaving the existing dark design intact. */
:root { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --media-border: #334155;
  --media-outline: #718297;
  --media-surface: #131f2c;
  --media-inset: #1c2936;
  --media-muted: #a9bbcb;
  --media-link: #7dd3fc;
}

.header-controls { display: flex; align-items: center; gap: .5rem; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border: 1px solid transparent;
  border-radius: .5rem; background: transparent; color: #64748b; cursor: pointer;
}
.theme-toggle:hover { background: #e2e8f0; color: #0f172a; }
.theme-toggle:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }
.theme-toggle svg { width: 1.25rem; height: 1.25rem; }
.theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle { color: #94a3b8; }
:root[data-theme="dark"] .theme-toggle:hover { background: #1e293b; color: #fff; }
:root[data-theme="dark"] .theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: block; }

:root:not([data-theme="dark"]) .bg-slate-950 { background-color: #f8fafc; }
:root:not([data-theme="dark"]) .bg-slate-950\/80 { background-color: rgba(248, 250, 252, .8); }
:root:not([data-theme="dark"]) .bg-slate-950\/90 { background-color: rgba(248, 250, 252, .92); }
:root:not([data-theme="dark"]) .bg-slate-900 { background-color: #fff; }
:root:not([data-theme="dark"]) .bg-slate-900\/90,
:root:not([data-theme="dark"]) .bg-slate-900\/70 { background-color: rgba(255, 255, 255, .92); }
:root:not([data-theme="dark"]) .bg-slate-900\/40 { background-color: #edf2f8; }
:root:not([data-theme="dark"]) .bg-slate-800 { background-color: #e2e8f0; }
:root:not([data-theme="dark"]) .bg-blue-950,
:root:not([data-theme="dark"]) .bg-blue-950\/50,
:root:not([data-theme="dark"]) .bg-blue-950\/60 { background-color: #dbeafe; }
:root:not([data-theme="dark"]) .bg-cyan-950\/60 { background-color: #cffafe; }
:root:not([data-theme="dark"]) .bg-orange-950 { background-color: #ffedd5; }
:root:not([data-theme="dark"]) .from-slate-950 { --tw-gradient-from: #f8fafc var(--tw-gradient-from-position); --tw-gradient-to: rgb(248 250 252 / 0) var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
:root:not([data-theme="dark"]) .via-slate-900\/40 { --tw-gradient-to: rgb(237 242 248 / 0) var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), #edf2f8 var(--tw-gradient-via-position), var(--tw-gradient-to); }
:root:not([data-theme="dark"]) .to-slate-950 { --tw-gradient-to: #f8fafc var(--tw-gradient-to-position); }

:root:not([data-theme="dark"]) :is(.text-white, .text-slate-100, .text-slate-200) { color: #0f172a; }
:root:not([data-theme="dark"]) .text-slate-300 { color: #334155; }
:root:not([data-theme="dark"]) :is(.text-slate-400, .text-slate-500) { color: #475569; }
:root:not([data-theme="dark"]) :is(.text-blue-300, .text-blue-400) { color: #1d4ed8; }
:root:not([data-theme="dark"]) :is(.text-cyan-300, .text-cyan-400) { color: #0e7490; }
:root:not([data-theme="dark"]) .text-orange-300 { color: #9a3412; }
:root:not([data-theme="dark"]) .text-orange-400 { color: #c2410c; }
:root:not([data-theme="dark"]) .text-emerald-400 { color: #047857; }
:root:not([data-theme="dark"]) :is(.bg-blue-600, .bg-orange-600).text-white { color: #fff; }
:root:not([data-theme="dark"]) :is(.border-slate-700, .border-slate-800, .border-slate-800\/80, .border-slate-900) { border-color: #cbd5e1; }
:root:not([data-theme="dark"]) :is(.border-blue-800, .border-blue-900) { border-color: #93c5fd; }
:root:not([data-theme="dark"]) .border-cyan-800 { border-color: #67e8f9; }
:root:not([data-theme="dark"]) .border-orange-800 { border-color: #fdba74; }
:root:not([data-theme="dark"]) .hover\:text-white:hover { color: #0f172a; }
:root:not([data-theme="dark"]) :is(.hover\:bg-slate-700, .hover\:bg-slate-800):hover { background-color: #cbd5e1; }
:root:not([data-theme="dark"]) .hover\:border-slate-700:hover { border-color: #94a3b8; }

/* Markdown pages have their own stylesheet rather than Tailwind color classes. */
:root:not([data-theme="dark"]) :is(.content-page h1, .content-body h2, .content-body h3) { color: #0f172a; }
:root:not([data-theme="dark"]) :is(.content-body, .content-body p) { color: #334155; }
:root:not([data-theme="dark"]) .content-body a { color: #1d4ed8; }
:root:not([data-theme="dark"]) .content-body a:hover { color: #1e3a8a; }
:root:not([data-theme="dark"]) .content-body blockquote { border-color: #0891b2; color: #475569; }
:root:not([data-theme="dark"]) .content-body pre { background: #e2e8f0; }
:root:not([data-theme="dark"]) .post-list li { border-color: #cbd5e1; }
:root:not([data-theme="dark"]) .post-list time { color: #475569; }
