/* Academic profile and content cards share a restrained paper surface. */
html.academic-document {
    --ui-canvas: #f5f7fa;
    --ui-ink: #252b33;
    --ui-muted: #66717e;
    --ui-line: #e5e8ec;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.academic-home { margin: 0; min-height: 100dvh; font-size: 14px; line-height: 1.8; }
.academic-home a { color: var(--ui-accent); text-decoration: none; }
.academic-home a:hover { text-decoration: underline; text-underline-offset: 3px; }
.academic-home img { display: block; max-width: 100%; }
.academic-home h1, .academic-home h2, .academic-home h3, .academic-home p { margin: 0; }
.academic-home :is(h1, h3, p, .award-list span) { overflow-wrap: anywhere; }
.academic-home [hidden] { display: none !important; }
.academic-layout {
    width: min(var(--ui-width), calc(100% - 2 * var(--ui-gutter)));
    display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px;
    align-items: start; margin: 0 auto; padding: 110px 0 44px;
}
.academic-profile, .academic-section {
    border: 1px solid var(--ui-line); border-radius: 10px;
    background: var(--ui-surface); box-shadow: 0 2px 8px rgb(32 57 88 / 3%);
}
.academic-profile { position: sticky; top: 88px; padding: 24px 22px; text-align: center; }
.profile-photo { width: 128px; height: 180px; margin: 0 auto 18px; object-fit: contain; border-radius: 6px; }
.academic-profile h1 { color: var(--ui-ink); font-size: 25px; font-weight: 600; line-height: 1.4; letter-spacing: .01em; }
.profile-english { margin-top: 2px !important; color: #4a5666; font-size: 16px; }
.academic-content { display: grid; gap: 18px; min-width: 0; }
.academic-section { padding: 26px 30px; scroll-margin-top: 88px; }
.academic-section h2 { margin-bottom: 18px; font-size: 21px; line-height: 1.4; font-weight: 600; letter-spacing: -.02em; }
.academic-section h2 > span { color: #788496; font-size: 13px; font-weight: 400; margin-left: 9px; letter-spacing: 0; }
.academic-section p { color: #3e4c5d; font-weight: 400; }
.academic-section strong { font-weight: 600; }
.academic-bio p { font-size: 15px; line-height: 1.9; }
.academic-bio p + p { margin-top: 14px; }
.academic-background { display: grid; grid-template-columns: 1.05fr 1fr; gap: 30px; }
.academic-background h2 { font-size: 18px; margin-bottom: 18px; }
.academic-background h2 > span { font-size: 12px; }
.education-entry { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-top: 14px; }
.education-entry h3 { font-size: 14px; font-weight: 550; }
.education-entry p, .education-entry time { color: #6c7889; font-size: 12px; }
.education-entry time { padding-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.education-institution { display: flex; align-items: center; gap: 10px; min-width: 0; }
.institution-emblem { width: 48px; height: 48px; flex: 0 0 48px; object-fit: cover; }
.institution-emblem[src$="/tsinghua-high-school-emblem.png"] { object-position: left center; padding: 5px; }
.award-list { list-style: none; margin: 0; padding: 0; }
.award-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 3px 0; font-size: 13px; color: #435267; }
.award-list time { color: #6c7889; font-size: 12px; font-variant-numeric: tabular-nums; }
.academic-news-list { margin: 0; padding: 0; list-style: none; }
.academic-news-list li { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 16px; padding: 7px 0; }
.academic-news-list time { color: #778397; font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1.95; }
.academic-news-list p { font-size: 14px; line-height: 1.9; }
.academic-details { margin-top: 14px; }
.academic-details summary { display: list-item; width: fit-content; cursor: pointer; color: var(--ui-accent); font-size: 12px; }
.academic-details[open] summary { margin-bottom: 12px; }
.academic-detail-copy { font-size: 12px; line-height: 1.9; }
.academic-detail-copy p + p { margin-top: 8px; }
.publication-entry { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 22px; align-items: center; }
.publication-entry > img { width: 136px; height: 94px; object-fit: cover; border-radius: 4px; border: 1px solid var(--ui-line); }
.publication-entry.no-image { grid-template-columns: 1fr; }
.publication-entry + .publication-entry { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--ui-line); }
.publication-authors { font-size: 12px; color: #667489; }
.publication-entry h3 { font-size: 15px; font-weight: 600; line-height: 1.8; text-wrap: pretty; }
.publication-entry .publication-venue { font-size: 13px; color: var(--ui-accent); margin-top: 4px; }
.publication-entry p:last-child { font-size: 12px; color: #748196; }
.academic-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.academic-section-heading > a { font-size: 12px; white-space: nowrap; }
.academic-home .project-grid { display: grid; gap: 0; }
.academic-home .project-card { display: grid; grid-template-columns: 116px minmax(0, 1fr); align-items: start; gap: 22px; padding: 20px 0; border-top: 1px solid #e8edf3; color: inherit; }
.academic-home .project-card:first-child { border-top: 0; padding-top: 2px; }
.academic-home .project-card:last-child { padding-bottom: 0; }
.academic-home .project-card:hover { text-decoration: none; }
.academic-home .project-card > img { width: 116px; aspect-ratio: 1.3; object-fit: cover; border-radius: 4px; border: 1px solid var(--ui-line); }
.academic-home .project-card h3 { font-size: 15px; font-weight: 600; line-height: 1.7; }
.academic-home .project-card:hover h3 { color: var(--ui-accent); }
.academic-home .project-card p { margin: 6px 0; color: #667489; font-size: 12px; line-height: 1.8; }
.academic-home .project-action { color: var(--ui-accent); font-size: 12px; }
.academic-home .project-empty { color: #69778b; font-size: 13px; }
.academic-contact > p { font-size: 13px; }
.academic-home .resume-form { padding-top: 6px; }
.academic-home .resume-form p { font-size: 13px; }
.academic-home .resume-form label { display: block; margin: 14px 0 6px; font-size: 12px; color: #667489; }
.resume-fields { display: flex; gap: 10px; max-width: 520px; }
.resume-fields input { flex: 1; min-width: 0; height: 42px; border: 1px solid var(--ui-line); border-radius: 6px; padding: 10px 12px; font: inherit; background: #fff; }
.resume-fields .button { min-height: 42px; font-size: 12px; padding: 8px 16px; cursor: pointer; }
.resume-status { margin-top: 8px !important; }
.resume-status.is-error { color: #b54848; }
.resume-status.is-success { color: #28674a; }
.academic-footer { width: min(var(--ui-width), calc(100% - 2 * var(--ui-gutter))); margin: 0 auto; padding: 22px 0 30px; border-top: 1px solid var(--ui-line); color: #7c8899; font-size: 11px; }
.academic-footer a { color: inherit; }
@media (max-width: 1000px) {
    .academic-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 22px; }
    .academic-profile { padding: 22px 18px; }
    .academic-section { padding: 24px; }
    .profile-photo { width: 128px; height: 180px; }
    .academic-background { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 700px) {
    .academic-layout { grid-template-columns: 1fr; padding: 84px 0 32px; gap: 18px; }
    .academic-profile { position: static; display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 18px; text-align: left; padding: 22px; }
    .profile-photo { grid-column: 1; grid-row: 1 / 3; width: 96px; height: 112px; margin: 0; }
    .academic-profile h1 { grid-column: 2; align-self: end; font-size: 23px; line-height: 1.3; }
    .profile-english { grid-column: 2; align-self: start; font-size: 14px; }
    .academic-content { gap: 16px; }
    .academic-section { padding: 22px; }
    .education-entry { flex-direction: column; gap: 3px; }
    .education-entry time { margin-left: 58px; }
    .academic-section h2 { font-size: 19px; margin-bottom: 16px; }
    .academic-section h2 > span { font-size: 12px; }
    .academic-background h2 { font-size: 17px; }
    .academic-bio p { font-size: 14px; line-height: 1.9; }
    .academic-news-list li { grid-template-columns: 57px minmax(0, 1fr); gap: 12px; }
    .academic-news-list time { font-size: 11px; }
    .publication-entry { grid-template-columns: 1fr; gap: 14px; }
    .publication-entry > img { width: 144px; height: 94px; }
    .publication-entry h3 { font-size: 14px; }
    .academic-home .project-card { grid-template-columns: 76px minmax(0, 1fr); gap: 14px; }
    .academic-home .project-card > img { width: 76px; }
    .academic-home .project-card h3 { font-size: 14px; }
    .resume-fields { flex-wrap: wrap; }
    .resume-fields input { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
