:root {
    /* Dark mode colors (default) */
    --bg-primary: #0a0a0a;
    --bg-secondary: #151515;
    --bg-tertiary: rgba(249, 115, 22, 0.08);
    --bg-nav: rgba(255, 255, 255, 0.06);
    --bg-nav-hover: rgba(255, 255, 255, 0.10);
    --bg-mobile-nav: rgba(255, 255, 255, 0.06);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-nav: rgba(255, 255, 255, 0.85);
    --accent-primary: #f97316;
    --accent-secondary: #fb923c;
    --border-primary: rgba(249, 115, 22, 0.2);
    --border-secondary: rgba(249, 115, 22, 0.3);
    --border-nav: rgba(255, 255, 255, 0.12);
    --shadow-primary: rgba(0, 0, 0, 0.3);
    --shadow-secondary: rgba(0, 0, 0, 0.4);
    --gradient-hero: radial-gradient(circle at 50% 50%, rgba(249, 115, 22, 0.1) 0%, transparent 50%);
    --gradient-services: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

/* Light mode colors */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #ffffff;
        --bg-secondary: #f8f9fa;
        --bg-tertiary: rgba(70, 13, 110, 0.06);
        --bg-nav: rgba(255, 255, 255, 0.55);
        --bg-nav-hover: rgba(255, 255, 255, 0.65);
        --bg-mobile-nav: rgba(255, 255, 255, 0.55);
        --text-primary: #1a1a1a;
        --text-secondary: #6b7280;
        --text-nav: rgba(70, 13, 110, 0.8);
        --accent-primary: #460d6e;
        --accent-secondary: #6d1fa8;
        --border-primary: rgba(70, 13, 110, 0.12);
        --border-secondary: rgba(70, 13, 110, 0.18);
        --border-nav: rgba(70, 13, 110, 0.12);
        --shadow-primary: rgba(70, 13, 110, 0.1);
        --shadow-secondary: rgba(70, 13, 110, 0.15);
        --gradient-hero: radial-gradient(circle at 50% 50%, rgba(70, 13, 110, 0.1) 0%, transparent 50%);
        --gradient-services: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    }
}

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

*,
*::before,
*::after {
    max-width: 100%;
}

