/*
 * 全站排版系统
 * 组件只定义布局和颜色；可阅读文字统一从这里取得字号、字重与行高。
 */
:root {
  --font-sans: "PingFang SC", "Helvetica Neue", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  --type-display: clamp(36px, calc(28px + 1vw), 48px);
  --type-section: clamp(22px, calc(20px + .3vw), 24px);
  --type-subsection: clamp(18px, calc(16px + .35vw), 22px);
  --type-project-title: clamp(23px, calc(18px + 1.1vw), 36px);
  --type-detail-title: clamp(26px, calc(21px + 1vw), 40px);
  --type-card-title: clamp(17px, calc(15px + .35vw), 21px);
  --type-card-lead: clamp(18px, calc(16px + .3vw), 21px);
  --type-card: clamp(14px, calc(13px + .2vw), 16px);
  --type-body: clamp(14.5px, calc(13.8px + .12vw), 16px);
  --type-compact: clamp(13px, calc(12.25px + .12vw), 14.5px);
  --type-meta: clamp(11px, calc(10.4px + .12vw), 12.5px);
  --type-label: clamp(10px, calc(9.65px + .1vw), 11.5px);
  --type-control: clamp(12px, calc(11.4px + .12vw), 13.5px);
  --type-nav: clamp(13px, calc(12.2px + .1vw), 14px);
  --type-stat: clamp(26px, calc(22px + .55vw), 32px);
  --lh-display: 1.06;
  --lh-section: 1.12;
  --lh-subsection: 1.3;
  --lh-title: 1.35;
  --lh-body: 1.82;
  --lh-compact: 1.68;
  --lh-meta: 1.55;
  --lh-label: 1.45;
  --weight-regular: 400;
  --weight-meta: 560;
  --weight-card: 650;
  --weight-heading: 740;
  --track-heading: -.025em;
  --track-title: -.015em;
  --track-label: .07em;
}

html,
body,
button,
input,
textarea,
select {
  font-family: var(--font-sans);
}

body {
  font-size: var(--type-body);
  font-weight: var(--weight-regular);
  line-height: var(--lh-body);
}

button,
input,
textarea,
select {
  font: inherit;
}

/* 页面主标题与一级章节。 */
.home-identity h1 {
  font-size: var(--type-display);
  font-weight: var(--weight-heading);
  line-height: var(--lh-display);
}

main .section-heading {
  display:block;
  margin-bottom:clamp(24px, 2.4vw, 34px);
  padding-bottom:0;
  border-bottom:0;
}
main h2.section-title {
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  margin:0;
  font-size:var(--type-section);
  font-weight:500;
  line-height:1.35;
  letter-spacing:.02em;
}
main h2.section-title::after {
  content:"";
  flex:1 1 32px;
  min-width:24px;
  height:1px;
  margin-left:10px;
  background:var(--line);
}
main h2.section-title > span:last-child {
  min-width:0;
  overflow-wrap:anywhere;
}
.section-title__number {
  display:inline-grid;
  flex:0 0 auto;
  box-sizing:border-box;
  width:36px;
  height:36px;
  place-items:center;
  border-radius:50%;
  border:0;
  background:color-mix(in srgb,var(--ink) 8%,var(--wall));
  color:var(--acc-d);
  font-size:18px;
  font-weight:600;
  line-height:1;
  letter-spacing:0;
}

/* 模块内二级章节。 */
.qualifications-v2__heading h3,
.photo-journal__heading h3,
.paper-detail-section__heading h3,
.project-detail-section h3 {
  font-size: var(--type-subsection);
  font-weight: var(--weight-heading);
  line-height: var(--lh-subsection);
  letter-spacing: var(--track-title);
}

/* 卡片、条目和项目标题。 */
.study-entry__title h3,
.qualification-card h3,
.paper-head h3 {
  font-size: var(--type-card-title);
  font-weight: var(--weight-card);
  line-height: var(--lh-title);
  letter-spacing: var(--track-title);
}

