﻿/* Global Light/Dark Theme System */

:root {
    color-scheme: light;
    --theme-accent-rgb: 188, 38, 73;
}

html[data-theme='dark'] {
    color-scheme: dark;
}

/* Theme toggle control */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.42);
}

.theme-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--theme-accent-rgb), 0.28);
}

.theme-toggle .theme-toggle-icon {
    font-size: 1rem;
    line-height: 1;
}

.navbar.scrolled .theme-toggle {
    border-color: rgba(2, 6, 23, 0.14);
    background: rgba(2, 6, 23, 0.04);
    color: var(--text-primary);
}

.navbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

html[data-theme='light'] body {
    background:
        radial-gradient(900px 560px at 8% -12%, rgba(56, 189, 248, 0.07), transparent 62%),
        radial-gradient(900px 560px at 92% -4%, rgba(var(--theme-accent-rgb), 0.08), transparent 62%),
        #fcfdff;
    color: var(--text-primary);
}

/* Dark theme overrides */
html[data-theme='dark'] body {
    background:
        radial-gradient(900px 560px at 10% -6%, rgba(var(--theme-accent-rgb), 0.16), transparent 60%),
        radial-gradient(820px 520px at 92% 0%, rgba(148, 163, 184, 0.08), transparent 62%),
        #0d1527;
    color: #e9efff;
}

html[data-theme='dark'] .navbar {
    background: rgba(12, 19, 34, 0.8) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.24) !important;
}

html[data-theme='dark'] .navbar.scrolled {
    background: rgba(12, 19, 34, 0.94) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38) !important;
}

html[data-theme='dark'] .navbar-brand img {
    filter: brightness(0) invert(1) !important;
}

html[data-theme='dark'] .nav-link {
    color: rgba(227, 234, 249, 0.94) !important;
}

html[data-theme='dark'] .nav-link:hover,
html[data-theme='dark'] .nav-link.active {
    color: #ffffff !important;
    background: rgba(var(--theme-accent-rgb), 0.2) !important;
}

html[data-theme='dark'] .navbar-toggler {
    background: rgba(148, 163, 184, 0.18) !important;
}

html[data-theme='dark'] .hamburger-line {
    background: rgba(226, 232, 240, 0.96) !important;
}

html[data-theme='dark'] .lang-switch {
    background: rgba(148, 163, 184, 0.16);
    border-color: rgba(148, 163, 184, 0.3);
}

html[data-theme='dark'] .lang-btn {
    color: #e5edff;
}

html[data-theme='dark'] .theme-toggle {
    border-color: rgba(148, 163, 184, 0.34);
    background: rgba(148, 163, 184, 0.16);
    color: #eff4ff;
}

