﻿html[lang="ar"] {
    font-family: 'Tajawal', sans-serif;
}

html[lang="ku"] {
    font-family: 'Noto Sans Arabic', sans-serif;
}

html[lang="en"] {
    font-family: 'Inter', sans-serif;
}

:root {
    --gold: #C9A84C;
    --gold-light: #E8C96A;
    --gold-dim: rgba(201,168,76,0.15);
    --deep: #070D1A;
    --surface: #0E1828;
    --surface2: #162035;
    --border: rgba(201,168,76,0.2);
    --text: #EAE6DB;
    --muted: #7A8BA0;
    --blue-accent: #1A6BCC;
    --river: #0A4A7A;
}

/* ===== LIGHT MODE ===== */
body.light-mode {
    --deep: #F0E8D0;
    --surface: #FDFAF2; 
    --surface2: #E4D8B8; 
    --border: rgba(120,88,20,0.22);
    --text: #1A1206; 
    --muted: #5C4A20; 
}

    body.light-mode ::-webkit-scrollbar-track {
        background: #F0E8D0;
    }

    body.light-mode ::-webkit-scrollbar-thumb {
        background: #C9A84C;
    }

    body.light-mode nav {
        background: rgba(240,232,208,0.97);
        border-bottom-color: rgba(120,88,20,0.2);
    }

    /* Terminal */
    body.light-mode .terminal {
        background: #FDFAF2;
        border-color: rgba(120,88,20,0.25);
        box-shadow: 0 20px 60px rgba(60,40,8,0.12), 0 0 0 1px rgba(201,168,76,0.12);
    }

    body.light-mode .terminal-body {
        background: #FDFAF2;
    }

    body.light-mode .terminal-header {
        background: #E4D8B8;
        border-bottom-color: rgba(120,88,20,0.18);
    }

    body.light-mode .tc-white {
        color: #1A1206;
    }

    body.light-mode .tc-key {
        color: #8A5C0C;
    }

    body.light-mode .tc-comment {
        color: #8A7848;
    }

    body.light-mode .tc-string {
        color: #2A6E3A;
    }

    body.light-mode .tc-blue {
        color: #1A5FA0;
    }

    body.light-mode .tc-gold {
        color: #7A5C0E;
    }

    body.light-mode #home::before {
        background: radial-gradient(ellipse 80% 60% at 70% 50%, rgba(201,168,76,0.08) 0%, transparent 70%), radial-gradient(ellipse 50% 80% at 10% 80%, rgba(201,168,76,0.04) 0%, transparent 60%);
    }

    body.light-mode .river-lines svg {
        opacity: 0.06;
    }

    body.light-mode .hero-badge {
        background: rgba(201,168,76,0.1);
        border-color: rgba(120,88,20,0.25);
    }

    body.light-mode h1 {
        color: #1A1206;
    }

        body.light-mode h1 .highlight {
            color: #7A5C0E;
        }

            body.light-mode h1 .highlight::after {
                background: linear-gradient(90deg, transparent, #7A5C0E, transparent);
            }

    body.light-mode .stat-num {
        color: #7A5C0E;
    }

    /* About section */
    body.light-mode #about {
        background: #E4D8B8;
        border-color: rgba(120,88,20,0.16);
    }

    body.light-mode .about-watermark-svg {
        opacity: 0.05;
    }

    body.light-mode .value-card {
        background: #FDFAF2;
        border-color: rgba(120,88,20,0.2);
        box-shadow: 0 2px 12px rgba(80,55,8,0.06);
    }

        body.light-mode .value-card:hover {
            border-color: rgba(120,88,20,0.4);
            box-shadow: 0 4px 20px rgba(80,55,8,0.1);
        }

    body.light-mode .value-icon-svg {
        background: rgba(201,168,76,0.12);
        border-color: rgba(120,88,20,0.2);
    }

    body.light-mode .offer-list {
        background: #FDFAF2;
        border-color: rgba(120,88,20,0.22);
        box-shadow: 0 4px 20px rgba(80,55,8,0.07);
    }

    body.light-mode .offer-item {
        border-bottom-color: rgba(120,88,20,0.12);
    }

        body.light-mode .offer-item:hover {
            background: rgba(201,168,76,0.08);
        }

    body.light-mode .offer-icon {
        background: rgba(201,168,76,0.12);
        border-color: rgba(120,88,20,0.2);
    }

    /* Services */
    body.light-mode #services {
        background: #F0E8D0;
    }

    body.light-mode .services-grid {
        background: rgba(120,88,20,0.14);
    }

    body.light-mode .service-card {
        background: #FDFAF2;
        box-shadow: none;
    }

        body.light-mode .service-card:hover {
            background: #F5EED8;
        }

    body.light-mode .section-tag {
        color: #7A5C0E;
    }

    body.light-mode .section-title {
        color: #1A1206;
    }

    body.light-mode .section-divider {
        background: linear-gradient(90deg, #7A5C0E, transparent);
    }

    body.light-mode .section-sub {
        color: #5C4A20;
    }

    body.light-mode .tag {
        border-color: rgba(120,88,20,0.25);
        color: #7A5C0E;
    }

    body.light-mode .service-card:hover .tag {
        border-color: rgba(120,88,20,0.45);
        color: #7A5C0E;
    }

    body.light-mode .service-num {
        color: #7A5C0E;
    }

    body.light-mode .service-icon {
        background: rgba(201,168,76,0.12);
        border-color: rgba(120,88,20,0.2);
    }

    /* Tech */
    body.light-mode #tech {
        background: #E4D8B8;
        border-color: rgba(120,88,20,0.16);
    }

    body.light-mode .tech-grid {
        background: rgba(120,88,20,0.14);
    }

    body.light-mode .tech-small-grid {
        background: rgba(120,88,20,0.14);
    }

    body.light-mode .tech-card {
        background: #FDFAF2;
        box-shadow: none;
    }

        body.light-mode .tech-card:hover {
            background: #F5EED8;
        }

    body.light-mode .tech-small {
        background: #FDFAF2;
    }

        body.light-mode .tech-small:hover {
            background: #F5EED8;
            color: #7A5C0E;
        }

    body.light-mode .tech-row-label {
        border-bottom-color: rgba(120,88,20,0.12);
    }

    /* Team */
    body.light-mode #team {
        background: #F0E8D0;
    }

    body.light-mode .team-grid {
        background: rgba(120,88,20,0.14);
    }

    body.light-mode .team-card {
        background: #FDFAF2;
    }

        body.light-mode .team-card:hover {
            background: #F5EED8;
        }

    body.light-mode .team-dept {
        background: rgba(201,168,76,0.14);
        color: #7A5C0E;
    }

    body.light-mode .team-count {
        color: rgba(122,92,14,0.18);
    }

    body.light-mode .team-stack {
        color: #7A6838;
    }

    /* Contact */
    body.light-mode #contact {
        background: #E4D8B8;
    }

    body.light-mode .contact-info-item {
        border-bottom-color: rgba(120,88,20,0.15);
    }

    body.light-mode .contact-icon {
        background: rgba(201,168,76,0.12);
        border-color: rgba(120,88,20,0.2);
    }

    body.light-mode .contact-info-label {
        color: #7A5C0E;
    }

    body.light-mode .social-link {
        border-color: rgba(120,88,20,0.25);
    }

        body.light-mode .social-link:hover {
            border-color: #C9A84C;
            background: rgba(201,168,76,0.12);
        }

        body.light-mode .social-link svg {
            fill: #5C4A20;
        }

        body.light-mode .social-link:hover svg {
            fill: #7A5C0E;
        }

    body.light-mode .contact-form {
        background: #FDFAF2;
        border-color: rgba(120,88,20,0.22);
        box-shadow: 0 4px 24px rgba(80,55,8,0.08);
    }

        body.light-mode .contact-form::before {
            background: linear-gradient(90deg, transparent, #C9A84C, transparent);
        }

        body.light-mode .contact-form input,
        body.light-mode .contact-form select,
        body.light-mode .contact-form textarea {
            background: #E4D8B8;
            color: #1A1206;
            border-color: rgba(120,88,20,0.2);
        }

            body.light-mode .contact-form input:focus,
            body.light-mode .contact-form select:focus,
            body.light-mode .contact-form textarea:focus {
                border-color: #C9A84C;
            }

            body.light-mode .contact-form input::placeholder,
            body.light-mode .contact-form textarea::placeholder {
                color: rgba(92,74,32,0.4);
            }

            body.light-mode .contact-form select option {
                background: #E4D8B8;
                color: #1A1206;
            }

    body.light-mode .form-group label {
        color: #7A5C0E;
    }

    /* Footer */
    body.light-mode footer {
        background: #D8C898;
        border-top-color: rgba(120,88,20,0.22);
    }

    body.light-mode .footer-bottom {
        border-top-color: rgba(120,88,20,0.15);
    }

    body.light-mode .footer-col h4 {
        border-bottom-color: rgba(120,88,20,0.15);
    }

    body.light-mode .footer-copy {
        color: rgba(92,74,32,0.5);
    }

    body.light-mode .footer-made {
        color: rgba(92,74,32,0.5);
    }

    /* Nav & controls */
    body.light-mode .lang-btn {
        border-color: rgba(120,88,20,0.28);
        color: #5C4A20;
    }

    body.light-mode .lang-menu {
        background: #FDFAF2;
        border-color: rgba(120,88,20,0.22);
    }

        body.light-mode .lang-menu a:hover {
            background: rgba(201,168,76,0.1);
        }

    body.light-mode .nav-links a {
        color: #5C4A20;
    }

        body.light-mode .nav-links a:hover {
            color: #7A5C0E;
        }

    body.light-mode .nav-cta {
        background: #C9A84C !important;
        color: #1A1206 !important;
    }

    body.light-mode .geo-accent {
        border-color: rgba(122,92,14,0.35);
    }

    body.light-mode .theme-toggle {
        border-color: rgba(120,88,20,0.28);
        color: #5C4A20;
    }

        body.light-mode .theme-toggle:hover {
            border-color: #C9A84C;
            color: #7A5C0E;
            background: rgba(201,168,76,0.1);
        }

    body.light-mode .mobile-menu-btn {
        border-color: rgba(120,88,20,0.28);
        color: #5C4A20;
    }

    /* Section borders in light mode */
    body.light-mode #about,
    body.light-mode #tech {
        border-top: 1px solid rgba(120,88,20,0.16);
        border-bottom: 1px solid rgba(120,88,20,0.16);
    }

