﻿/* ===== 全局变量与重置 ===== */
:root {
  --primary: #2c3e50;
  --secondary: #3498db;
  --accent: linear-gradient(135deg, #8e44ad 0%, #3498db 100%);
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
  --radius: 8px;
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: #fafafa;
  overflow-x: hidden;
}

/* ===== 布局容器 ===== */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
section { padding: 5rem 0; }

/* ===== 导航栏 ===== */
header {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

nav { display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 0; }

.logo {
  font-weight: 700;
  font-size: 1.3rem;
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links { display: flex; gap: 2.5rem; }
.nav-links a { text-decoration: none; color: var(--primary); font-weight: 500; position: relative; transition: var(--transition); }
.nav-links a:hover { color: var(--secondary); }
.nav-links a::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background: var(--accent); transition: var(--transition); }
.nav-links a:hover::after { width: 100%; }

.mobile-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--primary); }

/* ===== Hero 区域 ===== */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 5rem; background: linear-gradient(120deg, #f5f7fa 0%, white 100%); }
.hero-content { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.profile { text-align: center; max-width: 350px; margin: 0 auto; }

.avatar {
  width: 220px; height: 220px; border-radius: 50%; object-fit: cover;
  border: 5px solid white; box-shadow: var(--shadow); margin-bottom: 1.5rem;
  background: var(--accent); display: flex; align-items: center; justify-content: center;
  color: white; font-size: 5rem;
}

.tagline { font-size: 1.1rem; color: var(--gray); margin: 1rem 0; font-weight: 500; }
.hero-text h1 { font-size: 3.2rem; line-height: 1.1; margin-bottom: 1.2rem; background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-text p { font-size: 1.2rem; color: var(--gray); max-width: 600px; margin-bottom: 2rem; }

.cta-button {
  display: inline-block; padding: 0.9rem 2rem; background: var(--accent); color: white;
  border-radius: 30px; text-decoration: none; font-weight: 600;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3); transition: var(--transition); border: none; cursor: pointer;
}
.cta-button:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4); }

/* ===== 作品展示 ===== */
.section-title { text-align: center; margin-bottom: 3rem; font-size: 2.2rem; position: relative; }
.section-title::after { content: ''; position: absolute; bottom: -15px; left: 50%; transform: translateX(-50%); width: 60px; height: 4px; background: var(--accent); border-radius: 2px; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; }

.project-card { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); background: white; }
.project-card:hover { transform: translateY(-10px); box-shadow: 0 12px 25px rgba(0,0,0,0.12); }
.project-img { height: 200px; background: var(--accent); display: flex; align-items: center; justify-content: center; color: white; font-size: 3rem; }
.project-content { padding: 1.5rem; }
.project-content h3 { margin-bottom: 0.5rem; color: var(--primary); }
.project-content p { color: var(--gray); margin-bottom: 1rem; font-size: 0.95rem; }
.project-link { display: inline-block; color: var(--secondary); font-weight: 500; text-decoration: none; transition: var(--transition); }
.project-link:hover { color: #2980b9; text-decoration: underline; }

/* ===== 联系方式 ===== */
.contact { background: white; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-info p { margin: 1.2rem 0; display: flex; align-items: flex-start; gap: 1rem; color: var(--gray); }
.contact-info i { font-size: 1.4rem; background: var(--accent); -webkit-background-clip: text; background-clip: text; }

.social-links { display: flex; gap: 1.2rem; margin-top: 2rem; }
.social-links a { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: #f0f5ff; color: var(--secondary); font-size: 1.2rem; transition: var(--transition); }
.social-links a:hover { background: var(--accent); color: white; transform: translateY(-3px); }

/* 表单输入框样式 */
.contact-form input, .contact-form textarea {
  width: 100%; padding: 0.9rem; border: 1px solid #ddd; border-radius: var(--radius); font-size: 1rem; font-family: inherit;
}
.contact-form textarea { resize: vertical; }

/* ===== 页脚 ===== */
footer { background: var(--primary); color: white; padding: 3rem 0 1.5rem; text-align: center; }
.footer-content { max-width: 700px; margin: 0 auto; }
.footer-content p { opacity: 0.7; margin-top: 1rem; }

/* ===== 响应式适配 ===== */
@media (max-width: 992px) {
  .hero-content, .contact-grid { grid-template-columns: 1fr; }
  .profile { order: -1; margin-bottom: 2rem; }
  .hero-text h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed; top: 70px; right: -100%; flex-direction: column; background: white;
    width: 80%; height: calc(100vh - 70px); padding: 2rem; transition: var(--transition); box-shadow: -5px 0 15px rgba(0,0,0,0.1);
  }
  .nav-links.active { right: 0; }
  .mobile-toggle { display: block; }
  section { padding: 3.5rem 0; }
  .hero-text h1 { font-size: 2rem; }
  .section-title { font-size: 1.8rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.2rem; }
  .hero-text h1 { font-size: 1.7rem; }
  .projects-grid { grid-template-columns: 1fr; }
}