.project-row__title {
  font-size: var(--type-project-title);
  font-weight: var(--weight-heading);
  line-height: 1.16;
  letter-spacing: var(--track-heading);
}

.paper-detail-hero h2,
.project-detail-title {
  font-size: var(--type-detail-title);
  font-weight: var(--weight-heading);
  line-height: 1.16;
  letter-spacing: var(--track-heading);
}

.px-book-meta h3,
.other-photo__copy strong {
  font-size: var(--type-card-lead);
  font-weight: var(--weight-card);
  line-height: var(--lh-title);
  letter-spacing: var(--track-title);
}

.other-hobby strong,
.project-detail-copy__title,
.project-detail-evidence__heading h4,
.project-detail-methods strong,
.project-detail-conclusion h4 {
  font-size: var(--type-card);
  font-weight: var(--weight-card);
  line-height: var(--lh-title);
}

/* 长文正文：论文和项目详解共用同一阅读尺度。 */
.paper-detail-section__lead,
.paper-detail-section__body,
.paper-detail-question,
.project-detail-summary,
.project-detail-conclusion-line,
.project-detail-section__lead,
.project-detail-question,
.project-detail-section__body,
.project-detail-methods p,
.project-detail-findings li,
.project-detail-conclusion p {
  font-size: var(--type-body);
  line-height: var(--lh-body);
}

.paper-detail-section__lead,
.project-detail-section__lead,
.project-detail-conclusion-line {
  font-weight: var(--weight-card);
}

.paper-detail-section__body,
.project-detail-section__body,
.project-detail-question {
  text-align: justify;
  text-justify: inter-ideograph;
}

/* 普通正文与卡片说明。 */
.education-v2__heading p,
.study-entry__degree,
.study-entry__detail,
.study-entry__honours,
.paper-head p,
.project-row__result,
.other-language__details p,
.other-language__details p strong,
.other-skills dd,
.other-hobby small,
.paper-detail-data dd,
.project-detail-data dd,
.project-detail-evidence__interpretation {
  font-size: var(--type-compact);
  line-height: var(--lh-compact);
}

.study-entry__degree,
.other-skills dd,
.other-language__details p strong {
  font-weight: var(--weight-card);
}

/* 元数据。 */
.study-entry time,
.study-entry__title span,
.study-entry__metrics dd,
.orgs li,
.orgs a,
.paper-head .paper-authors,
.paper-head .paper-title-en,
.paper-foot p,
.paper-foot a,
#exp .exp-time,
#exp .exp-department,
.project-row__top,
.project-row__open,
.project-row__metric b,
.project-detail-kicker,
.project-detail-actions,
.paper-detail-authors,
.paper-detail-kicker,
.paper-detail-section__source,
.photo-archive__tabs button,
.photo-viewer__footer,
.qualifications-v2__heading p,
.qualification-card__meta time,
.qualification-card__proof-link {
  font-size: var(--type-meta);
  font-weight: var(--weight-meta);
  line-height: var(--lh-meta);
}

/* 标签、编号、图注和辅助信息。 */
.me-lat,
.fact-label,
.orgs .ol,
.other-kicker,
.other-skills dt,
.qualification-card__meta p,
.qualification-card__kind,
.qualification-card__proof figcaption,
.paper-index,
.paper-pages__head,
.paper-pages__controls,
.paper-detail-section__number,
.paper-detail-data dt,
.paper-detail-evidence__label,
.paper-detail-figure figcaption,
.project-row__metric small,
.project-detail-section__number,
.project-detail-data dt,
.project-detail-flow__number,
.project-detail-figure figcaption,
.project-detail-facet__title,
.project-detail-table th,
.report-row__preview-title,
.report-row__preview-index,
.photo-journal__heading p,
.home-identity__eyebrow,
.home-identity__snapshot span,
.home-proof span,
.home-proof small,
.home-photo-strip__label em {
  font-size: var(--type-label);
  font-weight: var(--weight-meta);
  line-height: var(--lh-label);
}

