:root {
    --bg-color: #f0f2f5;
    --text-main: #111827;
    --text-muted: #6b7280;
    --primary: #0066cc;
    /* Deep Tech Blue */
    --accent: #00d4ff;
    /* Cyan Neon */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-soft: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.3);
    --font-head: 'Rajdhani', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(0, 212, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 102, 204, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--primary);
    transition: width 0.2s, height 0.2s;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-head);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.1;
}

h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #111 0%, #0066cc 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 2rem;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: all 0.4s ease;
    background: rgba(240, 242, 245, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-family: var(--font-head);
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--primary);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--accent);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Navigation Dropdown */
.dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: white;
    /* Fallback */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    min-width: 260px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1100;
    pointer-events: none;
    /* Prevent accidental clicks when hidden */
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.dropdown-menu li {
    display: block;
    width: 100%;
}

.dropdown-menu li a {
    display: block;
    padding: 0.8rem 1.5rem;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: none;
    /* Sentence case for readability */
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    white-space: nowrap;
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

.dropdown-menu li a:hover {
    background: rgba(0, 102, 204, 0.05);
    /* Very subtle primary tint */
    color: var(--primary);
    padding-left: 2rem;
    /* Slide animation */
}

/* Override the underline effect for dropdown items */
.dropdown-menu li a::after {
    display: none;
}

/* Glassmorphism Components */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    padding: 3rem;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 60%);
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.glass-card:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 20px 50px rgba(0, 102, 204, 0.15);
    border-color: rgba(0, 212, 255, 0.3);
}

.glass-card:hover::before {
    opacity: 0.1;
}

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

.hero-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: float 10s infinite ease-in-out;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: rgba(0, 102, 204, 0.1);
    top: -100px;
    right: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: rgba(0, 212, 255, 0.1);
    bottom: 100px;
    left: -50px;
    animation-delay: -5s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(20px, 40px);
    }
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    align-items: center;
}

.hero-visual {
    position: relative;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-card {
    position: absolute;
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    animation: floatCard 6s infinite ease-in-out;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.fc-1 {
    top: 20%;
    right: 10%;
    width: 220px;
    animation-delay: 0s;
}

.fc-2 {
    bottom: 20%;
    left: 0%;
    width: 260px;
    animation-delay: -2s;
    z-index: 2;
}

.fc-3 {
    top: 40%;
    left: 20%;
    width: 180px;
    animation-delay: -4s;
    filter: blur(2px);
    opacity: 0.7;
    z-index: -1;
}

@keyframes floatCard {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.cta-btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: var(--main-text);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    overflow: hidden;
    margin-top: 2rem;
    transition: all 0.3s;
    background: linear-gradient(90deg, #111 0%, #333 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.cta-btn:hover::before {
    left: 100%;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3);
}

/* Sections */
.section {
    padding: 8rem 0;
    position: relative;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title-wrapper {
    margin-bottom: 5rem;
    position: relative;
}

.section-line {
    width: 100px;
    height: 4px;
    background: var(--primary);
    margin-bottom: 2rem;
    position: relative;
}

.section-line::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s;
}

/* Responsive 2-Column Grid */
.responsive-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 900px) {
    .responsive-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Services Grid */
.grid-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary);
    background: rgba(0, 102, 204, 0.05);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    transition: all 0.3s;
}

.glass-card:hover .service-icon {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 20px var(--accent);
}

.learn-more {
    margin-top: 2rem;
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    opacity: 0.7;
    transition: all 0.3s;
}

.glass-card:hover .learn-more {
    opacity: 1;
    transform: translateX(10px);
}

/* Stats Section */
.stats-section {
    background: #111;
    color: white;
    padding: 6rem 0;
    margin: 6rem 0;
    position: relative;
    overflow: hidden;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.stat-number {
    font-family: var(--font-head);
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.stat-label {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Footer */
.footer {
    background: white;
    padding: 6rem 0 2rem;
    position: relative;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    /* Homepage & General Mobile Fixes */
    .hero-visual {
        /* order: -1; REMOVED to show content first */
        height: auto !important;
        /* Override inline heights */
        min-height: auto;
        padding-bottom: 2rem;
        overflow: visible;
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative !important;
        /* Override inline absolute */
        width: 100% !important;
        top: auto !important;
        right: auto !important;
        margin-top: 3rem;
        /* Add spacing between text and visual */
    }

    .navbar .nav-links {
        display: none;
        /* Mobile menu logic to be added if needed, for now hidden on small screens */
    }

    .grid-masonry {
        grid-template-columns: 1fr;
    }

    /* Homepage Floating Cards Mobile Fix */
    .hero-visual .floating-card {
        position: static !important;
        /* Override inline absolute */
        transform: none !important;
        animation: none !important;
        margin: 0.5rem;
        display: inline-flex !important;
        width: auto !important;
        flex-wrap: wrap;
        /* Ensure text creates new lines if needed */
        justify-content: center;
    }

    /* Ensure content flows correctly */
    .hero-visual {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Tech Stack Sidebar Mobile Fix */
    .tech-stack-container {
        position: static !important;
        width: 100%;
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        margin-top: 1rem;
    }

    .tech-stack-container .glass-card {
        width: 100% !important;
        max-width: 300px;
        transform: none !important;
        animation: none !important;
        opacity: 1 !important;
        margin-bottom: 0.5rem;
    }
}

/* Tech Stack Container (Desktop Default) */
.tech-stack-container {
    position: absolute;
    top: 10%;
    right: 10%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 10;
}