/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Scheme - Black, White, Grey */
    --color-black: #000000;
    --color-white: #ffffff;
    --color-grey-50: #fafafa;
    --color-grey-100: #f5f5f5;
    --color-grey-200: #e5e5e5;
    --color-grey-300: #d4d4d4;
    --color-grey-400: #a3a3a3;
    --color-grey-500: #737373;
    --color-grey-600: #525252;
    --color-grey-700: #404040;
    --color-grey-800: #262626;
    --color-grey-900: #171717;
    
    /* Primary Colors */
    --primary: var(--color-white);
    --secondary: var(--color-grey-800);
    --accent: var(--color-grey-400);
    --background: var(--color-black);
    --surface: var(--color-grey-900);
    --text-primary: var(--color-white);
    --text-secondary: var(--color-grey-300);
    --text-muted: var(--color-grey-500);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-white) 0%, var(--color-grey-300) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--color-grey-800) 0%, var(--color-grey-600) 100%);
    --gradient-accent: linear-gradient(135deg, var(--color-grey-400) 0%, var(--color-grey-600) 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(255, 255, 255, 0.1);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    --space-4xl: 8rem;
    --space-5xl: 10rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Mobile-specific variables */
    --mobile-touch-target: 44px;
    --mobile-spacing: 1rem;
    --mobile-section-padding: 3rem 1rem;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Mobile-specific base styles */
@media (max-width: 768px) {
    body {
        font-size: 16px; /* Prevent zoom on iOS */
        -webkit-text-size-adjust: 100%;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Improve touch scrolling */
    html, body {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: auto; /* Disable smooth scroll on mobile for better performance */
    }
    
    /* Optimize for mobile performance - but exclude fixed navigation */
    *:not(.pill-nav-container):not(.pill-nav):not(.mobile-menu-button):not(.pill-logo) {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* Ensure body doesn't create stacking context that interferes with fixed nav */
    html, body {
        transform: none !important;
        transform-style: flat !important;
        will-change: auto !important;
        contain: none !important;
        position: static !important;
    }
    
    /* Override any potential transform issues on navigation elements */
    .pill-nav-container,
    .pill-nav-container *,
    .pill-nav,
    .pill-logo,
    .mobile-menu-button {
        -webkit-transform: none !important;
        transform: none !important;
        transform-style: flat !important;
        will-change: auto !important;
        backface-visibility: hidden;
    }
    
}

/* Pill Navigation */
.pill-nav-container {
    position: fixed;
    top: 1em;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    pointer-events: none;
}

@media (max-width: 768px) {
    .pill-nav-container {
        position: fixed !important;
        top: 1rem !important;
        left: 1rem !important;
        right: 1rem !important;
        width: calc(100% - 2rem) !important;
        transform: none !important;
        padding: 0 !important;
        z-index: 10000 !important;
        /* Ensure proper mobile viewport positioning */
        max-width: calc(100vw - 2rem) !important;
        box-sizing: border-box !important;
        /* Override any 3D transforms that might affect positioning */
        transform-style: flat !important;
        will-change: auto !important;
        /* Ensure it's positioned relative to viewport, not any scrolling container */
        contain: layout style paint !important;
    }
    
    /* Force viewport-relative positioning regardless of parent containers */
    body .pill-nav-container,
    html body .pill-nav-container,
    * .pill-nav-container {
        position: fixed !important;
        top: 1rem !important;
        left: 1rem !important;
        right: 1rem !important;
        z-index: 10000 !important;
        transform: none !important;
        width: calc(100% - 2rem) !important;
        max-width: calc(100vw - 2rem) !important;
        box-sizing: border-box !important;
        /* Override any inherited transforms */
        transform-style: flat !important;
        will-change: auto !important;
        contain: layout style paint !important;
        /* Ensure it doesn't scroll with content */
        position: fixed !important;
    }
    
    /* Enhanced mobile navigation */
    .pill-nav {
        width: 100%;
        justify-content: space-between;
        background: transparent;
        padding: 0.5rem 0;
    }
    
    .pill-logo {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
    }
    
    .mobile-menu-button {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        border-radius: 50%;
        background: var(--base);
        border: 1px solid var(--color-grey-700);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        cursor: pointer;
        padding: 0;
        position: relative;
        backdrop-filter: blur(10px);
        pointer-events: auto;
        transition: all var(--transition-normal);
    }
    
    .mobile-menu-button:hover {
        transform: scale(1.05);
        background: var(--color-grey-100);
    }
    
    .mobile-menu-button.active {
        background: var(--color-grey-200);
    }
    
    .mobile-menu-button.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-button.active .hamburger-line:nth-child(2) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .hamburger-line {
        width: 18px;
        height: 2px;
        background: var(--pill-bg);
        border-radius: 1px;
        transition: all 0.3s ease;
        transform-origin: center;
    }
    
    .mobile-menu-popover {
        position: absolute;
        top: 3em;
        left: 0;
        right: 0;
        background: var(--base);
        border: 1px solid var(--color-grey-700);
        border-radius: 20px;
        box-shadow: var(--shadow-xl);
        backdrop-filter: blur(20px);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all var(--transition-normal);
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        width: 100%;
        max-width: 100%;
    }
    
    .mobile-menu-popover.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .mobile-menu-list {
        list-style: none;
        padding: 1.5rem;
        margin: 0;
    }
    
    .mobile-menu-list li {
        margin-bottom: 0.5rem;
    }
    
    .mobile-menu-list li:last-child {
        margin-bottom: 0;
    }
    
    .mobile-menu-link {
        display: block;
        padding: 1rem 1.5rem;
        color: var(--pill-bg);
        text-decoration: none;
        border-radius: 12px;
        font-weight: 600;
        font-size: 1rem;
        transition: all var(--transition-normal);
        background: transparent;
        border: 1px solid transparent;
    }
    
    .mobile-menu-link:hover,
    .mobile-menu-link.is-active {
        background: var(--pill-bg);
        color: var(--base);
        border-color: var(--color-grey-600);
    }
    
    .mobile-menu-link.is-active {
        box-shadow: 0 0 0 2px var(--primary);
    }
    
    /* Final override to ensure mobile navigation stays fixed regardless of JS animations */
    .pill-nav-container[style] {
        position: fixed !important;
        top: max(1rem, env(safe-area-inset-top)) !important;
        left: max(1rem, env(safe-area-inset-left)) !important;
        right: max(1rem, env(safe-area-inset-right)) !important;
        transform: none !important;
        z-index: 10000 !important;
        width: calc(100% - max(2rem, env(safe-area-inset-left) + env(safe-area-inset-right))) !important;
        max-width: calc(100vw - max(2rem, env(safe-area-inset-left) + env(safe-area-inset-right))) !important;
    }
    
    /* Additional safe area support for all mobile navigation rules */
    .pill-nav-container {
        top: max(1rem, env(safe-area-inset-top)) !important;
        left: max(1rem, env(safe-area-inset-left)) !important;
        right: max(1rem, env(safe-area-inset-right)) !important;
        width: calc(100% - max(2rem, env(safe-area-inset-left) + env(safe-area-inset-right))) !important;
        max-width: calc(100vw - max(2rem, env(safe-area-inset-left) + env(safe-area-inset-right))) !important;
    }
}

.pill-nav {
    --nav-h: 42px;
    --logo: 36px;
    --pill-pad-x: 18px;
    --pill-gap: 3px;
    --base: #ffffff;
    --pill-bg: #000000;
    --hover-text: #000000;
    --pill-text: #ffffff;
    
    width: max-content;
    display: flex;
    align-items: center;
    gap: var(--pill-gap);
    box-sizing: border-box;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .pill-nav {
        width: 100%;
        justify-content: space-between;
        background: transparent;
    }
}

.pill-nav-items {
    position: relative;
    display: flex;
    align-items: center;
    height: var(--nav-h);
    background: var(--base);
    border-radius: 9999px;
    border: 1px solid var(--color-grey-700);
    backdrop-filter: blur(10px);
    pointer-events: auto;
}

.pill-logo {
    width: var(--nav-h);
    height: var(--nav-h);
    border-radius: 50%;
    background: var(--base);
    border: 1px solid var(--color-grey-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-decoration: none;
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
    pointer-events: auto;
}



.pill-logo .logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    display: block;
}

/* Logo Placeholder */
.logo-placeholder {
    width: 100%;
    height: 100%;
    display: none; /* Hidden by default, only shows when image fails */
    align-items: center;
    justify-content: center;
    background: var(--color-grey-800);
    border-radius: 50%;
    transition: all var(--transition-normal);
    padding: 6px;
}

.logo-placeholder span {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pill-logo:hover .logo-placeholder {
    background: var(--color-grey-700);
    transform: scale(1.05);
}



.pill-list {
    list-style: none;
    display: flex;
    align-items: stretch;
    gap: var(--pill-gap);
    margin: 0;
    padding: 3px;
    height: 100%;
}

.pill-list > li {
    display: flex;
    height: 100%;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 var(--pill-pad-x);
    background: var(--pill-bg);
    color: var(--pill-text);
    text-decoration: none;
    border-radius: 9999px;
    box-sizing: border-box;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.pill .hover-circle {
    position: absolute;
    left: 50%;
    bottom: 0;
    border-radius: 50%;
    background: var(--base);
    z-index: 1;
    display: block;
    pointer-events: none;
    will-change: transform;
}

.pill .label-stack {
    position: relative;
    display: inline-block;
    line-height: 1;
    z-index: 2;
}

.pill .pill-label {
    position: relative;
    z-index: 2;
    display: inline-block;
    line-height: 1;
    will-change: transform;
}

.pill .pill-label-hover {
    position: absolute;
    left: 0;
    top: 0;
    color: var(--hover-text);
    z-index: 3;
    display: inline-block;
    will-change: transform, opacity;
}

.pill.is-active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: var(--base);
    border-radius: 50px;
    z-index: 4;
}

.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: block;
    }
}

.mobile-menu-button {
    width: var(--nav-h);
    height: var(--nav-h);
    border-radius: 50%;
    background: var(--base);
    border: 1px solid var(--color-grey-700);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    padding: 0;
    position: relative;
    backdrop-filter: blur(10px);
    pointer-events: auto;
}

@media (max-width: 768px) {
    .mobile-menu-button {
        display: flex;
    }
}

.hamburger-line {
    width: 16px;
    height: 2px;
    background: var(--pill-bg);
    border-radius: 1px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-popover {
    position: absolute;
    top: 3em;
    left: 0;
    right: 0;
    background: var(--base);
    border: 1px solid var(--color-grey-700);
    border-radius: 27px;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
    z-index: 998;
    opacity: 0;
    transform-origin: top center;
    visibility: hidden;
    transition: all var(--transition-normal);
    pointer-events: auto;
}

.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 3px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mobile-menu-popover .mobile-menu-link {
    display: block;
    padding: 12px 16px;
    color: var(--pill-text);
    background-color: var(--pill-bg);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 50px;
    transition: all var(--transition-normal);
}

.mobile-menu-popover .mobile-menu-link:hover {
    cursor: pointer;
    background-color: var(--pill-bg);
    color: var(--hover-text);
    transform: translateX(4px);
}

.mobile-menu-popover .mobile-menu-link.is-active {
    background-color: var(--pill-bg);
    color: var(--hover-text);
}

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

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: auto;
}

#dither-container {
    width: 100%;
    height: 100%;
    position: relative;
    pointer-events: auto;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-sm);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
    align-items: center;
    pointer-events: none;
}

