:root {
  --bg: #0b0c10;
  --card: #15171c;
  --text: #e6e8ee;
  --muted: #9aa3b2;
  --brand: #4f7cff;
  --border: #242732;
  --shadow: 0 8px 24px rgba(0,0,0,.3);
}

/* 亮色主题 */
[data-theme="light"] {
  --bg: #fafbff;
  --card: #ffffff;
  --text: #1a202c;
  --muted: #718096;
  --brand: #4f7cff;
  --border: #e2e8f0;
  --shadow: 0 10px 40px rgba(79,124,255,.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans CJK SC', sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 10% -10%, rgba(79,124,255,.08), transparent 60%),
              radial-gradient(1000px 700px at 110% -20%, rgba(16,185,129,.06), transparent 60%),
              var(--bg);
  line-height: 1.7;
}

/* 亮色主题的特殊背景 */
[data-theme="light"] body {
  background: radial-gradient(1200px 800px at 10% -10%, rgba(79,124,255,.04), transparent 60%),
              radial-gradient(1000px 700px at 110% -20%, rgba(99,102,241,.03), transparent 60%),
              linear-gradient(135deg, #fafbff 0%, #f0f4ff 100%);
}

.container { width: min(1400px, 95%); margin: 0 auto; }

/* 顶部 */
.site-header {
  background: transparent;
  border-bottom: 2px solid var(--brand);
  margin-bottom: 20px;
}

/* 亮色主题的头部样式 */
[data-theme="light"] .site-header {
  border-bottom: 2px solid rgba(79,124,255,.2);
  background: rgba(255,255,255,.6);
  backdrop-filter: blur(10px);
}
.header-inner { display: flex; align-items: center; justify-content: flex-start; padding: 24px 0 16px; }
.brand { display: flex; align-items: center; gap: 16px; }
.logo { font-size: 28px; }
.brand-text .title { 
  font-family: 'Noto Serif SC', serif; 
  font-weight: 600; 
  font-size: 24px;
  color: var(--text);
  letter-spacing: .5px; 
}
.brand-text .subtitle { 
  color: var(--muted); 
  font-size: 14px; 
  margin-top: 2px;
}

/* 布局 */
.layout { display: grid; grid-template-columns: 1fr 280px; gap: 32px; padding: 20px 0; }
.content { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); }
.sidebar { position: sticky; top: 20px; height: fit-content; display: flex; flex-direction: column; gap: 16px; }
.toc-card, .info-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }

/* 亮色主题的增强效果 */
[data-theme="light"] .content {
  box-shadow: 0 20px 60px rgba(79,124,255,.06), 0 8px 24px rgba(0,0,0,.02);
  border: 1px solid rgba(79,124,255,.08);
}

[data-theme="light"] .toc-card,
[data-theme="light"] .info-card {
  box-shadow: 0 8px 32px rgba(79,124,255,.04), 0 4px 16px rgba(0,0,0,.02);
  border: 1px solid rgba(79,124,255,.06);
}
.toc-card { padding: 16px; }
.info-card { padding: 10px 14px; }
.toc-title { font-weight: 600; margin-bottom: 8px; }

/* 正文 */
h1, h2, h3 { font-family: 'Noto Serif SC', serif; }
h2 { margin: 16px 0 8px; border-left: 3px solid var(--brand); padding-left: 10px; font-size: 18px; }
h2:first-child { margin-top: 0; }
h3 { margin: 12px 0 6px; font-size: 16px; color: var(--brand); }
p { margin: 6px 0; font-size: 14px; line-height: 1.6; }
p.indent { text-indent: 2em; }
h3.indent { text-indent: 2em; }
ul, ol { padding-left: 32px; margin: 8px 0; }
li { margin: 2px 0; font-size: 14px; line-height: 1.5; }

/* Markdown 风格的列表 */
ul li::marker { content: "• "; color: var(--brand); }
ol li::marker { color: var(--brand); font-weight: 600; }
section { margin-bottom: 16px; }

.kv { display: grid; grid-template-columns: 100px 1fr; gap: 8px 16px; margin: 8px 0; }
.kv.indent { margin-left: 2em; }
.kv > div { display: contents; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; font-size: 14px; }

#toc a { display: block; color: var(--muted); text-decoration: none; padding: 6px 8px; border-radius: 8px; }
#toc a:hover { color: var(--text); }


/* 页脚 */
.site-footer { border-top: 1px solid var(--border); margin-top: 20px; }
.site-footer .container { padding: 18px 0; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* 论文分组样式 */
.paper-group { margin: 12px 0; padding: 8px 0; }
.paper-group h4 { 
  color: var(--brand); 
  margin: 4px 0 4px; 
  font-size: 15px; 
  font-weight: 600;
}
.paper-group ul { 
  margin: 4px 0 8px; 
  padding-left: 28px; 
}
.paper-group li { 
  margin: 2px 0; 
  font-size: 14px; 
  line-height: 1.4; 
}

/* 响应式 */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}


