* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00ffff;
    --secondary-color: #ff00ff;
    --tertiary-color: #ffff00;
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --neon-glow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Animation */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-color);
    text-shadow: var(--neon-glow);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
    text-shadow: var(--neon-glow);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.line1 {
    display: block;
    color: var(--primary-color);
    text-shadow: var(--neon-glow);
}

.line2 {
    display: block;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.5);
}

/* Hero Image */
.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-container {
    position: relative;
    width: 300px;
    height: 300px;
}

.avatar-glow {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--primary-color), var(--secondary-color), var(--tertiary-color), var(--primary-color));
    animation: rotate 3s linear infinite;
    filter: blur(20px);
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.avatar {
    position: absolute;
    inset: 0;
    background: var(--bg-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary-color);
}

.avatar-text {
    font-family: 'Orbitron', monospace;
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Sections */
section {
    padding: 5rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    text-shadow: var(--neon-glow);
}

/* About Section */
.about {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.05), rgba(255, 0, 255, 0.05));
}

.about-content {
    text-align: center;
}

.about-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-color);
    text-shadow: var(--neon-glow);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.3);
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--primary-color);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.3);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-placeholder {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--bg-dark);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.project-tech span {
    padding: 0.25rem 0.75rem;
    background: rgba(0, 255, 255, 0.1);
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--primary-color);
}

/* Contact Section */
.contact {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.05), rgba(0, 255, 255, 0.05));
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-item {
    display: block;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.contact-item:hover {
    text-shadow: var(--neon-glow);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 5px;
    color: var(--text-primary);
    font-family: inherit;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-menu {
        display: none;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .stats {
        flex-direction: column;
        gap: 1.5rem;
    }
}



/* —— 手机端响应式优化 —— */
@media screen and (max-width: 768px) {
  /* 1. 隐藏复杂背景动画，提升性能 */
  .bg-animation { display: none !important; }

  /* 2. 导航栏垂直排列 */
  .nav-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 1rem;
  }
  .nav-menu {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 0.5rem;
  }
  .nav-link {
    padding: 0.5rem 0;
    font-size: 1rem;
  }

  /* 3. Logo 缩小，标题居中 */
  .logo {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
    width: 100%;
  }

  /* 4. Hero 区域改为上下堆叠，文本居中 */
  .hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
  }
  .hero-content {
    text-align: center;
    padding: 1rem 0;
  }
  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
  }
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  /* 5. 按钮铺满屏幕宽度 */
  .btn, .btn-outline {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0.5rem 0;
  }

  /* 6. 图片和其他媒体自适应 */
  img, canvas {
    max-width: 100%;
    height: auto;
  }

  /* 7. 其它通用文本调整 */
  body {
    font-size: 16px;
    line-height: 1.5;
  }
}
