/* ============================================================
   styles.css — 个人主页样式
   配色思路：浅色背景 + 深蓝主色 + 金色强调，整体偏学术风
   - 主色 --c-primary  : 用于按钮、标题
   - 强调 --c-accent   : 用于 Spotlight 等高亮
   - 背景 --c-bg       : 主背景
   - 卡片 --c-card     : 卡片底色
   ============================================================ */
:root {
  --c-primary: #0d3b66;       /* 深蓝（学术） */
  --c-primary-soft: #e6edf6;
  --c-accent: #d4961a;        /* 金色 */
  --c-accent-soft: #fcf3df;
  --c-text: #1f2937;
  --c-text-soft: #4b5563;
  --c-muted: #6b7280;
  --c-bg: #fafbfc;
  --c-bg-alt: #f0f3f7;
  --c-card: #ffffff;
  --c-border: #e2e6eb;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md: 0 4px 14px rgba(15,23,42,0.08);
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--c-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.logo {
  font-weight: 700;
  font-size: 16px;
  color: var(--c-primary);
  white-space: nowrap;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--c-text-soft);
  font-size: 14px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--c-primary); text-decoration: none; }

.btn-lang {
  background: var(--c-primary);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  letter-spacing: 0.5px;
}
.btn-lang:hover { background: #082c4d; }

/* ---------- Hero ---------- */
.hero {
  padding: 60px 0 40px;
  background: linear-gradient(180deg, #f4f7fb 0%, var(--c-bg) 100%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 36px;
  align-items: center;
}
.avatar {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: var(--shadow-md);
}
.hero-text h1 {
  margin: 0 0 8px;
  font-size: 34px;
  color: var(--c-primary);
  letter-spacing: -0.3px;
}
.hero-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--c-accent);
  margin: 0 0 12px;
}
#hero-bio {
  color: var(--c-text-soft);
  font-size: 15px;
  margin: 0 0 18px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn {
  display: inline-block;
  padding: 8px 16px;
  background: #fff;
  color: var(--c-primary);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.15s;
}
.btn:hover { border-color: var(--c-primary); text-decoration: none; }
.btn-primary {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}
.btn-primary:hover { background: #082c4d; color: #fff; }

/* ---------- Sections ---------- */
.section {
  padding: 60px 0;
}
.section-alt {
  background: var(--c-bg-alt);
}
.section h2 {
  font-size: 26px;
  color: var(--c-primary);
  margin: 0 0 24px;
  position: relative;
  padding-left: 14px;
}
.section h2::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 4px;
  background: var(--c-accent);
  border-radius: 2px;
}
.subheading {
  font-size: 18px;
  color: var(--c-text);
  margin: 36px 0 14px;
}
.info-card {
  margin-top: 22px;
  padding: 18px 20px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.info-card h3 {
  margin: 0 0 10px;
  color: var(--c-primary);
  font-size: 17px;
}
.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 6px 18px;
  font-size: 14px;
  color: var(--c-text-soft);
}
.info-list strong { color: var(--c-text); }

/* ---------- Timeline ----------
   结构：[日期 160px][间隔 32px = 节点+线][正文]
   中线位于左侧 176px 处；日期在 0~160px 范围内右对齐，不会与中线重合。 */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 176px;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--c-border);
}
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 48px;               /* 留出中线与节点空间 */
  padding: 12px 0 18px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 170px;             /* 与 ::before 中线对齐（176 - 6） */
  top: 22px;
  width: 14px; height: 14px;
  background: var(--c-accent);
  border: 3px solid var(--c-bg);
  border-radius: 50%;
}
.section-alt .timeline-item::before {
  border-color: var(--c-bg-alt);
}
.timeline-date {
  text-align: right;
  font-size: 13px;
  color: var(--c-muted);
  font-weight: 500;
  padding-top: 4px;
  white-space: nowrap;
}
.timeline-body h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--c-primary);
}
.timeline-body p {
  margin: 0;
  color: var(--c-text-soft);
  font-size: 14px;
}

/* ---------- Publications ---------- */
.pub-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
}
.pub-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-label {
  font-size: 13px;
  color: var(--c-muted);
  margin-right: 4px;
}
.filter-divider {
  width: 1px;
  height: 18px;
  background: var(--c-border);
  margin: 0 8px;
}
.chip {
  background: #fff;
  color: var(--c-text-soft);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--c-primary); color: var(--c-primary); }
