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

:root {
    --primary-color: #00ff88;
    --primary-glow: rgba(0, 255, 136, 0.15);
    --secondary-color: #0066ff;
    --secondary-glow: rgba(0, 102, 255, 0.15);
    --accent-color: #44ccff;
    --dark-bg: #0a0a0a;
    --dark-surface: rgba(16, 16, 16, 0.85);
    --text-color: #ffffff;
    --text-secondary: #b0b0b0;
    --card-bg: rgba(20, 20, 20, 0.8);
    --card-border: rgba(255, 255, 255, 0.06);
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --transition-smooth: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    scroll-behavior: auto;
    scroll-padding-top: 80px;
    background-color: #0a0a0a;
}

/* Enable vertical scroll snapping across sections */
html,
body {
    height: 100%;
    scroll-snap-type: y mandatory;
    scroll-padding-top: 80px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    overflow-x: hidden;
    overflow-y: scroll;
}

/* Temporarily disable snapping during programmatic smooth scroll */
html.no-snap,
body.no-snap {
    scroll-snap-type: none !important;
}

/* Hide scrollbars in WebKit-based browsers */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 0;
    height: 0;
}

#coverBlack {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    opacity: 1.0;
    background: #000000;
}

body {
    font-family: 'Vend Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: transparent;
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* Intro Animation Overlay */
#intro-canvas {
    position: fixed;
    top: 0;
    left: 0;
    /* Fallback to classic viewport, then dynamic, then large (fills under URL bar) */
    width: 100vw;
    width: 100dvw;
    width: 100lvw;
    height: 100vh;
    height: 100dvh;
    height: 100lvh;
    z-index: 10000;
    background: #0a0a0a; /* dark fallback if WebGL context is lost/slow */
    transition: opacity 0.3s ease-out;
}

#intro-canvas.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Hide main content initially */
.main-content {
    opacity: 0;
    transition: none;
    position: relative;
    z-index: 1;
}

.main-content.visible {
    opacity: 1;
}

@keyframes fadeInDelayed {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Three.js Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    width: 100dvw;
    width: 100lvw;
    height: 100vh;
    height: 100dvh;
    height: 100lvh;
    /* Behind content, but not behind the document background. */
    z-index: 0;
    pointer-events: none;
    background: #0a0a0a; /* dark fallback if WebGL context is lost */
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.35s ease, border-color 0.35s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    text-decoration: none;
    margin-right: auto;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.logo:hover {
    text-shadow: 0 0 20px var(--primary-glow);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-color);
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(0, 255, 136, 0.06);
    box-shadow: 0 0 20px var(--primary-glow);
}

.lang-text {
    font-weight: 700;
    letter-spacing: 1px;
}

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    padding: 0.25rem;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--text-color);
    margin: 6px 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    transition: color var(--transition-smooth);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    transition: width var(--transition-smooth);
}

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

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}

.hero-content {
    max-width: 800px;
}

.glitch {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--primary-color);
    position: relative;
    letter-spacing: -0.02em;
    animation: glitch-anim 3s infinite;
}

@keyframes glitch-anim {
    0%, 90%, 100% { text-shadow: none; }
    91%, 93%, 95%, 97%, 99% {
        text-shadow:
            2px 2px 0 var(--secondary-color),
            -2px -2px 0 #ff0066;
    }
}

.subtitle {
    font-size: clamp(1.2rem, 3vw, 2rem);
    margin-bottom: 0.75rem;
    font-weight: 300;
    color: var(--text-color);
    letter-spacing: 0.02em;
}

.tagline {
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    margin-bottom: 2.5rem;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    padding: 0.9rem 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--dark-bg);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.03em;
    border-radius: 50px;
    transition: all var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.25);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    border-radius: inherit;
    pointer-events: none;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(0, 255, 136, 0.45);
}

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

/* Section Titles */
.section-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 50%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    margin: 1rem auto 0;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

/* Services Section */
.services {
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.services-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 2rem;
    overflow-x: visible;
    /* Disable horizontal scroll on desktop to prevent interference with page scroll */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
}

/* Hide horizontal scrollbar for services row in WebKit */
.services-grid::-webkit-scrollbar {
    display: none;
}

