:root {
    /* Monochrome Minimalist + SciFi Palette */
    --bg-main: #f8f9fa; /* Slightly cooler white/gray for lab feel */
    --bg-surface: #ffffff;
    
    --text-primary: #0a0a0a;
    --text-secondary: #555555;
    --text-light: #999999;
    
    --accent-blue: #000000;
    --accent-cyan: #222222;
    --accent-glow: rgba(0, 0, 0, 0.1);
    --accent-gradient: linear-gradient(135deg, #000000 0%, #444444 100%);
    
    /* Sci-Fi Shadows & Highlights */
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.04);
    --shadow-hard: 20px 20px 60px rgba(0, 0, 0, 0.06);
    --border-glass: rgba(255, 255, 255, 0.8);
    --border-subtle: rgba(0, 0, 0, 0.08);
    --scifi-border: 1px solid rgba(0, 0, 0, 0.15);

    /* Typography */
    --font-sans: 'Space Grotesk', 'Noto Sans SC', sans-serif;
    --font-mono: 'JetBrains Mono', monospace; /* Added Mono font for Sci-Fi feel */
    
    /* Layout */
    --container-px: 6vw;
    --section-py: 120px;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-main);
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    /* Default cursor, overridden on non-touch devices via media query */
    cursor: auto;
}

/* Custom Cursor (Desktop Only) */
@media (pointer: fine) {
    body { cursor: none; }
    .cursor {
        position: fixed;
        width: 6px;
        height: 6px;
        background-color: var(--accent-blue);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        transform: translate(-50%, -50%);
        transition: background-color 0.2s;
    }
    .cursor-follower {
        position: fixed;
        width: 40px;
        height: 40px;
        border: 1px solid rgba(17, 17, 17, 0.15);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9998;
        transform: translate(-50%, -50%);
        transition: width 0.3s, height 0.3s, border-color 0.3s, background-color 0.3s;
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }
    body:hover .cursor-follower.active {
        width: 50px;
        height: 50px;
        border-color: var(--accent-blue);
        background-color: rgba(17, 17, 17, 0.03);
    }
}

/* Isometric Grid Background - Enhanced Sci-Fi */
.iso-grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-image: 
        linear-gradient(rgba(0,0,0,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(1000px) rotateX(60deg) rotateZ(45deg) scale(3) translateY(-20%);
    opacity: 0.6;
    pointer-events: none;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 24px var(--container-px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: all 0.4s ease;
}

.navbar.scrolled {
    padding: 16px var(--container-px);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
}

.logo {
    display: flex;
    align-items: baseline;
    gap: 8px;
    position: relative;
    z-index: 102; /* Ensure logo is above mobile menu */
}

.logo-zh {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-primary);
}

.logo-en {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--text-light);
    font-family: var(--font-mono);
}

/* Mobile Menu Button */
.menu-btn {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 102; /* Ensure button is above mobile menu */
    padding: 8px;
}

.menu-line {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-btn.active .menu-line:nth-child(2) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-links {
    display: flex;
    gap: 48px;
    background: rgba(255, 255, 255, 0.5);
    padding: 12px 32px;
    border-radius: 100px;
    border: 1px solid var(--border-glass);
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--accent-blue);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 36px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--text-primary);
    color: white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    background: var(--accent-blue);
}

.btn-primary i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.btn-primary:hover i {
    transform: translateX(4px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding: 0 var(--container-px);
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    background: rgba(17, 17, 17, 0.03);
    border: var(--scifi-border);
    border-radius: 4px; /* More geometric/scifi than fully rounded */
    margin-bottom: 32px;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.02);
}

.badge-dot {
    width: 6px;
    height: 6px;
    background-color: var(--text-primary);
    border-radius: 0; /* Square dot for scifi feel */
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(17, 17, 17, 0.2); }
    70% { box-shadow: 0 0 0 6px rgba(17, 17, 17, 0); }
    100% { box-shadow: 0 0 0 0 rgba(17, 17, 17, 0); }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    margin-bottom: 24px;
    letter-spacing: -0.04em;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 500px;
}

/* Hero Visual - Icon Showcase */
.hero-visual {
    position: absolute;
    right: 5vw;
    top: 50%;
    transform: translateY(-50%);
    width: 45vw;
    height: 600px;
    pointer-events: none;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-icon-showcase {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-icon {
    position: absolute;
    background: var(--text-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.05));
}

.main-icon {
    font-size: 14rem;
    animation: floatIcon 6s ease-in-out infinite;
}

.sub-icon-1 {
    font-size: 5rem;
    top: 20%;
    left: 15%;
    opacity: 0.4;
    animation: floatIcon 8s ease-in-out infinite 1s;
}

.sub-icon-2 {
    font-size: 6rem;
    bottom: 25%;
    right: 20%;
    opacity: 0.3;
    animation: floatIcon 7s ease-in-out infinite 2s;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(5deg); }
}

