/* Ziyi Francis Yin — static personal website.
   Edit these variables to change the palette and type across all pages. */
:root {
  --ink: #20262c;
  --muted: #5e6973;
  --accent: #254e73;
  --line: #e2e6e9;
  --paper: #fff;
  --soft: #f6f8fa;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
.wrap { width: min(100% - 6rem, 70rem); margin-inline: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration: underline; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 1px; }
img { display: block; max-width: 100%; height: auto; }
p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { text-wrap: pretty; }
p, li { overflow-wrap: break-word; }
strong { font-weight: 600; }
main:focus { outline: none; }
.skip-link { position: fixed; top: .75rem; left: 1rem; z-index: 5; padding: .65rem 1rem; color: white; background: var(--accent); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.site-header { min-height: 5rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: flex-start; gap: 2rem; }
.site-header nav ul { display: flex; flex-wrap: wrap; gap: .2rem 2rem; list-style: none; margin: 0; padding: 0; }
.site-header nav a { display: inline-block; padding: .7rem 0; color: var(--muted); text-decoration: none; font-size: .9rem; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--accent); }
.site-header nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: .55rem; text-decoration-thickness: 1.5px; }
.introduction { display: grid; grid-template-columns: minmax(0,1fr) 13.25rem; column-gap: 6rem; padding: 5.1rem 0 3.8rem; align-items: start; }
.role { font-size: .9375rem; color: var(--muted); margin-bottom: 1.35rem; }
.role span { color: #a6b0b9; padding: 0 .65rem; }
h1 { font-family: var(--sans); font-size: clamp(2.7rem, 4.8vw, 4.15rem); font-weight: 400; line-height: 1.1; letter-spacing: -.04em; }
.chinese-name { margin-top: .8rem; font-size: 1.55rem; letter-spacing: .16em; font-family: var(--sans); color: var(--muted); }
.chinese-name span { font-family: var(--sans); font-size: .875rem; letter-spacing: 0; margin-left: .9rem; vertical-align: middle; }
.bio { margin-top: 2rem; max-width: 42rem; font-size: 1.095rem; line-height: 1.8; }
.bio p + p { margin-top: 1rem; }
.bio a { text-decoration: none; border-bottom: 1px solid #b9c8d5; }
.primary-links { display: flex; flex-wrap: wrap; gap: .6rem 1.75rem; margin-top: 1.7rem; font-size: .9375rem; }
.text-link { text-decoration: none; border-bottom: 1px solid #bdcbd7; }
.text-link span { margin-left: .25rem; }
.profile { padding-top: .2rem; }
.profile img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; }
.profile-location { color: var(--muted); font-size: .875rem; margin: 1rem 0 .8rem; }
.profile-links { display: flex; flex-wrap: wrap; column-gap: 1.15rem; row-gap: .3rem; font-size: .875rem; }
.profile-links a { text-decoration: none; }
.section-grid { display: grid; grid-template-columns: 13rem minmax(0,1fr); column-gap: 3rem; }
.section-grid > h2 { font-family: var(--sans); font-size: 1.4rem; line-height: 1.4; font-weight: 400; letter-spacing: -.015em; }
.research-section { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 2.4rem 0; }
.interests { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2rem; row-gap: .48rem; list-style: none; margin: 0; padding: 0; }
.interests li { position: relative; padding-left: .85rem; }
.interests li::before { content: ""; position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #8395a5; top: .75rem; left: 0; }
.news-section { padding: 3.2rem 0 1rem; }
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li { display: grid; grid-template-columns: 5.7rem minmax(0,1fr); gap: 1rem; padding: 0 0 1.35rem; font-size: .975rem; line-height: 1.75; }
.news-list time { color: var(--muted); font-size: .875rem; padding-top: .08rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.news-list a { text-decoration: none; }
.news-list a:hover { text-decoration: underline; }
.news-archive { margin-top: .4rem; border-top: 1px solid var(--line); }
.news-archive summary { color: var(--accent); cursor: pointer; padding: 1.05rem 0; font-size: .9375rem; }
.news-archive summary span { color: var(--muted); margin-left: .5rem; font-size: .875rem; }
.news-archive[open] summary { margin-bottom: .8rem; }
.site-footer { border-top: 1px solid var(--line); margin-top: 5.5rem; padding-top: 1.65rem; padding-bottom: 2.4rem; color: var(--muted); font-size: .875rem; }
.footer-line { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; }
.footer-line a { text-decoration: none; color: var(--muted); }
.footer-profiles { margin-top: .9rem; display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; }
.footer-profiles a { color: var(--muted); text-decoration: none; }
.inner-page { min-height: 62vh; }
.page-heading { padding-top: 4.2rem; padding-bottom: 3rem; max-width: 51rem; }
.page-heading h1 { font-size: clamp(2.6rem,4.4vw,3.6rem); }
.page-heading > p, .page-heading > div > p { margin-top: 1.3rem; color: var(--muted); line-height: 1.75; max-width: 42rem; }
.page-heading a { text-decoration: none; }
.page-heading .page-note { font-size: .875rem; margin-top: .65rem; }
.archive-layout { display: grid; grid-template-columns: 7.4rem minmax(0,1fr); gap: 3rem; }
.year-nav { align-self: start; position: sticky; top: 2rem; display: flex; flex-direction: column; gap: .2rem; }
.year-nav > span { color: var(--muted); font-size: .875rem; margin-bottom: .45rem; }
.year-nav a { width: fit-content; padding: .28rem 0; text-decoration: none; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.year-group { scroll-margin-top: 2rem; }
.year-group + .year-group { margin-top: 3.6rem; }
.year-heading { font-family: var(--sans); font-weight: 400; font-size: 1.95rem; line-height: 1.1; letter-spacing: -.025em; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.record { padding: 1.6rem 0 1.75rem; border-bottom: 1px solid var(--line); }
.record h3 { font-size: 1.16rem; font-weight: 600; line-height: 1.5; max-width: 48rem; letter-spacing: -.012em; }
.record h3 a { text-decoration: none; color: var(--ink); }
.record h3 a:hover { color: var(--accent); text-decoration: underline; }
.authors { margin-top: .5rem; font-size: .9375rem; color: var(--muted); line-height: 1.7; }
.authors strong { color: var(--ink); }
.authors ins { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.venue { margin-top: .25rem; font-size: .9375rem; }
.venue em { font-style: normal; }
.record-meta { margin-top: .2rem; font-size: .875rem; color: var(--muted); }
.record-meta span { padding: 0 .25rem; }
.resource-links { display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; margin-top: .7rem; font-size: .875rem; }
.resource-links a { text-decoration: none; }
.resource-links a:hover { text-decoration: underline; }
.recognition { margin-top: .7rem; border-left: 2px solid #9bb0c3; padding-left: .7rem; font-size: .875rem; color: var(--accent); }
.recognition a { text-decoration: none; }
.recognition p + p { margin-top: .35rem; }
.honors { border-top: 1px solid var(--line); padding-top: 2.5rem; }
.awards-list { list-style: none; padding: 0; margin: 0; }
.awards-list li { padding: 0 0 1.3rem; margin-bottom: 1.3rem; border-bottom: 1px solid var(--line); }
.awards-list a { text-decoration: none; }
.awards-list em { font-style: normal; color: var(--muted); }
.cv-heading { display: flex; gap: 2rem; justify-content: space-between; align-items: center; max-width: none; }
.download-link { color: var(--paper); background: var(--accent); padding: .7rem 1rem; font-size: .9375rem; white-space: nowrap; }
.download-link:hover { background: #1a3b58; text-decoration: none; }
.download-link span { margin-left: 1.25rem; font-size: .875rem; }
.cv-document { border: 1px solid var(--line); background: var(--soft); }
.cv-document object { display: block; width: 100%; height: 70rem; min-height: 70vh; border: 0; }
.cv-document object p { margin: 2rem; }
.cv-fallback { font-size: .9375rem; margin-top: 1rem; }
@media (max-width: 1000px) {
 .wrap { width: min(100% - 4rem,70rem); }
 .introduction { column-gap: 3rem; grid-template-columns: minmax(0,1fr) 11.5rem; }
 .section-grid { grid-template-columns: 10.5rem minmax(0,1fr); gap: 2rem; }
 .interests { grid-template-columns: 1fr; }
 .site-header nav ul { column-gap: 1.25rem; }
}
@media (max-width: 700px) {
 html { scroll-padding-top: 1rem; }
 .wrap { width: calc(100% - 2.5rem); }
 .site-header { min-height: 0; padding-block: 1rem; }
 .site-header nav { margin-top: 0; }
 .site-header nav ul { column-gap: 1.2rem; row-gap: 0; }
 .site-header nav a { font-size: .875rem; padding-block: .45rem; }
 .site-header nav a[aria-current="page"] { text-underline-offset: .38rem; }
 .introduction { grid-template-columns: 1fr; gap: 2rem; padding: 2.8rem 0 2.5rem; }
 .role { margin-bottom: 1rem; }
 .bio { margin-top: 1.4rem; font-size: 1.0625rem; }
 .primary-links { gap: .8rem 1.4rem; }
 .profile { display: grid; grid-template-columns: 5.5rem minmax(0,1fr); grid-template-rows: auto 1fr; gap: .2rem 1.2rem; align-items: start; }
 .profile img { grid-row: 1 / 3; }
 .profile-location { margin: 0 0 .2rem; }
 .profile-links { gap: .25rem 1.1rem; max-width: 16rem; }
 .section-grid { grid-template-columns: 1fr; gap: 1.35rem; }
 .research-section { padding: 1.9rem 0; }
 .interests { grid-template-columns: 1fr 1fr; gap: .7rem 1rem; font-size: .9375rem; }
 .news-section { padding-top: 2.2rem; }
 .news-list li { grid-template-columns: 4.7rem minmax(0,1fr); gap: .75rem; font-size: .9375rem; }
 .news-list time { font-size: .875rem; }
 .site-footer { margin-top: 3.2rem; }
 .footer-profiles { gap: .6rem 1.2rem; }
 .page-heading { padding-top: 2.8rem; padding-bottom: 2.1rem; }
 .archive-layout { grid-template-columns: 1fr; gap: 2rem; }
 .year-nav { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .25rem 1.15rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
 .year-nav > span { margin: 0; }
 .year-heading { font-size: 1.8rem; }
 .record { padding-top: 1.3rem; padding-bottom: 1.4rem; }
 .record h3 { font-size: 1.125rem; }
 .authors, .venue { font-size: .9375rem; }
 .year-group + .year-group { margin-top: 2.7rem; }
 .cv-heading { display: block; }
 .download-link { display: inline-block; margin-top: 1.5rem; }
 .cv-document object { height: 45rem; }
}
@media (max-width: 370px) {
 .wrap { width: calc(100% - 2rem); }
 .site-header nav ul { column-gap: 1rem; }
 .interests { grid-template-columns: 1fr; }
 .news-list li { grid-template-columns: 1fr; gap: .15rem; }
 .primary-links { font-size: .9rem; }
 h1 { font-size: 2.55rem; }
}
@media (prefers-reduced-motion: reduce) {
 html { scroll-behavior: auto; }
}
@media print {
 html { scroll-behavior: auto; }
 body { font-size: 10pt; }
 .wrap { width: 100%; }
 .site-header, .year-nav, .site-footer, .skip-link, .download-link { display: none; }
 .introduction, .page-heading { padding-top: 0; }
 .archive-layout { display: block; }
 .record, .news-list li { break-inside: avoid; }
 .record h3 { font-size: 12pt; }
 a { color: inherit; }
 .news-archive { display: block; }
}
