/* 主题颜色和字体。修改这里可以调整整个网站的外观。 */
:root {
  color-scheme: light;
  --ink: #343b40;
  --muted: #737c84;
  --blue: #367ca5;
  --line: #e9edf0;
  --blank: #e4e9ed;
  --canvas: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6.5rem; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
a:hover { color: #225d82; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 5px; border-radius: 2px; }
.skip-link { position: absolute; top: -5rem; left: 1rem; padding: .5rem 1rem; background: white; z-index: 30; }
.skip-link:focus { top: .75rem; }

.masthead { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 97%); }
.masthead-inner { max-width: 1280px; margin: auto; padding: 0 2.25rem; min-height: 76px; display: flex; align-items: center; gap: 3.5rem; }
.site-title { flex: 0 0 auto; color: #30373c; font-size: 1.2rem; font-weight: 750; letter-spacing: -.025em; text-decoration: none; }
.site-title:hover { color: #30373c; }
.site-title-dot { color: var(--blue); }
.site-navigation { display: flex; align-items: center; gap: 1.7rem; }
.nav-link { position: relative; padding: 1.45rem 0; color: #626c74; white-space: nowrap; text-decoration: none; font-size: .9rem; font-weight: 550; }
.nav-link:hover, .nav-link.is-active { color: var(--ink); }
.nav-link::after { content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--blue); transform: scaleX(0); transition: transform .15s ease; }
.nav-link.is-active::after { transform: scaleX(1); }
.menu-toggle { display: none; }

.page-layout { max-width: 1280px; margin: 0 auto; padding: 3.15rem 2.25rem 2rem; display: grid; grid-template-columns: 225px minmax(0, 1fr); column-gap: 4rem; align-items: start; }
.profile { position: sticky; top: 7.75rem; min-width: 0; }
.profile-avatar { display: block; width: 172px; height: 172px; object-fit: cover; border-radius: 50%; border: 5px solid #fff; outline: 1px solid var(--line); margin: .1rem 0 1.6rem; }
.avatar-placeholder { display: grid; place-items: center; width: 172px; height: 172px; margin: .1rem 0 1.6rem; border: 1px dashed #cdd6dc; border-radius: 50%; background: #fafbfc; color: #929da6; font-size: .875rem; letter-spacing: .045em; }
.profile-name { margin: 0 0 .5rem; font-size: 1.35rem; line-height: 1.5; font-weight: 700; overflow-wrap: anywhere; }
.profile-affiliation { margin: 0 0 .5rem; font-size: 1rem; line-height: 1.55; }
.profile-position { margin: 0; font-size: .875rem; line-height: 1.65; color: var(--muted); }
/* :empty 只匹配没有文字和子元素的元素；HTML 注释不会影响匹配。
   填入文字后，占位线会自动消失。空元素中不要加入额外空格或换行。 */
.fill-in:empty { display: block; min-height: 1.25rem; border-bottom: 1px dashed var(--blank); }
.profile-name.fill-in:empty { width: 82%; min-height: 1.8rem; margin-bottom: .65rem; }
.profile-affiliation.fill-in:empty { width: 93%; margin-bottom: .5rem; }
.profile-position.fill-in:empty { width: 71%; }
.profile-divider { width: 2.2rem; height: 1px; background: #dce3e8; margin: 1.5rem 0 1.2rem; }
.profile-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .65rem; font-size: .875rem; }
.profile-links li { min-width: 0; }
.profile-link, .profile-link-empty { display: flex; align-items: center; gap: .65rem; min-height: 24px; }
.profile-link { color: #535f68; text-decoration: none; }
.profile-link[href]:hover { color: var(--blue); text-decoration: underline; }
.profile-link:not([href]) { color: #78838c; cursor: default; }
.profile-link-empty { color: #78838c; }
.profile-icon { width: 16px; height: 16px; flex: 0 0 auto; color: #6e7982; }
.contact-value { min-width: 0; overflow-wrap: anywhere; }
.contact-blank { flex: 1; overflow-wrap: anywhere; }

.main-content { min-width: 0; }
.content-section { scroll-margin-top: 6.5rem; margin-bottom: 3rem; }
.section-heading { display: flex; align-items: baseline; gap: .55rem; margin: 0 0 1.2rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); font-size: 1.45rem; font-weight: 650; line-height: 1.55; letter-spacing: -.022em; }
.heading-icon { font-size: 1.2rem; flex: 0 0 auto; }
.about-section .section-heading { font-size: 1.6rem; margin-bottom: 1.15rem; }
.about-copy { margin: 0 0 1rem; overflow-wrap: anywhere; }
.about-copy.fill-in:empty:last-child { width: 78%; }
.entry-venue.fill-in:empty { width: 40%; }
.entry-date.fill-in:empty { max-width: 8rem; }
.dated-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.dated-row { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 1.4rem; align-items: baseline; }
.entry-date { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .875rem; }
.entry-description { margin: .4rem 0 0; color: #5b666f; font-size: .95rem; overflow-wrap: anywhere; white-space: pre-line; }
.entry-title { margin: 0; font-size: 1.05rem; font-weight: 650; line-height: 1.55; overflow-wrap: anywhere; }
.entry-title a { text-decoration: none; }
.entry-title a:hover { text-decoration: underline; }
.entry-meta { color: #65717b; font-size: .875rem; margin: .45rem 0; overflow-wrap: anywhere; }
.entry-venue { display: inline-block; margin-bottom: .5rem; color: #53616c; font-size: .8125rem; font-weight: 600; }
.publication-list, .project-list, .experience-list { display: grid; gap: 1.7rem; }
.publication, .project { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 1.45rem; align-items: start; }
.entry-image { width: 168px; height: 112px; object-fit: contain; background: #fafbfc; border: 1px solid var(--line); border-radius: 4px; }
.entry-image-empty { min-height: 112px; width: 168px; border: 1px dashed #dce3e8; border-radius: 4px; background: #fbfcfd; }
.publication.entry-no-image, .project.entry-no-image { grid-template-columns: minmax(0, 1fr); }
.entry-links { display: flex; flex-wrap: wrap; gap: .45rem 1rem; margin-top: .6rem; font-size: .875rem; }
.entry-links a { text-decoration: none; }
.entry-links a:hover { text-decoration: underline; }
.project-details { margin-top: .75rem; font-size: .95rem; }
.project-details summary { width: fit-content; cursor: pointer; color: var(--blue); font-size: .875rem; }
.project-details p { white-space: pre-line; }
.experience { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; }
.experience-body { min-width: 0; flex: 1; }
.experience-logo { width: 72px; height: 72px; object-fit: contain; flex: 0 0 auto; }
.page-footer { border-top: 1px solid var(--line); padding-top: 1.2rem; margin-top: 3.2rem; display: flex; justify-content: space-between; gap: .7rem 1.5rem; flex-wrap: wrap; color: var(--muted); font-size: .8125rem; }
.page-footer a { color: var(--muted); text-decoration: none; }
.page-footer a:hover { color: var(--blue); }

/* 响应式布局：屏幕变窄时收起导航、缩小侧栏，手机上改为单列。 */
@media (max-width: 1160px) {
  .masthead-inner { gap: 2.25rem; }
  .site-navigation { gap: 1.2rem; }
  .nav-link { font-size: .875rem; }
  .page-layout { grid-template-columns: 210px minmax(0, 1fr); column-gap: 2.75rem; }
}

@media (max-width: 1000px) {
  .masthead-inner { flex-wrap: wrap; justify-content: space-between; min-height: 68px; gap: 0; padding-inline: 1.5rem; }
  .menu-toggle { display: flex; align-items: center; gap: .45rem; padding: .45rem .2rem .45rem .7rem; background: none; color: #59656f; border: 0; cursor: pointer; font-size: .875rem; }
  .site-navigation { width: 100%; display: flex; flex-wrap: wrap; gap: 0 1.75rem; padding: .35rem 0 .8rem; }
  .js-enabled .site-navigation { display: none; }
  .js-enabled .site-navigation.is-open { display: flex; }
  .nav-link { padding: .5rem 0; }
  .nav-link::after { bottom: .25rem; }
  .page-layout { padding: 2.5rem 1.5rem 2rem; column-gap: 2rem; grid-template-columns: 190px minmax(0, 1fr); }
  .profile { top: 6.6rem; }
  .profile-avatar, .avatar-placeholder { width: 156px; height: 156px; }
  .publication, .project { grid-template-columns: 138px minmax(0, 1fr); gap: 1.1rem; }
  .entry-image, .entry-image-empty { width: 138px; height: 98px; min-height: 98px; }
}

@media (max-width: 700px) {
  html { scroll-padding-top: 6rem; }
  .masthead-inner { padding-inline: 1.25rem; }
  .site-navigation { gap: 0 1.3rem; }
  .page-layout { display: block; padding: 1.85rem 1.25rem 1.5rem; }
  .profile { position: static; display: grid; grid-template-columns: 100px minmax(0, 1fr); column-gap: 1.4rem; margin-bottom: 2.75rem; }
  .profile-avatar, .avatar-placeholder { grid-column: 1; grid-row: 1 / span 3; width: 100px; height: 100px; margin: .25rem 0 0; font-size: .8125rem; }
  .profile-name, .profile-affiliation, .profile-position { grid-column: 2; }
  .profile-name { font-size: 1.2rem; margin-bottom: .3rem; align-self: end; }
  .profile-affiliation { font-size: .9375rem; margin-bottom: .3rem; }
  .profile-position { font-size: .875rem; }
  .profile-divider { display: none; }
  .profile-links { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 1.4rem; margin-top: 1.45rem; }
  .content-section { margin-bottom: 2.5rem; scroll-margin-top: 6rem; }
  .section-heading, .about-section .section-heading { font-size: 1.3rem; padding-bottom: .5rem; }
  .heading-icon { font-size: 1.1rem; }
  .dated-row { grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1rem; }
  .publication, .project { grid-template-columns: 110px minmax(0, 1fr); gap: 1rem; }
  .entry-image, .entry-image-empty { width: 110px; height: 86px; min-height: 86px; }
  .entry-title { font-size: 1rem; }
  .experience-logo { width: 56px; height: 56px; }
}

@media (max-width: 400px) {
  .profile { column-gap: 1rem; }
  .profile-links { grid-template-columns: 1fr; gap: .55rem; }
  .publication, .project { grid-template-columns: 1fr; }
  .entry-image, .entry-image-empty { width: 100%; max-width: 168px; height: 104px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
