/* Light theme. The site is authored dark-first with Tailwind utility classes,
   so light mode remaps those utilities under html.light. */

html.light body { background: #f8fafc; color: #334155; }

html.light .bg-dark { background-color: #f8fafc; }
html.light .bg-dark\/50 { background-color: rgba(241, 245, 249, 0.9); }
html.light .bg-slate-900 { background-color: #ffffff; }
html.light .bg-slate-900\/50 { background-color: #f1f5f9; }
html.light .bg-slate-800 { background-color: #e2e8f0; }
html.light .bg-slate-800\/50 { background-color: rgba(226, 232, 240, 0.6); }
html.light .bg-slate-700\/50 { background-color: rgba(203, 213, 225, 0.6); }
html.light .bg-black\/40 { background-color: #f1f5f9; }
html.light .bg-white\/5 { background-color: rgba(15, 23, 42, 0.04); }
html.light .hover\:bg-white\/10:hover { background-color: rgba(15, 23, 42, 0.08); }
html.light .hover\:bg-slate-700:hover,
html.light .hover\:bg-slate-800:hover { background-color: #cbd5e1; }

html.light .glass {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}
html.light .glass-modal { background: rgba(255, 255, 255, 0.98); }

/* Text: white becomes ink, except on coloured surfaces (gradient/primary buttons, brand badges). */
html.light .text-white:not([class*="bg-gradient"]):not([class*="bg-primary"]):not([style*="background"]) { color: #0f172a; }
html.light [class*="bg-gradient"] .text-white,
html.light .bg-primary .text-white { color: #ffffff; }
html.light .text-slate-200 { color: #1e293b; }
html.light .text-slate-300 { color: #334155; }
html.light .text-slate-400 { color: #475569; }
html.light .text-slate-500 { color: #64748b; }

html.light .border-slate-600 { border-color: #cbd5e1; }
html.light .border-slate-700,
html.light .border-slate-700\/60 { border-color: #e2e8f0; }
html.light .border-slate-800 { border-color: #e2e8f0; }
html.light .border-white\/5 { border-color: rgba(15, 23, 42, 0.06); }
html.light .border-white\/10 { border-color: rgba(15, 23, 42, 0.1); }
html.light .border-white\/20 { border-color: rgba(15, 23, 42, 0.18); }

/* Hero primary button is white-on-dark in dark mode; invert it. */
html.light .bg-white.text-dark { background-color: #0f172a; color: #ffffff; }
html.light .bg-white.text-dark:hover { background-color: #1e293b; }

/* Accent colours tuned for dark backgrounds get darker shades for contrast on light. */
html.light .text-green-400 { color: #16a34a; }
html.light .text-blue-400 { color: #2563eb; }
html.light .text-\[\#34d399\] { color: #059669; }
html.light .text-\[\#38bdf8\] { color: #0284c7; }
html.light .text-\[\#a78bfa\] { color: #7c3aed; }
html.light .text-\[\#f472b6\] { color: #db2777; }
html.light .text-\[\#2ec27e\] { color: #16a34a; }
html.light .text-\[\#7b9ad6\] { color: #3b5bab; }

html.light ::-webkit-scrollbar-track { background: #f1f5f9; }
html.light ::-webkit-scrollbar-thumb { background: #cbd5e1; }

#themeToggle i, #themeToggleMobile i { transition: transform 0.4s ease; }
#themeToggle:hover i, #themeToggleMobile:hover i { transform: rotate(25deg); }

/* Links that turn white on hover would vanish on a light background. */
html.light .hover\:text-white:hover:not([class*="hover:bg-"]) { color: #0f172a; }
html.light .text-slate-600 { color: #64748b; }

/* Smooth colour change while the theme is being switched (class added briefly by theme.js). */
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
    transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease !important;
}

/* Horizontal swipe rows (case studies on phones) without a visible scrollbar. */
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