body {
    font-family: 'Space Mono', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Site Logo (scrolls with content) */
.fixed-logo {
    position: absolute;
    top: 2.5rem;
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
}

/* Pill Navigation */
.pill-navbar {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
}

.pill-nav-container {
    background: var(--bg-nav);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    border: none;
    border-radius: 50px;
    padding: 0.25rem;
    box-shadow: 
        0 8px 32px var(--shadow-primary),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

/* Subtle scrolled state for liquid glass feel */
.pill-nav-container.is-scrolled {
    background: rgba(255, 255, 255, 0.10);
    box-shadow:
        0 16px 48px rgba(0,0,0,0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.pill-nav-container.expanded {
    border-radius: 25px;
    padding: 1rem;
    background: var(--bg-nav-hover);
    box-shadow: 
        0 12px 40px var(--shadow-secondary),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.pill-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.pill-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: var(--text-nav);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
}

.pill-nav-container.expanded .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.pill-nav-container.expanded .hamburger-line:nth-child(2) {
    opacity: 0;
}

.pill-nav-container.expanded .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.logo-text {
    font-family: 'Space Mono', monospace;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--accent-primary);
    letter-spacing: -0.5px;
}

.logo-pulse {
    display: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.075rem;
    margin: 0;
    padding: 0;
    flex-direction: row;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pill-nav-container.expanded .nav-menu {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.nav-menu a {
    font-family: 'Space Mono', monospace;
    color: var(--text-nav);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Hover lens vars */
    --hx: 50%;
    --hy: 50%;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04)),
        radial-gradient(140% 180% at 50% -50%, rgba(255,255,255,0.16), rgba(255,255,255,0));
    border-radius: 25px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Dynamic lens highlight that follows the pointer */
.nav-menu a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(160px 80px at var(--hx) var(--hy), rgba(255,255,255,0.20), rgba(255,255,255,0.08) 35%, rgba(255,255,255,0) 60%);
    border-radius: 25px;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
    color: var(--text-primary);
    background: var(--bg-nav-hover);
    box-shadow:
        0 10px 24px rgba(0,0,0,0.18),
        inset 0 1px 0 rgba(255,255,255,0.18),
        inset 0 -1px 0 rgba(255,255,255,0.06);
    transform: translateY(-1px);
}

.nav-menu a:hover::before,
.nav-menu a:focus-visible::before {
    opacity: 1;
}

.nav-menu a:hover::after,
.nav-menu a:focus-visible::after {
    opacity: 1;
}

.nav-menu a:active {
    transform: translateY(0);
    box-shadow:
        0 6px 16px rgba(0,0,0,0.16),
        inset 0 1px 0 rgba(255,255,255,0.14),
        inset 0 -1px 0 rgba(255,255,255,0.05);
}

.pill-nav-container:hover {
    background: var(--bg-nav-hover);
    box-shadow: 
        0 12px 40px var(--shadow-secondary),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-hero);
}

.neural-network {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(90deg, rgba(249, 115, 22, 0.1) 1px, transparent 1px),
        linear-gradient(0deg, rgba(251, 146, 60, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 25% 25%, rgba(249, 115, 22, 0.2) 2px, transparent 3px),
        radial-gradient(circle at 75% 75%, rgba(251, 146, 60, 0.2) 2px, transparent 3px),
        radial-gradient(circle at 50% 50%, rgba(249, 115, 22, 0.15) 1px, transparent 2px);
    background-size: 60px 60px, 60px 60px, 120px 120px, 120px 120px, 80px 80px;
    animation: neuralFlow 25s infinite linear;
    opacity: 0.6;
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -1px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    font-family: 'Space Mono', monospace;
    padding: 1rem 2rem;
    border: 2px dotted var(--accent-primary);
    border-radius: 0;
    background: transparent;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    letter-spacing: -0.2px;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-primary:hover {
    color: white;
    border-color: var(--accent-primary);
}

.btn-primary:hover::before {
    left: 0;
}

.btn-secondary {
    color: var(--text-secondary);
    border-color: var(--text-secondary);
}

.btn-secondary:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(249, 115, 22, 0.05);
}

/* Services Section */
.services {
    padding: 4rem 0;
    background: var(--gradient-services);
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.service-card {
    background: transparent;
    border: 2px solid var(--border-primary);
    border-radius: 0;
    padding: 2rem;
    text-align: left;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
    width: 350px;
    height: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.service-card h3 {
    font-family: 'Space Mono', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-primary);
    letter-spacing: -0.3px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.service-card h3::before {
    content: '> ';
    color: var(--accent-secondary);
    font-weight: 400;
}

.service-card h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), transparent);
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
    margin-top: 1.5rem;
}

/* About Section */
.about {
    padding: 4rem 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.stats {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    font-family: 'Space Mono', monospace;
    display: block;
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--accent-primary);
    letter-spacing: -1px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.about-visual::before {
    content: none;
}

.about-visual::after {
    content: none;
}

.ai-brain {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1 / 1;
    position: relative;
    margin: 0 auto;
}

#ai-brain-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ai-brain-nodes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Contact Section */
.contact {
    padding: 4rem 0;
    background: var(--gradient-services);
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-message {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 3rem;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 2.5rem;
    background: var(--bg-primary);
    border: 2px dotted var(--accent-primary);
    border-radius: 0;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.contact-link::after {
    content: '✉';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%) translateX(20px);
    font-size: 1.2rem;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    color: white;
}

.contact-link:hover::before {
    left: 0;
}

.contact-link:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.contact-link:hover {
    color: white;
    border-color: var(--accent-primary);
    padding-right: 3.5rem;
}

.contact-email {
    font-family: 'Space Mono', monospace;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent-primary);
    position: relative;
    z-index: 1;
    letter-spacing: -0.3px;
}

.contact-prompt {
    font-family: 'Space Mono', monospace;
    font-size: 1.1rem;
    color: var(--accent-primary);
    font-weight: 600;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    letter-spacing: -0.2px;
}

.contact-link:hover .contact-prompt {
    color: white;
    transform: translateX(5px);
}


/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes neuralPulse {
    0%, 100% { 
        border-color: rgba(249, 115, 22, 0.3);
        filter: drop-shadow(0 0 20px rgba(249, 115, 22, 0.1));
        transform: scale(1);
    }
    25% {
        border-color: rgba(251, 146, 60, 0.4);
        filter: drop-shadow(0 0 30px rgba(251, 146, 60, 0.2));
        transform: scale(1.02);
    }
    50% { 
        border-color: rgba(249, 115, 22, 0.5);
        filter: drop-shadow(0 0 40px rgba(249, 115, 22, 0.3));
        transform: scale(1.05);
    }
    75% {
        border-color: rgba(251, 146, 60, 0.4);
        filter: drop-shadow(0 0 30px rgba(251, 146, 60, 0.2));
        transform: scale(1.02);
    }
}

@keyframes digitalRain {
    0% { 
        transform: translateY(-100%);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% { 
        transform: translateY(100%);
        opacity: 0;
    }
}

@keyframes neuralNodes {
    0%, 100% { 
        opacity: 0.6;
        transform: rotate(0deg) scale(1);
    }
    25% {
        opacity: 0.9;
        transform: rotate(2deg) scale(1.05);
    }
    50% {
        opacity: 1;
        transform: rotate(0deg) scale(1.1);
    }
    75% {
        opacity: 0.9;
        transform: rotate(-2deg) scale(1.05);
    }
}

@keyframes neuralFlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-60px, -60px); }
}

@keyframes cubeRotate {
    0% { 
        transform: translateY(0px) rotateX(0deg) rotateY(0deg);
    }
    50% {
        transform: translateY(-15px) rotateX(5deg) rotateY(180deg);
    }
    100% { 
        transform: translateY(0px) rotateX(0deg) rotateY(360deg);
    }
}

@keyframes spherePulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }
}

