:root {
  --theme:#c61230;
  --theme-hover:#a30f25;
  --fg:#222;
  --fg-muted:#666;
  --bg:#fff;
  --rule:#eee;
}

/* ===== 全局基础 ===== */
body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  color: var(--fg);
  margin: 0;
  background-color: var(--bg);
  transition: background-color 0.4s, color 0.4s;
}
a { color: var(--theme); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: #111; margin-top: 1.2em; }
.container { max-width: 900px; margin: 60px auto; padding: 0 20px; }
footer { text-align: center; margin: 50px 0 20px; color: var(--fg-muted); font-size: 0.9em; }

/* ===== 夜间模式变量覆写 ===== */
.dark-mode {
  --fg:#ddd;
  --fg-muted:#999;
  --bg:#121212;
  --rule:#333;
}
.dark-mode a { color: #ff7c85; }
.dark-mode h1, .dark-mode h2, .dark-mode h3 { color:#fff; }


.dark-mode .hero .name {
  color: #fff !important;
}

/* ===== 导航栏 ===== */
.navbar {
  display: flex;
  justify-content: center;
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 100;
  
  
  height: 62px;
  padding: 0;
  align-items: center;
  
 
  box-sizing: border-box;
}

.navbar .inner {
  display: flex;
  justify-content: flex-end;
  width: 92%;
  align-items: center;
  height: 100%; 
}

.navbar .right, 
.navbar .links {
  display: flex;
  align-items: center;
  height: 100%;  
}

.navbar a {
  margin-left: 22px;
  color: #333;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  
  
  display: flex;
  align-items: center;
  height: 100%;
}

.navbar a.active {
  color: var(--theme);
  font-weight: 700;
}

.navbar a:hover { 
  color: var(--theme); 
}

.toggle-dark {
  margin-left: 20px;
  cursor: pointer;
  font-size: 1.2rem;
  user-select: none;
  
 
  display: flex;
  align-items: center;
  height: 100%;
}

.dark-mode .navbar { 
  background-color: #1a1a1a; 
  border-bottom: 1px solid #333; 
}
.dark-mode .navbar a { color: #ccc; }
.dark-mode .navbar a.active { color: #ff7c85; }


.container {
  padding-top: 16px;
}
.container > h1:first-child,
.container > h2:first-child {
  margin-top: 0 !important;
}

/* ===== 首页头部 ===== */
.hero {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 25px; flex-wrap: wrap;
}
.hero .name {
  font-size: 2rem; font-weight: 700; color: #111; margin: 0 0 6px 0;
}
.hero img {
  width: 180px; border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.hero address { margin-top: 8px; font-style: normal; font-size: 0.9em; color: #555; }
.contact a { color: var(--theme); font-weight: 600; }
.dark-mode .contact a { color:#ff7c85; }

/* ===== 紧凑列表 ===== */
ul.list-tight { list-style: none; padding: 0; }
ul.list-tight li { margin: 8px 0; }

/* ===== 卡片（论文/荣誉）===== */
.pub-card, .honor-card {
  display: flex; align-items: center; gap: 20px;
  margin: 25px 0; border-bottom: 1px solid var(--rule); padding-bottom: 15px;
}
.thumb { flex: 0 0 285px; display: flex; align-items: center; justify-content: center; }
.thumb img {
  width: 285px; border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.3s;
}
.thumb img:hover { transform: scale(1.04); }
.text { flex: 1; }
.pub-card p, .honor-card p { margin: 5px 0; line-height: 1.5; }
.pub-card em, .honor-card em { color: var(--fg-muted); font-size: 0.95em; }

/* ================================
   论文标题优化（
   ================================ */
.pub-card h3 {
  font-family: Georgia, 'Times New Roman', serif !important;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 6px 0;
}

/* ================================
   作者行
   ================================ */
.pub-card .authors b {
  font-weight: 700 !important;
}
.pub-card .authors sup {
  font-size: 0.75em;
  margin-left: 2px;
}

/* Awards 显示 */
.pub-card .award {
  font-weight: 700;
  color: #c61230;
}

/* ===== 按钮徽章 ===== */
.badge {
  background-color: var(--theme); color: #fff;
  border-radius: 5px; padding: 6px 10px; margin-right: 8px; font-size: 0.9rem;
}
.badge:hover { background-color: var(--theme-hover); }

/* 夜间下卡片/徽章 */
.dark-mode .pub-card, .dark-mode .honor-card { border-bottom: 1px solid var(--rule); }
.dark-mode .badge { background-color: #ff7c85; color: #111; }
.dark-mode .badge:hover { background-color: #ff97a0; }

/* 首页底部提示色 */
.callout { color: #b23a48; }
.dark-mode .callout { color: #ff97a0; }

/* ===== 合作伙伴页 ===== */
.partner-grid { display: block; }
.partner-card {
  display: flex; align-items: flex-start; gap: 18px;
  background: var(--bg); border:1px solid var(--rule);
  border-radius:10px; padding:15px; margin: 16px 0;
  box-shadow:0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.3s;
}
.partner-card:hover { transform: translateY(-3px); }
.partner-card img {
  width:120px; height:120px; object-fit:cover; border-radius:8px;
}
.partner-name {
  display:flex; align-items:baseline; gap:10px; margin:0; padding:0;
}
.partner-name .left { font-size:1.15rem; font-weight:700; color:#111; }
.partner-name .right { font-size:0.95rem; color:#777; margin-left:auto; }
.partner-desc { margin:6px 0 10px 0; color: var(--fg); }
.partner-links a {
  display:inline-block; margin-right:10px; background:#e9eefb; color:#3056d3;
  padding:6px 12px; border-radius:6px; font-size:0.9rem;
}
.partner-links a:hover { background:#d4ddfa; }
.dark-mode .partner-card { background:#1f1f1f; box-shadow:0 2px 8px rgba(255,255,255,0.05); }
.dark-mode .partner-name .left, .dark-mode .partner-desc { color:#eee; }
.dark-mode .partner-name .right { color:#bbb; }
.dark-mode .partner-links a { background:#333; color:#ddd; }
.dark-mode .partner-links a:hover { background:#444; }

/* ================================
   时间轴
   ================================ */
.timeline {
  position: relative;
  margin: 32px 0 48px 0;
  

  --timeline-padding: 70px; 
  --line-x: 12px;          
  
  padding-left: var(--timeline-padding);
}


.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--line-x);
  width: 3px;
  background: var(--theme);
  transform: translateX(-50%);
}

/* 每一条记录 */
.timeline-item {
  position: relative;
  margin-bottom: 36px;
}


.timeline-item::before {
  content: "";
  position: absolute;
  

  left: calc(var(--line-x) - var(--timeline-padding));
  top: 0.95em;             
  transform: translate(-50%, -50%);
  
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--theme);
  z-index: 2;
}

.timeline-year {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 3px;
}

.timeline-title {
  font-size: 1.0rem;
  font-weight: 600;
  color: var(--fg);
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--fg-muted);
  margin-top: 3px;
}

/* 夜间模式适配 */
.dark-mode .timeline::before {
  background: var(--theme);
}

.dark-mode .timeline-item::before {
  background: var(--bg);
}

.dark-mode .timeline-title { 
  color: #fff; 
}

.dark-mode .timeline-desc { 
  color: #bbb; 
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .hero { flex-direction: column; align-items: center; text-align: center; }
  .hero img { width: 160px; }
  .navbar .inner { width: 95%; }
  .pub-card, .honor-card { flex-direction: column; align-items: center; text-align: center; }
  .thumb { flex: 0 0 auto; }
  .partner-card { flex-direction: column; align-items: center; text-align: left; }
  .partner-name { width: 100%; }
  .partner-name .right { margin-left: 0; }
  
  .timeline {
    --timeline-padding: 55px;
    --line-x: 20px;
  }
}
.arxiv-icon {
  width: 50px;       
  height: 25px;
  margin-left: 6px;   
  vertical-align: middle;  
}

.arxiv-link {
  display: inline-block;
  line-height: 1;     
}

.abs-btn {
  margin-top: 10px;
  padding: 4px 10px;
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.abs-btn:hover {
  background: #ddd;
}

.Abstract {
  margin-top: 10px;
  background: #fafafa;
  padding: 10px 12px;
  border-left: 3px solid #888;
  border-radius: 4px;
  font-size: 0.95rem;
  line-height: 1.45;
}

/* ===== 谷歌学术图标 ===== */
.scholar-link-inline {
  display: inline-block;
  line-height: 0;
}

.scholar-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  transition: opacity 0.3s;
}

.scholar-link-inline:hover .scholar-icon {
  opacity: 0.7;
}