@media (min-width: 768px) {
    .hero-content {
        padding: 0 var(--space-lg);
    }
}

@media (min-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
    }
}

.hero-text {
    text-align: center;
    pointer-events: auto;
}

@media (min-width: 1024px) {
    .hero-text {
        text-align: left;
    }
}



.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 4rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 5rem;
    }
}

.title-line {
    display: block;
    animation: fadeInUp 1s ease-out both;
}

.title-line:nth-child(1) { animation-delay: 0.2s; }
.title-line:nth-child(2) { animation-delay: 0.4s; }
.title-line:nth-child(3) { animation-delay: 0.6s; }
.title-line:nth-child(4) { animation-delay: 0.8s; }

.title-line.highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientShift 4s ease-in-out infinite, fadeInUp 1s ease-out both;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 600px;
    animation: fadeInUp 1s ease-out 1s both;
}

@media (min-width: 1024px) {
    .hero-description {
        margin-left: 0;
        margin-right: auto;
    }
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    animation: fadeInUp 1s ease-out 1.2s both;
}

@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

@media (min-width: 1024px) {
    .hero-buttons {
        justify-content: flex-start;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-lg);
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--background);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--color-grey-600);
}

.btn-secondary:hover {
    background: var(--color-grey-800);
    border-color: var(--color-grey-400);
    transform: translateY(-2px);
}

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

