/* ======================
   BASE STYLES --------------------------------------------------------------------------------------
   ====================== */
:root {
  /* 颜色变量 */
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --text-dark: #2c3e50;
  --text-medium: #555;
  --text-light: #7f8c8d;
  --bg-light: #f8f9fa;
  --border-color: #eee;

  /* 间距变量 */
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;

  /* 过渡动画 */
  --transition-fast: 0.2s;
  --transition-medium: 0.3s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  line-height: 1.6;
  color: var(--text-dark);
  padding-top: 80px; /* 增大导航栏高度适配现代设计 */
  font-family: 'Inter', system-ui, -apple-system, sans-serif; /* 更现代字体 */
}

/* ======================
   Navigation -------------------------------------------------------------------------------------
   ====================== */
/* ======================
   导航栏精准响应式方案
   ====================== */
.main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: #f8f9fa;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

/* 核心容器 */
.main-nav ul {
    display: flex;
    justify-content: center;  /* 宽屏居中 */
    flex-wrap: wrap;          /* 允许换行 */
    gap: 1.5rem;
    list-style: none;
    max-width: 1200px;        /* 控制最大宽度 */
    margin: 0 auto;           /* 水平居中 */
    padding: 0 20px;          /* 安全边距 */
}

/* 导航项基础样式 */
.main-nav a {
    display: inline-block;    /* 确保正确换行 */
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s;
    white-space: nowrap;     /* 禁止文字换行 */
}

/* 悬停效果 */
.main-nav a:hover {
    color: #3498db;
}

/* 窄屏优化 (<768px) */
@media (max-width: 768px) {
    .main-nav ul {
        justify-content: flex-start; /* 左对齐换行 */
        gap: 1rem;                   /* 缩小间距 */
        padding: 0 15px;             /* 紧凑边距 */
    }
    
    .main-nav a {
        padding: 0.5rem;            /* 紧凑点击区域 */
        font-size: 0.9rem;          /* 缩小字号 */
    }
}

