/* Theme Switcher Styles */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-switcher {
    position: relative;
}

.theme-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    background: var(--card-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.theme-btn:hover {
    border-color: var(--primary-color);
    background: var(--lighter-bg);
}

.theme-icon {
    width: 20px;
    height: 20px;
    color: var(--text-medium);
    position: absolute;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.5) rotate(-90deg);
}

.theme-icon.active {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.sun-icon {
    color: #f59e0b;
}

.moon-icon {
    color: #6366f1;
}

.system-icon {
    color: var(--text-medium);
}

.theme-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 160px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.theme-switcher:hover .theme-dropdown,
.theme-dropdown:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-option {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: var(--text-medium);
    font-size: 0.95rem;
    position: relative;
}

.theme-option:hover {
    background: var(--lighter-bg);
    color: var(--text-dark);
}

.theme-option.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.theme-option svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.theme-option span {
    flex: 1;
    text-align: left;
}

.check-icon {
    opacity: 0;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: bold;
}

.theme-option.active .check-icon {
    opacity: 1;
}

/* Dark Mode Styles */
[data-theme="dark"] {
    --primary-color: #3b82f6;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --light-bg: #0f172a;
    --lighter-bg: #1e293b;
    --card-bg: #1e293b;
    --text-dark: #f1f5f9;
    --text-medium: #cbd5e1;
    --text-light: #94a3b8;
    --text-lighter: #64748b;
    --border-color: #334155;
    --border-light: #293548;
    --glass-bg: rgba(30, 41, 59, 0.9);
    --glass-border: rgba(59, 130, 246, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .animated-bg {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1e293b 100%);
}

[data-theme="dark"] .animated-bg::before {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
}

[data-theme="dark"] .animated-bg::after {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
}

[data-theme="dark"] .grid-overlay {
    background-image: linear-gradient(rgba(59, 130, 246, 0.05) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(59, 130, 246, 0.05) 1px, transparent 1px);
}

[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .navbar.scrolled {
    background: rgba(15, 23, 42, 0.98);
}

[data-theme="dark"] .hero {
    color: var(--text-dark);
}

[data-theme="dark"] .view-project {
    color: #ffffff;
}

[data-theme="dark"] .hamburger span {
    background: var(--text-dark);
}

[data-theme="dark"] .portfolio-overlay {
    background: rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .footer {
    background: var(--light-bg);
    border-top-color: var(--border-color);
}

[data-theme="dark"] .cta-banner {
    background: linear-gradient(135deg, #1e40af, #6d28d9);
}

[data-theme="dark"] .quote-icon {
    opacity: 0.05;
}

/* Smooth theme transition */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

* {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .theme-switcher {
        order: -1;
    }
    
    .nav-actions {
        position: absolute;
        right: 60px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .theme-dropdown {
        right: auto;
        left: 0;
    }
}

/* Prevent transition on page load */
.no-transition * {
    transition: none !important;
}
