/* ── Theme Switcher Widget ── */

/* Floating button + panel */
.theme-switcher {
    position: fixed;
    bottom: 5rem;
    left: 1.5rem;
    right: auto;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.theme-toggle-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color, #6366f1), var(--secondary-color, #8b5cf6));
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(99, 102, 241, 0.6);
}

.theme-panel {
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border-color, #334155);
    border-radius: 0.75rem;
    padding: 0.75rem;
    min-width: 150px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: none;
    flex-direction: column;
    gap: 0.35rem;
    backdrop-filter: blur(12px);
}

.theme-panel.open {
    display: flex;
}

.theme-panel-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted, #94a3b8);
    padding: 0 0.4rem 0.4rem;
    border-bottom: 1px solid var(--border-color, #334155);
    margin-bottom: 0.2rem;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary, #cbd5e1);
    font-size: 0.83rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    width: 100%;
}

.theme-option:hover {
    background: var(--bg-hover, #334155);
    color: var(--text-primary, #f1f5f9);
}

.theme-option.active {
    background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(139,92,246,0.2));
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--text-primary, #f1f5f9);
}

/* ── Light Theme Overrides ── */
[data-theme="light"] {
    color-scheme: light;
}

[data-theme="light"] .navbar {
    background: var(--navbar-bg, rgba(248,250,252,0.97)) !important;
    border-bottom-color: #e2e8f0;
}

[data-theme="light"] .hero {
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 50%, #f8fafc 100%);
}

[data-theme="light"] .hero-title,
[data-theme="light"] .hero-subtitle {
    color: #0f172a;
}

[data-theme="light"] .hero-description {
    color: #475569;
}

[data-theme="light"] .stat-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

[data-theme="light"] .cloud-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .cloud-card:hover,
[data-theme="light"] .cloud-card.active {
    border-color: #6366f1;
    background: #f0f0ff;
}

[data-theme="light"] .cs-card,
[data-theme="light"] .project-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .cs-card:hover,
[data-theme="light"] .project-card:hover {
    border-color: rgba(99,102,241,0.4);
    box-shadow: 0 8px 32px rgba(99,102,241,0.1);
}

[data-theme="light"] .cs-card-title,
[data-theme="light"] .cs-card-id,
[data-theme="light"] .cs-card-desc {
    color: #0f172a;
}

[data-theme="light"] .cs-card-desc {
    color: #475569;
}

[data-theme="light"] .cs-tag {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

[data-theme="light"] .cs-outcome {
    background: rgba(16,185,129,0.06);
    border-color: rgba(16,185,129,0.2);
}

[data-theme="light"] .cs-outcome-text {
    color: #334155;
}

[data-theme="light"] .filter-btn,
[data-theme="light"] .cs-pill {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

[data-theme="light"] .filter-btn.active,
[data-theme="light"] .cs-pill.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border-color: #6366f1;
}

[data-theme="light"] .search-box,
[data-theme="light"] .cs-search {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #0f172a;
}

[data-theme="light"] .search-box input,
[data-theme="light"] .cs-search {
    color: #0f172a;
}

[data-theme="light"] .section-title,
[data-theme="light"] .section-subtitle {
    color: #0f172a;
}

[data-theme="light"] .section-subtitle {
    color: #475569;
}

[data-theme="light"] .footer {
    background: #0f172a !important;
}

[data-theme="light"] .cert-item,
[data-theme="light"] .cert-group {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .contact-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .progress-section,
[data-theme="light"] .follow-journey {
    background: #f1f5f9;
}

[data-theme="light"] .booking-section {
    background: linear-gradient(135deg, #f0f0ff 0%, #faf5ff 100%);
}

/* ── Navbar CSS variable support ── */
.navbar {
    background: var(--navbar-bg, rgba(15,23,42,0.95)) !important;
    transition: background 0.3s ease;
}

/* ── Card/input CSS variable support ── */
.search-box {
    background: var(--input-bg, rgba(30,41,59,0.8));
}

.search-box input {
    background: transparent;
    color: var(--text-primary);
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
}