@keyframes dataPoints {
    0%, 100% { 
        transform: translate(-50%, -50%) rotate(0deg);
        opacity: 0.4;
    }
    50% {
        transform: translate(-50%, -50%) rotate(180deg);
        opacity: 0.8;
    }
}

@keyframes binaryStream {
    0% { 
        transform: translateY(-100%);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% { 
        transform: translateY(100%);
        opacity: 0;
    }
}

@keyframes orbitalRing {
    0% { 
        transform: rotate(0deg);
        opacity: 0.2;
    }
    50% {
        opacity: 0.4;
    }
    100% { 
        transform: rotate(360deg);
        opacity: 0.2;
    }
}


@keyframes outerRing {
    0% { 
        transform: rotate(0deg) scale(0.9);
        opacity: 0.1;
    }
    50% {
        transform: rotate(180deg) scale(1.05);
        opacity: 0.2;
    }
    100% { 
        transform: rotate(360deg) scale(0.9);
        opacity: 0.1;
    }
}

@keyframes intelligentNode {
    0%, 90% { 
        opacity: 0.2;
        transform: scale(1);
        box-shadow: 0 0 5px rgba(249, 115, 22, 0.1);
    }
    5%, 15% { 
        opacity: 0.8;
        transform: scale(1.5);
        box-shadow: 0 0 15px rgba(249, 115, 22, 0.4);
    }
}

@keyframes neuralConnection {
    0%, 85% { 
        opacity: 0;
        transform: scaleX(0);
    }
    5% {
        opacity: 0.3;
        transform: scaleX(0.5);
    }
    10% { 
        opacity: 0.6;
        transform: scaleX(1);
    }
    15% {
        opacity: 0.2;
        transform: scaleX(0.8);
    }
}

@keyframes brainCore {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.2;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.4;
    }
}

