/* =============================================================================
   Final Consolidated Stylesheet for fyapeng.com
   Version: 3.0 (Updated for Research Highlights Grid)
   ========================================================================== */

/* -------------------- 1. CSS Variables & Global Resets -------------------- */
:root {
  --primary-color: #212529;
  --secondary-color: #495057;
  --accent-color: #007bff;     /* 链接和图标的主色调 */
  --highlight-title-color: #c0392b; /* 研究成果标题的深红色 */
  --bg-color: #ffffff;
  --card-bg-color: #f8f9fa;
  --border-color: #dee2e6;
  --font-family-sans-serif: 'Poppins', 'Noto Sans SC', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-family-sans-serif);
  line-height: 1.7;
  color: var(--primary-color);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.section-title { font-size: 2.5rem; font-weight: 600; color: var(--primary-color); margin-bottom: 40px; text-align: center; }
.section-title-left { text-align: left; font-size: 2.2rem; margin-bottom: 20px; }
.content-section { margin-bottom: 60px; }


/* -------------------- 2. Header / Navigation -------------------- */
.site-header {
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0;
  position: sticky; top: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  z-index: 1000;
}
.header-container { display: flex; justify-content: space-between; align-items: center; }
.site-title { font-size: 1.25rem; font-weight: 600; color: var(--primary-color); text-decoration: none; }
.site-nav .page-link {
  color: var(--secondary-color);
  text-decoration: none;
  margin-left: 25px;
  transition: color 0.2s;
  font-size: 1rem;
}
.site-nav .page-link:hover { color: var(--accent-color); }
/* 当前激活页面的高亮样式 */
.site-nav .page-link.active {
  background-color: var(--card-bg-color);
  color: var(--primary-color);
  font-weight: 600;
  border-radius: 5px;
  padding: 5px 12px;
}


/* -------------------- 3. Main Content Sections -------------------- */
.page-content { padding: 60px 0; }

