:root {
    /* Color Palette - Deep Space & Neon */
    --bg-dark: #050510;
    --bg-darker: #020205;
    --primary: #6366f1; /* Indigo 500 */
    --primary-glow: rgba(99, 102, 241, 0.4);
    --secondary: #8b5cf6; /* Violet 500 */
    --secondary-glow: rgba(139, 92, 246, 0.4);
    --accent: #06b6d4; /* Cyan 500 */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(12px);
    
    /* Spacing & Layout */
    --container-width: 1200px;
    --nav-height: 80px;
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-smooth: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--text-main) 0%, var(--primary) 50%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    transition: var(--transition-fast);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: var(--glass-bg);
}

.btn-block {
    width: 100%;
}

/* Background Elements */
#canvas-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -2;
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

/* Navigation */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    transition: var(--transition-fast);
}

#navbar.scrolled {
    background: rgba(5, 5, 16, 0.8);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    height: 70px;
}

.nav-container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.logo-wrapper {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-chinese {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.logo-text .highlight {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.95rem;
    color: var(--text-muted);
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-main);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition-fast);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

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

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

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

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-content h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.cta-group {
    display: flex;
    gap: 1rem;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.7;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-muted);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-main);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

/* Sections General */
.section {
    padding: 120px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}

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

/* Cards (Glassmorphism) */
.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.3);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.05), transparent 60%);
    opacity: 0;
    transition: var(--transition-fast);
}

.card:hover::before {
    opacity: 1;
}

.service-card .card-icon {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1.5rem;
    transition: var(--transition-fast);
}

.service-card:hover .card-icon {
    background: var(--primary);
    color: white;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* About Section */
.about-grid {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 4rem;
}

.about-content .lead {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.stats-row {
    display: flex;
    gap: 3rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
}

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

/* Visual Code Card */
.visual-card {
    background: #0f0f20;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--glass-border);
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease;
}

.visual-card:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.code-block {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #e2e8f0;
}

.code-block .line { margin-bottom: 8px; }
.code-block .indent { padding-left: 20px; }
.code-block .k { color: #c084fc; } /* keyword */
.code-block .v { color: #f472b6; } /* variable */
.code-block .f { color: #60a5fa; } /* function */
.code-block .s { color: #34d399; } /* string/value */
.code-block .c { color: #fbbf24; } /* class */
.code-block .m { color: #60a5fa; } /* method */
.code-block .p { color: #94a3b8; } /* property */

.floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    z-index: -1;
}

.shape-1 {
    width: 150px;
    height: 150px;
    background: var(--primary);
    top: -30px;
    right: -30px;
    opacity: 0.3;
}

.shape-2 {
    width: 100px;
    height: 100px;
    background: var(--accent);
    bottom: -20px;
    left: -20px;
    opacity: 0.2;
}

/* Contact */
.contact-grid {
    grid-template-columns: 1fr 1.5fr;
}

.info-item {
    margin-bottom: 2rem;
}

.info-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-item p {
    color: var(--text-muted);
    padding-left: 1.8rem;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-main);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-family: inherit;
    transition: var(--transition-fast);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Footer */
footer {
    background: var(--bg-darker);
    padding: 80px 0 30px;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: white;
}

.footer-col p {
    color: var(--text-muted);
    max-width: 300px;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: #64748b;
    font-size: 0.9rem;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}

@keyframes scroll {
    0% { top: 8px; opacity: 1; }
    100% { top: 20px; opacity: 0; }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.delay-100 { animation-delay: 0.1s; transition-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; transition-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; transition-delay: 0.3s; }

/* Responsive */
@media (max-width: 992px) {
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .visual-card {
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hide for mobile initially */
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--glass-border);
        gap: 1.5rem;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-toggle {
        display: flex;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stats-row {
        flex-wrap: wrap;
        gap: 1.5rem;
    }
}
