/* ========== Yingshu Li — 侧栏式雅致版 ========== */
:root {
  --ivory: #f8f5f0;
  --paper: #fffdf9;
  --ink: #2a2530;
  --muted: #736b78;
  --line: #e6ded3;
  --plum: #3b2338;          /* 侧栏深紫 */
  --plum-2: #4a2d46;
  --rose: #9c4f73;          /* 点缀玫瑰色 */
  --rose-soft: #f3e6ec;
  --gold: #c7a46a;
  --side: 340px;
  --serif: "Cormorant Garamond", Garamond, Georgia, serif;
  --sans: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--rose); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ========== 左侧栏 ========== */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--side);
  background: var(--plum);
  background-image: radial-gradient(120% 60% at 0% 0%, var(--plum-2) 0%, var(--plum) 60%);
  color: #e9dfe6;
  padding: 56px 40px 36px;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.sidebar .portrait {
  width: 150px; height: 150px; border-radius: 50%;
  object-fit: cover; object-position: center 20%;
  border: 2px solid var(--gold);
  padding: 5px; background: transparent;
  margin-bottom: 22px;
}
.sidebar .name { font-family: var(--serif); font-size: 40px; font-weight: 600; line-height: 1.05; color: #fff; margin: 0 0 8px; }
.sidebar .name a { color: inherit; }
.sidebar .name a:hover { text-decoration: none; }
.sidebar .role { font-size: 14px; letter-spacing: .04em; line-height: 1.6; color: #d8c9d3; margin: 0; }
.sidebar .role b { color: var(--gold); font-weight: 700; letter-spacing: .16em; font-size: 12px; text-transform: uppercase; display: block; margin-bottom: 4px; }

.sidebar nav { margin: 34px 0 30px; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 0; color: #e9dfe6;
  font-family: var(--serif); font-size: 21px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.sidebar nav a::after { content: "→"; font-family: var(--sans); font-size: 13px; opacity: 0; transform: translateX(-6px); transition: .2s; }
.sidebar nav a:hover { text-decoration: none; color: #fff; }
.sidebar nav a:hover::after, .sidebar nav a.active::after { opacity: 1; transform: none; }
.sidebar nav a.active { color: var(--gold); font-style: italic; }

.sidebar .contact { font-size: 13.5px; line-height: 1.7; color: #cdbfc8; margin-top: auto; }
.sidebar .contact a { color: #fff; }
.sidebar .ext { display: flex; gap: 14px; margin: 14px 0 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.sidebar .ext a { color: var(--gold); }

/* ========== 右侧正文 ========== */
.main { margin-left: var(--side); min-height: 100vh; }
.content { max-width: 860px; padding: 64px 64px 40px; }

.kicker { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--rose); margin: 0 0 10px; }
.page-title { font-family: var(--serif); font-size: 60px; font-weight: 500; line-height: 1.05; margin: 0 0 18px; }
.page-title em { color: var(--rose); }
.lead { font-family: var(--serif); font-size: 24px; line-height: 1.5; color: #4b4350; margin: 0 0 28px; font-style: italic; }

.section { margin-top: 56px; }
.section > h2 {
  font-family: var(--serif); font-size: 15px; font-weight: 600;
  letter-spacing: .28em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 22px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.section h3 { font-family: var(--serif); font-size: 24px; font-weight: 600; margin: 30px 0 8px; color: var(--ink); }

.prose p { margin: 0 0 18px; text-align: justify; hyphens: auto; }

/* 研究方向：编号列表 */
.interests { list-style: none; counter-reset: i; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.interests li { counter-increment: i; display: flex; gap: 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); font-family: var(--serif); font-size: 22px; }
.interests li::before { content: counter(i, decimal-leading-zero); font-family: var(--sans); font-size: 12px; letter-spacing: .1em; color: var(--rose); }

/* 时间轴式列表（年份在左） */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.timeline .when { font-family: var(--serif); font-size: 19px; color: var(--rose); font-style: italic; }
.timeline .what { line-height: 1.55; }
.timeline .what b { font-family: var(--serif); font-size: 21px; font-weight: 600; display: block; }
.timeline .what span { font-size: 14.5px; color: var(--muted); }

/* 普通列表 */
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 10px 0 10px 22px; position: relative; border-bottom: 1px solid var(--line); line-height: 1.6; }
.plain li::before { content: ""; position: absolute; left: 2px; top: 22px; width: 8px; height: 1px; background: var(--rose); }
.runon { margin: 0; line-height: 1.9; }

/* ========== 论文：按年份 ========== */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; margin: 0 0 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.filters button {
  font: inherit; font-family: var(--serif); font-size: 20px; color: var(--muted);
  background: none; border: 0; padding: 0; cursor: pointer;
}
.filters button.on { color: var(--ink); font-style: italic; border-bottom: 1px solid var(--rose); }
.filters button span { font-family: var(--sans); font-size: 12px; color: var(--rose); margin-left: 3px; vertical-align: super; }
#search {
  margin-left: auto; width: 260px; font: inherit; font-size: 15px;
  border: 0; border-bottom: 1px solid var(--line); background: transparent;
  padding: 4px 2px; outline: none;
}
#search:focus { border-bottom-color: var(--rose); }

.year { display: grid; grid-template-columns: 110px 1fr; gap: 24px; padding-top: 26px; }
.year > .y { font-family: var(--serif); font-size: 44px; font-weight: 500; line-height: 1; color: var(--gold); position: sticky; top: 24px; align-self: start; }
.paper { padding: 0 0 18px; margin: 0 0 18px; border-bottom: 1px solid var(--line); line-height: 1.6; }
.paper:last-child { border-bottom: 0; margin-bottom: 0; }
.paper .kind { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.paper .kind .venue { color: var(--rose); font-weight: 700; letter-spacing: .1em; margin-right: 8px; }
.paper .body > a:first-of-type { display: block; font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.3; color: var(--ink); margin: 2px 0 4px; }
.paper .body > a:first-of-type:hover { color: var(--rose); }
.paper .body { font-size: 15px; color: #4f4855; }
.award { display: inline-block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--plum); background: #f1e3c4; padding: 1px 8px; border-radius: 2px; margin: 4px 0; }
.note { color: var(--muted); font-size: 14px; font-style: italic; margin-top: 30px; }
.no-result { color: var(--muted); font-style: italic; padding: 24px 0; }

/* 学生卡 */
.students { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.student { padding: 14px 0; border-bottom: 1px solid var(--line); }
.student b { font-family: var(--serif); font-size: 23px; font-weight: 600; display: block; line-height: 1.2; }
.student span { font-size: 14.5px; color: var(--muted); }
.student a { font-size: 14px; }
.grads li { padding: 16px 0; }
.grads li strong { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.compact li { font-size: 15px; padding: 8px 0 8px 22px; }
.compact li::before { top: 20px; }
.compact li strong { font-family: var(--serif); font-size: 19px; font-weight: 600; }

.footnote { margin-top: 70px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.footnote img { height: 34px; opacity: .85; }

/* ========== 窄屏：侧栏变顶部 ========== */
@media (max-width: 980px) {
  .sidebar { position: static; width: auto; padding: 32px 24px 24px; }
  .sidebar .top { display: flex; gap: 20px; align-items: center; }
  .sidebar .portrait { width: 96px; height: 96px; margin: 0; }
  .sidebar .name { font-size: 32px; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 22px 0 14px; border: 0; }
  .sidebar nav a { border: 0; padding: 2px 0; font-size: 19px; }
  .sidebar nav a::after { display: none; }
  .main { margin-left: 0; }
  .content { padding: 36px 20px 30px; }
  .page-title { font-size: 44px; }
  .interests, .students { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 0; }
  .year { grid-template-columns: 1fr; gap: 6px; }
  .year > .y { position: static; font-size: 36px; }
  #search { margin-left: 0; width: 100%; }
}
.content > .section:first-child { margin-top: 0; }

/* 首页数字 */
.figures { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 8px; padding: 6px 0 30px; border-bottom: 1px solid var(--line); }
.figures div { padding: 0 18px; }
.figures div:first-child { padding-left: 0; }
.figures div + div { border-left: 1px solid var(--gold); }
.figures b { display: block; font-family: var(--serif); font-size: 54px; font-weight: 500; line-height: 1; color: var(--plum); letter-spacing: -.01em; }
.figures b i { font-style: italic; color: var(--rose); font-size: .7em; margin-left: 2px; }
.figures span { display: block; margin-top: 10px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); line-height: 1.5; }
.figures + .section { margin-top: 40px; }
@media (max-width: 980px) {
  .figures { grid-template-columns: 1fr 1fr; gap: 24px 0; }
  .figures div:nth-child(3) { border-left: 0; padding-left: 0; }
  .figures b { font-size: 42px; }
}
.figures b { font-size: clamp(34px, 3.4vw, 54px); white-space: nowrap; font-variant-numeric: lining-nums; }
.figures div { padding: 0 16px; }
