/* =========================================
   1. CSS Variables & Theme Setup
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Poppins:wght@500;600;700&display=swap');

:root {
    /* Dark Mode (Default to match mockup) */
    --bg-color: #050914;
    --bg-gradient: radial-gradient(circle at 15% 50%, rgba(20, 35, 90, 0.4) 0%, #050914 50%), 
                   radial-gradient(circle at 85% 30%, rgba(55, 30, 110, 0.3) 0%, #050914 50%);
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --accent-blue: #4a6bfd;
    --accent-purple: #7b4aff;
    --accent-gradient: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover-bg: rgba(255, 255, 255, 0.06);
    
    /* Layout & Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --max-width: 1200px;
    --transition: all 0.3s ease;
}

/* Light Mode Override */
body.light-mode {
    --bg-color: #f8fafc;
    --bg-gradient: radial-gradient(circle at 15% 50%, rgba(74, 107, 253, 0.1) 0%, #f8fafc 50%);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-hover-bg: rgba(255, 255, 255, 0.9);
}

/* =========================================
   2. Reset & Base Styles
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   3. Glassmorphism Utilities
   ========================================= */
.glass-navbar, .glass-container, .glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
}

.glass-card {
    border-radius: 16px;
    padding: 24px;
    transition: var(--transition);
}

.glass-card:hover {
    background: var(--glass-hover-bg);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.glass-badge {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* =========================================
   4. Buttons & Links
   ========================================= */
.btn {
    position: relative;
    overflow: hidden;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 8px;

    font-weight: 500;
    font-family: var(--font-body);

    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(74, 107, 253, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;

    background: linear-gradient(
        120deg,
        transparent,
        rgba(255,255,255,0.4),
        transparent
    );

    transform: skewX(-25deg);
    transition: 0.7s;
}

.btn-primary:hover::before {
    left: 150%;
}

.btn-primary:hover {
animation: pulseGlow 1.5s infinite;
}


@keyframes pulseGlow {
    0% {
        box-shadow:
            0 0 10px rgba(74,107,253,0.4);
    }

    50% {
        box-shadow:
            0 0 25px rgba(74,107,253,0.7),
            0 0 50px rgba(74,107,253,0.3);
    }

    100% {
        box-shadow:
            0 0 10px rgba(74,107,253,0.4);
    }
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--glass-hover-bg);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* =========================================
   5. Navigation Bar
   ========================================= */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: var(--max-width);
    height: 70px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    z-index: 1000;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 12px; /* Space between the logo image and the text */
}

.logo-img {
    height: 32px; /* Adjust this value to make your logo bigger or smaller */
    width: auto;
    display: block;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);

    background-clip: text;
    -webkit-background-clip: text;

    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.social-links a:hover {
    color: var(--text-primary);
}

/* Theme Toggle Switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 48px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: rgba(255, 255, 255, 0.1);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: var(--text-primary);
    bottom: 4px;
    content: "";
    height: 16px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 16px;
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-blue);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.mobile-menu-icon {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* =========================================
   6. Hero Section
   ========================================= */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 180px 0 100px;
    min-height: 100vh;
    gap: 40px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin: 20px 0 10px;
}

.highlight {
    color: var(--accent-blue);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.hero-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

/* Hero Image & Frame */
.hero-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    position: relative;
}

/* Glowing ambient effect behind the image */
.hero-image-wrapper::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--accent-blue);
    filter: blur(120px);
    opacity: 0.2;
    z-index: -1;
    border-radius: 50%;
}

.glass-frame {
    position: relative;
    padding: 10px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.1);
}

.hero-image {
    width: 400px;
    height: 400px;
    object-fit: cover;
    border-radius: 16px;
    display: block;
    border: 1px solid rgba(255,255,255,0.08);
}

.availability-badge {
    position: absolute;
    bottom: -15px;
    right: 20px;
    background: rgba(10, 15, 30, 0.8);
}

.status-dot {
    width: 10px;
    height: 10px;
    background-color: #22c55e;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px #22c55e;
}

/* =========================================
   7. Stats & Services Section
   ========================================= */
.stats-section {
    display: flex;
    justify-content: space-around;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 40px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    font-size: 1.8rem;
    color: var(--accent-blue);
}

.stat-info h3 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stat-divider {
    width: 1px;
    background: var(--glass-border);
}

/* Services */
.services-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 100px;
}

.service-card {
    flex: 1;
    min-width: 260px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
}

.service-icon {
    font-size: 1.5rem;
    color: var(--accent-blue);
    background: rgba(74, 107, 253, 0.1);
    padding: 12px;
    border-radius: 12px;
}

.service-text h4 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
}
.service-text p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

/* =========================================
   8. Projects Section
   ========================================= */
.projects-section {
    margin-bottom: 100px;
}

.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.text-highlight {
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.section-title {
    font-size: 2.5rem;
    margin-top: 8px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.project-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-img-wrapper {
    height: 200px;
    width: 100%;
    overflow: hidden;
    border-bottom: 1px solid var(--glass-border);
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img-wrapper img {
    transform: scale(1.05);
}

.project-info {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    flex: 1;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tech-tags span {
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.project-links {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--glass-border);
    padding-top: 16px;
}

.link-item {
    font-size: 0.85rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.link-item:hover {
    color: var(--accent-blue);
}

/* =========================================
   9. Footer & CTA
   ========================================= */
.cta-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px;
    border-radius: 20px;
    max-width: var(--max-width);
    margin: 0 auto 40px;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 0%, rgba(74,107,253,0.1) 100%);
}

.cta-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.cta-icon-wrapper {
    font-size: 2rem;
    color: var(--accent-blue);
}

.cta-text h2 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.cta-text p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-bottom {
    text-align: center;
    padding-bottom: 40px;
}

.connect-text {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-primary);
    transition: var(--transition);
}

.footer-socials a:hover {
    background: var(--accent-blue);
    transform: translateY(-3px);
}

/* =========================================
   10. Responsive Media Queries
   ========================================= */
@media screen and (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-image {
        width: 320px;
        height: 320px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    /* Navbar handling */
    .nav-links {
        display: none; /* Hidden on mobile by default */
    }
    
    .mobile-menu-icon {
        display: block; /* 3-line icon visible */
    }
    
    .theme-switch-wrapper, .social-links {
        display: none; /* Hide to save space, usually moved into mobile menu via JS */
    }

    /* Hero section */
    .hero-section {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 120px;
    }
    
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-image-wrapper {
        justify-content: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }

    /* Stats & Services */
    .stats-section {
        flex-direction: column;
        gap: 20px;
    }
    
    .stat-divider {
        width: 100%;
        height: 1px;
    }
    
    .service-card {
        min-width: 100%;
    }
    
    /* Projects */
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    /* CTA */
    .cta-footer {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
    
    .cta-left {
        flex-direction: column;
    }

    /* Add this inside your existing max-width: 768px media query */
    .nav-links.nav-active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--glass-bg);
        backdrop-filter: blur(16px);
        border: 1px solid var(--glass-border);
        border-radius: 16px;
        z-index:9999;
        padding: 20px 0;
        align-items: center;
        gap: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }
}