.btn-primary:hover .btn-glow {
    left: 100%;
}

/* Code Window */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 1s ease-out 1.4s both;
    pointer-events: auto;
}

.code-window {
    background: var(--surface);
    border: 1px solid var(--color-grey-700);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 100%;
}

.window-header {
    background: var(--color-grey-800);
    padding: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    border-bottom: 1px solid var(--color-grey-700);
}

.window-dots {
    display: flex;
    gap: 6px;
}

.window-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-grey-600);
}

.window-dots span:nth-child(1) { background: #ff5f56; }
.window-dots span:nth-child(2) { background: #ffbd2e; }
.window-dots span:nth-child(3) { background: #27ca3f; }

.window-title {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-family: var(--font-mono);
}

.code-content {
    padding: var(--space-lg);
    background: var(--surface);
}

.code-content pre {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.code-content .keyword {
    color: #ff6b6b;
}

.code-content .variable {
    color: #4ecdc4;
}

.code-content .property {
    color: #45b7d1;
}

.code-content .string {
    color: #96ceb4;
}

.code-content .function {
    color: #feca57;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    text-align: center;
    animation: fadeInUp 1s ease-out 1.6s both;
    pointer-events: auto;
}

.scroll-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-secondary);
    border-bottom: 2px solid var(--text-secondary);
    transform: rotate(45deg);
    margin: 0 auto;
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(45deg); }
    40% { transform: translateY(-10px) rotate(45deg); }
    60% { transform: translateY(-5px) rotate(45deg); }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-lg);
    }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 3rem;
    }
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Mission Section */
.mission {
    padding: var(--space-3xl) 0;
    background: var(--surface);
}

