:root {
  --primary: #1a4b8c;
  --primary-dark: #0a2e5c;
  --primary-light: #3a7bd5;
  --accent: #c9a84c;
  --accent-light: #e8d48b;
  --bg-light: #f5f7fa;
  --bg-white: #ffffff;
  --text-dark: #2c3e50;
  --text-gray: #6c757d;
  --text-light: #95a5a6;
  --border: #e8ecf1;
  --shadow: 0 2px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.7;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Navbar */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled { box-shadow: var(--shadow); }

.navbar .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex; align-items: center; gap: 12px;
  font-size: 18px; font-weight: 700; color: var(--primary-dark);
}

.nav-logo .logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; font-weight: 800;
}

.nav-links {
  display: flex; align-items: center; gap: 4px;
}

.nav-links a {
  padding: 8px 16px;
  font-size: 14px; font-weight: 500;
  color: var(--text-gray);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active { color: var(--primary); background: rgba(26,75,140,0.06); }

.nav-links a.active::after {
  content: '';
  position: absolute; bottom: -1px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 2px; background: var(--primary); border-radius: 2px;
}

.lang-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border: 1.5px solid var(--border); border-radius: 20px;
  background: transparent;
  font-size: 13px; font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
  margin-left: 12px;
}

.lang-btn:hover { border-color: var(--primary); background: rgba(26,75,140,0.06); }

.lang-btn .globe { font-size: 16px; }

.hamburger {
  display: none; flex-direction: column; gap: 4px;
  background: none; border: none; cursor: pointer;
  padding: 8px;
}

.hamburger span {
  width: 22px; height: 2px; background: var(--text-dark);
  border-radius: 2px; transition: var(--transition);
}

/* Hero Section */
.hero {
  min-height: auto;
  display: flex; align-items: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  position: relative; overflow: hidden;
  padding: 100px 0 60px;
}

.hero::before {
  content: '';
  position: absolute; width: 600px; height: 600px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  top: -100px; right: -100px;
}

.hero::after {
  content: '';
  position: absolute; width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.02);
  bottom: -50px; left: -50px;
}

.hero-content {
  position: relative; z-index: 1;
  text-align: center; color: #fff;
  max-width: 800px; margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: 6px 20px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  font-size: 13px; font-weight: 500;
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  opacity: 0.85;
  max-width: 600px; margin: 0 auto 32px;
  line-height: 1.8;
}

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  cursor: pointer; border: none;
  transition: var(--transition);
}

.btn-primary {
  background: #fff; color: var(--primary);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }

.btn-outline {
  background: transparent; color: #fff;
  border: 1.5px solid rgba(255,255,255,0.4);
}

.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,0.1); transform: translateY(-2px); }

/* Section Styles */
.page {
  padding-top: 72px;
}

.page-content {
  padding: 48px 0 96px;
}

.section-header {
  text-align: center; margin-bottom: 56px;
}

.section-tag {
  display: inline-block;
  padding: 4px 16px;
  background: rgba(26,75,140,0.08);
  color: var(--primary);
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 2px;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-gray);
  max-width: 500px; margin: 0 auto;
  font-size: 15px;
}

/* About Section within Home */
.about-section {
  padding: 80px 0;
  background: var(--bg-white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  position: relative;
}

.about-image .img-placeholder {
  width: 100%; aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 60px; opacity: 0.8;
}

/* Campus photo that replaced the 🔬 placeholder. */
.about-image .about-photo {
  width: 100%; aspect-ratio: 4 / 3; height: auto;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.about-image::before {
  content: '';
  position: absolute; width: 100%; height: 100%;
  border: 3px solid var(--accent); border-radius: var(--radius);
  top: 16px; left: 16px; z-index: -1;
}

.about-text h3 {
  font-size: 1.8rem; font-weight: 700;
  margin-bottom: 16px;
  color: var(--primary-dark);
}

.about-text p {
  color: var(--text-gray); margin-bottom: 16px;
  font-size: 15px; line-height: 1.8;
}

.stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin-top: 32px;
}

.stat-item { text-align: center; }

.stat-number {
  font-size: 2rem; font-weight: 800;
  color: var(--primary);
  display: block;
}

.stat-label {
  font-size: 13px; color: var(--text-gray);
  margin-top: 4px;
}

/* Research Areas */
.research-section {
  padding: 80px 0;
  background: var(--bg-light);
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.research-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 32px 24px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.research-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}

.research-card .icon {
  width: 48px; height: 48px;
  background: rgba(26,75,140,0.08);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.research-card h4 { font-size: 16px; margin-bottom: 8px; color: var(--primary-dark); }

.research-card p { font-size: 14px; color: var(--text-gray); line-height: 1.7; }

/* News Section */
.news-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }

.news-item {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 24px 28px;
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex; gap: 20px; align-items: flex-start;
}

.news-item:hover { box-shadow: var(--shadow); transform: translateX(4px); }

.news-date {
  min-width: 70px;
  text-align: center;
  padding: 8px 12px;
  background: rgba(26,75,140,0.06);
  border-radius: var(--radius-sm);
}

.news-date .day { font-size: 22px; font-weight: 700; color: var(--primary); display: block; line-height: 1.2; }
.news-date .month { font-size: 12px; color: var(--text-gray); text-transform: uppercase; }

.news-content h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }

