/* Pure White Minimalist Academic Theme — Clean Ink & Hairline Rules */
:root {
  --ink: #2c2e33;
  --ink-strong: #17191c;
  --ink-muted: #70757c;
  --accent: #3d5a58;        /* 淡雅墨青 */
  --accent-hover: #253b39;
  --bg-main: #ffffff;
  --border: #eaeaea;
  --border-light: #f1f1f1;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg-main);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14.8px;
  line-height: 1.75;
  margin: 0;
}

h1, h2, h3, h4, h5 {
  font-family: "Georgia", "Times New Roman", "Songti SC", "Noto Serif SC", serif;
  color: var(--ink-strong);
  font-weight: 600;
  letter-spacing: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Sidebar — pure white, hairline border */
.site-sidebar {
  background: #ffffff !important;
  width: 174px !important;
  border-right: 1px solid var(--border);
}

.site-sidebar .brand-block {
  padding: 36px 22px 20px 22px;
  border-bottom: 1px solid var(--border-light);
}

.site-sidebar .brand-name {
  color: var(--ink-strong);
  font-family: "Georgia", "Songti SC", serif;
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}

.site-sidebar .brand-sub {
  color: var(--ink-muted);
  font-size: 11.5px;
  margin-top: 4px;
  letter-spacing: 0.02em;
}

.site-sidebar .nav-list {
  padding: 20px 0;
}

.site-sidebar .nav-list a {
  display: block;
  padding: 9px 22px;
  color: #555a60;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  border-left: 2px solid transparent;
}

.site-sidebar .nav-list a:hover {
  color: var(--ink-strong);
  text-decoration: none;
}

.site-sidebar .nav-list a.active {
  color: var(--accent);
  font-weight: 600;
  border-left-color: var(--accent);
}

.site-main {
  margin-left: 174px;
}

.mobile-topbar {
  background: #ffffff !important;
  color: var(--ink-strong) !important;
  border-bottom: 1px solid var(--border);
}

/* Sections — pure white, airy spacing */
.section-block {
  padding: 36px 48px;
  border-bottom: 1px solid var(--border-light);
  background: #ffffff;
}

.section-block.alt {
  background: #ffffff;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 20px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: block;
}

.section-title span.cn {
  font-size: 14.5px;
  font-weight: 400;
  color: var(--ink-muted);
  margin-left: 10px;
}

/* Profile Hero */
.hero-wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.hero-avatar {
  width: 138px;
  height: 138px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.hero-info {
  flex: 1;
  min-width: 260px;
}

.hero-info h1 {
  font-size: 26px;
  margin: 0 0 5px 0;
  line-height: 1.25;
}

.hero-info h1 .cn-name {
  font-size: 19px;
  font-weight: 400;
  color: var(--ink-muted);
  margin-left: 10px;
}

.hero-role {
  color: var(--ink-strong);
  font-weight: 500;
  font-size: 14.8px;
  margin: 0 0 4px 0;
}

.hero-affil {
  color: var(--ink-muted);
  font-size: 13.6px;
  margin: 0 0 10px 0;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 8px;
  align-items: center;
  font-size: 13.6px;
}

.link-sep {
  color: #cccccc;
  user-select: none;
}

.pill-link {
  display: inline-block;
  padding: 2px 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

.pill-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.hero-bio {
  margin: 22px 0 12px 0;
  color: var(--ink);
  text-align: justify;
}

.interests-line {
  font-size: 13.8px;
  color: var(--ink-muted);
  margin: 0;
}

.interests-line strong {
  color: var(--ink-strong);
  font-weight: 600;
  margin-right: 6px;
}

.group-photo {
  margin: 24px 0 0 0;
}

.group-photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.group-photo figcaption {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--ink-muted);
  text-align: center;
}

/* Two-column grid */
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 28px;
}

.sub-heading {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink-strong);
  margin: 0 0 14px 0;
}

.timeline-item {
  margin-bottom: 13px;
  padding-left: 12px;
  border-left: 1.5px solid #e3e3e3;
}

.timeline-date {
  font-size: 12px;
  color: var(--ink-muted);
}

.timeline-org {
  font-weight: 600;
  color: var(--ink-strong);
  margin: 1px 0;
}

.timeline-role {
  font-size: 13.6px;
  color: var(--ink-muted);
}

.grants-plain {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}

.clean-list {
  margin: 8px 0 0 0;
  padding-left: 18px;
}

.clean-list li {
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--ink);
}

.prose-muted {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.8;
  margin: 6px 0 0 0;
}

/* Publications */
.pub-note {
  font-size: 13.5px;
  color: var(--ink-muted);
  margin: -10px 0 16px 0;
}

.year-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 10px 0;
  font-family: "Georgia", serif;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink-strong);
}

.year-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.paper-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-light);
}

.paper-card:last-child {
  border-bottom: none;
}

.paper-thumb {
  width: 205px;
  height: 142px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 5px;
  flex-shrink: 0;
}

.paper-body {
  flex: 1;
  min-width: 0;
}

.paper-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-strong);
  line-height: 1.44;
  margin-bottom: 5px;
}

.paper-authors {
  font-size: 13.8px;
  color: #4f5459;
  margin-bottom: 5px;
}

.paper-venue {
  font-size: 13.8px;
  color: var(--ink);
  margin-bottom: 6px;
}

.paper-venue em {
  font-weight: 500;
  color: var(--ink-strong);
}