/* 超窄屏优化 (<480px) */
@media (max-width: 480px) {
    .main-nav ul {
        gap: 0.8rem;
        padding: 0 10px;
    }
    
    .main-nav a {
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 768px) {
    .main-nav ul {
        justify-content: center;  /* 窄屏也居中换行 */
    }
}

/* Navigation 
.main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: #f8f9fa;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    list-style: none;
}

.main-nav a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: #3498db;
} */


/* ======================
   Sections ---------------------------------------------------------------------------------------
   ====================== */
.section {
  padding: var(--space-lg) 5%;
  scroll-margin-top: 100px; /* 锚点定位偏移 */
}

.section:nth-child(odd) { /* 交替背景色 */
  background: var(--bg-light);
}

h2 {
  font-size: 2.25rem;
  color: var(--text-dark);
  margin-bottom: var(--space-md);
  position: relative;
  padding-left: 2rem;
}

h2::before { /* 装饰性元素 */
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1.5rem;
  height: 3px;
  background: var(--primary-color);
}

/* ======================
   响应式增强
   ====================== */
@media (max-width: 768px) {
  .main-nav ul {
    justify-content: center;
    gap: 1rem;
  }

  .main-nav a {
    font-size: 0.9rem;
  }

  .section {
    padding: var(--space-md) 1.5rem;
  }

  h2 {
    font-size: 1.75rem;
    padding-left: 1.5rem;
  }

  h2::before {
    width: 1rem;
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 60px;
  }

  .main-nav {
    padding: 0.5rem 0;
  }
}





/* ======================
   HOME SECTION ---------------------------------------------------------------------------
   ====================== */

#home {
  background: linear-gradient(to bottom right, #f8f9fa, #ffffff); /* 浅色渐变背景 */
  padding-bottom: 5rem !important; /* 增加底部留白 */
}

.home-container {
  display: flex;
  gap: 4rem;
  align-items: flex-start; /* 顶部对齐 */
  padding: 2rem;
  position: relative;
}

.profile-img {
  position: relative;
  flex-shrink: 0;
}

.profile-img img {
  width: 320px;
  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  transition: transform 0.3s, box-shadow 0.3s;
}

.profile-img:hover img {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.bio {
  flex: 1;
  min-width: 300px;
  padding-top: 1.5rem;
}

.bio h1 {
  font-size: 2.8rem;
  color: #2c3e50;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.subtitle {
  font-size: 1.4rem;
  color: #7f8c8d;
  margin-bottom: 2.5rem;
  position: relative;
  padding-left: 2.5rem;
}

.contact-info {
  display: grid;
  gap: 1.2rem;
  font-size: 1.1rem;
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s;
}

.contact-info a {
  color: #3498db;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s;
}

.contact-info a:hover {
  color: #2980b9;
  border-bottom-color: currentColor;
}

/* 响应式设计 */
@media (max-width: 992px) {
  .home-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .subtitle::before {
    left: 50%;
    transform: translateX(-50%);
    width: 4rem;
  }

  .contact-info {
    justify-content: center;
  }

  .contact-info p {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .profile-img img {
    width: 100%;
    max-width: 280px;
  }

  .bio h1 {
    font-size: 2.2rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }
}

/* ======================
   EDUCATION SECTION ------------------------------------------------------------------
   ====================== */

#education h2 {
  border-bottom: 2px solid #3498db; /* 保持标题样式统一 */
  margin-bottom: 2.5rem;
}

.education-item {
  margin: 2rem 0;
  padding: 1.8rem;
  background: #fff;
  border-radius: 10px;
  border-left: 4px solid #3498db; /* 左侧强调色条 */
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.education-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.education-item::before { /* 时间轴圆点 */
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: #3498db;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #3498db;
}

.education-item h3 {
  color: #2c3e50;
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.education-item h3::before { /* 学校图标 */
  content: "🎓";
  font-size: 1.1em;
}

.degree {
  color: #444;
  font-size: 1.05rem;
  margin: 0.8rem 0;
  padding-left: 2.2rem;
  position: relative;
}

.degree::before { /* 学位图标 */
  content: "📚";
  position: absolute;
  left: 0;
  top: 0.1em;
}

.duration {
  color: #7f8c8d;
  font-size: 0.95rem;
  padding-left: 2.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.duration::before { /* 日历图标 */
  content: "📅";
  font-size: 0.9em;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .education-item {
    margin: 1.5rem 0;
    padding: 1.5rem;
  }

  .degree,
  .duration {
    padding-left: 1.8rem;
  }
  
  .education-item::before {
    left: -10px;
    width: 14px;
    height: 14px;
  }
}

/* ======================
   RESEARCH SECTION ----------------------------------------------------------------------
   ====================== */

#research h2 {
  border-bottom: 2px solid #3498db; /* 主色调统一 */
  margin-bottom: 3rem;
}

.research-project {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  margin: 2.5rem 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  transition: transform 0.3s;
  position: relative;
  overflow: hidden;
}

.research-project:hover {
  transform: translateY(-5px);
}

.research-project::before { /* 装饰性渐变条 */
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: linear-gradient(to bottom, #3498db, #2ecc71);
}

.project-image {
  border-radius: 8px;
  overflow: hidden;
  align-self: center;
}

.project-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s;
}

.project-image:hover img {
  transform: scale(1.05);
}

.project-details h3 {
  color: #2c3e50;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
  position: relative;
  padding-left: 2rem;
}

.project-details h3::before { /* 装饰图标 */
  content: "";
  position: absolute;
  left: 0;
  top: -0.1em;
}

.project-details p {
  color: #555;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.project-links {
  padding-left: 2rem;
  margin-top: 1.8rem;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s;
  gap: 0.6rem;
}

.project-links a:hover {
  filter: brightness(110%);
  transform: translateY(-2px);
}

/* 链接类型颜色 */
.arxiv { 
  background: #e74c3c;
  color: white;
  box-shadow: 0 2px 6px rgba(231,76,60,0.3);
}

.github { 
  background: #2c3e50;
  color: white;
  box-shadow: 0 2px 6px rgba(44,62,80,0.3);
}

.data { 
  background: #27ae60;
  color: white;
  box-shadow: 0 2px 6px rgba(39,174,96,0.3);
}

/* 响应式设计 */
@media (max-width: 992px) {
  .research-project {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .project-image {
    max-width: 400px;
    margin: 0 auto;
  }
  
  .project-details h3,
  .project-details p,
  .project-links {
    padding-left: 0;
  }
}

@media (max-width: 576px) {
  .research-project {
    padding: 1.5rem;
    margin: 1.5rem 0;
  }
  
  .project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
  }
  
  .project-links a {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}


/* ======================
   PUBLICATIONS SECTION ----------------------------------------------------------------------------
   ====================== */

#publications h2 {
  border-bottom: 2px solid #e74c3c; /* 红色强调学术严谨性 */
  margin-bottom: 2.5rem;
}

.publication-item {
  background: #fff;
  border-radius: 8px;
  padding: 1.8rem;
  margin: 1.5rem 0;
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
  border-left: 4px solid #e74c3c;
  position: relative;
}

.publication-item::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 1.2rem;
  font-size: 1.5rem;
  opacity: 0.8;
}

.publication-item p {
  color: #2c3e50;
  line-height: 1.8;
  font-size: 0.95rem;
  position: relative;
}

.publication-item em {
  color: #3498db;
  font-style: normal;
  font-weight: 500;
}

/* 出版状态标签 */
.pub-status {
  display: inline-block;
  padding: 0.3rem 1rem;
  border-radius: 15px;
  font-size: 0.85rem;
  margin-left: 1rem;
  vertical-align: middle;
}

/* 不同状态颜色编码 */
.in-process { background: #f1c40f33; color: #c0392b; }
.published { background: #27ae6033; color: #27ae60; }
.preprint { background: #3498db33; color: #3498db; }

/* 文献链接 */
.pub-links {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
}

.pub-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform 0.2s;
}

.pub-links a:hover {
  transform: translateY(-2px);
}

.arxiv-link { background: #e74c3c; color: white; }
.doi-link { background: #2c3e50; color: white; }
.pdf-link { background: #7f8c8d; color: white; }

/* 响应式优化 */
@media (max-width: 768px) {
  .publication-item::before {
    left: -25px;
    font-size: 1.2rem;
  }
  
  .pub-status {
    display: block;
    margin: 0.5rem 0;
    width: fit-content;
  }
}

/* ======================
   PRESENTATIONS SECTION -----------------------------------------------------------------
   ====================== */
#presentations h2 {
  border-bottom: 2px solid #3498db; /* 蓝色强调标题 */
  margin-bottom: 2rem;
}

.presentation-category h3 {
  color: #2c3e50;
  font-size: 1.4rem;
  margin: 2rem 0 1.5rem;
  padding-left: 1rem;
  border-left: 4px solid #3498db; /* 左侧装饰条 */
}

.presentation-item {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.2rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s;
  border: 1px solid #eee;
}

.presentation-item:hover {
  transform: translateY(-3px);
}

.conference {
  font-size: 1.1rem;
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.conference::before {  /* 会议图标 */
  content: "";
  font-size: 1.2rem;
}

.topic {
  font-size: 1.05rem;
  color: #3498db;
  margin: 0.8rem 0;
  padding-left: 1.8rem;
  position: relative;
}

.topic::before {  /* 话题图标 */
  content: "🎤";
  position: absolute;
  left: 0;
}

.details {
  color: #7f8c8d;
  font-size: 0.95rem;
  padding-left: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.details span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.details span::before {  /* 细节图标 */
  font-size: 0.9em;
}

.details span:nth-child(1)::before { content: "📌"; } /* 会议类型 */
.details span:nth-child(2)::before { content: "📆"; } /* 日期 */
.details span:nth-child(3)::before { content: "📍"; } /* 地点 */

/* 区分邀请报告和普通报告 */
.presentation-category:nth-child(2) h3 { /* Contributed Presentations */
  border-color: #95a5a6; /* 灰色区分 */
}

/* 响应式设计 */
@media (max-width: 768px) {
  .presentation-item {
    padding: 1.2rem;
  }
  
  .conference {
    font-size: 1rem;
    flex-wrap: wrap;
  }

  .topic {
    font-size: 1rem;
    padding-left: 1.5rem;
  }

  .details {
    padding-left: 1.5rem;
    gap: 0.8rem;
  }
}


/* Responsive Design */
@media (max-width: 768px) {
    .home-container {
        flex-direction: column;
        text-align: center;
    }

    .research-project {
        flex-direction: column;
    }

    .project-image {
        order: -1;
    }

    .main-nav ul {
        gap: 1rem;
        padding: 0 1rem;
    }
}


/* ======================
   AWARDS & EXPERIENCE ---------------------------------------------------------------------
   ====================== */

#awards h2 {
  border-bottom: 2px solid #e67e22; /* 使用橙色系强调 */
  margin-bottom: 2.5rem;
}

/* 通用卡片样式 */
.award-item, .experience-item {
  margin: 1.8rem 0;
  padding: 1.8rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
  transition: transform 0.3s;
  position: relative;
  overflow: hidden;
}

.award-item:hover, 
.experience-item:hover {
  transform: translateY(-3px);
}

/* 奖项特殊样式 */
.award-item {
  border-left: 4px solid #3498db; /* 蓝色强调条 */
  padding-left: 2.5rem;
}

.award-item::before {
  content: "🏆";
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  opacity: 0.15;
  z-index: 0;
}

/* 经历特殊样式 */
.experience-item {
  border-left: 4px solid #2ecc71; /* 绿色强调条 */
  padding-left: 2.5rem;
}

.experience-item::before {
  content: "📖";
  position: absolute;
  left: -18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.2rem;
  opacity: 0.15;
}

/* 文字层级 */
.award-item h3, 
.experience-item h3 {
  color: #2c3e50;
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
  position: relative;
  z-index: 1;
}

.year, .duration {
  color: #7f8c8d;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.year::before {
  content: "📅";
  font-size: 0.9em;
}

.duration::before {
  content: "⏳";
}

/* 课程列表样式 */
.experience-item p:not(.duration) {
  color: #555;
  padding-left: 1.5rem;
  position: relative;
  margin: 0.8rem 0;
}

.experience-item p:not(.duration)::before {
  content: "▹";
  color: #3498db;
  position: absolute;
  left: 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .award-item, 
  .experience-item {
    padding: 1.5rem;
    margin: 1.5rem 0;
  }

  .award-item::before,
  .experience-item::before {
    display: none;
  }
}

/* ======================
   TECHNICAL SKILLS -----------------------------------------------------------------------------
   ====================== */

#skills h2 {
  border-bottom: 2px solid #3498db; /* 保持标题样式统一 */
  margin-bottom: 2.5rem;
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.skill-category {
  background: #fff;
  border-radius: 12px;
  padding: 1.8rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  transition: transform 0.3s;
}

.skill-category:hover {
  transform: translateY(-5px);
}

.skill-category h3 {
  color: #2c3e50;
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* 分类图标系统 */
.skill-category[data-category="programming"] h3::before { content: "💻"; }
.skill-category[data-category="stats"] h3::before { content: "📊"; }
.skill-category[data-category="tools"] h3::before { content: "🛠️"; }

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.skill-tags span {
  background: #ecf0f1;
  color: #2c3e50;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  font-size: 0.95rem;
  transition: all 0.2s;
  position: relative;
}

/* 技能类型颜色编码 */
.skill-tags span[data-skill="python"] { background: #3498db26; color: #3498db; }
.skill-tags span[data-skill="matlab"] { background: #e67e2226; color: #e67e22; }
.skill-tags span[data-skill="r"] { background: #27ae6026; color: #27ae60; }
.skill-tags span[data-skill="sql"] { background: #9b59b626; color: #9b59b6; }

.skill-tags span:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 响应式优化 */
@media (max-width: 768px) {
  .skills-container {
    grid-template-columns: 1fr;
  }
  
  .skill-tags {
    gap: 0.6rem;
  }
  
  .skill-tags span {
    padding: 0.5rem 1rem;
  }
}

/*-----------------------------------------------------------------------------------------------*/