.news-content p { font-size: 14px; color: var(--text-gray); }

.news-tag {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(201,168,76,0.12);
  color: #8a7530;
  border-radius: 12px;
  font-size: 11px; font-weight: 600;
  margin-bottom: 8px;
}

.news-intro { max-width: 800px; margin: 0 auto 24px; color: var(--text-gray); font-size: 14px; text-align: center; }

.news-links { margin-top: 8px; font-size: 13px; }

.news-links a { color: var(--primary); font-weight: 600; }

.news-more { text-align: center; margin-top: 32px; }

/* People Section */
.people-tabs {
  display: flex; gap: 4px;
  justify-content: center; margin-bottom: 48px;
  flex-wrap: wrap;
}

.people-tab {
  padding: 10px 24px;
  font-size: 14px; font-weight: 500;
  color: var(--text-gray);
  background: transparent;
  border: none; cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.people-tab:hover { color: var(--primary); background: rgba(26,75,140,0.06); }

.people-tab.active {
  color: #fff;
  background: var(--primary);
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.people-grid.mentor-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* The academician card spans the full column and lays out horizontally:
   portrait on the left, all text on the right. */
.people-grid[data-people-category="academicians"] {
  grid-template-columns: 1fr;
}

.people-grid[data-people-category="academicians"] .person-card {
  display: flex; flex-direction: row; align-items: flex-start;
  gap: 32px; text-align: left; padding: 32px;
  max-width: 100%;
}

.people-grid[data-people-category="academicians"] .person-avatar {
  width: 168px; flex: 0 0 auto; margin: 0;
}

.people-grid[data-people-category="academicians"] .person-body {
  flex: 1 1 auto; min-width: 0;
}

.people-grid[data-people-category="academicians"] h4 {
  font-size: 22px; margin-bottom: 6px;
}

.people-grid[data-people-category="academicians"] .title {
  font-size: 14px; margin-bottom: 10px;
}

/* Short bio excerpt shown only on the wide academician card. */
.people-grid[data-people-category="academicians"] .desc-bio {
  margin-top: 12px;
  max-width: 56em;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-gray);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.person-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 28px 20px;
  text-align: center;
  transition: var(--transition);
}

.person-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.person-avatar {
  width: 104px;
  aspect-ratio: 5 / 7;            /* 标准证件照比例：一寸 25×35mm、二寸 35×49mm */
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 34px; font-weight: 700;
}

/* Supervisor cards carry a slightly larger portrait than student cards. */
.people-grid[data-people-category="supervisors"] .person-avatar {
  width: 128px;
  font-size: 42px;
}

.person-card .tag {
  display: inline-block;
  padding: 2px 12px;
  background: rgba(201,168,76,0.12);
  color: #8a7530;
  border-radius: 12px;
  font-size: 11px; font-weight: 600;
  margin-bottom: 8px;
}

.person-card h4 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }

.person-card .title {
  font-size: 13px; color: var(--primary);
  font-weight: 500; margin-bottom: 8px;
}

.person-card .desc {
  font-size: 13px; color: var(--text-gray);
  line-height: 1.6;
}

.people-tab-content { display: none; }
.people-tab-content.active { display: block; }

/* Publications Section */
.pub-overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 860px;
  margin: 0 auto 32px;
}

.pub-stat {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 12px;
  text-align: center;
  transition: var(--transition);
}

.pub-stat:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.pub-stat-value {
  display: block;
  font-size: 1.5rem; font-weight: 800;
  color: var(--primary);
  line-height: 1.3;
}

.pub-stat-label {
  font-size: 12px; color: var(--text-gray);
  letter-spacing: .3px;
}

/* Search & filter controls (shared by the publications and software pages) */
.filter-controls {
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

/* The publications page keeps its control row narrower than the page. */
.pub-controls { max-width: 860px; margin-left: auto; margin-right: auto; }

.filter-search {
  position: relative;
  flex: 1 1 300px;
  display: flex; align-items: center;
}

.filter-search-icon {
  position: absolute; left: 14px;
  font-size: 14px; opacity: .5;
  pointer-events: none;
}

.filter-search input {
  width: 100%;
  padding: 11px 16px 11px 40px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 24px;
  transition: var(--transition);
}

.filter-search input::placeholder { color: var(--text-light); }

.filter-search input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(58,123,213,0.12);
}

.filter-select {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600;
  color: var(--text-gray);
}

.filter-select select {
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.filter-select select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(58,123,213,0.12);
}

.filter-result-count {
  font-size: 13px; font-weight: 500;
  color: var(--text-gray);
  white-space: nowrap;
}

.filter-empty {
  background: var(--bg-white);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-gray);
  font-size: 14px;
}

.filter-empty p { margin-bottom: 14px; }