@keyframes brainField {
    0% { 
        transform: translate(-50%, -50%) rotate(0deg);
        opacity: 0.1;
    }
    50% {
        opacity: 0.3;
    }
    100% { 
        transform: translate(-50%, -50%) rotate(360deg);
        opacity: 0.1;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* Mobile Floating Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.mobile-nav-container {
    display: flex;
    position: relative;
    align-items: center;
    gap: 4px;
    background: var(--bg-mobile-nav);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--border-nav);
    border-radius: 50px;
    padding: 6px;
    height: 62px;
    min-width: 300px;
    box-shadow:
        0 18px 44px var(--shadow-secondary),
        0 6px 18px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

/* Animated active indicator */
.mobile-nav-indicator {
    position: absolute;
    left: 0;
    top: 0;
    width: 80px;
    height: 50px;
    transform: translate3d(0, 0, 0);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.10);
    box-shadow:
        0 10px 24px rgba(0,0,0,0.18),
        inset 0 1px 0 rgba(255,255,255,0.35),
        inset 0 -2px 0 rgba(255, 255, 255, 0.12);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), width 0.35s cubic-bezier(0.22, 1, 0.36, 1), height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    z-index: 0;
}

.mobile-nav-item {
    position: relative;
    z-index: 1;
    flex: 1;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    border-radius: 25px;
    padding: 0 10px;
    text-decoration: none;
    color: var(--text-nav);
    transition: color 0.25s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    cursor: pointer;
    text-align: center;
}

/* Hover overlays to match desktop nav items */
.mobile-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04)),
        radial-gradient(140% 180% at 50% -50%, rgba(255,255,255,0.16), rgba(255,255,255,0));
    border-radius: 25px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Dynamic lens highlight */
.mobile-nav-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(160px 80px at var(--mx) var(--my), rgba(255,255,255,0.20), rgba(255,255,255,0.08) 35%, rgba(255,255,255,0) 60%);
    border-radius: 25px;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .mobile-nav-item:hover::before,
    .mobile-nav-item:focus-visible::before { opacity: 1; }
    .mobile-nav-item:hover::after,
    .mobile-nav-item:focus-visible::after { opacity: 1; }
}

/* Disable old lens styles above. Indicator handles active visuals */

.mobile-nav-item.active {
    color: var(--text-primary);
}

/* Ensure visited links don't turn purple on mobile nav */
.mobile-nav-item:link,
.mobile-nav-item:visited,
.mobile-nav-item:focus,
.mobile-nav-item:active {
    color: var(--text-nav) !important;
}

.mobile-nav-item.active:link,
.mobile-nav-item.active:visited,
.mobile-nav-item.active:focus,
.mobile-nav-item.active:active {
    color: var(--text-primary) !important;
}

/* Ensure label inherits and overrides UA visited color */
.mobile-nav-item .label {
    color: inherit !important;
}


.mobile-nav-item .label {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    position: relative;
    z-index: 1;
    letter-spacing: 0;
    opacity: 0.9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    line-height: 1;
    white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
    .mobile-nav-item:hover { color: var(--text-primary); }
    .mobile-nav-item:active {
        transform: translateY(0);
        background: var(--bg-nav-hover);
        box-shadow:
            0 6px 16px rgba(0,0,0,0.16),
            inset 0 1px 0 rgba(255,255,255,0.14),
            inset 0 -1px 0 rgba(255,255,255,0.05);
    }
}

/* Match desktop nav hover/click visuals */
@media (hover: hover) and (pointer: fine) {
    .mobile-nav-item:hover,
    .mobile-nav-item:focus-visible,
    .mobile-nav-item.is-hovered {
        color: var(--text-primary);
        background: var(--bg-nav-hover);
        transform: translateY(-1px);
        box-shadow:
            0 10px 24px rgba(0,0,0,0.18),
            inset 0 1px 0 rgba(255,255,255,0.18),
            inset 0 -1px 0 rgba(255,255,255,0.06);
    }
}