.mission-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

@media (min-width: 1024px) {
    .mission-content {
        grid-template-columns: 2fr 1fr;
    }
}

.mission-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    color: var(--primary);
}

.mission-text p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

/* Interactive Process Flow */
.mission-interactive {
    position: relative;
    min-height: 400px;
}

/* Mission Particle System */
.mission-particle-system {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, rgba(0,255,255,0.05) 100%);
    border: 1px solid rgba(0, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 0 40px rgba(0, 255, 255, 0.1),
        inset 0 0 40px rgba(0, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.mission-particle-system:hover {
    border-color: rgba(0, 255, 255, 0.4);
    box-shadow: 
        0 0 60px rgba(0, 255, 255, 0.2),
        inset 0 0 60px rgba(0, 255, 255, 0.1);
    transform: translateY(-2px);
}

.mission-particle-system canvas {
    border-radius: 20px;
}

/* Particle system overlay */
.mission-particle-system .particle-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    font-weight: 300;
    z-index: 2;
    pointer-events: none;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.2);
}

/* Mission Growth System */
.mission-growth-system {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(10, 25, 15, 0.9) 0%, rgba(5, 40, 20, 0.8) 100%);
    border: 1px solid rgba(0, 255, 100, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 0 40px rgba(0, 200, 100, 0.2),
        inset 0 0 40px rgba(0, 255, 100, 0.1);
    transition: all 0.3s ease;
}

.mission-growth-system:hover {
    border-color: rgba(0, 255, 100, 0.5);
    box-shadow: 
        0 0 60px rgba(0, 255, 100, 0.3),
        inset 0 0 60px rgba(0, 255, 100, 0.15);
    transform: translateY(-3px);
}

.mission-growth-system canvas {
    border-radius: 20px;
}

/* Growth system overlay */
.mission-growth-system .growth-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    text-align: left;
    color: rgba(136, 255, 170, 0.9);
    font-size: 1.1rem;
    font-weight: 400;
    z-index: 2;
    pointer-events: none;
    text-shadow: 0 0 15px rgba(0, 255, 100, 0.6);
    background: rgba(0, 50, 25, 0.7);
    padding: 15px 20px;
}

/* Mission Earth System */
.mission-earth-system {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 20, 40, 0.3) 0%, rgba(0, 40, 80, 0.2) 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 0 40px rgba(255, 255, 255, 0.2),
        inset 0 0 40px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.mission-earth-system:hover {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 0 60px rgba(255, 255, 255, 0.3),
        inset 0 0 60px rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.mission-earth-system canvas {
    border-radius: 20px;
}

/* Earth system overlay */
.mission-earth-system .earth-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    text-align: left;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 400;
    z-index: 2;
    pointer-events: none;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    background: rgba(0, 40, 80, 0.7);
    padding: 15px 20px;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 255, 100, 0.2);
}

    
    .node-icon svg {
        width: 20px;
        height: 20px;
    }

/* Portfolio Section */
#portfolio {
    padding: 300px 0 800px !important;
    background: #000000 !important;
    overflow: visible;
    position: relative;
    min-height: 100vh;
    margin: 0 !important;
}

/* Modern Text Enhancement for Portfolio */
.portfolio .section-title {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 
        0 0 30px rgba(255, 255, 255, 0.3),
        0 0 60px rgba(255, 255, 255, 0.2),
        0 0 90px rgba(255, 255, 255, 0.1);
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.4));
    animation: textGlow 3s ease-in-out infinite alternate;
}

.portfolio .section-subtitle {
    position: relative;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 0.5),
        0 0 40px rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-block;
    margin-top: 10px;
}

@keyframes textGlow {
    0% {
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.4)) 
                drop-shadow(0 0 40px rgba(255, 255, 255, 0.2));
    }
    100% {
        filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.6)) 
                drop-shadow(0 0 60px rgba(255, 255, 255, 0.3))
                drop-shadow(0 0 90px rgba(255, 255, 255, 0.1));
    }
}

/* Enhanced filter buttons for better visibility */
.portfolio .filter-btn {
    position: relative;
    backdrop-filter: blur(15px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.portfolio .filter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.3),
        0 0 40px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.portfolio .filter-btn.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: #000000;
    font-weight: 600;
    box-shadow: 
        0 0 25px rgba(255, 255, 255, 0.4),
        0 0 50px rgba(255, 255, 255, 0.2);
}

/* Cubes Background */
.cubes-animation {
    position: relative;
    width: 100%;
    height: 100%;
}

