/* ========== Zhipeng Cai — 2026 简洁版样式 ========== */
:root {
  --accent: #0039a6;          /* GSU blue */
  --accent-soft: #e8eef9;
  --text: #1f2328;
  --muted: #5f6b7a;
  --line: #e3e7ed;
  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --max: 1320px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ========== 顶部导航 ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { height: 72px; width: auto; }
.brand span { font-family: var(--serif); font-size: 24px; font-weight: 600; padding-left: 16px; border-left: 1px solid var(--line); line-height: 1.6; }
.brand:hover span { color: var(--accent); }

.site-nav { display: flex; gap: 4px; }
.site-nav a {
  color: var(--muted);
  font-size: 17px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
}
.site-nav a:hover { color: var(--text); background: var(--bg-alt); text-decoration: none; }
.site-nav a.active { color: var(--accent); }

/* ========== 个人简介头部 ========== */
.hero { padding: 24px 0 0; }
.hero .wrap { display: grid; grid-template-columns: 280px 1fr; gap: 56px; align-items: start; }
.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .06);
}
.hero h1 {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 6px;
}
.hero .title { font-size: 21px; font-weight: 600; margin: 0; }
.hero .dept { color: var(--muted); margin: 0 0 10px; }
.hero .roles { list-style: none; padding: 0; margin: 0 0 14px; color: var(--muted); font-size: 17px; }
.hero .roles li { margin: 2px 0; }

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.badge {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

.links { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 8px;
  background: #fff;
}
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ========== 数据（放在简介右栏） ========== */
.hero-stats { display: flex; flex-wrap: wrap; gap: 0; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.hero-stats div { padding: 0 28px; }
.hero-stats div:first-child { padding-left: 0; }
.hero-stats div + div { border-left: 1px solid var(--line); }
.hero-stats b { display: block; font-family: var(--serif); font-size: 28px; font-weight: 600; color: var(--accent); line-height: 1.2; }
.hero-stats span { font-size: 14px; color: var(--muted); }

/* ========== 内容区块 ========== */
section.block { padding: 20px 0 0; }
section.block#about { padding-top: 24px; }
section.block h2 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
section.block h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 28px 0 10px;
}
.bio p { margin: 0 0 16px; text-align: justify; text-justify: inter-word; hyphens: auto; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag { font-size: 14px; border: 1px solid var(--line); padding: 4px 12px; border-radius: 999px; color: var(--text); }

/* 列表：左内容，右年份 */
.list { list-style: none; padding: 0; margin: 0; }
.list li {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}
.list li:last-child { border-bottom: 0; }
.list .yr { flex-shrink: 0; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.list .role { color: var(--muted); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }

/* 折叠区 */
details { margin-top: 10px; }
summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  list-style: none;
  padding: 6px 0;
}
summary::-webkit-details-marker { display: none; }
summary::before { content: "+ "; }
details[open] summary::before { content: "− "; }

/* TPC 表 */
.tpc { width: 100%; border-collapse: collapse; font-size: 17px; }
.tpc td { padding: 7px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.tpc td:first-child { width: 64px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ========== 页脚 ========== */
.site-footer { margin-top: 64px; background: #0b1f44; color: #c9d3e6; font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 32px; padding-bottom: 32px; }
.site-footer h4 { color: #fff; margin: 0 0 6px; font-size: 15px; }
.site-footer p { margin: 0; }
.site-footer a { color: #fff; }
.footer-logo { display: flex; align-items: center; gap: 12px; }
.footer-logo img { height: 52px; background: #fff; border-radius: 6px; padding: 4px; }

/* ========== 大屏 ========== */
@media (min-width: 1700px) {
  :root { --max: 1440px; }
  body { font-size: 18px; }
  .hero .wrap { grid-template-columns: 320px 1fr; }
}

/* ========== 手机 ========== */
@media (max-width: 760px) {
  .site-header { position: static; }
  .site-header .wrap { height: auto; flex-direction: column; align-items: flex-start; padding-top: 10px; padding-bottom: 6px; gap: 4px; }
  .site-nav { margin-left: -12px; flex-wrap: wrap; }
  .hero { padding-top: 32px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 24px; }
  .hero-photo img { width: 160px; }
  .hero h1 { font-size: 32px; }
  .brand img { height: 56px; }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 0; }
  .hero-stats div { padding: 0; border-left: 0 !important; }
  .two-col { grid-template-columns: 1fr; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}

/* ========== Publications 页面 ========== */
.page-head { padding: 32px 0 20px; }
.page-head h1 { font-family: var(--serif); font-size: 40px; font-weight: 600; margin: 0 0 8px; }
.page-head .lead { color: var(--muted); margin: 0 0 16px; max-width: 900px; }

.pub-bar {
  position: sticky;
  top: 88px;
  z-index: 9;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.pub-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.pub-tabs { display: flex; gap: 6px; }
.pub-tabs a { color: var(--text); font-weight: 500; padding: 6px 12px; border-radius: 6px; }
.pub-tabs a:hover { background: var(--bg-alt); text-decoration: none; }
.pub-tabs span { color: var(--muted); font-size: 14px; margin-left: 4px; }
#pub-search {
  width: 340px;
  max-width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}
#pub-search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

ol.publication-list { margin: 0; padding-left: 2.6em; }
ol.publication-list > li { padding: 10px 0 10px 6px; border-bottom: 1px dashed var(--line); }
ol.publication-list > li::marker { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.paper-block p { margin: 0; line-height: 1.5; }
.paper-block .line1 { color: var(--muted); }
.paper-block .line1 strong { color: var(--text); }
.paper-block .line2 { font-weight: 600; color: var(--text); }
.paper-block .line3 { color: var(--muted); font-style: italic; font-size: 0.94em; }
.venue {
  display: inline-block;
  min-width: 58px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  font-style: normal;
  letter-spacing: .02em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 1px 8px;
  border-radius: 4px;
  margin-right: 8px;
  vertical-align: 1px;
}
.no-result { color: var(--muted); padding: 24px 0; }

@media (max-width: 760px) {
  .pub-bar { position: static; }
  .pub-bar .wrap { flex-direction: column; align-items: stretch; }
  #pub-search { width: 100%; }
  .page-head h1 { font-size: 32px; }
}
section.pubs { scroll-margin-top: 160px; }

/* ========== Team 页面 ========== */
.team-group h3 { display: flex; align-items: center; gap: 8px; scroll-margin-top: 160px; }
.team-group h3 .count { font-size: 12px; letter-spacing: 0; color: var(--accent); background: var(--accent-soft); padding: 1px 8px; border-radius: 999px; }

.people { display: grid; gap: 20px; margin-bottom: 12px; }
.people.cur, .people.phd-alum { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.people.ms-alum { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px 20px; }

.person { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; transition: box-shadow .15s, border-color .15s; }
.person:hover { border-color: #cfd6e0; box-shadow: 0 6px 18px rgba(0, 0, 0, .06); }
.person img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 25%; background: var(--bg-alt); }
.person .info { padding: 12px 14px 14px; }
.person h4 { margin: 0 0 4px; font-size: 17px; font-weight: 600; line-height: 1.3; }
.person p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.person .pos { color: var(--accent); font-weight: 600; }
.person .inst { color: var(--text); margin-bottom: 4px; }
.person .award { margin-top: 4px; font-size: 13px; color: #8a5a00; }
.person .award::before { content: "★ "; }

/* 硕士校友：横向紧凑卡片 */
.person.ms-alum { display: flex; align-items: center; gap: 14px; padding: 10px; }
.person.ms-alum img { width: 64px; height: 64px; flex-shrink: 0; border-radius: 50%; }
.person.ms-alum .info { padding: 0; }
.person.ms-alum h4 { font-size: 15px; margin-bottom: 2px; }
.person.ms-alum p { font-size: 13px; }

@media (max-width: 760px) {
  .people.cur, .people.phd-alum { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .people.ms-alum { grid-template-columns: 1fr; }
}

/* ========== Teaching 页面 ========== */
.courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.course { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; background: #fff; }
.course-code { font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: .02em; }
.course h4 { margin: 4px 0 2px; font-size: 18px; font-weight: 600; line-height: 1.35; }
.course .lvl { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.course .terms { margin: 0; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--muted); }
.course .terms b { color: var(--text); }

.callout { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding: 20px 24px; border-radius: 10px; background: var(--bg-alt); border: 1px solid var(--line); }
.callout h4 { margin: 0 0 6px; font-size: 18px; }
.callout p { margin: 0; color: var(--muted); max-width: 640px; }
.callout-stats { display: flex; flex-shrink: 0; }
.callout-stats div { padding: 0 22px; text-align: center; }
.callout-stats div + div { border-left: 1px solid var(--line); }
.callout-stats b { display: block; font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--accent); line-height: 1.2; }
.callout-stats span { font-size: 13px; color: var(--muted); }

.history { width: 100%; border-collapse: collapse; font-size: 16px; }
.history th, .history td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.history thead th { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.history tbody th { width: 80px; font-weight: 600; font-variant-numeric: tabular-nums; }
.history td { width: 45%; line-height: 1.7; }
.history td.empty { color: #b7bec8; }
.history .cc { display: inline-block; min-width: 118px; font-size: 13px; font-weight: 600; color: var(--accent); }
.history tbody tr:hover { background: var(--bg-alt); }

@media (max-width: 760px) {
  .callout { flex-direction: column; align-items: flex-start; }
  .callout-stats div:first-child { padding-left: 0; }
  .history { font-size: 14px; }
  .history th, .history td { padding: 8px 6px; }
  .history .cc { display: block; min-width: 0; }
}
.pub-tabs { flex-wrap: wrap; }
.pub-tabs a { white-space: nowrap; }
@media (max-width: 760px) {
  .pub-tabs a { padding: 4px 8px; font-size: 15px; }
}

/* 完整论文列表：年份跳转 */
.pub-tabs.years { gap: 2px; }
.pub-tabs.years a { padding: 4px 8px; font-size: 14px; font-variant-numeric: tabular-nums; }
section.pubs h2 .count { font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 2px 9px; border-radius: 999px; vertical-align: middle; }
section.pubs h3 { scroll-margin-top: 160px; }

/* ========== Team：圆形头像版（覆盖上面的卡片样式） ========== */
.people.cur, .people.phd-alum { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 28px 20px; }
.person.cur, .person.phd-alum {
  border: 0;
  background: transparent;
  text-align: center;
  overflow: visible;
}
.person.cur:hover, .person.phd-alum:hover { box-shadow: none; }
.person.cur img, .person.phd-alum img {
  width: 116px;
  height: 116px;
  aspect-ratio: auto;
  margin: 0 auto 12px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 22%;
  border: 4px solid #fff;
  box-shadow: 0 0 0 1px var(--line), 0 6px 16px rgba(11, 31, 68, .10);
  filter: grayscale(35%) contrast(1.03);
  transition: filter .25s, transform .25s, box-shadow .25s;
}
.person.cur:hover img, .person.phd-alum:hover img {
  filter: none;
  transform: translateY(-3px);
  box-shadow: 0 0 0 2px var(--accent), 0 10px 22px rgba(11, 31, 68, .16);
}
.person.cur .info, .person.phd-alum .info { padding: 0 4px; }
.person.cur h4, .person.phd-alum h4 { font-size: 16px; }
.person.cur p, .person.phd-alum p { font-size: 13px; }

/* 硕士校友小头像也统一风格 */
.person.ms-alum img {
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
  object-position: center 22%;
  filter: grayscale(35%) contrast(1.03);
  transition: filter .25s;
}
.person.ms-alum:hover img { filter: none; }

@media (max-width: 760px) {
  .people.cur, .people.phd-alum { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
  .person.cur img, .person.phd-alum img { width: 96px; height: 96px; }
}

/* ========== Team：蓝色渐变圆框，活泼版（覆盖上面） ========== */
.person.cur img, .person.phd-alum img, .person.ms-alum img {
  padding: 5px;
  border: 0;
  background: linear-gradient(135deg, #8fb4ff 0%, #0039a6 30%, #a9c6ff 55%, #002a7a 80%, #5d8ff0 100%);
  box-shadow: 0 8px 18px rgba(0, 42, 122, .22), 0 2px 4px rgba(0, 0, 0, .08);
  filter: saturate(1.08);
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s;
}
.person.cur img, .person.phd-alum img { width: 124px; height: 124px; }
.person.ms-alum img { padding: 3px; box-shadow: 0 4px 10px rgba(0, 42, 122, .18); }
.person.cur:hover img, .person.phd-alum:hover img {
  filter: saturate(1.08);
  transform: translateY(-4px) scale(1.06) rotate(-3deg);
  box-shadow: 0 14px 26px rgba(0, 42, 122, .28), 0 2px 4px rgba(0, 0, 0, .08);
}
.person.ms-alum:hover img { filter: saturate(1.08); transform: scale(1.08) rotate(-3deg); }
@media (max-width: 760px) {
  .person.cur img, .person.phd-alum img { width: 100px; height: 100px; }
}

/* 头像再缩小 */
.person.cur img, .person.phd-alum img { width: 100px; height: 100px; padding: 4px; }
.people.cur, .people.phd-alum { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.person.ms-alum img { width: 54px; height: 54px; }
@media (max-width: 760px) {
  .person.cur img, .person.phd-alum img { width: 84px; height: 84px; }
}

/* Team：每行固定 5 人 */
.people.cur, .people.phd-alum { grid-template-columns: repeat(5, 1fr); gap: 36px 24px; }
.person.cur img, .person.phd-alum img { width: 118px; height: 118px; }
.person.cur h4, .person.phd-alum h4 { font-size: 17px; margin-top: 2px; }
.person.cur p, .person.phd-alum p { font-size: 14px; }
@media (max-width: 1100px) {
  .people.cur, .people.phd-alum { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .people.cur, .people.phd-alum { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .people.cur, .people.phd-alum { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
  .person.cur img, .person.phd-alum img { width: 90px; height: 90px; }
}

/* 首页：名字右侧的 IEEE Fellow / ACM Distinguished Scientist */
.name-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; margin-bottom: 6px; }
.name-row h1 { margin: 0; }
.name-honors { font-size: 19px; font-weight: 600; color: var(--text); }
.name-honors a { color: var(--text); }
.name-honors a:hover { color: var(--accent); }
.name-honors .sep { color: #b7bec8; margin: 0 10px; font-weight: 400; }
.hero .roles .honors-li .sep { color: #b7bec8; margin: 0 8px; }


/* Team：学生卡片加框 */
.people.cur, .people.phd-alum { gap: 20px; }
.person.cur, .person.phd-alum {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 14px 18px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.person.cur:hover, .person.phd-alum:hover {
  border-color: #c9d6ee;
  box-shadow: 0 10px 24px rgba(11, 31, 68, .08);
  transform: translateY(-2px);
}

/* Team：照片和字体放大 */
.person.cur img, .person.phd-alum img { width: 140px; height: 140px; margin-bottom: 14px; }
.person.cur h4, .person.phd-alum h4 { font-size: 19px; margin-bottom: 6px; }
.person.cur p, .person.phd-alum p { font-size: 15px; line-height: 1.5; }
.person.cur, .person.phd-alum { padding: 26px 16px 22px; }
@media (max-width: 760px) {
  .person.cur img, .person.phd-alum img { width: 104px; height: 104px; }
  .person.cur h4, .person.phd-alum h4 { font-size: 17px; }
  .person.cur p, .person.phd-alum p { font-size: 13.5px; }
}

/* 页头下面直接是正文时，减少空白（Teaching 页） */
.page-head .lead:last-child { margin-bottom: 0; }
.page-head + main > section.block:first-child { padding-top: 4px; }