.paper-detail-figure figcaption strong,
.project-detail-table,
.project-detail-flow strong,
.project-detail-actions__primary,
.project-detail-actions__secondary {
  font-size: var(--type-meta);
  line-height: var(--lh-meta);
}

/* 侧栏与交互控件。 */
.me-name {
  font-size: 36px;
  font-weight: var(--weight-heading);
  line-height: 1;
}

.me-role {
  font-size: var(--type-compact);
  font-weight: var(--weight-meta);
  line-height: var(--lh-compact);
}

.me-c,
.me-c a {
  font-size: var(--type-meta);
  font-weight: var(--weight-meta);
  line-height: 1.65;
}

.toc a {
  font-size: var(--type-nav);
  font-weight: var(--weight-card);
  line-height: 1.5;
}

.toc i {
  font-size: var(--type-meta);
  font-weight: var(--weight-meta);
  line-height: 1.5;
}

.btn,
.skip,
.qualifications-v2__archive a,
.qualification-card__proof-link,
.paper-foot a,
.paper-pages__controls button,
.pdf-reader button,
.project-entry__full-link,
.project-row__open,
.project-row__demo,
.project-detail-actions__primary,
.project-detail-actions__secondary {
  font-size: var(--type-control);
  font-weight: var(--weight-card);
  line-height: 1.45;
}

/* 首屏使用独立字号，不随卡片宽度缩小为微型文字。 */
.home-identity__eyebrow,
.home-identity__eyebrow small,
.home-identity__education dt time,
.home-identity__snapshot span,
.home-project-slide__copy > small,
.home-project-slide__cta,
.home-proof span,
.home-proof small,
.home-photo-strip__label em { font-size:12px; }
.home-identity__snapshot strong { font-size:14px; line-height:1.5; }
.home-proof strong { font-size:14px; font-weight:650; line-height:1.5; }
.home-identity__education dt { font-size:16px; font-weight:650; line-height:1.5; }
.home-identity__education dd { font-size:14px; font-weight:400; line-height:1.6; }
.home-identity__education dd small { font-size:13px; line-height:1.7231; }
.home-project-slide__copy > strong { font-size:clamp(20px,1.55vw,24px); line-height:1.25; }
.home-project-slide__copy > p { font-size:14px; line-height:1.6; }
.home-project-slide.is-support .home-project-slide__copy > strong { font-size:14px; }
.home-photo-strip__label strong { font-size:22px; line-height:1.2; }

.me-lat,
.other-kicker,
.qualification-card__meta p,
.qualification-card__kind,
.paper-index,
.project-row__top,
.orgs .ol {
  letter-spacing: var(--track-label);
}

.num,
time,
.study-entry__metrics dd,
.project-row__metric b,
.project-detail-data dd,
.paper-detail-data dd {
  font-variant-numeric: tabular-nums;
}


@media(max-width:800px) {
  .home-identity h1{font-size:34px}
  .home-project-slide.is-lead .home-project-slide__copy>strong{font-size:22px;line-height:1.3}
  .home-project-slide.is-support .home-project-slide__copy>strong{font-size:14px}
  .home-proof strong{font-size:14px}
  .home-photo-strip__label strong{font-size:20px}
}
/* 手机以实际阅读距离设定字号，不沿用桌面元数据的缩小比例。 */
@media(max-width:700px) {
  :root {
    --type-body: 15px;
    --type-compact: 14px;
    --type-meta: 12px;
    --type-label: 11px;
    --type-nav: 15px;
    --type-control: 14px;
    --control-font-size: 14px;
  }
  .paper-head h3 { font-size:19px; line-height:1.45; }
  .paper-head .paper-title-en { font-size:13px; line-height:1.6; }
  .paper-head .paper-authors { font-size:12px; }
  .paper-detail-section__body,
  .project-detail-section__body,
  .project-detail-question { text-align:start; }
}
@media(max-width:360px) {
  :root{--type-display:28px}
  .me-name{font-size:28px}
  .home-identity h1{font-size:32px}
  .home-project-slide.is-lead .home-project-slide__copy>strong{font-size:20px}
  .home-proof strong{font-size:13px}
}
