/* ============================================
   CybTech — Theme System (Dark / Light)
   ============================================ */

/* ── Light Theme (Default) ──────────────────── */
:root, [data-theme="light"] {
    --bg-primary:    #fafbfe;
    --bg-secondary:  #f1f0f9;
    --bg-tertiary:   #e8e5f5;
    --bg-card:       rgba(255, 255, 255, 0.9);
    --text-primary:  #1a1033;
    --text-secondary:#4a4562;
    --text-tertiary: #6b6580;
    --border-color:  rgba(124, 58, 237, 0.12);
    --glass-bg:      rgba(255, 255, 255, 0.7);
    --glass-border:  rgba(124, 58, 237, 0.1);
    --nav-bg:        rgba(250, 251, 254, 0.85);
    --nav-bg-solid:  rgba(250, 251, 254, 0.98);
    --footer-bg:     #1a1033;

    --shadow-glow:    0 0 20px rgba(124, 58, 237, 0.15), 0 0 60px rgba(124, 58, 237, 0.05);
    --shadow-glow-lg: 0 0 30px rgba(124, 58, 237, 0.25), 0 0 80px rgba(168, 85, 247, 0.1);
}

/* ── Dark Theme ────────────────────────────── */
[data-theme="dark"] {
    --bg-primary:    #0a0e1a;
    --bg-secondary:  #111827;
    --bg-tertiary:   #1a1f35;
    --bg-card:       rgba(17, 24, 39, 0.8);
    --text-primary:  #f1f5f9;
    --text-secondary:#94a3b8;
    --text-tertiary: #64748b;
    --border-color:  rgba(124, 58, 237, 0.15);
    --glass-bg:      rgba(10, 14, 26, 0.7);
    --glass-border:  rgba(124, 58, 237, 0.1);
    --nav-bg:        rgba(10, 14, 26, 0.85);
    --nav-bg-solid:  rgba(10, 14, 26, 0.98);
    --footer-bg:     #060a14;
}

/* Default (Light) Component Styles */
.hero { background: linear-gradient(135deg, #ede9fe 0%, #fafbfe 50%, #e0e7ff 100%); }
.hero-title { color: #1a1033; }
.hero-subtitle { color: #4a4562; }
.hero-badge { background: rgba(124, 58, 237, 0.1); border-color: rgba(124, 58, 237, 0.2); color: var(--primary-600); }
.stats-section { background: linear-gradient(135deg, #ede9fe 0%, #f5f3ff 100%); }
.cta-section { background: var(--gradient-cta); }
.page-header { background: linear-gradient(135deg, #ede9fe 0%, #fafbfe 50%, #e0e7ff 100%); border-bottom: 1px solid rgba(124, 58, 237, 0.1); }
.page-header::before { background: radial-gradient(circle at 20% 30%, rgba(124, 58, 237, 0.08) 0%, transparent 50%); }
.breadcrumbs { color: #6b6580; }
.breadcrumbs a { color: #4a4562; }
.breadcrumbs .current { color: var(--primary-600); }
.footer { color: #e2e8f0; }
.footer h4 { color: #f1f5f9; }
.footer p, .footer a { color: #94a3b8; }
.footer a:hover { color: #ffffff; }
.card { background: var(--bg-card); box-shadow: var(--shadow-md); }
.card:hover { box-shadow: var(--shadow-glow), var(--shadow-xl); }
#particles-canvas { opacity: 0.3; }

/* Dark Mode Overrides */
[data-theme="dark"] .cta-section { 
    background: linear-gradient(135deg, #1a0b3a 0%, #0a0e1a 100%); 
    border-top: 1px solid rgba(124, 58, 237, 0.1);
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
}
[data-theme="dark"] .hero { background: var(--gradient-hero); }
[data-theme="dark"] .hero-title, [data-theme="dark"] .hero-subtitle { color: inherit; }
[data-theme="dark"] .stats-section { background: var(--bg-secondary); }
[data-theme="dark"] #particles-canvas { opacity: 1; }

/* ── Theme Toggle Button ───────────────────── */
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    border-color: var(--primary-500);
    color: var(--primary-400);
    background: rgba(124, 58, 237, 0.1);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-base);
}

.theme-toggle:hover svg {
    transform: rotate(15deg);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }
