/* ==========================================================================
   Academic Laboratory Website Stylesheet
   Designed based on https://www.jiechen.site/ aesthetics
   ========================================================================== */

:root {
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --primary-light: #eff6ff;
  --text-main: #1f2937;
  --text-muted: #4b5563;
  --text-light: #6b7280;
  --bg-page: #f9fafb;
  --bg-card: #ffffff;
  --border-color: #e5e7eb;
  --border-focus: #93c5fd;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", SimSun, Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --max-w: 1040px;
  --radius: 6px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 68px;
}

.lab-brand {
  display: flex;
  flex-direction: column;
}

.lab-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.01em;
}

.lab-sub {
  font-size: 0.8rem;
  color: var(--text-light);
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

/*.nav-link {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: all 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background-color: var(--primary-light);
  text-decoration: none;
}
*/

.nav-link {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: all 0.15s ease;

  /* 新增：控制导航栏排版 */
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.5;
}

/* 新增：英文显示在第二行 */
.nav-link .nav-en {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.75;
}

/* 原来的悬停和选中效果，完全保留 */
.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background-color: var(--primary-light);
  text-decoration: none;
}

.page-hero {
  padding: 44px 0 28px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-page) 100%);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 820px;
  line-height: 1.7;
}

.section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border-color);
}

.section:last-child {
  border-bottom: none;
}

.section-header {
  margin-bottom: 24px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1.15rem;
  background-color: var(--primary);
  border-radius: 2px;
}

.section-desc {
  font-size: 0.92rem;
  color: var(--text-light);
  margin-top: 4px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  border-color: var(--border-focus);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-badge {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--primary);
}

.card-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.card-list {
  margin-top: 12px;
  padding-left: 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.card-list li {
  margin-bottom: 6px;
}

.faculty-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.faculty-avatar-box {
  width: 130px;
  height: 170px;
  flex-shrink: 0;
  background: #f3f4f6;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  text-align: center;
  padding: 10px;
  font-size: 0.8rem;
}

.faculty-avatar-box svg {
  width: 48px;
  height: 48px;
  margin-bottom: 6px;
  stroke: #9ca3af;
}

.faculty-content {
  flex-grow: 1;
}

.faculty-header {
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 12px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.faculty-name-group {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.faculty-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: #111827;
}

.faculty-en-name {
  font-size: 1rem;
  color: var(--text-light);
}

.faculty-title-tag {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 500;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 2px 10px;
  border-radius: 4px;
}

.faculty-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.faculty-meta-item {
  display: inline-block;
  margin-right: 20px;
}

.faculty-meta-item strong {
  color: var(--text-main);
}

.faculty-bio {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

.faculty-subhead {
  font-size: 0.88rem;
  font-weight: 700;
  color: #111827;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 14px;
  margin-bottom: 8px;
}

.faculty-pub-list {
  list-style: none;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.faculty-pub-list li {
  margin-bottom: 8px;
  position: relative;
  padding-left: 14px;
}

.faculty-pub-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

.tag-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--primary);
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
}

.tag-badge:hover {
  background: #e2e8f0;
  text-decoration: none;
}

.news-list {
  list-style: none;
}

.news-item {
  display: flex;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 0.92rem;
}

.news-item:last-child {
  border-bottom: none;
}

.news-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  min-width: 95px;
  flex-shrink: 0;
}

.news-content {
  color: var(--text-muted);
}

.student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.student-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 14px;
  border-radius: var(--radius);
  font-size: 0.88rem;
}

.student-name {
  font-weight: 600;
  color: #111827;
}

.student-desc {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 3px;
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background: #f3f4f6;
  color: var(--primary);
  border-color: var(--border-focus);
}

.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 36px 0;
  margin-top: 60px;
  font-size: 0.86rem;
  color: var(--text-light);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 16px 0;
    gap: 12px;
  }
  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
  .faculty-card {
    flex-direction: column;
    align-items: center;
    text-align: left;
  }
  .faculty-avatar-box {
    width: 140px;
    height: 180px;
  }
  .faculty-header {
    flex-direction: column;
  }
}

