:root {
    /* --- 核心调色板 --- */
    --bg-dark: #0f172a;       /* 深蓝底色 */
    --bg-darker: #020617;     /* 导航/移动端底色 */
    --primary: #8b5cf6;       /* 紫色主调 */
    --secondary: #06b6d4;     /* 青色辅调 */
    
    --text-main: #f8fafc;     /* 主文字白 */
    --text-muted: #94a3b8;    /* 辅助文字灰 */
    
    /* --- 玻璃拟态参数 --- */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* --- 字体设置 --- */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
}

/* --- 基础重置 --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- 背景流光特效 --- */
.fixed-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    overflow: hidden;
}
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 10s infinite ease-in-out;
}
.orb-1 { width: 400px; height: 400px; background: var(--primary); top: -100px; left: -100px; }
.orb-2 { width: 300px; height: 300px; background: var(--secondary); bottom: -50px; right: -50px; animation-delay: -5s; }

/* --- 导航栏 --- */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 100;
    padding: 20px 0;
    transition: 0.3s;
}
.navbar.scrolled {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-border);
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo 图片自适应设置 */
.logo { display: flex; align-items: center; padding: 0; }
.logo-img {
    display: block;
    height: 45px; /* 限制高度，宽度自动缩放 */
    width: auto; 
    object-fit: contain;
}

/* 导航链接精细动画 */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
    align-items: center;
}
.nav-link {
    position: relative;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 0;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}
/* 悬停与激活状态 */
.nav-link:hover, .nav-link.active {
    color: #fff;
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}
/* 底部渐变光条 */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
    border-radius: 2px;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link:active { transform: scale(0.95); opacity: 0.8; }

/* Contact 按钮特殊样式 */
.btn-nav {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-nav:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
    transform: translateY(-1px);
}
.btn-nav:active { transform: scale(0.95); }

/* --- Hero 区域 --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}
.hero-content { max-width: 800px; }
.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--secondary);
    border-radius: 100px;
    font-size: 0.9rem;
    font-family: var(--font-code);
    margin-bottom: 24px;
}
.blink { animation: blink 2s infinite; }
.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 24px;
    font-family: var(--font-heading);
    color: white;
}
.text-gradient {
    background: linear-gradient(to right, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 40px; max-width: 600px; }
.hero-buttons { display: flex; gap: 16px; margin-bottom: 60px; }

/* 按钮样式 */
.btn {
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center;
    transition: transform 0.2s;
    cursor: pointer;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white; border: none;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4); }
.btn-secondary { background: transparent; border: 1px solid var(--glass-border); color: white; }
.btn-secondary:hover { border-color: white; background: rgba(255,255,255,0.05); }

.hero-stats { display: flex; gap: 40px; align-items: center; }
.stat-num { font-size: 2.5rem; font-weight: 700; font-family: var(--font-heading); line-height: 1; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.stat-separator { width: 1px; height: 40px; background: var(--glass-border); }

/* --- 通用组件 --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.small-container { max-width: 800px; }
.section { padding: 100px 0; }
.section-tag { color: var(--primary); font-family: var(--font-code); font-size: 0.9rem; display: block; margin-bottom: 10px; }
.section-title { font-size: 2.5rem; margin-bottom: 20px; font-family: var(--font-heading); }
.section-desc { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; }
.text-center { text-align: center; }

/* 玻璃卡片通用 */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 32px;
}

/* About Grid */
.grid-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.code-decoration { font-family: var(--font-code); color: var(--text-muted); line-height: 1.8; }
.code-decoration span { color: var(--secondary); }

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 40px;
}
.hover-glow { transition: 0.3s; }
.hover-glow:hover { border-color: var(--primary); transform: translateY(-5px); }
.card-icon { font-size: 2.5rem; margin-bottom: 20px; }

/* Portfolio */
.portfolio-list { display: flex; flex-direction: column; gap: 40px; margin-top: 40px; }
.glass-panel {
    display: flex;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    overflow: hidden;
}
.glass-panel.reverse { flex-direction: row-reverse; }
.portfolio-img-wrapper { flex: 1; min-height: 300px; }
.portfolio-placeholder { width: 100%; height: 100%; }
.gradient-1 { background: linear-gradient(45deg, #4f46e5, #ec4899); }
.gradient-2 { background: linear-gradient(45deg, #06b6d4, #3b82f6); }
.portfolio-content { flex: 1; padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.tech-stack { margin-bottom: 16px; display: flex; gap: 10px; }
.tech-stack span {
    font-size: 0.8rem;
    padding: 4px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 100px;
    font-family: var(--font-code);
}
.link-arrow { color: var(--secondary); text-decoration: none; font-weight: 600; margin-top: 20px; }

/* Contact Form */
.contact-form { margin-top: 32px; display: flex; flex-direction: column; gap: 16px; }
.input-group { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
input, textarea {
    width: 100%; padding: 16px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px; color: white; font-family: var(--font-body);
}
input:focus, textarea:focus { outline: none; border-color: var(--primary); }
.full-width { width: 100%; }

/* Footer */
.footer { border-top: 1px solid var(--glass-border); padding: 40px 0; margin-top: 60px; color: var(--text-muted); text-align: center; }

/* --- 移动端适配 --- */
.hamburger { display: none; cursor: pointer; }
.bar { display: block; width: 25px; height: 3px; background: white; margin: 5px auto; transition: 0.3s; }

@media (max-width: 768px) {
    .hamburger { display: block; z-index: 101; }
    /* 汉堡菜单激活时的 X 形状 */
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .nav-menu {
        position: fixed; left: -100%; top: 70px;
        flex-direction: column; background: var(--bg-darker);
        width: 100%; padding: 40px; transition: 0.3s;
        border-bottom: 1px solid var(--glass-border);
    }
    .nav-menu.active { left: 0; }
    
    .nav-link { font-size: 1.1rem; display: block; width: fit-content; }
    
    .logo-img { height: 35px; } /* 移动端 Logo 更小 */
    .hero-title { font-size: 2.8rem; }
    .grid-2-col, .glass-panel, .glass-panel.reverse { grid-template-columns: 1fr; flex-direction: column; }
    .hero-stats { flex-direction: column; align-items: flex-start; gap: 20px; }
    .stat-separator { display: none; }
    .input-group { grid-template-