/* ==========================================================================
   课题组官网 · 设计系统
   ----------------------------------------------------------
   说明：所有颜色、字号、圆角都集中在此文件的 :root 变量里。
   想换主色调，只需改 :root 里的 --primary / --accent 即可，全站自动生效。
   ========================================================================== */

:root {
  /* 主题色（学术蓝紫系，可整体替换） */
  --primary:       #2563eb;   /* 主蓝：链接、按钮、强调 */
  --primary-dark:  #1e40af;   /* 主蓝深：悬停 */
  --primary-deep:  #1e3a8a;   /* 深蓝：标题、页头 */
  --indigo:        #667eea;   /* 靛蓝：渐变中间色 */
  --accent:        #764ba2;   /* 紫：点缀、渐变收尾、标签 */
  --accent-soft:   #EEEDFE;

  /* 中性色 */
  --ink:      #111827;   /* 正文 */
  --ink-2:    #374151;   /* 次级正文 */
  --ink-3:    #6b7280;   /* 辅助说明 */
  --bg:       #f8fafc;   /* 页面底色 */
  --card:     #ffffff;   /* 卡片底色 */
  --line:     #e5e7eb;   /* 分隔线 */
  --line-2:   #d1d5db;   /* 分隔线（深） */

  /* 语义色 */
  --chip:     #eef2ff;   /* 标签底色 */

  /* 尺寸 */
  --radius:   12px;
  --radius-lg: 16px;
  --maxw:     1120px;

  --font: "PingFang SC", "Microsoft YaHei", "Heiti SC", "Segoe UI", Roboto, sans-serif;
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 6px 24px rgba(15, 23, 42, .05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4 { line-height: 1.35; color: var(--ink); }
ul, ol { padding-left: 1.4em; }
code, .mono { font-family: ui-monospace, Consolas, "Courier New", monospace; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ============ 顶部导航 ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; color: var(--primary-deep); white-space: nowrap; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600;
}
.brand small { display: block; font-size: 11px; color: var(--ink-3); font-weight: 400; line-height: 1.1; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; padding: 0; }
.nav-links a {
  display: block; padding: 8px 13px; border-radius: 8px;
  color: var(--ink-2); font-size: 15px; white-space: nowrap;
}
.nav-links a:hover { color: var(--primary); background: #f1f5f9; }
.nav-links a.active { color: var(--primary-deep); background: var(--chip); font-weight: 600; }
.nav-toggle {
  display: none; border: 1px solid var(--line-2); background: #fff;
  border-radius: 8px; width: 40px; height: 40px; cursor: pointer; font-size: 20px; color: var(--ink-2);
}

/* ============ 页头 Hero ============ */
.hero {
  background: linear-gradient(120deg, var(--primary-deep) 0%, var(--primary) 55%, var(--accent) 125%);
  color: #fff; padding: 60px 0 56px;
}
.hero .container { max-width: var(--maxw); }
.hero .tag {
  display: inline-block; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.32);
  padding: 4px 14px; border-radius: 999px; font-size: 13px; letter-spacing: 1px; margin-bottom: 16px;
}
.hero h1 { font-size: 34px; font-weight: 700; color: #fff; }
.hero .en { font-size: 15px; opacity: .82; margin-top: 4px; }
.hero p.lead { margin-top: 14px; font-size: 16px; opacity: .94; max-width: 780px; }

/* ============ 分节标题 ============ */
.section { padding: 56px 0; }
.section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { margin-bottom: 26px; }
.sec-head .kicker { color: var(--primary); font-size: 13px; font-weight: 600; letter-spacing: 2px; }
.sec-head h2 { font-size: 26px; font-weight: 700; margin-top: 2px; }
.sec-head .desc { color: var(--ink-3); font-size: 15px; margin-top: 6px; max-width: 720px; }

/* ============ 卡片 ============ */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px 24px; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============ 首页：PI 信息卡 ============ */
.pi-card { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.pi-card .avatar {
  width: 128px; height: 160px; border-radius: 12px; object-fit: cover; flex: none;
  background: #e2e8f0; border: 1px solid var(--line-2);
}
.pi-card .info { flex: 1; min-width: 260px; }
.pi-card h3 { font-size: 20px; }
.pi-card .title-line { color: var(--primary); font-weight: 600; font-size: 15px; margin: 4px 0 10px; }
.contact-list { list-style: none; padding: 0; display: grid; gap: 6px; }
.contact-list li { font-size: 14.5px; color: var(--ink-2); }
.contact-list b { color: var(--ink); font-weight: 600; margin-right: 4px; }

/* ============ 数据速览 KPI ============ */
.kpis { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 22px; }
.kpi {
  flex: 1; min-width: 140px; background: var(--card); border: 1px solid var(--line);
  border-top: 3px solid var(--primary); border-radius: 12px; padding: 16px; text-align: center;
}
.kpi .num { font-size: 30px; font-weight: 700; color: var(--primary-deep); }
.kpi .lbl { font-size: 13px; color: var(--ink-3); margin-top: 2px; }

/* ============ 研究方向入口卡 ============ */
.dir-card { display: block; height: 100%; transition: transform .18s ease, box-shadow .18s ease; }
.dir-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(15,23,42,.10); color: inherit; }
.dir-card .icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: var(--chip); color: var(--primary-deep); margin-bottom: 12px;
}
.dir-card h3 { font-size: 17px; margin-bottom: 6px; }
.dir-card p { font-size: 14px; color: var(--ink-3); }

/* ============ 时间线（新闻/获奖） ============ */
.timeline { list-style: none; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line-2); }
.timeline li { position: relative; padding: 0 0 26px 30px; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 4px solid var(--primary);
}
.timeline .date { font-size: 13.5px; color: var(--primary); font-weight: 600; }
.timeline .title { font-size: 16.5px; font-weight: 600; margin: 2px 0 4px; }
.timeline .body { font-size: 14.5px; color: var(--ink-2); }
.timeline .body img { margin-top: 10px; border-radius: 10px; max-width: 480px; }

/* ============ 成员网格 ============ */
.member { text-align: center; }
.member .photo {
  width: 100%; aspect-ratio: 1 / 1.15; object-fit: cover; border-radius: 12px;
  background: #e2e8f0; border: 1px solid var(--line-2); margin-bottom: 10px;
}
.member h3 { font-size: 16px; }
.member .role { font-size: 13px; color: var(--primary); font-weight: 600; margin: 2px 0; }
.member .brief { font-size: 13px; color: var(--ink-3); }
.member .email { font-size: 12.5px; color: var(--ink-3); word-break: break-all; }

/* ============ 论文列表 ============ */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.filter-btn {
  border: 1px solid var(--line-2); background: #fff; color: var(--ink-2);
  padding: 6px 15px; border-radius: 999px; cursor: pointer; font-size: 14px;
}
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pub-year { font-size: 20px; font-weight: 700; color: var(--primary-deep); margin: 22px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.pub { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.pub .authors { font-size: 14.5px; color: var(--ink-2); }
.pub .authors .me { font-weight: 600; color: var(--primary-deep); }
.pub .ptitle { font-size: 16px; font-weight: 600; margin: 3px 0; }
.pub .ptitle a { color: var(--ink); }
.pub .ptitle a:hover { color: var(--primary); }
.pub .venue { font-size: 13.5px; color: var(--ink-3); }
.badge { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 6px; margin-left: 6px; vertical-align: middle; }
.badge.journal { background: #e6f1fb; color: #0c447c; }
.badge.conf { background: var(--accent-soft); color: #3c3489; }
.badge.highlight { background: #fef3c7; color: #92400e; }

/* ============ 项目 / 服务 / 获奖 列表 ============ */
.item-list { display: grid; gap: 14px; }
.item { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.item .idx { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--chip); color: var(--primary-deep); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }
.item h3 { font-size: 16px; }
.item .meta { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.item .role-tag { font-size: 12px; padding: 1px 8px; border-radius: 6px; background: #eaf3de; color: #27500a; margin-left: 6px; }

/* ============ 标签 chip ============ */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { display: inline-block; font-size: 12.5px; padding: 2px 10px; border-radius: 6px; background: var(--chip); color: #3730a3; }

/* ============ 按钮 ============ */
.btn {
  display: inline-block; background: var(--primary); color: #fff; padding: 10px 22px;
  border-radius: 10px; font-size: 15px; font-weight: 600; border: none; cursor: pointer; text-align: center;
}
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn.ghost { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn.ghost:hover { background: var(--chip); }

/* ============ FAQ ============ */
details.faq { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
details.faq summary { cursor: pointer; font-weight: 600; font-size: 15.5px; }
details.faq p { margin-top: 8px; color: var(--ink-2); font-size: 14.5px; }

/* ============ 图库 / 灯箱 ============ */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; cursor: zoom-in; border: 1px solid var(--line); }
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(15,23,42,.86);
  display: none; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 10px; }
.lightbox .close { position: absolute; top: 18px; right: 26px; color: #fff; font-size: 36px; cursor: pointer; line-height: 1; }

/* ============ 页脚 ============ */
.site-footer { background: #0f172a; color: #cbd5e1; padding: 44px 0 28px; font-size: 14px; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin: 6px 0; }
.site-footer .copyright { margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); color: #94a3b8; font-size: 13px; text-align: center; }

/* ============ 滚动显现动画 ============ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============ 响应式 ============ */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .site-footer .cols { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); flex-direction: column;
    align-items: stretch; padding: 8px 16px 16px; gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; border-radius: 8px; }
  .hero { padding: 40px 0; }
  .hero h1 { font-size: 26px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .pi-card { flex-direction: column; }
  .pi-card .avatar { width: 100%; height: auto; aspect-ratio: 3/4; }
  .section { padding: 38px 0; }
}