html[data-theme='dark'] .hero-section {
    background:
        radial-gradient(860px 400px at 84% 10%, rgba(var(--theme-accent-rgb), 0.2), transparent 62%),
        linear-gradient(138deg, #0d1527 0%, #16223d 54%, #24182f 100%) !important;
}

html[data-theme='dark'] .hero-subtitle {
    color: rgba(224, 232, 248, 0.9) !important;
}

html[data-theme='dark'] .feature-item {
    background: rgba(148, 163, 184, 0.16) !important;
    border-color: rgba(148, 163, 184, 0.3) !important;
    color: #e6eefc !important;
}

html[data-theme='dark'] .feature-item i {
    color: #e6eefc !important;
}

html[data-theme='dark'] .hero-buttons .btn-outline-light {
    background: rgba(226, 232, 240, 0.11) !important;
    border-color: rgba(226, 232, 240, 0.5) !important;
    color: #ffffff !important;
}

html[data-theme='dark'] .hero-buttons .btn-outline-light:hover {
    background: rgba(226, 232, 240, 0.22) !important;
}

html[data-theme='dark'] .stats-section,
html[data-theme='dark'] .portfolio-section,
html[data-theme='dark'] .process-section,
html[data-theme='dark'] .projects-section {
    background: #101a30 !important;
}

html[data-theme='dark'] .services-section,
html[data-theme='dark'] .contact-section {
    background: #13203a !important;
}

html[data-theme='dark'] .section-title,
html[data-theme='dark'] h1,
html[data-theme='dark'] h2,
html[data-theme='dark'] h3,
html[data-theme='dark'] h4,
html[data-theme='dark'] h5,
html[data-theme='dark'] h6 {
    color: #f1f5ff !important;
}

html[data-theme='dark'] .section-subtitle,
html[data-theme='dark'] .hero-subtitle,
html[data-theme='dark'] .service-card p,
html[data-theme='dark'] .portfolio-content p,
html[data-theme='dark'] .process-step p,
html[data-theme='dark'] .form-note,
html[data-theme='dark'] .stat-label,
html[data-theme='dark'] .footer-brand p,
html[data-theme='dark'] .contact-info p,
html[data-theme='dark'] .lead,
html[data-theme='dark'] .text-muted {
    color: #c0cee9 !important;
}

html[data-theme='dark'] .stat-card,
html[data-theme='dark'] .service-card,
html[data-theme='dark'] .portfolio-card,
html[data-theme='dark'] .process-step,
html[data-theme='dark'] .contact-form,
html[data-theme='dark'] .modal-content,
html[data-theme='dark'] .floating-card,
html[data-theme='dark'] .project-card {
    background: linear-gradient(180deg, #1a2845, #14213a) !important;
    border: 1px solid rgba(148, 163, 184, 0.24) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme='dark'] .service-card-large {
    background: linear-gradient(135deg, #b43052 0%, #8e2342 100%) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

html[data-theme='dark'] .stat-icon,
html[data-theme='dark'] .step-icon,
html[data-theme='dark'] .card-icon {
    box-shadow: none !important;
}

html[data-theme='dark'] .stat-number,
html[data-theme='dark'] .stat-suffix {
    color: #ffc6d3 !important;
    -webkit-text-fill-color: #ffc6d3 !important;
    background: none !important;
}

html[data-theme='dark'] .filter-btn {
    background: rgba(20, 31, 56, 0.96) !important;
    border-color: rgba(148, 163, 184, 0.34) !important;
    color: #e4ebff !important;
}

html[data-theme='dark'] .filter-btn:hover,
html[data-theme='dark'] .filter-btn.active {
    background: rgba(var(--theme-accent-rgb), 0.3) !important;
    border-color: rgba(var(--theme-accent-rgb), 0.54) !important;
    color: #ffffff !important;
}

html[data-theme='dark'] .tag {
    background: rgba(var(--theme-accent-rgb), 0.28) !important;
    border: 1px solid rgba(var(--theme-accent-rgb), 0.56);
    color: #ffe8ee !important;
}

html[data-theme='dark'] .portfolio-overlay {
    background: rgba(11, 18, 32, 0.6) !important;
}

html[data-theme='dark'] .form-control,
html[data-theme='dark'] .form-select,
html[data-theme='dark'] textarea.form-control {
    background: #101a31 !important;
    border-color: rgba(148, 163, 184, 0.34) !important;
    color: #edf3ff !important;
}

html[data-theme='dark'] .form-control::placeholder,
html[data-theme='dark'] textarea.form-control::placeholder {
    color: #97abd0 !important;
}

html[data-theme='dark'] .form-floating > label {
    color: #a9bce0 !important;
}

html[data-theme='dark'] .form-control:focus,
html[data-theme='dark'] .form-select:focus {
    background: #0e182d !important;
    border-color: rgba(var(--theme-accent-rgb), 0.64) !important;
    box-shadow: 0 0 0 3px rgba(var(--theme-accent-rgb), 0.24) !important;
}

html[data-theme='dark'] .modal-header,
html[data-theme='dark'] .modal-footer,
html[data-theme='dark'] .bg-light {
    background: #13203a !important;
    border-color: rgba(148, 163, 184, 0.24) !important;
}

html[data-theme='dark'] .btn-secondary {
    background: #314564;
    border-color: #314564;
}

html[data-theme='dark'] .footer {
    background: linear-gradient(145deg, #0d172b 0%, #192741 100%) !important;
}

html[data-theme='dark'] .footer-links a {
    color: #c6d3ee !important;
}

html[data-theme='dark'] .footer-links a:hover {
    color: #ffffff !important;
}

html[data-theme='dark'] .footer-divider {
    border-color: rgba(148, 163, 184, 0.24) !important;
}

html[data-theme='dark'] .page-hero {
    background:
        radial-gradient(920px 480px at 84% 2%, rgba(var(--theme-accent-rgb), 0.2), transparent 62%),
        linear-gradient(180deg, #0d1527 0%, #10192f 70%, rgba(13, 21, 39, 0) 100%) !important;
}

html[data-theme='dark'] .page-hero-subtitle {
    color: #c6d3ec !important;
}

html[data-theme='dark'] .empty-state i,
html[data-theme='dark'] .empty-state h3,
html[data-theme='dark'] .empty-state p {
    color: #c0cee9 !important;
}

@media (max-width: 991.98px) {
    .navbar-actions {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .navbar-actions .theme-toggle {
        flex-shrink: 0;
    }
}

@media (max-width: 767.98px) {
    .theme-toggle {
        width: 38px;
        height: 38px;
    }
}
