/* CSS Variables with Theme Support */
:root {
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme (Default) */
[data-theme="dark"] {
    --bg-color: #050a14;
    --bg-secondary: #0a1122;
    --text-main: #ffffff;
    --text-muted: #a0aec0;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --gradient-main: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-text: linear-gradient(to right, #60a5fa, #c084fc);
    --card-hover-bg: rgba(255, 255, 255, 0.08);
}

/* Light Theme */
[data-theme="light"] {
    --bg-color: #f8fafc;
    --bg-secondary: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
    --primary: #2563eb;
    --primary-glow: rgba(37, 99, 235, 0.2);
    --gradient-main: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --gradient-text: linear-gradient(to right, #2563eb, #7c3aed);
    --card-hover-bg: rgba(255, 255, 255, 0.9);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-padding {
    padding: 5rem 0;
}

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    font-family: 'Outfit', sans-serif;
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    margin-left: 1rem;
}

[dir="rtl"] .btn-secondary {
    margin-left: 0;
    margin-right: 1rem;
}

.btn-secondary:hover {
    background: var(--glass-bg);
    border-color: var(--primary);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    background: var(--bg-secondary);
    /* Updated to use theme variable */
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

[data-theme="dark"] .navbar {
    background: rgba(5, 10, 20, 0.8);
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.8);
}

.navbar.scrolled {
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.logo img {
    height: 40px;
    width: auto;
    border-radius: 50%;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
}

.nav-links .btn-primary {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    color: white !important;
    /* Force white text even in light mode */
}

/* Controls */
.nav-controls {
    display: flex;
    gap: 1rem;
    margin-left: 1rem;
    align-items: center;
}

[dir="rtl"] .nav-controls {
    margin-left: 0;
    margin-right: 1rem;
}

.nav-controls button {
    background: none;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.nav-controls button:hover {
    background: var(--glass-bg);
    border-color: var(--primary);
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-main);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 2000;
    transition: 0.4s ease-in-out;
}

[dir="rtl"] .mobile-menu {
    right: auto;
    left: -100%;
}

[dir="rtl"] .mobile-menu.active {
    right: auto;
    left: 0;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu a {
    color: var(--text-main);
    font-size: 1.5rem;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
}

.mobile-menu-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-main);
}

[dir="rtl"] .mobile-menu-close {
    right: auto;
    left: 2rem;
}

/* Mobile Controls */
.mobile-controls {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.control-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}


/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    opacity: 0.4;
    filter: blur(80px);
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    font-family: 'Outfit', sans-serif;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: var(--text-main);
}

/* Services */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 20px;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    background: var(--card-hover-bg);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .service-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.icon-box {
    width: 60px;
    height: 60px;
    background: var(--gradient-main);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: white;
}



.service-card h3 {
    margin-bottom: 1rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
}

.service-card p {
    color: var(--text-muted);
}

/* Portfolio */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    display: block;
    text-decoration: none;
    color: var(--text-main);
    /* group; removed invalid CSS property */
}

.project-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    aspect-ratio: 16/10;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    z-index: 10;
    backdrop-filter: blur(2px);
}

.project-overlay i {
    font-size: 2rem;
    transform: scale(0.8);
    transition: var(--transition);
    color: white;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-card:hover .project-overlay i {
    transform: scale(1);
}

.project-info h3 {
    font-size: 1.5rem;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 0.5rem;
}

.project-info p {
    color: var(--primary);
    font-weight: 500;
}

/* Contact */
.contact-wrapper {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #0c162d 100%);
    border-radius: 30px;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--glass-border);
}

[data-theme="light"] .contact-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

.contact-content {
    padding: 2rem;
    z-index: 2;
}

.contact-content h2 {
    font-size: 2.5rem;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 1rem;
}

.contact-content p {
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
}

[data-theme="light"] .contact-item i {
    background: rgba(0, 0, 0, 0.05);
}

.contact-item span {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.contact-item a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--primary);
}

.contact-visual {
    position: relative;
    height: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-visual::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--gradient-main);
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.3;
}

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3rem 4rem;
    border-radius: 20px;
    text-align: center;
    transform: rotate(-5deg);
    transition: var(--transition);
}

[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

[dir="rtl"] .glass-card {
    transform: rotate(5deg);
}

[dir="rtl"] .glass-card:hover {
    transform: rotate(0deg) scale(1.05);
}


.glass-card:hover {
    transform: rotate(0deg) scale(1.05);
}

.glass-card span {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 1.5rem 0;
    /* Reduced from 3rem */
    margin-top: 5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo img {
    height: 30px;
    margin-bottom: 0.5rem;
    /* Reduced from 1rem */
}

.footer-logo p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-bottom {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    animation-delay: 0.1s;
    transition-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
    transition-delay: 0.2s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media Queries */
@media (max-width: 900px) {
    .hero h1 {
        font-size: 3rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-visual {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .hero-btns {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .btn-secondary {
        margin-left: 0;
        margin-right: 0;
    }

    .section-padding {
        padding: 3rem 0;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
}