:root {
    --bg-color: #030712;
    --card-bg: #111827;
    --primary: #8b5cf6;
    --secondary: #3b82f6;
    --accent: #f472b6;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --font-heading: 'Outfit', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-heading);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.highlight {
    color: var(--secondary);
}

.gradient-text {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: #3B84F7;
    color: white;
    box-shadow: 0 4px 15px rgba(59, 132, 247, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 132, 247, 0.6);
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    margin-left: 15px;
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: white;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    /* Offset for fixed header */
    perspective: 1000px;
    /* Essential for 3D effect */
}

/* Background Abstract Glows */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
    filter: blur(80px);
    z-index: -1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
    filter: blur(80px);
    z-index: -1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 50px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-description {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 550px;
    /* Widened slightly for balance */
    line-height: 1.8;
}

.stats {
    display: flex;
    gap: 40px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item h3 {
    font-size: 2rem;
    color: white;
}

.stat-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

/* Atmospheric Light Overlay */
.hero-image::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    filter: blur(40px);
}

/* Volumetric Backlight */
.glow-bg {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, rgba(59, 130, 246, 0.1) 60%, transparent 80%);
    filter: blur(60px);
    z-index: -1;
    animation: pulse-glow 4s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    0% {
        transform: scale(0.8);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.floating-img {
    max-width: 100%;
    width: 350px;
    height: auto;
    /* Clean, glowing white logo style */
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5)) drop-shadow(0 0 30px rgba(139, 92, 246, 0.3));

    /* Blend mode to make black background visible */
    mix-blend-mode: screen;

    /* Ensure it scales nicely */
    object-fit: contain;

    /* transition removed to allow full JS physics control */
    will-change: transform;
    margin-left: 200px;
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: rgba(17, 24, 39, 0.5);
    padding: 40px 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(17, 24, 39, 0.8);
}

.icon-box {
    width: 60px;
    height: 60px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    color: var(--primary);
    font-size: 1.5rem;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.service-card p {
    color: var(--text-muted);
}

/* Portfolio */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.portfolio-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.portfolio-card:hover {
    transform: translateY(-10px);
}

.portfolio-img {
    height: 250px;
    position: relative;
    overflow: hidden;
}

/* Placeholders using Gradients */
.gradient-1 {
    background: linear-gradient(45deg, #4c1d95, #2563eb);
}

.gradient-2 {
    background: linear-gradient(45deg, #be185d, #db2777);
}

.gradient-3 {
    background: linear-gradient(45deg, #059669, #10b981);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-card:hover .overlay {
    opacity: 1;
}

.overlay i {
    font-size: 2rem;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 50%;
    backdrop-filter: blur(5px);
}

.portfolio-info {
    padding: 25px;
}

.portfolio-info h3 {
    margin-bottom: 5px;
}

.portfolio-info p {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
}

/* CTA */
.cta-section {
    padding: 80px 0;
}

.cta-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 30px;
    padding: 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.2), transparent 40%);
}

.cta-box h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    position: relative;
}

.cta-box p {
    color: var(--text-muted);
    margin-bottom: 30px;
    position: relative;
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
    position: relative;
}

/* Contact */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--card-bg);
    padding: 50px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-info h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.info-item i {
    color: var(--primary);
    width: 20px;
}

.social-links {
    margin-top: 40px;
    display: flex;
    gap: 20px;
}

.social-links a {
    width: 45px;
    height: 45px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

input,
textarea {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-family: var(--font-heading);
    transition: var(--transition);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.5);
}

/* Footer */
footer {
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    /* Navbar Fixes */
    .navbar {
        padding: 15px 0;
    }

    .logo {
        font-size: 1.5rem;
        z-index: 1001;
        /* Ensure logo stays above menu background if needed */
        position: relative;
    }

    .hamburger {
        display: block;
        z-index: 1001;
        /* Ensure button is clickable above menu */
        position: relative;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        /* Cover entire screen */
        left: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        background: rgba(3, 7, 18, 0.98);
        padding: 80px 20px 20px;
        /* Top padding to clear logo/hamburger */
        text-align: center;
        backdrop-filter: blur(10px);
        z-index: 1000;
        justify-content: center;
        gap: 30px;
    }

    .nav-links.active {
        display: flex;
        animation: fadeIn 0.3s ease;
    }

    .nav-links li a {
        font-size: 1.5rem;
        /* Larger touch targets */
    }

    /* Hero Section Fixes */
    .hero {
        height: auto;
        min-height: 100vh;
        padding-top: 120px;
        /* Space for navbar */
        padding-bottom: 60px;
        display: flex;
        align-items: center;
    }

    .hero-container {
        display: flex;
        flex-direction: column-reverse;
        /* Image Top (visual), Text Bottom? No, Column Reverse puts last item first. Grid was [Text, Image]. So column-reverse makes it [Image, Text]. Usually good for mobile visual impact. */
        align-items: center;
        gap: 40px;
        padding-top: 0;
        width: 100%;
    }

    .hero-title {
        font-size: 2.2rem;
        line-height: 1.3;
        margin-bottom: 15px;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 25px;
        max-width: 100%;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .btn {
        width: 100%;
        max-width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Specific fix for Navbar Button to not be full width */
    .navbar .btn {
        width: auto;
        padding: 6px 14px;
        font-size: 0.75rem;
        margin-left: auto;
        /* Push to right if needed, but justify-between handles it */
        margin-right: 15px;
        /* Space between button and hamburger */
    }

    .btn-outline {
        margin-left: 0;
    }

    /* Stats Mobile */
    .stats {
        width: 100%;
        justify-content: space-around;
        gap: 20px;
        margin-top: 30px;
    }

    /* Image Mobile */
    .hero-image {
        margin-top: 0;
        width: 100%;
        height: auto;
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
    }

    .floating-img {
        margin-left: 0;
        margin-right: 0;
        width: 80%;
        max-width: 320px;
        height: auto;
        /* Ensure physics transform works but position is centered */
        transform-origin: center center;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 25px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}