:root {
    --bg-dark: #0a0a1a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --primary: #00f3ff;
    --secondary: #bd00ff;
    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    --font-main: 'Inter', sans-serif;
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --gradient-main: linear-gradient(135deg, var(--primary), var(--secondary));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-gradient {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-primary {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--gradient-main);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 243, 255, 0.3);
}

/* Top Bar */
.top-bar {
    background: #05050f;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 1001;
    /* Above header */
}

/* Make top bar content full width to push items to corners */
.top-bar .container {
    max-width: 100%;
    padding: 0 4rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.contact-info-top {
    display: flex;
    gap: 1.5rem;
}

.contact-info-top a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.contact-info-top a:hover {
    color: var(--primary);
}

.contact-info-top i {
    color: var(--primary);
    margin-right: 0.5rem;

}

.social-links-top a {
    color: var(--text-muted);
    margin-left: 1rem;
    transition: color 0.3s ease;
}

.social-links-top a:hover {
    color: var(--primary);
}


/* Header */
header {
    position: sticky;
    top: 0;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(10px);
    width: 100%;
    z-index: 1000;
    padding: 0.4rem 0;
    border-bottom: var(--glass-border);
}

/* Make header content full width */
header .container {
    max-width: 100%;
    padding: 0 4rem;
    /* Add generous side padding */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 90px;
    /* Increased size for better visibility */
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.20);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    /* Reset default margins */
    padding: 0;

    /* Desktop Alignment: Push to the right */
    margin-left: auto;
    margin-right: 2rem;
    /* Space between links and Get Started button */
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.mobile-toggle {
    display: none;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 2rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--primary);
    filter: blur(150px);
    opacity: 0.2;
    border-radius: 50%;
    z-index: -1;
    animation: float 10s infinite alternate;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: var(--secondary);
    filter: blur(150px);
    opacity: 0.2;
    border-radius: 50%;
    z-index: -1;
    animation: float 10s infinite alternate-reverse;
}

@keyframes float {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(50px, 50px);
    }
}

.hero-content {
    max-width: 900px;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* Services */
.services {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--text-muted);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 20px;
    border: var(--glass-border);
    transition: transform 0.3s ease, background 0.3s ease;
    cursor: default;
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
}

.icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: var(--primary);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-muted);
}

/* Projects / Stats Section */
.stats-section {
    padding: 80px 0;
    margin-top: 50px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.02) 100%);
    border-top: var(--glass-border);
    border-bottom: var(--glass-border);
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    text-align: center;
    gap: 2rem;
}

.stat-item h3 {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* About Section */
.about {
    padding: 100px 0;
    position: relative;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.about-visual {
    position: relative;
    height: 400px;
    background: var(--bg-card);
    border-radius: 20px;
    border: var(--glass-border);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.code-snippet {
    font-family: monospace;
    color: var(--primary);
    padding: 2rem;
    opacity: 0.8;
}

/* Contact Section (Common) */
.contact {
    padding: 100px 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0) 100%);
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 4rem;
    border-radius: 24px;
    border: var(--glass-border);
    text-align: center;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    color: var(--primary);
    font-size: 1.2rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

input,
textarea {
    background: rgba(255, 255, 255, 0.03);
    border: var(--glass-border);
    padding: 1rem;
    border-radius: 10px;
    color: white;
    font-family: var(--font-main);
    outline: none;
    transition: border-color 0.3s ease;
}

input:focus,
textarea:focus {
    border-color: var(--primary);
}

/* Footer */
footer {
    padding: 4rem 0 2rem;
    border-top: var(--glass-border);
    background: #05050f;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-col p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.copyright {
    text-align: center;
    color: #555;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Tech Stack Marquee */
.tech-stack {
    padding: 60px 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.01);
    border-top: var(--glass-border);
    border-bottom: var(--glass-border);
}

.marquee-container {
    display: flex;
    gap: 3rem;
    width: max-content;
    animation: scroll 20s linear infinite;
}

.tech-item {
    font-size: 2rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.tech-item i {
    font-size: 2.5rem;
}

.tech-item:hover {
    color: var(--primary);
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-50% - 1.5rem));
    }
}

/* Process Timeline */
.process {
    padding: 100px 0;
}

.process-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    max-width: 1000px;
    margin: 4rem auto 0;
    flex-wrap: wrap;
    gap: 2rem;
}

.process-steps::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 50px;
    right: 50px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
    min-width: 150px;
}

.step-number {
    width: 80px;
    height: 80px;
    background: var(--bg-dark);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
    color: var(--primary);
    transition: transform 0.3s, background 0.3s;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
}

.step:hover .step-number {
    transform: scale(1.1);
    background: rgba(0, 243, 255, 0.1);
}

.step h3 {
    margin-bottom: 0.5rem;
    color: white;
}

.step p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .process-steps::before {
        display: none;
    }

    .process-steps {
        flex-direction: column;
        gap: 3rem;
    }

    .step-number {
        margin-bottom: 1rem;
    }
}