/* Theme toggle button */
.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--muted);
    flex-shrink: 0;
}

    .theme-toggle:hover {
        border-color: var(--gold);
        color: var(--gold);
        background: var(--gold-dim);
    }

    .theme-toggle svg {
        width: 16px;
        height: 16px;
        transition: transform 0.4s ease;
    }

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

    .theme-toggle .icon-moon {
        display: block;
    }

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

body.light-mode .theme-toggle .icon-moon {
    display: none;
}

body.light-mode .theme-toggle .icon-sun {
    display: block;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--deep);
    color: var(--text);
    overflow-x: hidden;
}

    /* ===== NOISE TEXTURE OVERLAY ===== */
    body::before {
        content: '';
        position: fixed;
        inset: 0;
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
        pointer-events: none;
        z-index: 9999;
        opacity: 0.4;
    }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--deep);
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 2px;
}

/* ===== NAV ===== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(7,13,26,0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ===== LOGO ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.logo-icon {
    width: 44px;
    height: 44px;
    position: relative;
    flex-shrink: 0;
}

    .logo-icon svg {
        width: 100%;
        height: 100%;
    }

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-ar {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

.logo-en {
    font-size: 0.62rem;
    font-weight: 500;
    color: var(--gold);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    font-family: 'IBM Plex Mono', monospace;
    margin-top: 3px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
}

    .nav-links a {
        text-decoration: none;
        color: var(--muted);
        font-size: 0.9rem;
        font-weight: 500;
        transition: color 0.2s;
    }

        .nav-links a:hover {
            color: var(--gold);
        }

.nav-cta {
    padding: 0.55rem 1.4rem;
    background: var(--gold);
    color: var(--deep) !important;
    font-weight: 700 !important;
    border-radius: 6px;
    font-size: 0.85rem !important;
    transition: background 0.2s, transform 0.15s !important;
}

    .nav-cta:hover {
        background: var(--gold-light) !important;
        transform: translateY(-1px);
        color: var(--deep) !important;
    }

.lang-dropdown {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    background: #070D1A;
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    font-weight: 500;
    color: #7A8BA0;
}

.lang-menu {
    position: absolute;
    top: 45px;
    right: 0;
    background: #0f1a2b;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 6px;
    min-width: 110px;
    display: none;
    flex-direction: column;
    z-index: 1000;
}

    .lang-menu.show {
        display: flex;
    }

.lang-option {
    background: none;
    border: none;
    color: #C9A84C;
    text-align: left;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 6px;
}

    .lang-option:hover {
        background: rgba(255,255,255,0.05);
        border: 1px solid #C9A84C;
        width: 58px;
    }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