.filter-reset {
  padding: 8px 20px;
  font-size: 13px; font-weight: 600;
  font-family: inherit;
  color: var(--primary);
  background: rgba(26,75,140,0.06);
  border: none; border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.filter-reset:hover { background: rgba(26,75,140,0.13); }

.pub-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.pub-sidebar {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.pub-sidebar h5 {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.pub-year-nav {
  display: flex; flex-direction: column; gap: 2px;
  border-left: 2px solid var(--border);
}

.pub-year-nav a {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: 13px; font-weight: 500;
  color: var(--text-gray);
  transition: var(--transition);
}

.pub-year-nav a:hover { color: var(--primary); background: rgba(26,75,140,0.05); }

.pub-year-nav a.active {
  color: var(--primary);
  font-weight: 700;
  border-left-color: var(--primary);
  background: rgba(26,75,140,0.06);
}

.pub-year-nav-count { font-size: 11px; color: var(--text-light); }

.pub-year-group { scroll-margin-top: 92px; }

.pub-year-heading {
  position: sticky;
  top: 72px;
  z-index: 5;
  display: flex; align-items: baseline; gap: 12px;
  padding: 12px 0 10px;
  margin-bottom: 16px;
  background: var(--bg-light);
  border-bottom: 2px solid var(--border);
}

.pub-year-heading .pub-year-label {
  font-size: 1.4rem; font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: .5px;
}

.pub-year-count {
  font-size: 12px; font-weight: 600;
  color: var(--primary);
  background: rgba(26,75,140,0.08);
  border-radius: 12px;
  padding: 2px 10px;
}

.pub-list { display: flex; flex-direction: column; gap: 14px; }

.pub-item {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 22px 26px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.pub-item:hover {
  box-shadow: var(--shadow);
  border-color: rgba(26,75,140,0.18);
}

.pub-item .pub-authors {
  font-size: 13px; color: var(--text-gray);
  margin-bottom: 6px;
}

.pub-item .pub-leader { color: var(--primary-dark); font-weight: 700; }

.pub-item .pub-title {
  font-size: 15px; font-weight: 600;
  line-height: 1.55;
  margin-bottom: 8px;
}

.pub-item .pub-venue {
  font-size: 13px; color: var(--primary);
  line-height: 1.6;
}

.pub-item .pub-links { margin-top: 10px; display: flex; gap: 12px; flex-wrap: wrap; }

.pub-item .pub-links a {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600;
  color: #8a7530;
  background: rgba(201,168,76,0.14);
  padding: 3px 12px;
  border-radius: 12px;
  transition: var(--transition);
}

.pub-item .pub-links a:hover { background: rgba(201,168,76,0.26); color: #6f5e26; }

.pub-toggle {
  margin-top: 14px;
  padding: 9px 20px;
  font-size: 13px; font-weight: 600;
  font-family: inherit;
  color: var(--primary);
  background: rgba(26,75,140,0.06);
  border: none; border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.pub-toggle:hover { background: rgba(26,75,140,0.13); }

.pub-empty {
  background: var(--bg-white);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-gray);
  font-size: 14px;
}

.pub-empty a { color: var(--primary); font-weight: 600; }

/* Software & Database Section */
.svc-overview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 460px;
  margin: 0 auto 48px;
}

.svc-stat {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 12px;
  text-align: center;
  transition: var(--transition);
}

.svc-stat:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.svc-stat-value {
  display: block;
  font-size: 1.5rem; font-weight: 800;
  color: var(--primary);
  line-height: 1.3;
}

.svc-stat-label { font-size: 12px; color: var(--text-gray); letter-spacing: .3px; }

.svc-group { margin-bottom: 56px; }

.svc-group-head {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.svc-group-head h3 {
  font-size: 1.25rem; font-weight: 700;
  color: var(--primary-dark);
}

.svc-group-count {
  font-size: 12px; font-weight: 700;
  color: var(--primary);
  background: rgba(26,75,140,0.08);
  border-radius: 12px;
  padding: 2px 10px;
}

.svc-group-head p {
  flex: 1 1 100%;
  font-size: 13px; color: var(--text-gray);
  margin: 0;
}

.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  /* Cards in the same row share the tallest height, so the action row below
     lines up across the row. */
  align-items: stretch;
}

.software-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  transition: var(--transition);
  display: flex; flex-direction: column;
}

.software-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.software-card.is-legacy { background: #fbfbfc; }

.software-card .svc-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.software-card h4 {
  font-size: 17px; font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.35;
  margin: 0;
}

.svc-badges {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap; justify-content: flex-end;
}

.svc-version, .svc-status {
  font-size: 11px; font-weight: 600;
  border-radius: 12px;
  padding: 2px 8px;
  white-space: nowrap;
}

.software-card .type-badge {
  font-size: 11px; font-weight: 600;
  color: var(--primary);
  background: rgba(26,75,140,0.08);
  border-radius: 12px;
  padding: 2px 10px;
  white-space: nowrap;
}

.svc-version { color: var(--text-gray); background: rgba(0,0,0,0.04); }

.svc-status.live { color: #1c7a4a; background: rgba(28,122,74,0.12); }
.svc-status.legacy { color: #8a7530; background: rgba(201,168,76,0.16); }

.software-card .svc-desc {
  font-size: 14px; color: var(--text-dark);
  line-height: 1.7; margin-bottom: 10px;
}

.software-card .svc-desc-en {
  font-size: 13px; color: var(--text-gray);
  line-height: 1.65; margin-bottom: 12px;
}

.svc-citation {
  font-size: 12px; color: var(--text-gray);
  line-height: 1.6;
  padding: 8px 12px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.svc-citation-label {
  font-weight: 700; color: var(--text-light);
  margin-right: 6px;
}

.svc-citation a { color: var(--primary); font-weight: 600; }

.svc-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
}

.svc-url {
  font-size: 11.5px; color: var(--text-light);
  word-break: break-all;
}

.software-card .btn-sm {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px;
  font-size: 13px; font-weight: 600;
  color: var(--primary);
  background: rgba(26,75,140,0.06);
  border-radius: var(--radius-sm);
  border: none; cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.software-card .btn-sm:hover { background: rgba(26,75,140,0.12); }

/* Collaboration Section */
.collab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.collab-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 32px;
  text-align: center;
  transition: var(--transition);
}

.collab-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.collab-card .icon {
  width: 64px; height: 64px;
  background: rgba(26,75,140,0.06);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
}

.collab-card h4 { font-size: 17px; font-weight: 600; margin-bottom: 12px; }

.collab-card p { font-size: 14px; color: var(--text-gray); line-height: 1.7; margin-bottom: 16px; }

.collab-contact {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  margin-top: 32px;
}

.collab-contact h4 { font-size: 1.3rem; margin-bottom: 8px; }

.collab-contact p { color: var(--text-gray); margin-bottom: 8px; }

.collab-contact .email {
  color: var(--primary); font-weight: 600;
  font-size: 1.1rem;
}

/* Footer */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h4 {
  color: #fff; font-size: 18px; margin-bottom: 12px;
}

.footer-brand p { font-size: 14px; line-height: 1.7; }

.footer h5 {
  color: #fff; font-size: 14px; font-weight: 600;
  margin-bottom: 16px;
}

/* Font size belongs on the list item so plain text (the address) and links
   (email, phone) inside the footer render at the same size. */
.footer ul li { margin-bottom: 8px; font-size: 13px; line-height: 1.7; }

.footer ul li a { font-size: inherit; transition: var(--transition); }

.footer ul li a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
}

/* Back to Top */
.back-to-top {
  position: fixed; bottom: 30px; right: 30px;
  width: 44px; height: 44px;
  background: var(--primary);
  color: #fff;
  border: none; border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  z-index: 999;
}

.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }

.back-to-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* Responsive */
@media (max-width: 968px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 72px; left: 0; right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 4px;
  }
  .lang-btn { margin-left: auto; }
  .svc-overview { grid-template-columns: repeat(2, 1fr); }
  .software-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

@media (max-width: 640px) {
  .section { padding: 60px 0; }
  .news-item { flex-direction: column; gap: 12px; }
  .news-date { min-width: auto; display: flex; gap: 8px; align-items: center; }
  .news-date .day { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .people-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  /* On narrow screens the academician card stacks again. */
  .people-grid[data-people-category="academicians"] {
    grid-template-columns: 1fr;
  }
  .people-grid[data-people-category="academicians"] .person-card {
    flex-direction: column; align-items: center; text-align: center;
    padding: 24px 20px;
  }
  .people-grid[data-people-category="academicians"] .person-avatar { width: 132px; }
  .people-grid[data-people-category="academicians"] .desc-bio { text-align: left; }
  .people-grid[data-people-category="supervisors"] .person-avatar { width: 112px; font-size: 38px; }
  .software-grid { grid-template-columns: 1fr; }
  .collab-grid { grid-template-columns: 1fr; }
  .pub-overview { grid-template-columns: repeat(2, 1fr); }
  .pub-layout { grid-template-columns: 1fr; gap: 24px; }
  .pub-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .pub-sidebar h5 { margin-bottom: 8px; }
  .pub-year-nav { flex-direction: row; overflow-x: auto; border-left: none; padding-bottom: 4px; }
  .pub-year-nav a {
    flex: 0 0 auto;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-left: 0;
  }
  .pub-year-nav a.active { border-color: var(--primary); }
  .pub-year-heading { top: 64px; }
  .pub-item { padding: 18px 20px; }
  .filter-controls { gap: 10px; }
  .filter-result-count { width: 100%; }
  .svc-overview { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .svc-group-head { align-items: baseline; }
  .software-card { padding: 20px; }
  .software-card .svc-head { flex-direction: column; }
  .svc-badges { justify-content: flex-start; }
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   Member self-service: navbar auth, profile pages, account centre
   ============================================================ */

.nav-links a.nav-auth { font-weight: 600; }
.nav-links a.nav-auth.logged-in { color: var(--primary); }

/* Team cards are now links to each member's profile page. */
.person-card { display: block; text-decoration: none; color: inherit; }
/* A white plate under the photo stops the blue fallback gradient from showing
   through at sub-pixel/rounded-corner edges. */
img.person-avatar { object-fit: cover; object-position: center top; background: #fff; }
img.profile-avatar { object-fit: cover; object-position: center top; background: #fff; }
.people-empty {
  grid-column: 1 / -1;
  text-align: center; color: var(--text-light);
  padding: 24px 0;
}

/* ---------- Individual profile page ---------- */
.profile-root { max-width: 900px; margin: 0 auto; }

.profile-head {
  display: flex; gap: 24px; align-items: center;
  margin-bottom: 32px; flex-wrap: wrap;
}

.profile-avatar {
  width: 132px;
  aspect-ratio: 5 / 7;            /* 标准证件照比例：一寸 25×35mm、二寸 35×49mm */
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 46px; font-weight: 700;
  object-fit: cover; object-position: center top; flex: 0 0 auto;
}

.profile-head-text h1 { font-size: 1.8rem; margin: 6px 0; }
.profile-title { color: var(--primary); font-weight: 500; margin-bottom: 4px; }
.profile-actions { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }

.profile-section { margin-bottom: 28px; }
.profile-section h3 {
  font-size: 1.1rem; margin-bottom: 12px;
  padding-left: 12px; border-left: 3px solid var(--primary);
}
/* Publication count shown next to the heading — plain parenthesised number, faculty only. */
.profile-section h3 .profile-count {
  font-weight: 600;
  color: var(--primary);
}
.profile-section p { color: var(--text-gray); line-height: 1.8; white-space: pre-line; }

.profile-links { display: flex; flex-direction: column; gap: 8px; }
.profile-links a { color: var(--primary); }
.profile-muted { color: var(--text-light); }
.profile-empty { text-align: center; padding: 60px 0; }
.profile-empty h2 { margin-bottom: 12px; }

/* Outline buttons sitting on a light background (hero's .btn-outline is white). */
.profile-root .btn-outline,
.account-root .btn-outline,
.auth-card .btn-outline { color: var(--primary); border-color: var(--border); }
.profile-root .btn-outline:hover,
.account-root .btn-outline:hover,
.auth-card .btn-outline:hover { border-color: var(--primary); background: rgba(26,75,140,0.06); }

/* ---------- Auth / account centre ---------- */
.auth-card {
  max-width: 420px; margin: 40px auto;
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
}

.account-root { max-width: 960px; margin: 0 auto; }
.account-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.account-heading { font-size: 1.6rem; margin-bottom: 4px; }
.account-sub { color: var(--text-gray); margin-bottom: 6px; }
.account-user { color: var(--text-light); font-size: 13px; }
.account-subheading {
  font-size: 1.15rem; margin: 32px 0 14px;
  padding-left: 12px; border-left: 3px solid var(--primary);
}

.account-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.account-form label,
.account-target label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; color: var(--text-gray); font-weight: 500;
}
.account-form input,
.account-form textarea,
.account-form select,
.account-target select {
  padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; font-family: inherit;
  background: #fff; color: var(--text-dark);
}
.account-form input:focus,
.account-form textarea:focus,
.account-form select:focus,
.account-target select:focus { outline: none; border-color: var(--primary); }
.account-form label.checkbox { flex-direction: row; align-items: center; gap: 8px; }
.account-form label.checkbox input { width: auto; }

.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-status { font-size: 13px; color: var(--text-light); }
.form-error { color: #c0392b; font-size: 13px; }

.account-notice {
  background: rgba(201,168,76,0.12); border: 1px solid rgba(201,168,76,0.4);
  color: #8a7530; padding: 10px 14px; border-radius: var(--radius-sm);
  margin-bottom: 16px; font-size: 14px;
}
.account-target { margin-bottom: 8px; }
.account-target select { max-width: 340px; }

.links-editor { border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 16px; }
.links-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; font-size: 13px; color: var(--text-gray); font-weight: 600;
}
.link-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; margin-bottom: 8px; }

.btn-sm { padding: 6px 14px; font-size: 12px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th,
.admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.admin-table th {
  color: var(--text-light); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.admin-actions { display: flex; gap: 8px; }
.admin-muted { color: var(--text-light); font-size: 12px; }
.admin-filter {
  width: 100%; max-width: 420px; margin: 0 0 12px;
  padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit;
}
.account-hint { font-size: 13px; color: var(--text-gray); margin-bottom: 12px; }
.form-row .wide { grid-column: 1 / -1; }

/* Avatar upload field */
.avatar-field { display: flex; flex-direction: column; gap: 8px; }
.avatar-field-label { font-size: 13px; color: var(--text-gray); font-weight: 600; }
.avatar-upload { display: flex; gap: 16px; align-items: flex-start; }
.avatar-preview {
  width: 72px; height: 90px; object-fit: cover; object-position: center top;
  border-radius: 6px; border: 1px solid var(--border); background: #fff;
}
.avatar-upload-controls { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.avatar-pick { cursor: pointer; }

.auth-back { font-size: 13px; color: var(--primary); }

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .link-row { grid-template-columns: 1fr; }
  .profile-head { flex-direction: column; text-align: center; }
  .account-head { flex-direction: column; }
}