.chip-active {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}
.pub-note {
  font-size: 13px;
  color: var(--c-muted);
  margin: 6px 0 18px;
}
.task-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}

.pub-year-group {
  margin-bottom: 24px;
}
.pub-year-group h3 {
  font-size: 18px;
  color: var(--c-text);
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--c-border);
}
.pub-item {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s;
}
.pub-item:hover {
  box-shadow: var(--shadow-md);
  border-color: #cdd5e0;
}
.pub-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
  margin: 0 0 4px;
}
/* 论文标题链接：整行标题可点击跳到论文主页 / Demo / arXiv */
.pub-title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}
.pub-title-link:hover {
  color: var(--c-primary);
  text-decoration: none;
}
.pub-authors {
  font-size: 13.5px;
  color: var(--c-text-soft);
  margin: 2px 0;
}
.pub-authors strong {
  color: var(--c-primary);
  font-weight: 700;
}
.pub-venue {
  font-size: 13px;
  color: var(--c-muted);
  font-style: italic;
}
.pub-badges {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pub-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.3px;
}
.badge-journal    { background: #e6f1ff; color: #0d3b66; }
.badge-conference { background: #e8f6ee; color: #1f7a3d; }
.badge-preprint   { background: #fbf2e6; color: #8a5a14; }
.badge-highlight  { background: var(--c-accent); color: #fff; }
.badge-task       { background: #edf2ff; color: #3442a0; }
.pub-keywords {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pub-keywords span {
  display: inline-block;
  font-size: 11.5px;
  color: #526070;
  background: #f3f6fa;
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  padding: 2px 8px;
}
.pub-links {
  margin-top: 6px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
/* 统一的按钮样式：摘要按钮、Demo / Code / arXiv / DOI 等外部链接 */
.pub-linkbtn {
  font-size: 12px;
  background: var(--c-primary-soft);
  color: var(--c-primary);
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
  transition: background 0.15s, border-color 0.15s;
}
.pub-linkbtn:hover {
  background: #d8e3f1;
  text-decoration: none;
}
.pub-linkbtn.is-disabled {
  background: #f1f2f4;
  color: #9aa3ad;
  cursor: not-allowed;
}
.pub-abstract {
  margin-top: 10px;
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--c-text-soft);
  background: #f7f9fc;
  border-left: 3px solid var(--c-primary);
  border-radius: 4px;
  line-height: 1.7;
}
.pub-abstract[hidden] { display: none; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: all 0.18s;
  display: block;
  color: inherit;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--c-primary);
  text-decoration: none;
}
.card h3, .card h4 {
  margin: 0 0 8px;
  color: var(--c-primary);
  font-size: 16px;
}
.card p {
  margin: 0 0 10px;
  color: var(--c-text-soft);
  font-size: 14px;
}
.card-tag {
  font-size: 12px;
  color: var(--c-muted);
  font-family: monospace;
}
.card-sm h4 { font-size: 15px; }
.card-sm p  { font-size: 13px; margin-bottom: 0; }

/* ---------- Awards ---------- */
.award-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.award-list li {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--c-border);
  font-size: 14px;
  color: var(--c-text-soft);
}
.award-date {
  color: var(--c-accent);
  font-weight: 600;
  font-size: 13px;
}

/* ---------- Contact ---------- */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15px;
  color: var(--c-text-soft);
}
.contact-list li { padding: 4px 0; }
.contact-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--c-muted);
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0d2745;
  color: #b6c2d2;
  padding: 22px 0;
  text-align: center;
  font-size: 13px;
}
.site-footer a { color: #b6c2d2; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .header-inner { gap: 8px; }
  .nav-links { display: none; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .avatar { margin: 0 auto; width: 160px; height: 160px; }
  .hero-actions { justify-content: center; }
  .timeline::before { left: 8px; }
  .timeline-item { grid-template-columns: 1fr; gap: 4px; padding-left: 28px; }
  .timeline-item::before { left: 2px; top: 8px; }
  .timeline-date { text-align: left; }
  .award-list li { grid-template-columns: 1fr; gap: 0; }
  .award-date { font-size: 12px; }
}
