@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700&display=swap&font-display=swap');

:root {
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Courier New', monospace;
    
    /* Fluid typography scale */
    --text-xs: clamp(12px, 1.5vw, 14px);
    --text-sm: clamp(14px, 1.8vw, 16px);
    --text-base: clamp(16px, 2vw, 18px);
    --text-lg: clamp(18px, 2.2vw, 20px);
    --text-xl: clamp(20px, 2.5vw, 24px);
    --text-2xl: clamp(24px, 3vw, 28px);
    --text-3xl: clamp(28px, 3.5vw, 36px);
    --text-4xl: clamp(36px, 4vw, 48px);
    --text-5xl: clamp(48px, 5vw, 60px);
}

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

html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar Styles */
/* For Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: #ff5722;
    border-radius: 6px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #e64a19;
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #ff5722 #f1f1f1;
}

/* For Firefox hover effect */
*:hover {
    scrollbar-color: #e64a19 #f1f1f1;
}

body {
    background-color: #2a2a2a;
    font-family: var(--font-stack);
    font-size: var(--text-base);
    margin: 0;
    padding: 0;
}

body.loaded {
    background-color: #f5f5f5;
    overflow-x: hidden;
}

/* Initially hide all content until animation starts */
body:not(.loaded) .nav-pill,
body:not(.loaded) .nav-logo,
body:not(.loaded) .mailto-link,
body:not(.loaded) .hero-title,
body:not(.loaded) .hero-subtitle,
body:not(.loaded) .hero-tagline,
body:not(.loaded) .nav-menu,
body:not(.loaded) .nav-cta {
    opacity: 0 !important;
}

.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    background-color: #2a2a2a;
}

.main-content {
    min-height: 100vh;
    background-color: #f5f5f5;
    position: relative;
}

/* Fixed Menu Container - matches header width */
.fixed-menu-container {
    position: fixed;
    top: 30px;
    left: 0;
    right: 0;
    z-index: 9999;
    pointer-events: none;
}

.fixed-menu-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 48px; /* Fixed height */
}

.fixed-menu-spacer {
    flex: 1;
}

.fixed-menu-spacer:first-child {
    flex: 1.3; /* Make left spacer larger to push menu towards right */
}

.fixed-menu-spacer:last-child {
    flex: 0.7; /* Make right spacer smaller */
}

/* Fixed Menu Wrapper */
.fixed-menu-wrapper {
    position: relative;
    z-index: 9999;
    will-change: transform;
    backface-visibility: hidden;
    white-space: nowrap; /* Prevent menu items from wrapping */
    height: clamp(40px, 4vw, 56px); /* Scales with viewport: min 40px, max 56px */
    display: flex;
    align-items: center;
    pointer-events: auto;
}


.fixed-menu-wrapper .nav-menu {
    flex: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

/* Header Navigation */
.header {
    padding: 30px 40px;
    background-color: #f5f5f5;
    position: relative;
    min-width: 0; /* Allow shrinking */
    z-index: 1000; /* Below fixed menu but above other content */
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    height: clamp(40px, 4vw, 56px); /* Scales with viewport */
    position: relative;
    width: 100%;
}

/* Ensure all navigation elements align with the fixed menu */
.nav-container > * {
    align-self: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.2vw, 18px);
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
    height: clamp(40px, 4vw, 56px); /* Scales with viewport */
}

.nav-logo:hover {
    opacity: 0.8;
}

.logo-symbol-nav {
    display: flex;
    align-items: center;
    justify-content: center;
}

