/* Revision 4: one body size, compact research rows, and balanced reading width. */
:root { --ink: #272631; --muted: #625d6b; --rule: #e8e5ee; --purple: #6545ad; --body-size: 16px; }
.main-content { font-size: var(--body-size); line-height: 1.65; color: #3d3b43; }
.main-content p, .main-content ul, .main-content ol, .main-content li,
.main-content details, .main-content summary { font-size: inherit; }
.main-content h1, .main-content h2, .main-content h3 { color: var(--ink); line-height: 1.4; font-weight: 600; }
/* The theme's heading mixins use !important; override them to keep this scale at every width. */
.main-content h1 { font-size: 32px !important; }
.main-content h2 { margin-top: 2.5rem; font-size: 24px !important; }
.main-content h3 { margin-top: 1.5rem; font-size: 20px !important; }
.main-content a { text-underline-offset: 3px; overflow-wrap: anywhere; }
.main-content a:focus-visible, .main-content summary:focus-visible { outline: 2px solid var(--purple); outline-offset: 4px; }
.main-content main > hr { margin: 2rem 0; }
.profile-header { display: flex; align-items: center; gap: 1.7rem; padding-top: .6rem; }
.profile-photo { border-radius: 50%; width: 152px; height: 152px; object-fit: cover; flex: 0 0 152px; border: 4px solid #f2eef8; }
.main-content .profile-copy h1 { line-height: 1.3; margin: 0 0 .65rem; }
.name-zh { display: inline-block; font-size: 24px; font-weight: 400; color: var(--muted); margin-left: .3rem; }
.profile-role { margin: 0 0 .55rem; font-weight: 600; }
.profile-affiliation { margin: 0 0 .6rem; color: var(--muted); }
.profile-links { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; padding: 1.2rem 0 1.3rem; border-bottom: 1px solid var(--rule); }
.research-focus { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .7rem; margin: 1.15rem 0 0; }
.methods { --accent: #4d788e; --tint: #f0f6f8; --edge: #6398b0; }
.ai { --accent: #755e98; --tint: #f5f1fa; --edge: #9b82bb; }
.health { --accent: #4c7b61; --tint: #f0f7f3; --edge: #6da588; }
.main-content .focus-item { display: flex; flex-direction: column; padding: 1rem; border-top: 3px solid var(--edge); border-radius: 0 0 4px 4px; background: var(--tint); color: var(--ink); text-decoration: none; }
.focus-item:hover { box-shadow: inset 0 0 0 1px var(--edge); }
.focus-item strong { margin-bottom: .6rem; line-height: 1.5; }
.focus-item > span { color: #58565f; }
.section-link { text-align: right; margin-top: .7rem; }
.news-row { display: grid; grid-template-columns: 96px minmax(0,1fr); gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--rule); }
.news-date { color: var(--muted); }
.news-body > p:first-child { margin-top: 0; }
.news-body > p:last-child { margin-bottom: 0; }
.main-content summary { cursor: pointer; color: var(--purple); }
.news-note { margin-top: .6rem; }
.news-note > p { color: var(--muted); padding-left: .85rem; border-left: 2px solid #dcd3ee; margin-bottom: .25rem; }
.archive-toggle { padding: .85rem 0; border-bottom: 1px solid var(--rule); }
.archive-toggle[open] > summary { margin-bottom: .7rem; }
.contact-note { margin-top: 2.5rem; padding: .8rem 1.15rem; background: #f7f5fa; border-left: 3px solid #a48ac4; }
.contact-note p { margin: .4rem 0; }
.updated { color: var(--muted); margin-top: 1.4rem; }
.research-map { margin: 1.4rem 0; }
.research-map img { display: block; width: 100%; height: auto; }
.research-pillar { border-left: 3px solid var(--edge); background: var(--tint); padding: .7rem 1rem; margin: .8rem 0; }
.research-pillar p { margin: .15rem 0; }
.featured-papers { border-top: 1px solid var(--rule); }
.featured-paper { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 1.25rem; align-items: center; padding: .65rem 0; border-bottom: 1px solid var(--rule); }
.featured-image { display: flex; align-items: center; justify-content: center; height: 128px; padding: .45rem; border: 1px solid var(--rule); border-radius: 4px; background: #fff; }
.featured-image img { width: 100%; height: 100%; object-fit: contain; }
.main-content .featured-paper h3 { margin: 0 0 .25rem; }
.featured-copy p { margin: .2rem 0 0; }
.featured-meta { color: var(--muted); }
.publication-summary { padding: .85rem 1rem; border-left: 3px solid var(--purple); background: #f7f4fb; }
.publication-summary p { margin: .2rem 0; }
.publication-summary .publication-total { color: #222; font-weight: 700; }
.publication-summary .first-author-count { color: var(--purple); }
.publication-entry { position: relative; padding: .65rem 0 .65rem 2rem; border-bottom: 1px solid var(--rule); scroll-margin-top: 1.5rem; }
.paper-number { position: absolute; top: .65rem; left: 0; color: var(--muted); }
.paper-citation p { margin: 0; }
.paper-category { display: inline-block; width: 18px; height: 18px; border-radius: 3px; margin-right: 5px; vertical-align: -.17em; }
.paper-links { display: inline; }
.paper-links a { white-space: nowrap; }
.paper-figure { margin-top: .2rem; }
.paper-figure img { display: block; max-width: 100%; height: auto; margin: 1rem auto .5rem; }
.education-block { border-left: 2px solid #ded3ee; padding-left: 1.3rem; }
.education-block h3 { padding-top: .25rem; }
.education-block ul { color: var(--muted); }
.honors-featured { margin-top: 1rem; padding: .2rem 1rem; background: #f7f4fb; border-top: 3px solid #9b82bb; border-radius: 0 0 4px 4px; }
.award-row { display: grid; grid-template-columns: 152px minmax(0,1fr); gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--rule); }
.honors-featured .award-row:last-child { border: 0; }
.award-date { color: var(--muted); white-space: nowrap; }
.award-body p { margin: 0; }
.honors-list { margin-top: 1rem; padding: 0 1rem; }
.talk-year-group { border-left: 2px solid #ded3ee; padding-left: 1rem; }
.talk-entry { position: relative; padding: .6rem 0 .6rem 1.7rem; }
.talk-entry + .talk-entry { border-top: 1px solid var(--rule); }
.talk-number { position: absolute; left: 0; color: var(--muted); }
.talk-citation p { margin: 0; }
.main-content ol > li { margin-bottom: .85rem; }
@media (max-width: 600px) {
  .profile-header { align-items: flex-start; gap: 1rem; }
  .profile-photo { width: 96px; height: 96px; flex-basis: 96px; border-width: 3px; }
  .main-content .profile-copy h1 { font-size: 28px !important; }
  .name-zh { font-size: 20px; margin-left: 0; }
  .profile-links { gap: .65rem 1rem; }
  .research-focus { grid-template-columns: 1fr; gap: .6rem; }
  .focus-item strong { margin-bottom: .3rem; }
  .main-content .focus-item { padding: .8rem 1rem; border-top: 0; border-left: 3px solid var(--edge); }
  .news-row { grid-template-columns: 1fr; gap: .2rem; }
  .news-date { color: var(--purple); }
  .featured-paper { grid-template-columns: 1fr; gap: .6rem; }
  .featured-image { height: 168px; }
  .publication-entry { padding-left: 1.8rem; }
  .award-row { grid-template-columns: 1fr; gap: .2rem; }
  .award-date { color: var(--purple); }
}
@media (max-width: 400px) {
  .profile-header { display: block; }
  .profile-photo { margin-bottom: .8rem; }
}