.badge-jfm {
  display: inline-block;
  background: #ffffff;
  color: var(--accent);
  border: 1px solid #d4dddd;
  font-size: 10.5px;
  font-weight: 600;
  padding: 0 5px;
  border-radius: 2px;
  margin-left: 6px;
  vertical-align: 1px;
  letter-spacing: 0.03em;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.paper-btn {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

.paper-btn::before { content: "["; color: #a8b0af; margin-right: 1px; }
.paper-btn::after  { content: "]"; color: #a8b0af; margin-left: 1px; }

.paper-btn:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* People page cards */
.pi-card {
  display: flex;
  align-items: center;
  gap: 22px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px 20px;
  flex-wrap: wrap;
}

.pi-card img {
  width: 102px;
  height: 102px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.people-group-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-strong);
  margin: 24px 0 14px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

.people-group-title:first-of-type {
  margin-top: 6px;
}

.people-group-title span.cn {
  font-size: 13.5px;
  font-weight: 400;
  color: var(--ink-muted);
  margin-left: 8px;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 10px;
}

.person-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 14px 12px 13px 12px;
  text-align: center;
}

.person-photo {
  width: 132px;
  height: 152px;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: #ffffff;
  display: block;
  margin: 0 auto 10px auto;
}

.person-name-cn {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink-strong);
  line-height: 1.3;
}

.person-name-en {
  font-size: 12.8px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.person-meta {
  display: block;
  margin-top: 5px;
  font-size: 11.8px;
  color: var(--ink-muted);
}

.person-topic {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--border-light);
  font-size: 12.2px;
  color: #4f5459;
  line-height: 1.48;
}

/* Teaching overview & course subpage */
.course-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.course-item:last-child {
  border-bottom: none;
}

.course-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.course-name {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink-strong);
}

.course-name .cn {
  font-weight: 400;
  color: var(--ink-muted);
  margin-left: 8px;
  font-size: 14px;
}

.course-term {
  font-size: 13px;
  color: var(--ink-muted);
}

.course-desc {
  font-size: 13.8px;
  color: var(--ink-muted);
  margin: 5px 0 0 0;
}

.course-link-row {
  margin-top: 7px;
  font-size: 13.8px;
}

/* Research page cards & grants */
.research-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-light);
}

.research-card:last-child {
  border-bottom: none;
}

.research-thumb {
  width: 240px;
  height: 168px;
  object-fit: cover;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 3px;
  flex-shrink: 0;
}

.research-thumb.contain {
  object-fit: contain;
  padding: 6px;
}

.research-body {
  flex: 1;
  min-width: 0;
}

.research-title {
  font-family: "Georgia", "Songti SC", serif;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink-strong);
  margin: 0 0 6px 0;
  line-height: 1.35;
}

.research-title .cn {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-muted);
  margin-left: 8px;
}

.research-desc {
  font-size: 14px;
  color: var(--ink);
  margin: 0 0 8px 0;
  text-align: justify;
  line-height: 1.7;
}

.research-refs {
  font-size: 12.8px;
  color: var(--ink-muted);
  margin: 0;
}

.grant-item {
  padding: 11px 0;
  border-bottom: 1px solid var(--border-light);
}

.grant-item:last-child {
  border-bottom: none;
}

.grant-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.grant-agency {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink-strong);
}

.grant-role {
  font-size: 12px;
  color: var(--accent);
  border: 1px solid #d4dddd;
  border-radius: 2px;
  padding: 0 6px;
  margin-left: 8px;
  font-weight: 500;
}

.grant-role.co {
  color: var(--ink-muted);
  border-color: var(--border);
}

.grant-year {
  font-size: 13px;
  color: var(--ink-muted);
}

.grant-title {
  font-size: 13.8px;
  color: var(--ink);
  margin: 3px 0 0 0;
}

.grant-en {
  font-size: 12.8px;
  color: var(--ink-muted);
  margin: 2px 0 0 0;
}

.code-box {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 12px 15px;
  margin: 10px 0 18px 0;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
}

.code-box pre { margin: 0; white-space: pre; }

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ffffff;
  color: var(--ink-muted);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 9px;
  font-size: 11.5px;
  cursor: pointer;
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.dl-btn {
  display: inline-block;
  background: #ffffff;
  color: var(--accent) !important;
  border: 1px solid var(--accent);
  text-decoration: none;
  padding: 7px 15px;
  border-radius: 3px;
  font-weight: 500;
  font-size: 14px;
  margin-right: 10px;
  margin-bottom: 8px;
}

.dl-btn:hover {
  background: var(--accent);
  color: #ffffff !important;
  text-decoration: none;
}

.note-banner {
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 2.5px solid var(--accent);
  padding: 11px 15px;
  margin: 16px 0 22px 0;
  border-radius: 2px;
  font-size: 14px;
  color: var(--ink);
}

table.course-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 22px 0;
  font-size: 13.8px;
  background: #ffffff;
}

table.course-table th,
table.course-table td {
  border: 1px solid var(--border);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}

table.course-table th {
  background: #ffffff;
  font-weight: 600;
  color: var(--ink-strong);
  border-bottom: 1.5px solid #d8d8d8;
}

.step-badge {
  display: inline-block;
  color: var(--accent);
  border: 1px solid #d4dddd;
  border-radius: 2px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 7px;
  vertical-align: 1px;
}

.site-footer {
  padding: 22px 48px;
  font-size: 12.5px;
  color: var(--ink-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 992px) {
  .site-main { margin-left: 0; }
  .section-block { padding: 26px 20px; }
  .site-footer { padding: 20px; }
}

@media (max-width: 680px) {
  .paper-card, .research-card { flex-direction: column; gap: 12px; }
  .paper-thumb, .research-thumb { width: 100%; max-width: 340px; height: auto; max-height: 210px; }
  .hero-wrap { flex-direction: column; text-align: center; }
  .hero-links { justify-content: center; }
}
