/* Shared type system for the current bilingual laboratory website.
   Layout remains in rebuild.css. Use these roles for new components.
   Native fonts need no download and include explicit CJK fallbacks. */
:root {
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC",
    "Helvetica Neue", Arial, sans-serif;
  --type-caption: .8125rem;
  --type-small: .875rem;
  --type-body: 1rem;
  --type-card: 1.25rem;
  --type-section: 1.75rem;
  --type-page: 2.25rem;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-heading: 600;
  --leading-body: 1.75;
  --ink: #242a31;
  --muted: #59636e;
}

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.site-shell {
  font-family: var(--font-ui);
  font-size: var(--type-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  letter-spacing: normal;
}
.site-shell :is(button, input, select, textarea) { font: inherit; }
.site-shell :is(h1, h2, h3, h4) {
  font-family: var(--font-ui);
  font-weight: var(--weight-heading);
  letter-spacing: normal;
  color: var(--ink);
}
.site-shell :is(strong, b) { font-weight: var(--weight-heading); }
.site-shell :is(time, .student-meta, .output-year, .conference-year, .direction-number) {
  font-variant-numeric: lining-nums tabular-nums;
}

/* Masthead: a clear name and readable English subtitle at every width. */
.site-header .header-inner { flex-wrap: wrap; }
.site-header .header-tools { margin-left: auto; }
.site-header .site-search { height: auto; min-height: 40px; }
.site-header .brand-title {
  font-family: var(--font-ui);
  font-size: 1.5rem;
  font-weight: var(--weight-heading);
  line-height: 1.4;
  letter-spacing: normal;
}
.site-header .brand-title small {
  font-size: .6875rem;
  font-weight: var(--weight-regular);
  line-height: 1.5;
  letter-spacing: normal;
  margin-top: 6px;
}
.site-header .header-tools { font-size: var(--type-small); }
.site-header :is(.language-link, .legacy-site-link) {
  font-weight: var(--weight-medium);
  letter-spacing: normal;
}
.site-shell .nav-inner a { font-size: .9375rem; font-weight: var(--weight-medium); line-height: 1.5; white-space: normal; }
.site-shell :is(.eyebrow, .section-kicker) {
  font-size: var(--type-caption);
  font-weight: var(--weight-medium);
  line-height: 1.5;
  letter-spacing: .025em;
}

/* Page / section / card: 36 / 28 / 20 px on a 16 px browser default. */
.site-shell :is(.page-head h1, .page-title, .profile-identity h1, .founder-feature h2, .faculty-feature h2) {
  font-size: var(--type-page);
  line-height: 1.35;
  font-weight: var(--weight-heading);
  letter-spacing: normal;
}
.site-shell :is(.section-heading h2, .home-lab-summary h2, .home-section-title, .site-section h2, .project-overview h2) {
  font-size: var(--type-section);
  font-weight: var(--weight-heading);
  line-height: 1.4;
  letter-spacing: normal;
}
.site-shell :is(.article-body h2, .profile-body h2, .team-section h2, .research-topics h2, .conference-journal h3) {
  font-size: 1.5rem;
  font-weight: var(--weight-heading);
  line-height: 1.5;
}
.site-shell :is(.home-news-list h3, .research-card h3, .research-project-copy h3,
  .research-list h3, .research-framework h2, .platform-card h2, .platform-card h3,
  .progress-card h2, .search-results h2, .conference-card h2, .event-item h3,
  .output-item h3, .person-card h3, .article-body h3) {
  font-size: var(--type-card);
  font-weight: var(--weight-medium);
  line-height: 1.5;
}

/* Reading copy stays regular-weight, with a neutral colour and measured leading. */
.site-shell :is(.article-body, .overview-copy, .intro-statement > p,
  .home-lab-summary p, .research-framework p, .research-topics p,
  .person-profile .profile-body, .founder-feature p:not(.faculty-role), .project-overview > p) {
  font-size: var(--type-body);
  line-height: var(--leading-body);
  font-weight: var(--weight-regular);
  color: var(--ink);
}
.site-shell :is(.page-lead, .page-head > .site-container > p, .profile-role, .faculty-role) {
  font-size: 1.0625rem;
  line-height: var(--leading-body);
  font-weight: var(--weight-regular);
  color: var(--muted);
}
.site-shell :is(.home-news-list p, .research-card p, .research-project-copy p,
  .platform-card p, .search-results p, .person-card p) {
  font-size: .9375rem;
  line-height: var(--leading-body);
  color: var(--muted);
}
.site-shell :is(.student-meta, .person-card small, .page-breadcrumb, .page-meta,
  .home-news-list time, .paper-authors, .paper-citation, .output-venue,
  .detail-figure figcaption, .project-gallery figcaption, .footer-inner p) {
  font-size: var(--type-caption);
  line-height: 1.65;
}
.site-shell :is(.button-link, .text-link, .section-heading > a, .home-lab-summary > a) {
  font-size: var(--type-small);
  font-weight: var(--weight-medium);
}
.site-shell :is(.research-number, .direction-number, .conference-year,
  .output-year, .research-topics > section > span, .focus-list > div > span, .team-portrait) {
  font-family: var(--font-ui);
  font-weight: var(--weight-regular);
  letter-spacing: normal;
}
.site-shell .research-direction-list a { font-size: var(--type-body); line-height: 1.6; }
.site-shell .paper-copy h3 {
  font-family: var(--font-ui);
  font-size: .9375rem;
  font-weight: var(--weight-medium);
  line-height: 1.6;
  word-break: normal;
  overflow-wrap: break-word;
}
.site-shell :is(.profile-publications a, .home-certificate-card h3) {
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
  line-height: 1.65;
}
.site-shell .profile-publications span { font-size: var(--type-small); line-height: 1.65; }
.site-shell .profile-body .profile-publications li { margin-bottom: 24px; }
.site-shell .footer-wordmark { font-size: 2rem; font-weight: var(--weight-heading); letter-spacing: -.02em; }
.site-shell .footer-wordmark b { font-weight: inherit; }
.site-shell .footer-links a { font-size: var(--type-small); }

@media (max-width: 1250px) {
  .site-header .brand-title { font-size: 1.3125rem; }
}
@media (max-width: 760px) {
  :root { --type-section: 1.5rem; --type-page: 1.875rem; --type-card: 1.1875rem; }
  .site-header .brand-title { font-size: clamp(1rem, 4.4vw, 1.1875rem); }
  .site-header .brand-title small { font-size: .625rem; line-height: 1.5; max-width: 30em; }
  .site-header .header-tools { gap: 12px !important; font-size: var(--type-caption); }
  .site-header .legacy-site-link { font-size: var(--type-caption); }
  .site-shell .site-search-input { font-size: var(--type-small); }
  .site-shell :is(.article-body h2, .profile-body h2, .team-section h2) { font-size: 1.375rem; }
  .site-shell .profile-identity h1 { font-size: 1.75rem; }
  .site-shell .profile-role { font-size: var(--type-small); }
  .site-shell .person-card p { font-size: var(--type-small); }
  .site-shell .home-certificate-card h3 { font-size: var(--type-small); }
}
@media (max-width: 360px) {
  .site-shell .profile-identity h1 { font-size: 1.5rem; }
  .site-header .brand-mark { width: 36px; height: 36px; }
}