/* ---------- 3.1 About Section (个人简介) ---------- */
.about-section { display: flex; gap: 40px; align-items: flex-start; }
.profile-sidebar {
  flex: 0 0 300px;
  text-align: center;
  padding: 25px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--card-bg-color);
}
.profile-pic { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; margin-bottom: 20px; border: 4px solid var(--bg-color); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.profile-sidebar h2 { margin-bottom: 5px; font-size: 1.6rem; }
.profile-sidebar p { color: var(--secondary-color); margin-bottom: 25px; }

.contact-info { list-style: none; text-align: left; font-size: 0.95rem; }
.contact-info li { margin-bottom: 12px; display: flex; align-items: center; }
.contact-info i { margin-right: 12px; color: var(--accent-color); width: 20px; text-align: center; font-size: 1.1rem; }
.contact-info a { color: var(--primary-color); text-decoration: none; }
.contact-info a:hover { text-decoration: underline; }

.about-content { flex: 1; }
.about-grid { display: flex; gap: 30px; align-items: flex-start; }
.about-photo-container { flex: 0 0 220px; margin-top: 5px; }
.about-image { max-width: 100%; border-radius: 8px; }
.prose { flex: 1; font-size: 1.05rem; color: var(--secondary-color); }
.prose p { margin-bottom: 1.2em; }
.prose strong { color: var(--primary-color); font-weight: 600; }
.prose a { color: var(--accent-color); text-decoration: none; font-weight: 500; }


/* ---------- 3.2 Education Section (教育背景) ---------- */
.education-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.education-item {
  background-color: var(--card-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px 25px;
  display: flex;
  align-items: flex-start;
  gap: 30px;
}
.education-duration {
  flex: 0 0 180px;
  font-weight: 500;
  color: var(--secondary-color);
  text-align: right;
  padding-top: 3px;
  font-size: 0.95rem;
}
.education-details { flex: 1; }
.education-degree { font-size: 1.15rem; font-weight: 600; margin-bottom: 4px; }
.education-institution { color: var(--secondary-color); font-size: 1rem; }


/* ---------- 3.3 Research Interests (研究兴趣) ---------- */
.interests-container { max-width: 800px; margin: 0 auto; text-align: center; }
.interest-list {
  list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 15px; margin-bottom: 25px;
}
.interest-list li {
  background-color: var(--card-bg-color);
  border: 1px solid var(--border-color);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.95rem;
  color: var(--secondary-color);
}
.interest-description { font-size: 1.05rem; line-height: 1.8; color: var(--secondary-color); text-align: left; }


/* ---------- 3.4 Research Highlights (双列 Flex 瀑布流) ---------- */

/* 1. 大容器：左右排列 */
.highlights-grid {
  display: flex;       /* 启用 Flex 布局 */
  gap: 30px;           /* 左右两列之间的间距 */
  align-items: flex-start; /* 顶部对齐 */
  margin-top: 30px;
}

/* 2. 列容器：每一列内部是垂直排列 */
.highlight-column {
  flex: 1;             /* 左右两列平分宽度 (50% : 50%) */
  display: flex;
  flex-direction: column; /* 内部从上到下排 */
  gap: 30px;           /* 上下卡片之间的间距 */
}

/* 3. 单个卡片样式 (保持之前的卡片风格) */
.highlight-item {
  width: 100%;
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.highlight-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* 4. 标题、图片、文字样式 (保持不变) */
.highlight-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 15px;
  line-height: 1.4;
  text-align: left;
}

.highlight-link {
  color: var(--highlight-title-color);
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.highlight-link:hover { opacity: 0.8; }

.highlight-img-container {
  width: 100%;
  margin-bottom: 15px;
  overflow: hidden;
  border-radius: 4px;
}

.highlight-img-container a { display: block; cursor: pointer; }

.highlight-img-container img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  transition: transform 0.3s ease;
}

.highlight-img-container a:hover img { transform: scale(1.02); }

.highlight-desc {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  text-align: justify;
}

/* 5. 描述文字 */
.highlight-desc {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  text-align: justify; /* 两端对齐 */
}

/* ---------- 3.5 Research Page Styles (单独的研究列表页) ---------- */
.paper-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 25px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}
.paper-item:last-child { border-bottom: none; }
.paper-main-content { flex: 1; padding-right: 20px; }
.paper-title { font-size: 1.15rem; font-weight: 600; margin-bottom: 5px; }
.paper-authors, .paper-status { font-size: 0.95rem; color: var(--secondary-color); margin-bottom: 5px; }
.paper-links { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

.paper-link-button {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-color);
  text-decoration: none;
  background-color: var(--card-bg-color);
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  border-radius: 5px;
  transition: all 0.2s ease;
  min-width: 80px; text-align: center;
}
.paper-link-button:hover { background-color: var(--accent-color); color: white; border-color: var(--accent-color); }
.paper-abstract {
  flex-basis: 100%;
  background-color: #f8f9faef;
  padding: 15px; border-radius: 5px; margin-top: 15px;
  font-size: 0.95rem; color: var(--secondary-color);
  border-left: 3px solid var(--accent-color);
}

/* 通用按钮样式 (如 View More) */
.button-primary {
  display: inline-block;
  background-color: var(--accent-color);
  color: white;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s, transform 0.2s;
}
.button-primary:hover { background-color: #0056b3; transform: translateY(-2px); }


/* -------------------- 4. Footer -------------------- */
.site-footer { border-top: 1px solid var(--border-color); padding: 40px 0; margin-top: 40px; }
.text-center { text-align: center; color: #6c757d; font-size: 0.9rem; }


/* =============================================================================
   5. Responsive Design (Global Adjustments)
   ========================================================================== */

/* Tablet & Smaller Desktop */
@media (max-width: 992px) {
  .about-section { flex-direction: column; }
  .profile-sidebar { flex: 0 0 auto; width: 100%; max-width: 450px; margin: 0 auto 40px auto; }
}

/* Mobile Devices (<= 768px) */
@media (max-width: 768px) {
  html { font-size: 15px; }
  .page-content { padding: 40px 0; }
  
  /* Header */
  .header-container { flex-wrap: wrap; justify-content: center; gap: 10px 20px; }
  
  /* About */
  .about-grid { flex-direction: column; gap: 25px; }
  .about-photo-container { width: 100%; max-width: 350px; margin: 0 auto; }
  
  /* Education */
  .education-item { flex-direction: column; gap: 8px; padding: 15px 20px; }
  .education-duration { flex-basis: auto; text-align: left; }
  
 /* Research Highlights: 手机上改为垂直单列 */
  .highlights-grid { 
    flex-direction: column; /* 变成上下排列 */
  }
  
  .highlight-column {
    width: 100%; /* 占满屏幕 */
  }
  
  .highlight-desc { 
    text-align: left; 
  }

  /* Research Page */
  .paper-item { flex-direction: column; align-items: flex-start; }
  .paper-links { width: 100%; flex-direction: row; flex-wrap: wrap; margin-top: 10px; }
}

/* Very Small Screens (<= 480px) */
@media (max-width: 480px) {
  .header-container { flex-direction: column; gap: 15px; }
  .site-nav { width: 100%; display: flex; justify-content: space-around; }
  .site-nav .page-link { margin: 0; }
}
