/* Theme transitions */
html.theme-ready *,
html.theme-ready *::before,
html.theme-ready *::after {
    transition: background-color 0.35s ease, border-color 0.35s ease, color 0.25s ease, box-shadow 0.35s ease;
}

/* ── Light mode overrides ── */
html:not(.dark) body {
    background-color: #f8fafc;
    color: #0f172a;
}

html:not(.dark) .theme-nav-shell {
    background-color: rgba(255, 255, 255, 0.88);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
}

html:not(.dark) .theme-nav-link {
    color: #64748b;
}

html:not(.dark) .theme-nav-link.is-active {
    color: var(--cyan);
}

html:not(.dark) .theme-mobile-menu {
    background-color: rgba(255, 255, 255, 0.95);
    border-color: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

html:not(.dark) .theme-mobile-link {
    border-color: rgba(15, 23, 42, 0.08);
    color: #334155;
}

html:not(.dark) .theme-mobile-btn {
    color: #0f172a;
}

html:not(.dark) .theme-toggle-btn {
    color: #475569;
    border-color: rgba(15, 23, 42, 0.12);
    background-color: rgba(255, 255, 255, 0.7);
}

html:not(.dark) .theme-toggle-btn:hover {
    color: #0f172a;
    border-color: rgba(58, 178, 213, 0.5);
}

html:not(.dark) .bg-brand-dark:not(.hero-dark) {
    background-color: #f1f5f9;
}

html:not(.dark) .bg-brand-charcoal {
    background-color: #ffffff;
}

html:not(.dark) .bg-black:not(.hero-dark *) {
    background-color: #ffffff;
}

html:not(.dark) section:not(.hero-dark) .text-white,
html:not(.dark) footer .text-white {
    color: #0f172a;
}

html:not(.dark) section:not(.hero-dark) .text-gray-400,
html:not(.dark) footer .text-gray-400 {
    color: #64748b;
}

html:not(.dark) section:not(.hero-dark) .text-gray-500,
html:not(.dark) footer .text-gray-500 {
    color: #94a3b8;
}

html:not(.dark) section:not(.hero-dark) .border-white\/10,
html:not(.dark) footer .border-white\/10,
html:not(.dark) .theme-modal .border-white\/10,
html:not(.dark) .theme-form .border-white\/10,
html:not(.dark) .theme-form .border-white\/20 {
    border-color: rgba(15, 23, 42, 0.1);
}

html:not(.dark) section:not(.hero-dark) .border-white\/20 {
    border-color: rgba(15, 23, 42, 0.15);
}

html:not(.dark) section:not(.hero-dark) .group.bg-black,
html:not(.dark) section:not(.hero-dark) .bg-brand-charcoal.border {
    background-color: #ffffff;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

html:not(.dark) section:not(.hero-dark) .group.bg-black:hover {
    border-color: #3AB2D5;
}

html:not(.dark) .theme-loading {
    background-color: #ffffff;
}

html:not(.dark) .theme-loading .theme-loading-bar {
    background-color: rgba(15, 23, 42, 0.1);
}

html:not(.dark) footer.theme-footer {
    background-color: #ffffff;
    border-color: rgba(15, 23, 42, 0.08);
}

html:not(.dark) .theme-modal {
    background-color: rgba(248, 250, 252, 0.95);
}

html:not(.dark) .theme-modal-panel {
    background-color: #ffffff;
    border-color: rgba(15, 23, 42, 0.1);
}

html:not(.dark) .theme-form input,
html:not(.dark) .theme-form select,
html:not(.dark) .theme-form textarea {
    background-color: #f8fafc;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.15);
}

html:not(.dark) .hero-text-stroke {
    -webkit-text-stroke: 2px #fff;
}

html:not(.dark) .theme-logo-wrap {
    background-color: #ffffff;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

html:not(.dark) #cursor-follower {
    border-color: #3AB2D5;
}

/* Keep hero & image overlays dark */
html:not(.dark) .hero-dark,
html:not(.dark) .hero-dark .text-white,
html:not(.dark) .hero-dark .text-white\/50,
html:not(.dark) .hero-dark .border-white\/10,
html:not(.dark) .hero-dark .border-white\/30 {
    color: inherit;
}

html:not(.dark) .hero-dark .text-white { color: #ffffff; }
html:not(.dark) .hero-dark .text-white\/50 { color: rgba(255, 255, 255, 0.5); }
html:not(.dark) .hero-dark .border-white\/10 { border-color: rgba(255, 255, 255, 0.1); }
html:not(.dark) .hero-dark .border-white\/30 { border-color: rgba(255, 255, 255, 0.3); }
