/* ===== 基础重置与变量 ===== */
:root {
  --primary: #4f6ef7;
  --primary-dark: #3b55d9;
  --text: #1f2937;
  --text-light: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f6f8fc;
  --border: #e5e7eb;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(31, 41, 55, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--bg);
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== 导航栏 ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 22px;
  font-weight: 700;
}

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

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-size: 15px;
  color: var(--text-light);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary);
}

/* ===== Hero ===== */
.hero {
  padding: 96px 0 80px;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.hero-greeting {
  color: var(--primary);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.hero-name {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 22px;
  color: var(--text-light);
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 17px;
  color: var(--text-light);
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.hero-avatar {
  flex-shrink: 0;
}

.avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #9a6cf7);
  color: #fff;
  font-size: 64px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

/* ===== 通用 Section ===== */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: 34px;
  font-weight: 700;
  text-align: center;
}

.section-sub {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 48px;
  letter-spacing: 1px;
}

/* ===== 关于 ===== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.about-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.about-card h3 {
  font-size: 19px;
  margin-bottom: 12px;
}

.about-card p {
  color: var(--text-light);
  font-size: 15px;
}

/* ===== 技能 ===== */
.skills-grid {
  display: grid;
  gap: 22px;
  max-width: 640px;
  margin: 0 auto;
}

.skill-name {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.skill-bar {
  height: 10px;
  background: #e5e7eb;
  border-radius: 50px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #9a6cf7);
  border-radius: 50px;
}

/* ===== 项目 ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.project-card:hover {
  transform: translateY(-6px);
}

.project-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.project-card h3 {
  font-size: 19px;
  margin-bottom: 10px;
}

.project-card p {
  color: var(--text-light);
  font-size: 15px;
  margin-bottom: 16px;
}

.tag {
  display: inline-block;
  background: var(--bg-alt);
  color: var(--primary);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 50px;
  margin-right: 6px;
  margin-bottom: 6px;
}

/* ===== 联系 ===== */
.contact-text {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 32px;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 12px 22px;
  border-radius: 50px;
  font-weight: 500;
  transition: all 0.2s;
}

.contact-item:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.contact-icon {
  font-size: 18px;
}

/* ===== 页脚 ===== */
.footer {
  padding: 28px 0;
  text-align: center;
  color: var(--text-light);
  border-top: 1px solid var(--border);
  font-size: 14px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .hero {
    padding: 56px 0;
  }

  .hero-inner {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero-name {
    font-size: 40px;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .avatar {
    width: 140px;
    height: 140px;
    font-size: 48px;
  }

  .about-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }
}
