:root {
    --bg-color: #0a0f1e;
    --text-color: #e2e8f0;
    --accent-color: #9d4edd;
    /* Electric Purple */
    --secondary-accent: #00f2ff;
    /* Cyan */
    --glass-bg: rgba(10, 15, 30, 0.6);
    --glass-border: rgba(157, 78, 221, 0.3);
    --card-shadow: 0 8px 32px 0 rgba(74, 0, 224, 0.1);
    --font-heading: 'Outfit', sans-serif;
    /* Changed font */
    --font-body: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    /* Scroll Snap */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Grid */
.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(157, 78, 221, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(157, 78, 221, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: gridMove 20s linear infinite;
    z-index: -2;
    pointer-events: none;
}

@keyframes gridMove {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateY(50px) translateZ(-200px);
    }
}

/* Background Animation Globes */
.background-globes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.globe-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.mobile-lang-toggle {
    display: none;
}

.globe {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.globe-1 {
    width: 500px;
    height: 500px;
    background: #4a00e0;
    top: -100px;
    left: -100px;
    animation: moveGlobe1 8s infinite alternate ease-in-out;
}

.globe-2 {
    width: 400px;
    height: 400px;
    background: #8e2de2;
    bottom: -50px;
    right: -50px;
    animation: moveGlobe2 10s infinite alternate ease-in-out;
}

@keyframes moveGlobe1 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

@keyframes moveGlobe2 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-50px, -50px) scale(1.1);
    }
}

/* Scroll Snap Sections */
.snap-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
}

.snap-section {
    height: 100vh;
    /* Full height for snap */
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 20px;
}

/* Glassmorphism Utilities */
.glass-card,
.glass-nav {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
    transition: all 0.4s ease;
}

.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    z-index: 1000;
}

.logo {
    font-weight: 700;
    font-size: 1.8rem;
    color: #fff;
    letter-spacing: 1px;
}

.logo .dot {
    color: var(--secondary-accent);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links a:hover {
    color: var(--secondary-accent);
    text-shadow: 0 0 10px var(--secondary-accent);
}

.btn-nav {
    border: 1px solid var(--accent-color);
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    color: var(--accent-color) !important;
}

.btn-nav:hover {
    background: var(--accent-color);
    color: #fff !important;
    box-shadow: 0 0 15px var(--accent-color);
}

/* Hero Section */
.hero-content {
    text-align: center;
    max-width: 900px;
}

.badge-pill {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background: rgba(0, 242, 255, 0.1);
    color: var(--secondary-accent);
    border: 1px solid var(--secondary-accent);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero .highlight {
    background: linear-gradient(90deg, var(--secondary-accent), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #94a3b8;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Typing Effect Cursor */
.typing-effect {
    display: inline-block;
    font-size: 1.5rem;
    color: var(--secondary-accent);
    border-right: 3px solid var(--secondary-accent);
    white-space: nowrap;
    overflow: hidden;
    margin: 0 auto 1.5rem auto;
    animation: blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: var(--secondary-accent)
    }
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-color), #7b2cbf);
    color: #fff;
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(157, 78, 221, 0.6);
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.social-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    font-size: 1.8rem;
}

.social-links a {
    color: #64748b;
    transition: all 0.3s;
}

.social-links a:hover {
    color: var(--secondary-accent);
    transform: scale(1.2);
}

/* Services Grid */
.container {
    border-radius: 20px;
    padding: 4rem;
    width: 100%;
    max-width: 1200px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

h2 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    /* Responsive heading size to prevent overflow */
    margin-bottom: 1rem;
    color: #fff;
    text-align: center;
}

.section-desc {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Force 2 columns */
    gap: 1.5rem;
    /* Slightly reduced gap */
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }
}

.service-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
    text-align: center;
}

.service-card:hover {
    background: rgba(157, 78, 221, 0.1);
    border-color: var(--accent-color);
    transform: translateY(-10px);
}

.service-icon {
    font-size: 3rem;
    color: var(--secondary-accent);
    margin-bottom: 1.5rem;
    background: rgba(0, 242, 255, 0.1);
    padding: 1rem;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: #fff;
}

.service-card p {
    color: #94a3b8;
    font-size: 0.95rem;
}

/* Project Showcase */
.project-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.project-tagline {
    color: var(--secondary-accent);
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.project-info p {
    color: #cbd5e1;
    margin-bottom: 2rem;
}

.tech-stack {
    display: flex;
    gap: 0.8rem;
}

.badge {
    background: rgba(157, 78, 221, 0.2);
    color: #d8b4fe;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid rgba(157, 78, 221, 0.3);
}

.visual-placeholder {
    height: 300px;
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

/* Timeline */
.timeline {
    border-left: 2px solid var(--glass-border);
    padding-left: 2rem;
    margin-left: 1rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.6rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--secondary-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--secondary-accent);
}

.timeline-date {
    color: var(--secondary-accent);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    font-family: monospace;
}

.timeline-content h3 {
    color: #fff;
    font-size: 1.2rem;
}

.timeline-content h4 {
    color: #94a3b8;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

/* Contact */
.contact-container {
    text-align: center;
}

.contact-box {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 3rem 0;
}

.contact-btn {
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    margin-top: 3rem;
    color: #64748b;
    font-size: 0.9rem;
}

/* Services Intro (Merged) */
.services-header {
    text-align: center;
    margin-bottom: 3rem;
}

.compact-desc {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    color: #94a3b8;
}

/* Testimonials (Standalone) */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.testimonial-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 16px;
    font-style: italic;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s;
}

.testimonial-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-color);
}

.testimonial-item p {
    color: #e2e8f0;
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.6;
}

.testimonial-item span {
    display: block;
    color: var(--secondary-accent);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: right;
    margin-top: 1rem;
}

/* Contact Form (Premium Glass) */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
    background: rgba(255, 255, 255, 0.02);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1.2rem;
    background: rgba(10, 15, 30, 0.6);
    border: 1px solid rgba(157, 78, 221, 0.3);
    border-radius: 12px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-accent);
    background: rgba(10, 15, 30, 0.8);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.15);
    transform: scale(1.01);
}

.form-group select option {
    background: var(--bg-color);
    color: #fff;
    padding: 1rem;
}

.btn-block {
    width: 100%;
    display: block;
    text-align: center;
    padding: 1.2rem;
    font-size: 1.1rem;
    letter-spacing: 1.5px;
}

/* Responsive */
@media (max-width: 900px) {
    .project-showcase {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    .mobile-lang-toggle {
        display: block;
        font-size: 1.5rem;
        color: var(--text-primary);
        cursor: pointer;
        padding: 0.5rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.05);
    }

    .container {
        padding: 2rem;
    }

    /* Disable Scroll Snap on Mobile for better UX */
    html,
    .snap-container {
        scroll-snap-type: none;
        overflow-y: auto;
        height: auto;
    }

    .snap-section {
        height: auto;
        /* Allow content to dictate height */
        min-height: 100vh;
        padding: 4rem 1rem;
        scroll-snap-align: none;
    }

    .hero h1 {
        font-size: 2.5rem;
        /* Adjust hero size for mobile */
    }

    /* Fix Typing Effect on Mobile */
    .typing-effect {
        white-space: normal;
        /* Allow wrapping */
        overflow: visible;
        border-right: none;
        /* Remove cursor */
        animation: none;
        /* Remove blinking animation */
        font-size: 1.2rem;
        /* Smaller font */
        height: auto;
        margin-bottom: 1rem;
    }
}

/* Language Modal */
.lang-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
}

.lang-modal {
    text-align: center;
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.5s ease-out;
}

.lang-options {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}