/* 全局变量 */
:root {
  --primary-color: #c41e3a; /* 中国红 */
  --text-color: #333;
  --bg-color: #fff;
  --secondary-bg: #f5f5f5;
  --header-height: 60px;
  --font-main: "Microsoft YaHei", sans-serif;
}

/* 重置默认样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--bg-color);
}

/* 通用样式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 导航栏样式 */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--bg-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.nav-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* 主要内容区域 */
.main {
  margin-top: var(--header-height);
  padding: 40px 0;
}

/* 页面区块 */
.section {
  padding: 60px 0;
}

.section-title {
  font-size: 32px;
  text-align: center;
  margin-bottom: 40px;
  color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .section {
    padding: 40px 0;
  }
  
  .section-title {
    font-size: 24px;
  }
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #a01830;
}

/* 卡片样式 */
.card {
  background-color: var(--bg-color);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 20px;
}

/* 表单样式 */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.form-input:focus {
  border-color: var(--primary-color);
  outline: none;
}

/* 首页英雄区域 */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  text-align: center;
  color: white;
}

.hero-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  margin-bottom: 20px;
  border: 4px solid var(--primary-color);
}

.hero-text {
  font-size: 24px;
  margin: 20px 0;
}

/* 技能网格 */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.skill-card {
  text-align: center;
}

.skill-card h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
}

/* 作品网格 */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.work-item {
  overflow: hidden;
}

.work-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 15px;
}

.work-item h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

/* 工作环境展示 */
.workspace-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

/* 页脚样式 */
.footer {
  background-color: var(--secondary-bg);
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer h3 {
  color: var(--primary-color);
  margin-bottom: 20px;
}

.footer-links ul {
  list-style: none;
}

.footer-links a {
  color: var(--text-color);
  text-decoration: none;
  line-height: 2;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #ddd;
}

/* 通用工具类 */
.text-center {
  text-align: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .hero-content {
    padding: 0 20px;
  }

  .hero-image {
    width: 150px;
    height: 150px;
  }

  .hero-text {
    font-size: 20px;
  }

  .skills-grid,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* 关于页面样式 */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

.about-text p {
  margin-bottom: 20px;
  font-size: 18px;
}

/* 时间线样式 */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background-color: var(--primary-color);
}

.timeline-item {
  margin-bottom: 40px;
  position: relative;
}

.timeline-content {
  background: var(--bg-color);
  border-radius: 8px;
  padding: 20px;
  position: relative;
  width: calc(100% - 40px);
  margin-left: 40px;
}

.timeline-content::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 2px;
  background-color: var(--primary-color);
}

.timeline-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 20px;
}

.timeline-text h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.timeline-period {
  color: #666;
  font-style: italic;
  margin-bottom: 10px;
}

.timeline-text ul {
  margin-top: 15px;
  padding-left: 20px;
}

.timeline-text li {
  margin-bottom: 5px;
}

/* 兴趣爱好样式 */
.hobbies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.hobby-card {
  text-align: center;
  transition: transform 0.3s;
}

.hobby-card:hover {
  transform: translateY(-5px);
}

.hobby-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 20px;
}

.hobby-card h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .timeline::before {
    left: 0;
  }

  .timeline-content {
    width: calc(100% - 20px);
    margin-left: 20px;
  }

  .timeline-content::before {
    width: 10px;
  }

  .about-text p {
    font-size: 16px;
  }

  .hobbies-grid {
    grid-template-columns: 1fr;
  }
}

/* 技能页面样式 */
.skills-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 40px;
}

.skills-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.skill-item {
  width: 100%;
}

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.skill-header h3 {
  font-size: 18px;
  color: var(--text-color);
}

.skill-header span {
  color: var(--primary-color);
  font-weight: bold;
}

.skill-bar {
  width: 100%;
  height: 8px;
  background-color: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 4px;
  transition: width 1s ease-in-out;
}

/* 证书样式 */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.certificate-card {
  transition: transform 0.3s;
}

.certificate-card:hover {
  transform: translateY(-5px);
}

.certificate-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 20px;
}