/* 3D Container */
#hero-canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    /* Ensure text is above canvas */
    pointer-events: none;
    /* Allow clicking through text area to canvas if needed, or set to auto for buttons */
}

.hero-content a {
    pointer-events: auto;
}

/* UI/UX Improvements & Mobile Optimization */

/* Add Noise Texture to Body */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.4;
}

/* Enhanced Gradient Text */
.text-gradient {
    background: linear-gradient(135deg, #00f3ff 0%, #bd00ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 243, 255, 0.3);
    /* Subtle glow */
}

/* Improved Stats Section for Mobile */
@media (max-width: 768px) {
    .stats-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        /* 2x2 Grid on mobile */
        gap: 2rem;
    }

    .stat-item h3 {
        font-size: 2.5rem;
    }
}

/* Improved Hero Typography on Mobile */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.2rem;
        /* Smaller font on very small screens */
    }

    .hero p {
        font-size: 1rem;
    }

    .btn-primary {
        width: 100%;
        /* Full width button on mobile */
        text-align: center;
        padding: 1rem;
    }
}

/* Tech Stack Mobile Optimization */
@media (max-width: 768px) {
    .tech-item {
        font-size: 1.2rem;
        /* Smaller text */
        gap: 0.3rem;
    }

    .tech-item i {
        font-size: 1.5rem;
        /* Smaller icons */
    }

    .marquee-container {
        gap: 1.5rem;
        /* Tighter gap */
    }

    .tech-stack {
        padding: 40px 0;
    }
}

/* General Mobile Padding Fixes */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    /* Adjust header padding for mobile */
    header .container {
        padding: 0 1.5rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .about-content {
        gap: 2rem;
    }

    .about-visual {
        height: 300px;
        /* Shorter visual on mobile */
    }

    .contact-container {
        padding: 2rem 1.5rem;
    }

    .contact-info {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }
}

/* 3D Container Mobile Fix */
@media (max-width: 992px) {
    #hero-canvas-container {
        display: block;
        opacity: 0.6;
        /* Dim background slightly on mobile to improve text readability */
    }
}

@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        font-size: 0.7rem;
    }

    .contact-info-top {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    /* Navigation Drawer Improvements */
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 100%;
        max-width: none;
        background: rgba(10, 10, 26, 0.95);
        border-left: none;
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 100px 0 150px 0;
        /* Increased bottom padding to 150px to clear mobile browser toolbars */
        overflow-y: auto;
        transition: opacity 0.4s ease, visibility 0.4s ease;
        z-index: 999;

        /* New State Handling */
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        right: auto;
        /* Reset right property */
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-links li {
        margin: 1.5rem 0;
        width: auto;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    /* Staggered animation for links */
    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-links.active li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-links.active li:nth-child(2) {
        transition-delay: 0.2s;
    }

    .nav-links.active li:nth-child(3) {
        transition-delay: 0.3s;
    }

    .nav-links.active li:nth-child(4) {
        transition-delay: 0.4s;
    }

    .nav-links.active li:nth-child(5) {
        transition-delay: 0.5s;
    }

    .nav-links.active li:nth-child(6) {
        transition-delay: 0.6s;
    }

    .nav-links a {
        font-size: 2rem;
        font-weight: 700;
        display: block;
        padding: 0;
        border-bottom: none;
        color: white;
        text-transform: uppercase;
        /* Modern look */
        letter-spacing: 1px;
    }

    .nav-links a:hover {
        color: var(--primary);
        text-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
    }

    /* Hamburger Icon Position */
    .mobile-toggle {
        display: block;
        font-size: 2rem;
        cursor: pointer;
        z-index: 1000;
        color: white;
        transition: transform 0.3s ease;
        /* Ensure it sits on the right */
        margin-left: auto;
    }

    /* Force Nav Layout */
    nav {
        width: 100%;
        justify-content: space-between;
    }

    /* Rotate close icon */
    .mobile-toggle .fa-times {
        transform: rotate(90deg);
        color: var(--primary);
    }

    /* Hide the header Call-to-Action button on mobile to prevent overlap/clutter */
    nav .btn-primary {
        display: none;
    }
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.team-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    border: var(--glass-border);
    text-align: center;
    transition: transform 0.3s ease, background 0.3s ease;
}

.team-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
}

.team-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    border: 3px solid var(--primary);
    overflow: hidden;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    /* Placeholder bg */
}

.team-avatar i {
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.2);
    line-height: 120px;
}

.team-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.team-role {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}

.team-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.team-social a {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.team-social a:hover {
    color: white;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: pulse-green 2s infinite;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    color: white;
}

.my-float {
    margin-top: 0px;
}

@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Website Loader */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loader-wrapper.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.dot {
    width: 15px;
    height: 15px;
    background-color: var(--primary);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) {
    animation-delay: -0.32s;
}

.dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}