.terminal-box-nav {
    width: clamp(26px, 2.6vw, 36px);
    height: clamp(26px, 2.6vw, 36px);
    border: clamp(2px, 0.25vw, 3px) solid #000;
    border-radius: clamp(4px, 0.4vw, 6px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-family: 'Courier New', monospace;
    font-size: clamp(10px, 1vw, 14px);
    color: #000;
    font-weight: bold;
    flex-shrink: 0;
}

.logo-text-nav {
    font-family: var(--font-stack);
    font-size: clamp(22px, 2.2vw, 30px);
    font-weight: 700;
    color: #000;
    letter-spacing: -0.7px;
    transition: opacity 0.3s ease;
}

.nav-menu {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.nav-menu-placeholder {
    flex: 1;
}

.nav-cta {
    display: flex;
    align-items: center;
    flex-shrink: 0; /* Prevent shrinking */
}

.nav-pill {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 50px;
    padding: clamp(5px, 0.5vw, 7px) clamp(6px, 0.7vw, 10px) clamp(5px, 0.5vw, 7px) clamp(12px, 1.2vw, 18px);
    gap: 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    backface-visibility: hidden;
    flex-shrink: 0;
    height: clamp(40px, 4vw, 56px); /* Scales with viewport */
}

.nav-hover-bg {
    position: absolute;
    width: clamp(11px, 1.2vw, 16px);
    height: clamp(11px, 1.2vw, 16px);
    background-color: #ff5722;
    border-radius: 50%;
    left: clamp(6px, 0.7vw, 10px);
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    opacity: 1;
    pointer-events: none;
    will-change: transform, width, height, left, top, border-radius;
}

/* Active section state handled by JavaScript */

.nav-link {
    text-decoration: none;
    color: #000;
    font-weight: 400;
    font-family: var(--font-stack);
    font-size: var(--text-lg);
    padding: clamp(10px, 1.2vw, 16px) clamp(14px, 1.5vw, 20px);
    transition: color 0.3s ease;
    position: relative;
    z-index: 2;
    overflow: hidden;
    display: inline-block;
}

/* Ensure all links are visible initially with black text */
.nav-pill .nav-link {
    opacity: 1;
    visibility: visible;
    color: #000;
}

/* Only when active should text be white */
.nav-pill.active-section .nav-link.active-nav {
    color: #fff !important;
}

.nav-pill.active-section .nav-link.active-nav .original-text {
    color: #fff !important;
}

.nav-pill.active-section .nav-link.active-nav .hover-text {
    color: #fff !important;
}

.nav-link:first-of-type {
    padding-left: clamp(32px, 3.5vw, 44px);
}


/* Hover animation with parentheses */
.nav-link .original-text {
    display: block;
    position: relative;
    transition: all 0.2s ease;
    z-index: 2;
}

.nav-link .hover-text {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff5722;
    font-size: 18px;
    font-weight: 400;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 2;
}

.nav-link:hover .original-text {
    transform: translateY(-20px);
    opacity: 0;
}

.nav-link:hover .hover-text {
    transform: translateY(-100%);
}

/* Contact link special handling */
.nav-link.contact-link:hover:not(.active-nav) {
    color: #000;
}

.nav-link.contact-link {
    background-color: #f0f0f0;
    padding: clamp(8px, 0.8vw, 12px) clamp(14px, 1.5vw, 20px) !important;
    border-radius: 25px;
    margin-left: clamp(6px, 0.6vw, 10px);
    margin-right: clamp(6px, 0.6vw, 10px);
    display: inline-flex;
    align-items: center;
    height: clamp(30px, 3vw, 40px);
}

/* Hide gray background when Contact is active */
.nav-pill.active-section .nav-link.contact-link.active-nav {
    background-color: transparent !important;
}

/* Ensure orange background is above gray background */
.nav-pill.active-section .nav-hover-bg {
    z-index: 2;
}

.nav-cta p {
    margin: 0;
    padding: 0;
    display: inline-block;
}

.nav-cta .mailto-link {
    text-decoration: none;
    color: #000;
    font-weight: 400;
    font-family: var(--font-stack);
    font-size: var(--text-lg);
    letter-spacing: 0;
    font-family: 'Inter', sans-serif;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    padding: clamp(10px, 1.2vw, 16px) clamp(14px, 1.5vw, 20px);
    line-height: 1;
    position: relative;
    height: clamp(40px, 4vw, 56px); /* Scales with viewport */
}

.nav-cta .mailto-link:hover {
    color: #ff5722;
}

/* Hero Section */
.hero-section {
    padding: 100px 40px 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.hero-content {
    max-width: 1200px;
    text-align: left;
}

.hero-title {
    font-family: var(--font-stack);
    font-size: var(--text-5xl);
    font-weight: 700;
    line-height: 0.9;
    color: #333;
    letter-spacing: -1.5px;
    margin: 0;
    margin-bottom: 10px;
    max-width: 1200px;
}

.hero-subtitle {
    font-family: var(--font-stack);
    font-size: var(--text-5xl);
    font-weight: 700;
    line-height: 0.9;
    color: #333;
    letter-spacing: -1.5px;
    margin: 0;
    margin-bottom: 10px;
    max-width: 1200px;
}

.hero-subtitle.ai-powered {
    color: #ff5722;
    margin-bottom: 30px;
}

/* MWG_041 Hover Effect Styles */
.hero-hover-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    width: max-content;
}

.hero-hover-item.hovered span {
    pointer-events: none;
}

.hero-hover-item .hidden {
    pointer-events: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    color: inherit;
}

.hero-hover-item .visible {
    display: block;
}

.hero-hover-item span {
    display: inline-block;
    will-change: transform;
}

/* Maintain original colors for hidden text */
.hero-subtitle.ai-powered .hidden {
    color: #ff5722;
}

/* Gray hover effect for hero text */
.hero-hover-item:hover .visible {
    color: #999;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Section Base Styles */
section {
    padding: 100px 0;
}

.section-title {
    font-family: var(--font-stack);
    font-size: var(--text-4xl);
    font-weight: 300;
    margin-bottom: 60px;
    color: #333;
    letter-spacing: -1px;
}

/* Hero Tagline */
.hero-tagline {
    font-family: var(--font-stack);
    font-size: var(--text-xl);
    font-weight: 300;
    color: #666;
    margin-top: 30px;
    letter-spacing: -0.5px;
}


/* Work Section */
.work-section {
    background-color: #fff;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.work-item {
    padding: 40px;
    background-color: #f9f9f9;
    border-radius: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.work-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.work-item h3 {
    font-family: var(--font-stack);
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.work-item p {
    font-family: var(--font-stack);
    font-size: var(--text-base);
    line-height: 1.6;
    color: #666;
}

/* Services Section */
.services-section {
    background-color: #f5f5f5;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-item {
    padding: 30px;
    background-color: #fff;
    border-radius: 15px;
    border: 1px solid #e5e5e5;
    transition: all 0.3s ease;
}

.service-item:hover {
    border-color: #ff5722;
    transform: translateY(-3px);
}

.service-item h3 {
    font-family: var(--font-stack);
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.service-item p {
    font-family: var(--font-stack);
    font-size: var(--text-base);
    line-height: 1.5;
    color: #666;
}

/* Approach Section */
.approach-section {
    background-color: #fff;
    padding-top: 200px;
}

.approach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.approach-item {
    text-align: center;
    padding: 40px;
}

.approach-item h3 {
    font-family: var(--font-stack);
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.approach-item p {
    font-family: var(--font-stack);
    font-size: var(--text-base);
    line-height: 1.6;
    color: #666;
}

/* About Section */
.about-section {
    background-color: #f5f5f5;
}

.about-intro {
    font-family: var(--font-stack);
    font-size: var(--text-2xl);
    font-weight: 300;
    line-height: 1.4;
    color: #333;
    margin-bottom: 60px;
    max-width: 800px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.value-item h3 {
    font-family: var(--font-stack);
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.value-item p {
    font-family: var(--font-stack);
    font-size: var(--text-base);
    line-height: 1.6;
    color: #666;
}

/* Contact Section */
.contact-section {
    background-color: #ff5722;
    color: #fff;
    text-align: center;
    padding: 120px 0;
}

.contact-section .section-title {
    color: #fff;
}

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

.contact-intro {
    font-family: var(--font-stack);
    font-size: var(--text-xl);
    font-weight: 300;
    margin-bottom: 40px;
    color: #fff;
}

.contact-email {
    font-family: var(--font-stack);
    font-size: var(--text-3xl);
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 60px;
    transition: transform 0.3s ease;
}

.contact-email:hover {
    transform: scale(1.05);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.social-link {
    font-family: var(--font-stack);
    color: #fff;
    text-decoration: none;
    font-size: var(--text-base);
    font-weight: 400;
    padding: 12px 24px;
    border: 2px solid #fff;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: #fff;
    color: #ff5722;
}

/* Responsive Design */


/* These breakpoints are now handled by mobile styles at 1100px */

/* Removed intermediate states - now direct switch at 950px */

@media (max-width: 1024px) {
    .header {
        padding: 20px 30px;
    }
    
    .nav-container {
        max-width: 100%;
    }
    
    .hero-title {
        font-size: 48px;
        letter-spacing: -1px;
    }
    
    .hero-subtitle {
        font-size: 48px;
        letter-spacing: -1px;
    }
    
    .hero-section {
        padding: 80px 30px 150px;
    }
    
    .container {
        padding: 0 30px;
    }
    
    section {
        padding: 80px 0;
    }
    
    .section-title {
        font-size: 40px;
    }
    
    .work-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 30px;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    
    .approach-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-email {
        font-size: 30px;
    }
}

/* Mobile Menu System */
.mobile-menu-toggle {
    display: none; /* Hidden by default */
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    z-index: 999;
    transition: opacity 0.3s ease;
    position: fixed;
    top: 30px;
    right: 30px;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background-color: #000;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Hide hamburger icon when menu is open */
.mobile-menu-toggle.active {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.mobile-menu-overlay {
    position: fixed;
    top: 20px;
    right: -300px; /* Increased to ensure it's completely off-screen */
    width: 220px;
    height: auto;
    background-color: transparent;
    z-index: 9999;
    transition: right 0.3s ease, visibility 0s linear 0.3s;
    padding: 12px;
    overflow: hidden; /* Prevent any content from showing */
    visibility: hidden;
}

.mobile-menu-overlay.active {
    right: 20px;
    visibility: visible;
    transition: right 0.3s ease, visibility 0s;
}

.mobile-menu-content {
    padding: 0;
    height: auto;
    max-height: fit-content;
    display: flex;
    flex-direction: column;
    background-color: #f5f5f5;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.08);
}

.mobile-menu-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 40px;
}

.mobile-menu-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-symbol-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
}

.terminal-box-mobile {
    width: 28px;
    height: 28px;
    border: 3px solid #000;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #000;
    font-weight: bold;
}

.logo-text-mobile {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #000;
    letter-spacing: -0.5px;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    color: #000;
    padding: 5px 0;
    line-height: 1;
    position: relative;
    z-index: 10000;
    pointer-events: auto;
    min-width: 60px;
    height: 22px;
    display: inline-block;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    white-space: nowrap;
}

.close-original, .close-hover {
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    white-space: nowrap;
}

.close-hover {
    position: absolute;
    top: 4px;
    left: 0;
    transform: translateY(100%);
    opacity: 0;
    color: #ff5722;
}

.mobile-menu-close:hover .close-original {
    transform: translateY(-100%);
    opacity: 0;
}

.mobile-menu-close:hover .close-hover {
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu-close:active {
    opacity: 0.8;
}

.mobile-menu-items {
    flex: 1;
    padding: 0;
    padding-top: 12px;
    padding-right: 16px;
    padding-left: 16px;
    padding-bottom: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 8px 0;
    color: #000;
    text-decoration: none;
    font-family: var(--font-stack);
    font-size: var(--text-base);
    font-weight: 400;
    border-bottom: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 36px;
    line-height: 1;
    text-align: right;
    min-width: 100px;
    white-space: nowrap;
}

.mobile-menu-item:hover {
    color: #000;
}

.mobile-menu-item .mobile-original-text,
.mobile-menu-item .mobile-hover-text {
    transition: none;
}

.mobile-menu-item.email-item {
    margin-top: 20px;
}

@media (min-width: 1201px) and (max-width: 1400px) {
    /* Fine-tune medium-large screens */
    .nav-link {
        padding: 14px 16px;
        font-size: 17px;
    }
    
    .nav-link:first-of-type {
        padding-left: 38px;
    }
}

/* Disable transitions during resize to prevent jumping */
.resizing * {
    transition: none !important;
    animation: none !important;
}

/* Force hide mobile menu on desktop and ensure fixed menu is visible */
@media (min-width: 1001px) {
    .mobile-menu-overlay {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: none !important;
    }
    
    /* Ensure fixed menu is visible on desktop */
    .fixed-menu-container {
        display: block !important;
    }
}

/* Hide fixed menu only at mobile breakpoint - now at 1000px */
@media (max-width: 1000px) {
    
    .header {
        padding: 15px 20px;
    }
    
    .fixed-menu-container {
        display: none !important;
    }
    
    .nav-container {
        justify-content: space-between;
        align-items: center;
    }
    
    .desktop-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        z-index: 10000 !important;
        background-color: rgba(245, 245, 245, 0.9);
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    /* Show logo text again on mobile */
    .logo-text-nav {
        display: block;
    }
    
    .nav-logo {
        gap: 16px;
    }
    
    .hero-title {
        /* Font size handled by fluid typography */
        letter-spacing: -0.7px;
        max-width: 100%;
        text-align: left;
        white-space: nowrap;
    }
    
    .hero-subtitle {
        /* Font size handled by fluid typography */
        letter-spacing: -0.7px;
        text-align: left;
        white-space: nowrap;
    }
    
    .hero-tagline {
        /* Font size handled by fluid typography */
        text-align: left;
        line-height: 1.4;
    }
    
    .hero-section {
        padding: 60px 20px 120px;
        min-height: 50vh;
    }
    
    .hero-content {
        text-align: left;
    }
    
    .container {
        padding: 0 20px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .section-title {
        /* Font size handled by fluid typography */
        margin-bottom: 40px;
    }
    
    .work-grid,
    .services-grid,
    .values-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .work-item,
    .approach-item {
        padding: 30px;
    }
    
    .service-item {
        padding: 25px;
    }
    
    .about-intro {
        font-size: 24px;
    }
    
    .contact-section {
        padding: 80px 0;
    }
    
    .contact-email {
        font-size: 28px;
        margin-bottom: 40px;
    }
    
    .social-links {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .social-link {
        width: 200px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 15px 16px;
    }
    
    .nav-logo {
        gap: 12px;
    }
    
    .logo-text-nav {
        font-size: 22px;
    }
    
    .terminal-box-nav {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }
    
    .mobile-menu-overlay {
        width: 280px;
    }
    
    .mobile-menu-logo {
        gap: 10px;
    }
    
    .terminal-box-mobile {
        width: 26px;
        height: 26px;
        font-size: 10px;
    }
    
    .logo-text-mobile {
        font-size: 20px;
    }
    
    .mobile-menu-item {
        font-size: 16px;
        padding: 14px 16px;
    }
    
    .mobile-menu-item:hover {
        padding-left: 26px;
    }
    
    .hero-title {
        font-size: 26px;
        line-height: 1.2;
        letter-spacing: -0.5px;
        white-space: nowrap;
    }
    
    .hero-subtitle {
        font-size: 26px;
        line-height: 1.2;
        letter-spacing: -0.5px;
        white-space: nowrap;
    }
    
    .hero-tagline {
        font-size: 16px;
        line-height: 1.3;
    }
    
    .hero-section {
        padding: 40px 16px 80px;
        min-height: 40vh;
    }
    
    .container {
        padding: 0 16px;
    }
    
    section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 30px;
        margin-bottom: 30px;
    }
    
    .work-item,
    .approach-item {
        padding: 25px;
    }
    
    .work-item h3,
    .approach-item h3 {
        font-size: 20px;
    }
    
    .service-item {
        padding: 20px;
    }
    
    .service-item h3 {
        font-size: 18px;
    }
    
    .about-intro {
        font-size: 20px;
        margin-bottom: 40px;
    }
    
    .value-item h3 {
        font-size: 20px;
    }
    
    .contact-section {
        padding: 60px 0;
    }
    
    .contact-intro {
        font-size: 20px;
    }
    
    .contact-email {
        font-size: 24px;
    }
    
    .social-link {
        font-size: 16px;
        padding: 10px 20px;
    }
    
    .loading-container .logo {
        gap: 12px;
    }
    
    .logo-text {
        font-size: 36px;
    }
    
    .terminal-box {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.logo-symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

.terminal-box {
    width: 40px;
    height: 40px;
    border: 3px solid #999;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #999;
    font-weight: bold;
    transition: all 0.3s ease;
}

.terminal-prompt {
    font-weight: bold;
}

.terminal-underscore {
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}


.logo-text {
    position: relative;
    font-size: 48px;
    font-weight: 300;
    letter-spacing: -1px;
    font-family: 'Inter', sans-serif;
}

.text-outline {
    color: #999;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.text-fill {
    color: #fff;
    position: relative;
    z-index: 2;
    clip-path: inset(100% 0 0 0);
}

.logo.filled .terminal-box {
    border-color: #fff;
    color: #fff;
}

/* Very Small Mobile - for screens narrower than 380px */
@media (max-width: 380px) {
    .hero-title {
        font-size: 20px;
        letter-spacing: -0.4px;
    }
    
    .hero-subtitle {
        font-size: 20px;
        letter-spacing: -0.4px;
    }
    
    .hero-tagline {
        font-size: 14px;
        white-space: normal;
        line-height: 1.3;
    }
}

/* Extra Small Mobile - for screens narrower than 320px */
@media (max-width: 320px) {
    .hero-title {
        font-size: 18px;
        letter-spacing: -0.3px;
    }
    
    .hero-subtitle {
        font-size: 18px;
        letter-spacing: -0.3px;
    }
    
    .hero-tagline {
        font-size: 12px;
        line-height: 1.3;
    }
}

/* 3D Services Section */
.services-3d-section {
    padding: 0 0 100px 0;
    position: relative;
    overflow: hidden;
    background: #121212;
}

.services-heading {
    padding: 100px 80px 60px;
    text-align: left;
    background: #121212;
    max-width: 1400px;
    margin: 0 auto;
}

.services-heading h2 {
    font-size: 48px;
    font-weight: 300;
    color: #fff;
    letter-spacing: -1px;
    margin: 0;
}

@media (max-width: 1200px) {
    .services-heading h2 {
        font-size: 40px;
    }
}

@media (max-width: 768px) {
    .services-heading h2 {
        font-size: 36px;
    }
    .services-heading {
        padding: 60px 40px 40px;
    }
    .services-3d-section {
        padding-bottom: 60px;
    }
}

@media (max-width: 480px) {
    .services-heading h2 {
        font-size: 30px;
    }
    .services-heading {
        padding: 40px 20px 30px;
    }
    .services-3d-section {
        padding-bottom: 40px;
    }
}

.services-3d-wrapper {
    padding-top: 0;
    background: #121212;
}

.service-slide {
    height: 100vh;
    box-shadow: 3px 3px 30px rgba(0, 0, 0, 0.14);
}

.service-content-wrapper {
    width: 100%;
    height: 100%;
    perspective: 250vw;
}

.service-content {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    transform-origin: 50% 10%;
    padding: 25px 50px 50px 25px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    will-change: transform, opacity;
}

.service-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.service-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.service-text {
    width: 100%;
    display: block;
    font-family: var(--font-stack);
    font-size: calc(var(--text-5xl) / 2);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 30px;
}

.service-bottom > div:last-child {
    display: flex;
    font: 500 normal 10.5vw / 0.9 'Inter', sans-serif;
    letter-spacing: -0.06em;
    gap: 25px;
}

.service-bottom img {
    width: 25vw;
    border-radius: 0.02em;
}

.service-top p {
    font-family: var(--font-stack);
    font-size: var(--text-5xl);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.06em;
}

.service-top svg {
    width: 5.7vw;
    height: auto;
    display: block;
}

.service-slide:nth-child(1) .service-content, 
.service-slide:nth-child(4) .service-content {
    background: #121212;
    color: #F1F1F1;
}

.service-slide:nth-child(2) .service-content,
.service-slide:nth-child(5) .service-content {
    background: #C4EF7A;
    color: #527200;
}

.service-slide:nth-child(3) .service-content,
.service-slide:nth-child(6) .service-content {
    background: #FC4C3B;
    color: #FFF;
}

.service-slide:nth-child(7) .service-content {
    background: #FFC107;
    color: #121212;
}

.service-num {
    font: 500 normal 10.5vw / 0.9 'Inter', sans-serif;
    letter-spacing: -0.06em;
    opacity: 0.5;
}

@media (max-aspect-ratio: 1/1) {
    .service-content {
        padding: 15px;
        justify-content: initial;
    }
    .service-num {
        display: none;
    }
    .service-bottom {
        margin: 15px 0 0;
        flex-direction: column;
        gap: 15px;
    }
    .service-text {
        font-size: calc(var(--text-5xl) / 2);
        width: 100%;
        margin-bottom: 20px;
    }
    .service-bottom img {
        width: 100%;
        aspect-ratio: 1;
        object-fit: cover;
    }
}

/* Email Form Styles */
.email-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 10000;
    display: none;
    pointer-events: none;
}

.email-form-overlay.active {
    display: block;
    pointer-events: auto;
}

/* Edge Animation */
.email-form-edge-animation {
    position: fixed;
    top: 50%;
    right: -10px;
    transform: translateY(-50%);
    width: 10px;
    height: 200px;
    z-index: 10001;
    overflow: hidden;
}

@media (max-width: 768px) {
    .email-form-edge-animation {
        display: none;
    }
}

/* Left Edge Animation */
.email-form-left-edge {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 40px;
    overflow: visible;
    z-index: 9999;
}

.left-edge-black,
.left-edge-orange {
    position: absolute;
    width: 20px;
    height: 100%;
    transform: scaleY(1);
    transform-origin: right center;
    z-index: 10000;
}

.left-edge-black {
    background: #000;
    left: 50px;
    opacity: 1;
}

.left-edge-orange {
    background: #ff5722;
    left: 0;
    opacity: 1;
}

.edge-orange,
.edge-black {
    position: absolute;
    width: 100%;
    height: 0;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.edge-orange {
    background: #ff5722;
    top: 50%;
    transform: translateY(-50%);
}

.edge-black {
    background: #000;
    top: 50%;
    transform: translateY(-50%);
}

.email-form-overlay.animating .edge-orange {
    height: 100%;
}

.email-form-overlay.animating .edge-black {
    height: 80%;
    transition-delay: 0.1s;
}

/* Form Container */
.email-form-container {
    position: fixed;
    top: 0;
    right: -35%;
    width: 35%;
    min-width: 320px;
    height: 100%;
    background: #f0f0f0;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    -webkit-overflow-scrolling: touch;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    container-type: inline-size;
}

/* Form Content Wrapper */
.email-form-inner {
    width: calc(100% - 40px);
    max-width: 500px;
    padding: clamp(40px, 5vw, 60px) clamp(20px, 3vw, 40px);
    margin: 20px auto;
    min-height: calc(100% - 40px);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Form Header */
.email-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 30px 0;
}

.form-title {
    font-family: var(--font-stack);
    color: #666;
    font-size: var(--text-base);
    font-weight: 400;
}

.form-close {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    color: #666;
    transition: all 0.3s;
    padding: 8px;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10002;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-close:hover {
    color: #000;
}

/* Form Content */
.email-form-content {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-heading {
    font-family: var(--font-stack);
    font-size: var(--text-4xl);
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: clamp(20px, 3vw, 40px);
    color: #000;
    letter-spacing: -0.02em;
}

/* Form Elements */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: clamp(15px, 2.5vw, 30px);
    flex: 1;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: clamp(10px, 2vw, 20px);
}

/* Container queries for form layout */
@container (max-width: 450px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .email-form-inner {
        padding: clamp(30px, 4vw, 50px) clamp(15px, 2vw, 30px);
    }
    
    .form-heading {
        font-size: clamp(20px, 5vw, 32px);
        margin-bottom: 20px;
    }
}

@container (max-width: 380px) {
    .form-group input,
    .form-group textarea {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .form-group label {
        font-size: 12px;
    }
    
    .form-submit {
        padding: 10px 20px 10px 15px;
        font-size: 14px;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 0.8vw, 8px);
}

.form-group label {
    font-family: var(--font-stack);
    font-size: var(--text-sm);
    color: #666;
    font-weight: 400;
}

.form-group input,
.form-group textarea {
    padding: clamp(12px, 1.5vw, 16px) clamp(16px, 2vw, 20px);
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: var(--text-base);
    font-family: var(--font-stack);
    background: #fff;
    transition: border-color 0.3s;
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff5722;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

/* Submit Button */
.form-submit {
    align-self: flex-start;
    background: none;
    border: 2px solid #ff5722;
    border-radius: 30px;
    padding: clamp(10px, 1.2vw, 12px) clamp(20px, 3vw, 30px) clamp(10px, 1.2vw, 12px) clamp(15px, 2vw, 20px);
    font-family: var(--font-stack);
    font-size: var(--text-base);
    font-weight: 500;
    color: #ff5722;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: clamp(8px, 1vw, 10px);
    position: relative;
}

.submit-circle {
    width: 12px;
    height: 12px;
    background: #ff5722;
    border-radius: 50%;
    transition: all 0.3s;
}

.form-submit:hover {
    background: #ff5722;
    color: #fff;
}

.form-submit:hover .submit-circle {
    background: #fff;
}

/* Responsive */
@media (max-width: 1400px) {
    .email-form-container {
        width: 45%;
        right: -45%;
    }
}

@media (max-width: 1200px) {
    .email-form-container {
        width: 55%;
        right: -55%;
        min-width: 320px;
    }
}

@media (max-width: 992px) {
    .email-form-container {
        width: 70%;
        right: -70%;
        min-width: unset;
    }
}

@media (max-width: 768px) {
    .email-form-container {
        width: 100%;
        right: -100%;
        min-width: unset;
    }
    
    /* Fallback for browsers without container query support */
    @supports not (container-type: inline-size) {
        .form-row {
            grid-template-columns: 1fr;
        }
    }
    
    .email-form-inner {
        width: 100%;
        margin: 0;
        padding: 60px 20px 40px;
    }
}

@media (max-width: 480px) {
    .form-group textarea {
        min-height: 100px;
    }
    
    .form-title {
        font-size: 14px;
    }
}