/* Services Section */
.services {
    padding: var(--section-py) var(--container-px);
    background: #ffffff;
    position: relative;
    z-index: 2;
    border-radius: 40px;
    box-shadow: 0 -20px 40px rgba(0,0,0,0.02);
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--accent-blue);
    font-weight: 600;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
}

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

/* 3D Card Styling */
.iso-card-wrapper {
    perspective: 1000px;
    height: 100%;
}

.iso-card {
    background: #ffffff;
    border-radius: 8px; /* Sharper corners */
    padding: 40px 32px;
    height: 100%;
    box-shadow: var(--shadow-hard);
    border: var(--scifi-border);
    position: relative;
    transform-style: preserve-3d;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.iso-card:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.4); /* Stronger border on hover */
}

.card-content {
    transform: translateZ(30px);
}

/* Professional Icon Styling */
.card-icon {
    font-size: 3rem;
    margin-bottom: 24px;
    display: inline-block;
    color: var(--text-primary);
    line-height: 1;
}

.iso-card h3 {
    font-size: 1.4rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

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

.card-number {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 3rem;
    font-weight: 700;
    color: rgba(0,0,0,0.03);
    line-height: 1;
    font-family: var(--font-mono);
}

/* About Section */
.about {
    padding: var(--section-py) var(--container-px);
    background: var(--bg-main);
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid var(--border-subtle);
}

.stat-val {
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 8px;
}

.stat-val span {
    font-size: 1.2rem;
    color: var(--accent-blue);
}

.stat-lbl {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
}

/* About Visual - Icon Showcase */
.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    aspect-ratio: 1;
}

.about-icon-showcase {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, rgba(0,0,0,0.02) 0%, transparent 70%);
}

.about-main-icon {
    font-size: 20rem;
    color: var(--text-primary);
    filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.08));
    animation: floatIconSlow 8s ease-in-out infinite;
}

@keyframes floatIconSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Footer */
.footer {
    padding: 36px var(--container-px) 26px;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.footer-shell {
    background: linear-gradient(180deg, #fbfbfb 0%, #f3f4f5 100%);
    border: 1px solid var(--border-subtle);
    border-radius: 28px;
    box-shadow: var(--shadow-soft);
    padding: 52px 56px 32px;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr;
    gap: 56px;
    align-items: start;
}

.footer-brand .logo {
    margin-bottom: 18px;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 40ch;
}

.footer-col h4 {
    font-size: 1.02rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-col ul {
    list-style: none;
    display: grid;
    gap: 10px;
}

.footer-col li {
    color: var(--text-secondary);
    font-size: 0.98rem;
}

.contact-email {
    display: inline-block;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    margin-bottom: 16px;
    transition: color 0.3s;
}

.contact-email:hover {
    color: var(--accent-blue);
}

.contact-address {
    color: var(--text-secondary);
    margin-top: 12px;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0;
    padding-top: 18px;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-light);
    font-size: 0.9rem;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
}

.footer-meta {
    display: flex;
    gap: 20px;
}

.footer-meta a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;
    transition: opacity 1.2s ease;
}

.fade-in.visible {
    opacity: 1;
}

.dud {
    color: var(--text-light);
    opacity: 0.7;
}

/* --- Responsive Media Queries --- */

/* Tablet & Smaller Desktops */
@media (max-width: 992px) {
    :root {
        --container-px: 5vw;
        --section-py: 100px;
    }

    .about-container {
        grid-template-columns: 1fr;
    }
    
    .about-visual {
        max-width: 400px;
        margin: 0 auto 60px;
    }
    
    .hero-visual {
        opacity: 0.15;
        right: -10vw;
        width: 80%;
        z-index: 0;
    }
    
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    :root {
        --container-px: 24px;
        --section-py: 80px;
    }

    .navbar {
        padding: 16px var(--container-px);
    }
    
    /* Mobile Hamburger Menu */
    .menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(252, 252, 252, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        border-radius: 0;
        border: none;
        box-shadow: none;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 101; /* Below logo/btn */
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-link {
        font-size: 1.5rem;
        color: var(--text-primary);
    }

    .hero {
        padding-top: 120px;
        text-align: center;
    }

    .hero-content {
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-desc {
        text-align: center;
    }

    .hero-visual {
        display: none; /* Hide 3D elements on mobile for performance/space */
    }
    
    .services {
        border-radius: 24px;
    }

    .section-header {
        margin-bottom: 48px;
    }

    .iso-card {
        padding: 32px 24px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }
    
    .footer-shell {
        padding: 34px 24px 24px;
        border-radius: 22px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: center;
    }

    .footer-tagline {
        max-width: none;
    }

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

    .footer-meta {
        justify-content: center;
    }
}
