@charset "utf-8";
/* CSS Document */
/* =============== 全局重置与基础样式 =============== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 莫兰迪色系：柔和灰蓝+浅灰背景 */
  --primary-color: #3a5f7d;    /* 深灰蓝 */
  --secondary-color: #5a7b9c;  /* 柔和蓝 */
  --bg-light: #f5f7fa;         /* 浅灰背景 */
  --card-bg: #ffffff;          /* 卡片白 */
  --text-dark: #2d3748;        /* 深灰文字 */
  --text-gray: #718096;        /* 灰色文字 */
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  --transition: all 0.3s ease;
}

body {
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
  padding-top: 70px; /* 为固定导航栏留空间 */
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 15px;
}

/* =============== 导航栏样式 =============== */
nav {
  background-color: var(--card-bg);
  box-shadow: var(--shadow);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: center;
  padding: 18px 0;
}

.nav-container a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  margin: 0 12px;
  padding: 8px 12px;
  border-radius: 4px;
  transition: var(--transition);
  font-size: 1.05rem;
}

/* 当前页面高亮样式 */
.nav-container a.active {
  background-color: var(--primary-color);
  color: white;
}

.nav-container a:hover:not(.active) {
  color: var(--secondary-color);
}

/* =============== 通用内容区块 =============== */
section {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 40px 30px;
  margin: 30px auto;
  box-shadow: var(--shadow);
  max-width: 800px;
  text-align: center;
}

h1 {
  font-size: 2.5rem;
  margin: 15px 0;
  color: var(--primary-color);
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 25px;
  color: var(--primary-color);
  position: relative;
  display: inline-block;
}

h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 3px;
}

p {
  margin: 15px 0;
  color: var(--text-gray);
  line-height: 1.7;
}

/* =============== 首页专属样式 =============== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}

.avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-light);
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.tagline {
  font-size: 1.3rem;
  color: var(--secondary-color);
  font-weight: 500;
  margin-top: 10px;
}

/* =============== 作品集卡片 =============== */
.projects-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  margin-top: 20px;
}

.project-card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 25px;
  width: 260px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid #eee;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.project-card h3 {
  color: var(--primary-color);
  margin: 10px 0;
}

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

/* =============== 联系方式 =============== */
.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;
  margin-top: 25px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  transition: var(--transition);
  padding: 8px 15px;
  border-radius: 30px;
  background-color: var(--bg-light);
}

.contact-item:hover {
  background-color: var(--primary-color);
  color: white;
  transform: scale(1.05);
}

/* =============== 响应式设计 =============== */
@media (max-width: 768px) {
  body {
    padding-top: 60px;
  }
  
  .nav-container {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .nav-container a {
    margin: 4px;
    padding: 6px 10px;
    font-size: 0.95rem;
  }
  
  section {
    padding: 30px 20px;
    margin: 20px 15px;
  }
  
  h1 {
    font-size: 2.1rem;
  }
  
  h2 {
    font-size: 1.6rem;
  }
  
  .avatar {
    width: 140px;
    height: 140px;
  }
  
  .projects-grid {
    flex-direction: column;
    align-items: center;
  }
  
  .project-card {
    width: 100%;
    max-width: 320px;
  }
}