.cubes-animation--scene {
    display: grid;
    width: 100%;
    height: 100%;
    perspective: 99999999px;
    grid-auto-rows: 1fr;
}

.cube {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    transform-style: preserve-3d;
}

.cube::before {
    content: '';
    position: absolute;
    top: -36px;
    right: -36px;
    bottom: -36px;
    left: -36px;
}

.cubes-animation .cube-face {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cube-face-bg);
    border: var(--cube-face-border);
    opacity: 1;
}

.cubes-animation .cube-face--top {
    transform: translateY(-50%) rotateX(90deg);
}

.cubes-animation .cube-face--bottom {
    transform: translateY(50%) rotateX(-90deg);
}

.cubes-animation .cube-face--left {
    transform: translateX(-50%) rotateY(-90deg);
}

.cubes-animation .cube-face--right {
    transform: translateX(50%) rotateY(90deg);
}

.cubes-animation .cube-face--back,
.cubes-animation .cube-face--front {
    transform: rotateY(-90deg) translateX(50%) rotateY(90deg);
}

@media (max-width: 768px) {
    .cubes-animation {
        width: 100%;
    }
}



.portfolio-content {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-3xl);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--space-sm) var(--space-lg);
    background: transparent;
    border: 1px solid var(--color-grey-700);
    color: var(--text-secondary);
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-primary);
    color: var(--background);
    border-color: transparent;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    overflow: visible;
}

.portfolio-item {
    background: var(--color-grey-900);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-grey-700);
    transition: all var(--transition-normal);
    position: relative;
    pointer-events: auto;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-grey-500);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}



.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-popup {
    position: absolute;
    top: 50%;
    right: -20px;
    transform: translateY(-50%) translateX(100%);
    background: var(--color-grey-800);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    min-width: 300px;
    max-width: 350px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 1000;
    backdrop-filter: blur(10px);
    pointer-events: auto;
}

.portfolio-popup::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -8px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid var(--color-grey-600);
}

.portfolio-popup::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -7px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-right: 7px solid var(--color-grey-900);
}

.portfolio-item:hover .portfolio-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(calc(100% + 10px));
}

/* Alternative positioning for items on the right side of the grid */
.portfolio-item:nth-child(even) .portfolio-popup {
    right: auto;
    left: -20px;
    transform: translateY(-50%) translateX(-100%);
}

.portfolio-item:nth-child(even) .portfolio-popup::before {
    left: auto;
    right: -8px;
    border-right: none;
    border-left: 8px solid var(--color-grey-600);
}

.portfolio-item:nth-child(even) .portfolio-popup::after {
    left: auto;
    right: -7px;
    border-right: none;
    border-left: 7px solid var(--color-grey-900);
}

.portfolio-item:nth-child(even):hover .portfolio-popup {
    transform: translateY(-50%) translateX(calc(-100% - 10px));
}

.portfolio-info {
    color: var(--primary);
}

.portfolio-info h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--primary);
}

.portfolio-info p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    font-size: 0.875rem;
    line-height: 1.5;
}

.portfolio-tech {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.portfolio-tech span {
    padding: var(--space-xs) var(--space-sm);
    background: var(--background);
    border: 1px solid var(--color-grey-700);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.portfolio-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--color-grey-600);
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
}

.portfolio-link:hover {
    background: var(--background);
    border-color: var(--primary);
    transform: translateX(2px);
}

.portfolio-link svg {
    width: 14px;
    height: 14px;
}

.portfolio-links {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.portfolio-link.secondary {
    color: var(--text-secondary);
    border-color: var(--color-grey-600);
}

.portfolio-link.secondary:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.portfolio-learn-more {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    background: transparent;
    border: 1px solid var(--color-grey-600);
    color: var(--text-secondary);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-top: var(--space-md);
}

.portfolio-learn-more:hover {
    background: var(--background);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(2px);
}

.portfolio-learn-more svg {
    width: 14px;
    height: 14px;
}

.portfolio-details {
    padding: var(--space-lg);
}

.portfolio-details h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--primary);
}

.portfolio-details p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.portfolio-status {
    display: flex;
    gap: var(--space-sm);
}

.status-badge {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.live {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-badge.development {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* About Section */
.about {
    padding: var(--space-3xl) 0;
    background: var(--surface);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
    align-items: start;
}

@media (min-width: 1024px) {
    .about-content {
        grid-template-columns: 2fr 1fr;
    }
}

.about-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    color: var(--primary);
}

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

.leader-card {
    background: var(--background);
    border: 1px solid var(--color-grey-700);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.leader-info h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    color: var(--primary);
}

.leader-title {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    font-weight: 500;
}

.leader-bio {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.leader-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.leader-link:hover {
    transform: translateX(4px);
}

.leader-link svg {
    width: 16px;
    height: 16px;
}

/* Services Section */
.services {
    padding: var(--space-3xl) 0;
    background: var(--background);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

.service-card {
    background: var(--surface);
    border: 1px solid var(--color-grey-700);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-normal);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-grey-500);
}

.service-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-grey-700);
}