.service-card {
    background: var(--dark-surface);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    transition: all var(--transition-smooth);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex: 0 0 340px;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(0, 255, 136, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 255, 136, 0.25);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px var(--primary-glow);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-icon-3d {
    width: 100%;
    height: 150px;
    margin-bottom: 1rem;
    position: relative;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* About Section */
.about {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

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

.about-text {
    font-size: 1.25rem;
    margin: 0 auto 3rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 650px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 1rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    text-shadow: 0 0 30px var(--primary-glow);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

/* Projects Section */
.projects {
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    overflow: hidden;
}

.projects .container {
    max-width: 1400px;
    width: 100%;
}

.projects-wrapper {
    width: 100%;
    position: relative;
}

.project-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(20, 20, 20, 0.6);
    color: var(--primary-color);
    border: 1px solid rgba(0, 255, 136, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    padding-bottom: 4px;
    /* Optical center adjustment */
    line-height: 1;
    opacity: 0;
    /* Controlled by JS */
    pointer-events: none;
}

.project-nav.visible {
    opacity: 1;
    pointer-events: all;
}

.project-nav:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

.project-nav.prev {
    left: -1rem;
    /* Outside initially on desktop */
}

.project-nav.next {
    right: -1rem;
    /* Outside initially on desktop */
}

@media (min-width: 769px) {
    .projects-wrapper {
        padding: 0 3rem;
    }

    .project-nav.prev {
        left: 0.5rem;
    }

    .project-nav.next {
        right: 0.5rem;
    }
}

.projects-grid {
    display: flex;
    gap: 1.2rem;
    padding: 2.5rem 2rem;
    justify-content: center;
}

.projects-grid::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.project-card {
    flex: 0 0 85vw;
    width: 85vw;
    max-width: 300px;
    height: min(400px, calc(100vh - 14rem));
    background: var(--dark-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    scroll-snap-align: center;
    border: 1px solid var(--card-border);
    transition: all var(--transition-smooth);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(0, 255, 136, 0.25);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px var(--primary-glow);
    z-index: 10;
}

.project-icon-3d {
    width: 100%;
    height: 55%;
    background: radial-gradient(circle at center, rgba(30, 30, 30, 0.5) 0%, rgba(10, 10, 10, 0.8) 100%);
    position: relative;
    overflow: hidden;
    pointer-events: none;
    /* Ensure clicks pass through to card */
}

@media (min-width: 769px) {
    .project-card {
        flex: 0 0 calc((100% - 3 * 1.2rem) / 4);
        width: calc((100% - 3 * 1.2rem) / 4);
        max-width: 300px;
    }
}

.project-icon-3d canvas {
    display: block;
    width: 100%;
    height: 100%;
    outline: none;
}

.project-card:hover .project-icon-3d {
    /* Optional: can add a slight zoom or glow here later */
}

.project-info {
    padding: 1.5rem 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.98), rgba(20, 20, 20, 0.85));
    z-index: 2;
    min-height: 0;
}

.project-title {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.project-short-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.tag {
    font-size: 0.7rem;
    padding: 0.3rem 0.75rem;
    background: rgba(0, 255, 136, 0.08);
    color: var(--primary-color);
    border-radius: 50px;
    border: 1px solid rgba(0, 255, 136, 0.15);
    font-weight: 500;
    letter-spacing: 0.03em;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 2rem;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: #151515;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow-y: auto;
    transform: translateY(50px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    font-family: sans-serif;
}

.modal-close:hover {
    background: var(--primary-color);
    color: black;
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
}

.modal-image-container {
    height: 100%;
    min-height: 400px;
    background: #000;
}

.modal-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-details {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-details h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    line-height: 1.1;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

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

.cta-button.small {
    padding: 0.8rem 2rem;
    font-size: 0.9rem;
    align-self: flex-start;
}

/* Mobile adjustments for Projects and Modal */
@media (max-width: 768px) {
    .projects {
        padding: 1rem 0;
        display: block;
        overflow: hidden;
    }

    .projects .container {
        padding: 0;
        width: 100%;
        max-width: 100%;
    }

    .projects-wrapper {
        padding: 0;
    }

    .projects-grid {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 1.5rem calc((100vw - min(75vw, 280px)) / 2);
        gap: 1rem;
        margin: 0;
        width: 100%;
        justify-content: flex-start;
    }

    .project-card {
        flex: 0 0 75vw;
        max-width: 280px;
        height: min(380px, calc(100vh - 12rem));
        min-height: 280px;
        opacity: 0.5;
        transform: scale(0.9);
        transition: all 0.3s ease;
    }

    .project-card .project-info {
        padding: 1.2rem;
    }

    .project-card .project-title {
        font-size: 1.3rem;
    }

    .project-card.active {
        opacity: 1;
        transform: scale(1);
    }

    .project-nav {
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
        background: rgba(10, 10, 10, 0.8);
        border-color: rgba(0, 255, 136, 0.4);
    }

    .project-nav.prev { left: 10px; }
    .project-nav.next { right: 10px; }

    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal-content {
        max-height: 90vh;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        transform: translateY(100%);
        transition: transform 0.4s ease-out;
    }

    .modal-overlay.active .modal-content {
        transform: translateY(0);
    }

    .modal-body {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    .modal-image-container {
        height: 200px;
        min-height: auto;
        flex-shrink: 0;
    }

    .modal-details {
        padding: 1.5rem;
        overflow-y: auto;
    }

    .modal-details h3 {
        font-size: 1.5rem;
    }

    .modal-close {
        top: 1rem;
        right: 1rem;
        background: rgba(0, 0, 0, 0.6);
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
}

/* Contact Section */
.contact {
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.contact-content {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.contact-info {
    text-align: center;
    max-width: 550px;
}

.contact-intro {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.8;
    font-size: 1.1rem;
}

.contact-links {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
}

.contact-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    background: var(--dark-surface);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-smooth);
    min-width: 180px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.contact-link-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 255, 136, 0.25);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px var(--primary-glow);
}

.contact-link-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

.contact-link-value {
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 600;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--dark-surface);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    color: var(--text-color);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--primary-glow);
}

.submit-button {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--dark-bg);
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-smooth);
    letter-spacing: 0.03em;
}

.submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(0, 255, 136, 0.45);
}

/* Scroll snap targets */
.hero,
.about,
.services,
.projects,
.contact {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    height: 100vh;
    height: 100dvh;
    box-sizing: border-box;
}

/* Footer */
.footer {
    padding: 3rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 2rem;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: text-shadow 0.3s ease;
}

.footer-logo:hover {
    text-shadow: 0 0 20px var(--primary-glow);
}

.footer-nav {
    display: flex;
    gap: 2rem;
}

.footer-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color var(--transition-smooth);
}

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

.footer-copy {
    color: var(--text-secondary);
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Modal improvements */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-smooth);
    padding: 2rem;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: #151515;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    position: relative;
    overflow-y: auto;
    transform: translateY(50px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

/* Mobile device detection class */
.mobile-device {
    /* This class will be added by JavaScript for mobile devices */
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-controls {
        gap: 0.5rem;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        margin: 0;
        padding: 0.75rem 2rem 1rem;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transform: translateY(-8px);
        transition: max-height 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    }

    .nav-menu.open {
        max-height: 300px;
        opacity: 1;
        transform: translateY(0);
    }

    .nav-menu li a {
        padding: 0.5rem 0;
        display: block;
    }

    .nav-menu a {
        font-size: 0.9rem;
    }

    .services-grid {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        overflow-x: visible;
        padding: 0;
    }

    .service-card {
        flex: 0 1 auto;
        width: min(100%, 400px);
        max-width: 100%;
        padding: 1.25rem;
        margin: 0 auto;
        display: flex;
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 1.25rem;
    }

    .service-icon-3d {
        width: 70px;
        height: 70px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .service-info {
        flex: 1;
    }

    .service-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.35rem;
    }

    .service-card p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .stats {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 0.5rem;
        margin-top: 2rem;
        width: 100%;
    }

    .stat {
        flex: 1;
        min-width: 0;
        padding: 0 0.25rem;
    }

    .stat-number {
        font-size: 1.8rem;
        margin-bottom: 0.25rem;
    }

    .stat-label {
        font-size: 0.65rem;
        letter-spacing: 0;
        line-height: 1.3;
        text-align: center;
        word-break: break-word;
        hyphens: auto;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .contact-link-card {
        min-width: 0;
        width: 100%;
        max-width: 280px;
    }

    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.25rem;
    }

    /* Ensure all sections have consistent padding and centering on mobile */
    .hero,
    .about,
    .services,
    .contact {
        padding: 2rem 1rem;
        justify-content: center;
        height: auto;
        min-height: 100dvh;
    }

    .section-title {
        margin-bottom: 2rem;
    }
}