/* Ensure label stays plain (no gradient) */
.mobile-nav-item:hover .label,
.mobile-nav-item.is-hovered .label,
.mobile-nav-item:active .label {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: currentColor !important;
}

.mobile-nav-item svg {
    width: 20px;
    height: 20px;
    color: var(--text-nav);
    transition: color 0.25s ease, transform 0.25s ease;
}

/* remove icon-specific styling; icons removed */

/* Remove previous enhanced mobile hover styles; unify with desktop */
.mobile-nav-item:focus-visible { outline: none; }

/* Liquid morphing effect */
.mobile-nav-container:hover {
    box-shadow:
        0 20px 52px var(--shadow-secondary),
        0 8px 22px rgba(0, 0, 0, 0.18),
        inset 0 2px 0 rgba(255, 255, 255, 0.35),
        inset 0 -2px 0 rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(28px) saturate(220%);
    -webkit-backdrop-filter: blur(28px) saturate(220%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .services {
        padding: 3rem 0;
    }
    
    .about {
        padding: 3rem 0;
    }
    
    .contact {
        padding: 3rem 0;
    }
    
    /* Hide floating elements on mobile */
    .floating-elements {
        display: none;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    /* Mobile pill navigation */
    .nav-menu {
        display: none;
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
        opacity: 0;
        transform: translateY(-10px);
    }
    
    .pill-nav-container.expanded .nav-menu {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }
    
    .pill-menu-toggle {
        display: none;
    }
    
    .mobile-nav {
        display: block;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary {
        width: 200px;
        border-radius: 25px;
    }
    
    /* Hide pill navbar on mobile */
    .pill-navbar {
        display: none;
    }
    
    .fixed-logo {
        top: 1rem;
        left: 1rem;
    }
    
    .pill-nav-container {
        padding: 0.5rem;
    }
    
    /* Adjust bottom padding for mobile nav */
    body {
        padding-bottom: 100px;
    }
    /* Match desktop nav item rounding for CTA-like buttons */
    .contact-link {
        border-radius: 25px;
    }
}

/* Prevent sticky :hover on touch devices */
@media (hover: none) {
    .mobile-nav-item:hover,
    .mobile-nav-item:focus-visible,
    .mobile-nav-item:focus,
    .mobile-nav-item:active,
    .mobile-nav-item.is-hovered {
        background: transparent !important;
        color: var(--text-nav) !important;
        transform: none !important;
        box-shadow: none !important;
        outline: none !important;
    }
    .mobile-nav-item::before,
    .mobile-nav-item::after {
        opacity: 0 !important;
    }
    /* Aggressively override visited state on touch devices */
    .mobile-nav-item:link,
    .mobile-nav-item:visited,
    .mobile-nav-item:focus,
    .mobile-nav-item:active {
        color: var(--text-nav) !important;
    }
    .mobile-nav-item.active:link,
    .mobile-nav-item.active:visited,
    .mobile-nav-item.active:focus,
    .mobile-nav-item.active:active {
        color: var(--text-primary) !important;
    }
}

@media (max-width: 480px) {
    .fixed-logo .logo-text {
        font-size: 1.2rem;
    }
    
    .pill-nav-container {
        padding: 0.3rem 0.6rem;
    }
    
    .mobile-menu-toggle {
        padding: 0.3rem;
    }
    
    .mobile-menu-toggle span {
        width: 20px;
        height: 1.5px;
        margin: 2px 0;
    }
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-primary);
    background: transparent;
    padding: 1.5rem 0;
}

.site-footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

/* Footer background: white in light mode */
@media (prefers-color-scheme: light) {
    .site-footer {
        background: #ffffff;
    }
}