.certificate-content h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.certificate-issuer {
  color: #666;
  margin-bottom: 5px;
}

.certificate-date {
  color: #999;
  font-size: 14px;
}

/* 项目经验样式 */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.project-card {
  padding: 30px;
}

.project-card h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.project-role {
  color: #666;
  font-style: italic;
  margin-bottom: 15px;
}

.project-points {
  padding-left: 20px;
}

.project-points li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* 软技能样式 */
.soft-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.soft-skill-card {
  text-align: center;
  transition: transform 0.3s;
}

.soft-skill-card:hover {
  transform: translateY(-5px);
}

.soft-skill-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 20px;
}

.soft-skill-card h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .skills-container {
    grid-template-columns: 1fr;
  }

  .skills-image {
    height: 300px;
  }

  .certificates-grid,
  .projects-grid,
  .soft-skills-grid {
    grid-template-columns: 1fr;
  }
}

/* 作品集页面样式 */
.portfolio-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  font-size: 18px;
  color: #666;
}

/* 筛选按钮 */
.portfolio-filter {
  padding: 20px 0;
}

.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 20px;
  border: 2px solid var(--primary-color);
  background: transparent;
  color: var(--primary-color);
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--primary-color);
  color: white;
}

/* 作品集网格 */
.portfolio-grid .projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  padding: 20px 0;
}

.portfolio-item {
  transition: transform 0.3s;
}

.portfolio-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  padding: 0;
}

.portfolio-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s;
  padding: 20px;
  text-align: center;
}

.portfolio-overlay h3 {
  color: white;
  margin-bottom: 10px;
  transform: translateY(-20px);
  transition: transform 0.3s;
}

.portfolio-overlay p {
  color: #ddd;
  margin-bottom: 20px;
  transform: translateY(20px);
  transition: transform 0.3s;
}

.portfolio-links {
  transform: translateY(20px);
  transition: transform 0.3s;
}

.portfolio-card:hover .portfolio-image {
  transform: scale(1.1);
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-card:hover .portfolio-overlay h3,
.portfolio-card:hover .portfolio-overlay p,
.portfolio-card:hover .portfolio-links {
  transform: translateY(0);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .portfolio-intro {
    font-size: 16px;
    padding: 0 20px;
  }

  .filter-buttons {
    gap: 10px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 14px;
  }

  .portfolio-grid .projects-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-image {
    height: 200px;
  }
}

/* 联系页面样式 */
.contact-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  font-size: 18px;
  color: #666;
}

/* 联系信息和表单网格 */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

/* 联系信息样式 */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
}

.info-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.info-item {
  text-align: center;
  padding: 20px;
  background-color: var(--secondary-bg);
  border-radius: 8px;
  transition: transform 0.3s;
}

.info-item:hover {
  transform: translateY(-5px);
}

.info-item h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

/* 社交媒体链接 */
.social-links {
  text-align: center;
}

.social-icons {
  width: 200px;
  height: 200px;
  margin-bottom: 20px;
}

.social-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social-btn {
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.social-btn:hover {
  background-color: #a01830;
}

/* 联系表单样式 */
.contact-form {
  padding: 30px;
}

.contact-form h2 {
  color: var(--primary-color);
  margin-bottom: 30px;
  text-align: center;
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
}

.submit-btn {
  width: 100%;
  margin-top: 20px;
}

/* 地图位置样式 */
.map-container {
  position: relative;
  margin-top: 40px;
  border-radius: 8px;
  overflow: hidden;
}

.map-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.map-overlay {
  position: absolute;
  top: 20px;
  right: 20px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 300px;
}

.office-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 15px;
}

.location-info {
  text-align: center;
}

.location-info h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.location-info p {
  margin-bottom: 15px;
  color: #666;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .contact-intro {
    font-size: 16px;
    padding: 0 20px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .info-items {
    grid-template-columns: 1fr;
  }

  .social-buttons {
    flex-direction: column;
    align-items: center;
  }

  .map-overlay {
    position: relative;
    top: 0;
    right: 0;
    max-width: 100%;
    margin-top: 20px;
  }
} 