/* Shared visual system for the academic homepage. */
:root {
    --paper: #faf9f6;
    --ink: #292722;
    --muted: #6b675f;
    --accent: #a64e38;
    --rule: #dedbd3;
    --serif: Georgia, "Times New Roman", serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { background: var(--paper); color: var(--ink); }
body { margin: 0; font: 15px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a:link, a:visited { color: var(--accent); text-decoration: none; }
a:hover, a:active { color: #743824; text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 2px;
}
img { max-width: 100%; }
#content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    align-items: start;
    gap: 40px;
    width: 100%;
    max-width: 1176px;
    margin: 0 auto;
    padding: 56px 48px 64px;
    background: transparent;
}
#left { width: 100%; min-width: 0; }
.profile-container {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0 0 30px;
    font-family: var(--sans);
}
.profile-pic { flex: 0 0 auto; margin: 0; }
.profile-pic img { display: block; width: 160px; height: 160px; mix-blend-mode: multiply; }
.profile-info { min-width: 0; }
.profile-info .name {
    display: block;
    margin: 0 0 8px;
    padding: 0;
    font: 400 40px/1.15 var(--serif);
    letter-spacing: -1px;
}
.profile-info .name-zh { margin: 0 0 12px; }
.name-zh img { display: block; width: auto; height: 36px; mix-blend-mode: multiply; }
.profile-info .affiliation { margin: 0 0 3px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.profile-info .email-link { color: var(--muted); }
.profile-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 9px; font-size: 12px; }
#intro { float: none; clear: none; width: 100%; max-width: none; margin: 0; padding: 0; border: 0; background: transparent; }
#intro .bio-content p {
    margin: 0;
    color: #44413b;
    font: 15px/1.75 var(--sans);
    text-align: justify;
    text-align-last: left;
    overflow-wrap: break-word;
    hyphens: auto;
}
#intro .bio-content .lang-zh { margin-top: 14px; color: var(--muted); font-size: 14px; font-weight: 400; line-height: 1.9; }
.page-section { margin-top: 40px; }
.section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
    clear: both;
    margin: 0 0 18px;
    padding: 0;
    color: var(--ink);
    font: 400 24px/1.3 var(--serif);
    letter-spacing: -0.4px;
}
.section-title:first-of-type { margin-top: 0; }
.section-link { flex-shrink: 0; font: 500 12px/1.6 var(--sans); letter-spacing: 0; }
/* The unenhanced timeline stays readable as a normal document list. */
.career-viewport { overflow: visible; }
.career-chart { --career-gutter: 76px; --career-track-offset: calc(var(--career-gutter) / 2 - 8px); width: 100%; min-width: 0; margin: 0; }
.career-headings { display: none; }
.career-plot { position: relative; }
.career-axis, .career-range { display: none; }
.career-timeline { margin: 0; padding: 0; list-style: none; }
.career-entry { margin-bottom: 16px; }
.career-label { width: auto; }
.career-chart.is-enhanced .career-headings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--career-gutter);
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.75px;
    text-transform: uppercase;
}
.career-chart.is-enhanced .career-headings > span { text-align: center; }
.career-plot.is-ready { height: var(--timeline-height, 320px); }
.career-plot.is-ready .career-axis {
    display: block;
    position: absolute;
    top: var(--axis-top);
    left: 50%;
    height: var(--axis-height);
    border-left: 1px solid #e4e0d8;
}
.career-tick {
    position: absolute;
    top: var(--tick-position);
    left: -1px;
    transform: translate(-50%, -50%);
    padding: 2px 3px;
    background: var(--paper);
    color: #827a6d;
    font-size: 10px;
    line-height: 1.4;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.career-axis-break {
    position: absolute;
    top: var(--break-position);
    left: -4px;
    width: 8px;
    height: 7px;
    border-top: 1px solid #a49d92;
    border-bottom: 1px solid #a49d92;
    background: var(--paper);
    transform: skewY(-30deg);
}
.career-plot.is-ready .career-timeline { position: relative; height: 100%; }
.career-plot.is-ready .career-entry {
    position: absolute;
    top: var(--range-top);
    height: var(--range-height);
    left: 0;
    right: 0;
    margin: 0;
}
.career-plot.is-ready .career-range {
    display: block;
    position: absolute;
    inset: 0 auto 0 calc(50% - var(--career-track-offset) - 1px);
    width: 2px;
    border-radius: 2px;
    background: #b5aa98;
}
.career-range::before, .career-range::after {
    content: "";
    position: absolute;
    left: -1.5px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: inherit;
}
.career-range::before { top: -2.5px; }
.career-range::after { bottom: -2.5px; }
.career-plot.is-ready .career-current .career-range { background: var(--accent); }
.career-plot.is-ready .career-industry .career-range { left: calc(50% + var(--career-track-offset) - 1px); background: #788e83; }
.career-plot.is-ready .career-startup .career-range { background: #4f7161; }
.career-plot.is-ready .career-label { position: relative; top: var(--label-offset); width: calc((100% - var(--career-gutter)) / 2); text-align: center; overflow-wrap: break-word; }
.career-plot.is-ready .career-industry .career-label { margin-left: calc((100% + var(--career-gutter)) / 2); }
.career-date { margin: 0 0 4px; color: var(--muted); font-size: 11px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.career-date time { white-space: nowrap; }
.career-present { color: var(--accent); }
.career-role { margin: 0; padding: 0; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.5; }
.career-focus, .career-organization, .career-note { margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.5; }
.career-organization a { color: var(--ink); }
.career-note a { color: inherit; }
.career-note a:hover, .career-note a:focus-visible { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.career-chart.is-narrow .career-headings { font-size: 10px; letter-spacing: 0.5px; }
.career-chart.is-narrow .career-role { font-size: 13px; }
/* Funding and honors share the same date column. */
.funding-container { margin: 0; }
.funding-card {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: start;
    gap: 20px;
    max-width: none;
    margin: 0;
    padding: 18px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transition: none;
}
.funding-card:first-child { padding-top: 0; }
.funding-card:last-child { padding-bottom: 0; }
.funding-card + .funding-card { border-top: 1px solid var(--rule); }
.funding-year, .award-group-year { padding-top: 1px; color: var(--muted); font: 500 13px/1.7 var(--sans); letter-spacing: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.funding-details { min-width: 0; color: var(--muted); line-height: 1.7; }
.funding-source { display: inline-block; margin: 0 0 5px; font-size: 12px; font-weight: 400; }
.funding-source:link, .funding-source:visited { color: var(--muted); }
.funding-card .funding-title { margin: 0 0 7px; padding: 0; color: var(--ink); font: 500 15px/1.6 var(--sans); }
.funding-program-zh { color: var(--muted); font-size: 12px; font-weight: 400; }
.funding-program { margin-bottom: 8px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.funding-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; }
.funding-role { color: var(--accent); font-weight: 500; }
.funding-duration { color: var(--muted); }
/* Publications and project resource links use one quiet text treatment. */
#publications { width: 100%; }
#publications .section-title + .year-heading { margin-top: 0; }
#publications .year-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 32px 0 18px;
    padding: 0;
    color: #7b7469;
    font: 500 13px/1.5 var(--sans);
    letter-spacing: 0.8px;
    background: none;
    border: 0;
    box-shadow: none;
    transform: none;
    transition: none;
}
#publications .year-heading::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
#publications .paper-card { margin: 0 0 24px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; transition: none; }
#publications .paper-card:hover { box-shadow: none; transform: none; }
#publications .paper-title { display: block; margin: 0; padding: 0; color: var(--ink); font: 600 16px/1.4 var(--serif); }
#publications .paper-title a { color: var(--ink); }
#publications .paper-authors { margin: 3px 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.my-name, #publications .my-name { color: var(--ink); font-weight: 600; text-decoration: none; }
#publications .paper-venue { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 12px; line-height: 1.45; }
.conf-badge, .award-badge, #publications .conf-badge, #publications .award-badge {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--muted);
    font: 400 12px/1.6 var(--sans);
}
.award-badge, #publications .award-badge { color: var(--accent); font-weight: 500; }
.paper-badges, #publications .paper-badges { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 0; margin: 5px 0 0; padding: 0; line-height: 1.6; }
.paper-badges > *, #publications .paper-badges > * { margin: 0; }
.paper-badges .link-btn, #publications .paper-badges .link-btn {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--accent);
    font: 400 12px/1.6 var(--sans);
    text-decoration: none;
    transition: none;
}
.paper-badges .link-btn::before, #publications .paper-badges .link-btn::before { content: none; }
.paper-badges .link-btn + .link-btn::before, #publications .paper-badges .link-btn + .link-btn::before {
    content: "·";
    display: inline;
    width: auto;
    height: auto;
    margin: 0 9px;
    color: #a29a8d;
    background: none;
    font: inherit;
}
.paper-badges .link-btn:hover, #publications .paper-badges .link-btn:hover { text-decoration: underline; text-underline-offset: 3px; background: none; }
#publications .paper-badges { margin-top: 2px; gap: 3px 0; line-height: 1.45; }
#publications .paper-badges .link-btn,
#publications .conf-badge,
#publications .award-badge { line-height: 1.45; }
#publications .code-btn.has-stars { white-space: nowrap; }
#publications .github-stars { margin-left: 4px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.publication-legend { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.awards-container { max-width: none; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.award-group { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 20px; margin-bottom: 22px; }
.award-group:last-child { margin-bottom: 0; }
.award-group-list { min-width: 0; padding: 0; border: 0; }
.awards-container .award-item { display: block; width: 100%; max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; transition: none; }
.awards-container .award-item + .award-item { margin-top: 12px; }
.awards-container .award-item:hover { box-shadow: none; }
.awards-container .award-title { color: var(--ink); font-size: 15px; font-weight: 500; line-height: 1.6; }
.award-detail { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.recognition-label { color: var(--muted); font-size: 11px; letter-spacing: 0.6px; text-transform: uppercase; }
/* Selected industrial projects. */
.internship-card { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; transition: none; }
.internship-card:hover { box-shadow: none; }
.internship-header { display: flex; align-items: center; margin: 0 0 5px; }
.internship-header img { width: 30px; height: 30px; margin-right: 10px; mix-blend-mode: multiply; }
.internship-header .title { padding: 0; font: 600 15px/1.5 var(--sans); }
.internship-header a { color: var(--ink); }
.internship-details, .career-reflection { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.career-reflection { margin-top: 2px; }
.internship-card .project-section { margin: 24px 0 0; padding: 0; }
.internship-card .project-section + .project-section { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--rule); }
.internship-card .project-card { display: block; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
.project-image { margin: 0 0 14px; }
.project-image img { display: block; width: 100%; height: auto; max-height: none; }
.internship-card .project-text { padding: 0; }
.project-title, .project-title-0222 { margin: 0 0 7px; padding: 0; color: var(--ink); font: 600 16px/1.5 var(--sans); overflow-wrap: break-word; }
.project-authors, .project-authors-0222 { margin: 0 0 5px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.project-venue { color: var(--muted); font-size: 12px; line-height: 1.6; }
.project-desc { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.75; text-align: justify; text-align-last: left; hyphens: auto; }
.paper-list-0222 { margin: 18px 0 0; padding: 0; list-style: none; }
.paper-item-0222 { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 20px; }
.paper-item-0222:last-child { margin-bottom: 0; }
.paper-logo-0222 { flex: 0 0 44px; width: 44px; height: 44px; margin: 2px 0 0; object-fit: contain; mix-blend-mode: multiply; }
.paper-content-0222 { min-width: 0; }
.project-title-0222 { font-size: 14px; }
.project-name { font: inherit; color: inherit; }
.site-footer { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 12px; }
/* News remains a separate column on wide screens. */
#news { width: 100%; min-width: 0; margin: 0; padding: 0 0 0 24px; border: 0; border-left: 1px solid var(--rule); border-radius: 0; background: transparent; }
#news h2 { display: block; margin: 0 0 16px; padding: 0; border: 0; color: var(--ink); font: 400 24px/1.3 var(--serif); text-align: left; }
.news-list { margin: 0; padding: 0; border: 0; list-style: none; }
.news-list li { margin: 0 0 16px; padding: 0; }
.news-list li::before { display: none; }
.news-date { margin: 0 0 3px; color: #827a6d; font-size: 11px; font-weight: 500; letter-spacing: 0.2px; font-variant-numeric: tabular-nums; }
.news-content { color: var(--muted); font-size: 12px; line-height: 1.7; }
.news-archive { margin-top: 4px; color: var(--muted); font-size: 12px; }
.news-archive summary { width: fit-content; padding: 4px 0; color: var(--accent); cursor: pointer; }
.news-archive[open] summary { margin-bottom: 12px; }
@media (max-width: 1100px) {
    #content { padding: 40px 28px 56px; gap: 28px; grid-template-columns: minmax(0, 1fr) 180px; }
    .profile-container { gap: 20px; }
    .profile-info .name { font-size: 34px; }
}
@media (max-width: 740px) {
    #content { grid-template-columns: minmax(0, 1fr); max-width: 840px; gap: 40px; padding: 36px 28px 48px; }
    #news { margin-top: 32px; padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--rule); }
    .news-list { display: grid; gap: 12px; }
    .news-list li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; margin: 0; }
    .news-date { margin: 0; line-height: 1.85; }
    .news-archive { margin-top: 12px; }
}
@media (max-width: 600px) {
    #content { padding: 28px 24px 40px; }
    .profile-container { gap: 18px; margin-bottom: 26px; }
    .profile-pic img { width: 120px; height: 120px; }
    .profile-info .name { font-size: 30px; letter-spacing: -0.6px; }
    .name-zh img { height: 30px; }
    .profile-info .name-zh { margin-bottom: 8px; }
    .profile-info .affiliation { font-size: 12px; }
    .section-title { flex-wrap: wrap; gap: 6px 12px; }
    .funding-card, .award-group { grid-template-columns: 64px minmax(0, 1fr); gap: 14px; }
    .funding-year, .award-group-year { font-size: 12px; }
}
@media (max-width: 420px) {
    #content { padding-right: 20px; padding-left: 20px; }
    .profile-container { gap: 14px; }
    .profile-pic img { width: 100px; height: 100px; }
    .profile-info .name { font-size: 27px; }
    .name-zh img { height: 28px; }
    .profile-links { gap: 4px 12px; }
}
@media (max-width: 350px) {
    #content { padding-right: 16px; padding-left: 16px; }
    .profile-container { gap: 12px; }
    .profile-pic img { width: 84px; height: 84px; }
    .profile-info .name { font-size: 24px; }
    .profile-info .affiliation { font-size: 11px; }
    .profile-links { font-size: 11px; }
}