.service-icon svg {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--primary);
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.service-tech {
    display: flex;
    gap: var(--space-xs);
    justify-content: center;
    flex-wrap: wrap;
}

.service-tech span {
    padding: var(--space-xs) var(--space-sm);
    background: var(--background);
    border: 1px solid var(--color-grey-700);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Contact Section */
.contact {
    padding: var(--space-3xl) 0;
    background: var(--surface);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
    align-items: start;
}

@media (min-width: 1024px) {
    .contact-content {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--background);
    border: 1px solid var(--color-grey-700);
    border-radius: var(--radius-lg);
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border-radius: var(--radius-md);
}

.contact-text h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--primary);
}

.contact-text p {
    color: var(--text-secondary);
}

.contact-text a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.contact-text a:hover {
    color: var(--text-secondary);
}

/* Contact Form */
.contact-form-container {
    background: var(--background);
    border: 1px solid var(--color-grey-700);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-group {
    position: relative;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: var(--space-md);
    background: var(--surface);
    border: 1px solid var(--color-grey-700);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all var(--transition-normal);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.form-group label {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    color: var(--text-secondary);
    transition: all var(--transition-normal);
    pointer-events: none;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group select:focus + label,
.form-group select:not([value=""]) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -8px;
    left: var(--space-sm);
    font-size: 0.75rem;
    color: var(--primary);
    background: var(--background);
    padding: 0 var(--space-xs);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    margin-top: var(--space-md);
}

/* Footer */
.footer {
    background: var(--background);
    border-top: 1px solid var(--color-grey-700);
    padding: var(--space-3xl) 0 var(--space-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
    margin-bottom: var(--space-xl);
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr 2fr;
    }
}

.footer-brand {
    text-align: center;
}

@media (min-width: 768px) {
    .footer-brand {
        text-align: left;
    }
}

.footer-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: var(--space-xs);
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
}

.footer-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--primary);
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: var(--space-sm);
    transition: color var(--transition-fast);
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-grey-700);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Enhanced mobile typography */
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Mobile section spacing */
    .hero,
    .mission,
    .portfolio,
    .about,
    .services,
    .contact {
        padding: var(--mobile-section-padding);
        margin: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Mobile hero specific fixes */
    .hero {
        min-height: 100vh;
        padding: 2rem 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
        position: relative;
    }
    
    .hero-content {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 2rem;
        box-sizing: border-box;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 1rem;
        width: 100%;
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .hero-description {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 2rem;
        width: 100%;
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Mobile container adjustments */
    .container {
        padding: 0 1rem;
        max-width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
    }
    
    /* Mobile hero optimizations */
    .hero-text {
        order: 1;
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
        text-align: center;
    }
    
    .hero-visual {
        order: 2;
        margin-top: 1rem; /* Reduce margin */
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
        justify-content: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        padding: 1rem 2rem;
        font-size: 1rem;
        min-height: var(--mobile-touch-target);
        margin: 0 auto;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Mobile code window */
    .code-window {
        max-width: 100%;
        font-size: 0.875rem;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
        transform: none;
        position: relative;
        max-height: 60vh; /* Limit height to 60% of viewport height */
    }
    
    .code-content {
        max-height: none; /* Remove max-height constraint */
        overflow-y: visible; /* Remove scrolling */
        width: 100%;
        box-sizing: border-box;
        font-size: 0.7rem; /* Slightly smaller font for mobile */
        padding: 1rem; /* Reduce padding */
    }
    
    .code-content pre {
        margin: 0;
        padding: 0.5rem; /* Reduce padding */
        width: 100%;
        box-sizing: border-box;
        font-size: 0.65rem; /* Smaller font for code */
        line-height: 1.3; /* Tighter line height */
    }
    
    /* Mobile window header optimization */
    .window-header {
        padding: 0.5rem; /* Reduce padding */
    }
    
    .window-dots span {
        width: 8px; /* Smaller dots */
        height: 8px;
    }
    
    .window-title {
        font-size: 0.75rem; /* Smaller title */
    }
    
    /* Mobile scroll indicator centering fix */
    .scroll-indicator {
        position: absolute;
        bottom: 2rem;
        left: 0;
        right: 0;
        transform: none;
        z-index: 2;
        text-align: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
    }
    
    .scroll-text {
        font-size: 0.8rem; /* Slightly smaller for mobile */
        margin-bottom: 0.5rem;
    }
    
    .scroll-arrow {
        width: 16px; /* Smaller arrow for mobile */
        height: 16px;
        border-right: 1.5px solid var(--text-secondary);
        border-bottom: 1.5px solid var(--text-secondary);
    }
    
    /* Mobile mission section */
    .mission-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .mission-interactive {
        order: 2;
        width: 100%;
        max-width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    /* Mobile Earth visualization optimizations */
    .mission-earth-system {
        width: 100%;
        max-width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        min-height: 300px; /* Ensure minimum height for mobile */
    }
    
    /* Mobile-specific earth container */
    .mobile-earth-container .mission-earth-system {
        min-height: 300px;
        max-height: 400px;
    }
    
    .mission-earth-system.mobile-optimized {
        min-height: 280px;
        max-height: 350px;
        border-radius: 16px;
        overflow: hidden;
    }
    
    .mobile-earth-container canvas {
        max-height: 300px !important;
        border-radius: 16px;
    }
    
    .earth-overlay {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
        z-index: 10;
        background: rgba(0, 0, 0, 0.8);
        padding: 1rem;
        border-radius: 12px;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        max-width: 90%; /* Prevent overlay from being too wide on mobile */
    }
    
    .process-flow {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .flow-node {
        flex-direction: row;
        text-align: left;
        padding: 1rem;
    }
    
    .node-icon {
        margin-right: 1rem;
        margin-bottom: 0;
    }
    
    /* Mobile portfolio optimizations */
    .portfolio-filters {
        justify-content: center;
        overflow-x: auto;
        padding: 0 var(--space-sm) var(--space-sm);
        gap: 0.75rem;
        margin-bottom: 2rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-btn {
        white-space: nowrap;
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
        min-height: var(--mobile-touch-target);
        flex-shrink: 0;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 0;
        justify-items: center;
        place-items: center;
    }
    
    .portfolio-item {
        border-radius: 16px;
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
    }
    
    .portfolio-image {
        border-radius: 16px 16px 0 0;
        width: 100%;
        max-width: 100%;
    }
    
    .portfolio-details {
        padding: 1.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .portfolio-learn-more {
        width: 100%;
        padding: 1rem;
        min-height: var(--mobile-touch-target);
        font-size: 1rem;
    }
    
    /* Mobile portfolio popup improvements */
    .portfolio-popup {
        position: fixed;
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        min-width: 280px;
        max-width: 90vw;
        max-height: 80vh;
        z-index: 1000;
        overflow-y: auto;
        border-radius: 16px;
    }
    
    .portfolio-popup::before,
    .portfolio-popup::after {
        display: none;
    }
    
    .portfolio-item:nth-child(even) .portfolio-popup {
        position: fixed;
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
    }
    
    .portfolio-item:hover .portfolio-popup,
    .portfolio-item:nth-child(even):hover .portfolio-popup {
        transform: translate(-50%, -50%);
    }
    
    /* Enhanced mobile portfolio overlay */
    .portfolio-item:hover .portfolio-overlay {
        background: rgba(0, 0, 0, 0.8);
        z-index: 999;
    }
    
    /* Mobile about section */
    .about-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .about-leadership {
        order: 2;
    }
    
    .leader-card {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    /* Mobile services section */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .service-card {
        padding: 1.5rem;
        border-radius: 16px;
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
    }
    
    .service-tech {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .service-tech span {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Mobile contact section */
    .contact-content {
        flex-direction: column;
        gap: 2rem;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .contact-info {
        order: 2;
        width: 100%;
        max-width: 100%;
    }
    
    .contact-item {
        padding: 1rem;
        border-radius: 12px;
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
    }
    
    .contact-form {
        padding: 1.5rem;
        border-radius: 16px;
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 1rem;
        font-size: 1rem;
        min-height: var(--mobile-touch-target);
    }
    
    .form-submit {
        width: 100%;
        padding: 1rem;
        min-height: var(--mobile-touch-target);
        font-size: 1rem;
    }
    
    /* Mobile footer */
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    /* Mobile scroll indicator optimizations */
    .scroll-indicator-sidebar {
        right: 0.5rem;
    }
    
    .scroll-btn {
        width: 36px;
        height: 36px;
        margin-bottom: 0.5rem;
    }
    
    .btn-icon {
        width: 16px;
        height: 16px;
    }
    
    /* Optimize complex animations on mobile for better performance */
    .cubes-animation {
        display: block;
        width: 100%;
        height: 300px;
        max-width: 100%;
        opacity: 0.7;
    }
    
    .dither-container {
        opacity: 0.5;
    }
    
    /* Mobile-specific touch improvements */
    .portfolio-item,
    .service-card,
    .leader-card,
    .contact-item {
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    }
    
    /* Mobile form improvements */
    input[type="email"],
    input[type="text"],
    input[type="tel"],
    textarea,
    select {
        -webkit-appearance: none;
        appearance: none;
        border-radius: 8px;
    }
    
    /* Mobile button improvements */
    button,
    .btn {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* Mobile-specific performance optimizations */
    .hero-background {
        will-change: auto;
    }
    
    /* Mobile touch improvements */
    .portfolio-item,
    .service-card,
    .leader-card,
    .contact-item {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
        touch-action: manipulation;
    }
    
    /* Mobile scroll improvements */
    .portfolio-filters {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .portfolio-filters::-webkit-scrollbar {
        display: none;
    }
    
    /* Mobile form improvements */
    .contact-form input:focus,
    .contact-form textarea:focus,
    .contact-form select:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
    }
    
    /* Mobile navigation improvements */
    .mobile-menu-button:active {
        transform: scale(0.95);
    }
    
    /* Mobile portfolio popup improvements */
    .portfolio-popup {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Mobile loading states */
    .btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }
    
    /* Mobile accessibility improvements */
    .btn:focus,
    .filter-btn:focus,
    .mobile-menu-link:focus {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
    }
    
    /* Mobile viewport optimizations */
    @media (max-width: 480px) {
        .hero-title {
            font-size: 2rem;
        }
        
        .section-title {
            font-size: 1.75rem;
        }
        
        .btn {
            padding: 0.875rem 1.5rem;
            font-size: 0.875rem;
        }
        
        .portfolio-filters {
            gap: 0.5rem;
        }
        
        .filter-btn {
            padding: 0.625rem 1.25rem;
            font-size: 0.75rem;
        }
        
        /* Extra small screen optimizations */
        .container {
            padding: 0 0.75rem;
        }
        
        .hero-content {
            padding: 0 0.75rem;
        }
        
        .hero-title {
            margin-bottom: 0.75rem;
        }
        
        .hero-description {
            margin-bottom: 1.5rem;
        }
    }
    
    /* Ensure proper spacing from scroll bar */
    @media (max-width: 768px) {
        body {
            padding-right: 0;
            margin-right: 0;
            overflow-x: hidden;
        }
        
        /* Prevent horizontal scroll */
        html, body {
            max-width: 100vw;
            overflow-x: hidden;
        }
        
        /* Ensure all content stays within bounds */
        * {
            max-width: 100%;
            box-sizing: border-box;
        }
        
        /* Additional spacing for very small screens */
        @media (max-width: 360px) {
            .container {
                padding: 0 0.5rem;
            }
            
            .hero-content {
                padding: 0 0.5rem;
            }
            
            .hero-title {
                font-size: 1.75rem;
            }
            
            .section-title {
                font-size: 1.5rem;
            }
        }
    }
}

/* Custom Scroll Indicator Sidebar */
.scroll-indicator-sidebar {
    position: fixed;
    right: 2rem;
    top: 0;
    bottom: 0;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    height: 100vh;
    overflow: visible;
}

.scroll-line {
    position: absolute;
    width: 2px;
    height: calc(100% - 120px);
    top: 60px;
    background: var(--color-grey-700);
    border-radius: 1px;
    overflow: hidden;
    z-index: 1;
}

.scroll-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to bottom, var(--primary), var(--color-grey-400));
    border-radius: 1px;
    transition: height 0.1s ease;
}

.scroll-buttons {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 100%;
    z-index: 2;
    overflow: visible;
}

.scroll-btn {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    border: 2px solid var(--color-grey-600);
    background: var(--background);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    z-index: 3;
    opacity: 1;
    visibility: visible;
}



.scroll-btn:hover {
    border-color: var(--primary);
    background: var(--primary);
    transform: scale(1.2);
}

.scroll-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.btn-icon {
    width: 14px;
    height: 14px;
    stroke: var(--color-grey-400);
    stroke-width: 2;
    transition: all var(--transition-normal);
}

.scroll-btn:hover .btn-icon,
.scroll-btn.active .btn-icon {
    stroke: var(--background);
}

.btn-tooltip {
    position: absolute;
    right: 20px;
    background: var(--surface);
    color: var(--text-primary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all var(--transition-normal);
    border: 1px solid var(--color-grey-700);
}

.scroll-btn:hover .btn-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Hide default scrollbar */
html {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

html::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Mobile adjustments */
@media (max-width: 768px) {
    /* Completely hide custom scroll indicator on mobile */
    .scroll-indicator-sidebar {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    .scroll-line {
        display: none !important;
    }
    
    .scroll-buttons {
        display: none !important;
    }
    
    .scroll-btn {
        display: none !important;
    }
    
    .btn-icon {
        display: none !important;
    }
    
    .btn-tooltip {
        display: none !important;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Smooth scrolling for anchor links */
html {
    scroll-padding-top: 80px;
    scroll-behavior: smooth;
}

/* Ensure page loads at top */
body {
    scroll-margin-top: 0;
}
