/* V5: a narrower reading column, restrained borders, and original paper figures. */
.site-main, .header-inner, .site-footer, .theme-preview-inner {
  width: min(980px, calc(100% - 80px));
}
.header-inner { gap: 20px; }
.site-name { font-size: 18px; }
.site-name span { display: none; }
nav { gap: 24px; }
.academic-grid { grid-template-columns: 216px minmax(0, 1fr); gap: 32px; padding-top: 30px; }
.profile { padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.portrait { width: 100%; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; margin-bottom: 17px; }
.portrait img { width: 100%; height: 213px; object-position: center 48%; }
h1 { font-size: 26px; letter-spacing: -.55px; }
.institution { font-size: 14px; }
.profile-contact { margin-top: 18px; padding-top: 14px; }
.profile .email-link { font-size: 11px; gap: 7px; }
.profile-links { gap: 5px; margin-top: 10px; }
.profile-links a { gap: 8px; font-size: 12px; padding-block: 5px; }
.profile-icon { display: block; width: 17px; height: 17px; flex: 0 0 17px; color: var(--muted); }
.profile-links a:hover .profile-icon:not(.profile-brand-icon) { color: var(--blue); }
.profile-brand-icon { object-fit: contain; filter: none; opacity: 1; }
.about-section { border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; }
.about-section h2 { font-size: 22px; }
.about-section p { font-size: 14px; line-height: 1.8; }
.about-section .collaboration-note { font-size: 12px; line-height: 1.7; }
.publication { grid-template-columns: 214px minmax(0, 1fr); gap: 20px; }
.publication-visual { position: relative; width: 100%; margin: 2px 0 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; overflow: hidden; }
.publication-visual img { display: block; width: 100%; height: 150px; object-fit: contain; padding: 8px; background: #fff; }
.figure-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding: 5px 8px; color: var(--blue); background: #fafbfc; font-size: 10px; line-height: 1.5; }
.publication-visual:hover { text-decoration: none; border-color: var(--blue); }
.publication-visual:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.publication h3 { font-size: 18px; line-height: 1.45; letter-spacing: -.2px; }
.publication-meta { margin-bottom: 7px; }
.authors { font-size: 12px; }
.publication-abstract { font-size: 12px; }
.resource-links { gap: 5px 6px; }
.resource-links a { font-size: 11px; padding-inline: 7px; }
.career-item { padding: 11px 13px; border: 1px solid var(--line); border-radius: 6px; grid-template-columns: 129px minmax(0, 1fr); gap: 14px; background: #fff; }
.career-list { gap: 10px; }
.career-copy h3 { font-size: 13px; }
.career-role { font-size: 12px; }
.career-dates { font-size: 11px; }
/* V6: original institution marks remain small, unaltered, and beside their names. */
.career-copy.has-logo { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 12px; }
.institution-logo { display: flex; align-items: center; justify-content: center; width: 56px; height: 48px; padding: 3px; background: #fff; }
.institution-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.career-details { min-width: 0; }
.figure-open { overflow: hidden; }
.figure-dialog { width: min(1120px, calc(100vw - 48px)); max-width: none; max-height: calc(100vh - 48px); border: 1px solid var(--line); border-radius: 10px; padding: 18px; color: var(--ink); background: #fff; }
.figure-dialog::backdrop { background: rgba(22, 30, 39, .62); }
.figure-dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.figure-dialog h2 { font-size: 16px; line-height: 1.5; border: 0; margin: 0; padding: 0; }
.figure-dialog h2::after { display: none; }
.figure-dialog button { cursor: pointer; font: 12px/1.5 var(--sans); color: var(--ink); background: #fff; border: 1px solid #c6ced5; border-radius: 4px; padding: 5px 10px; white-space: nowrap; }
.figure-dialog button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.figure-stage { overflow: auto; max-height: calc(100vh - 200px); border: 1px solid var(--line); background: #fff; }
.figure-stage img { display: block; width: 100%; height: auto; max-height: calc(100vh - 205px); object-fit: contain; margin-inline: auto; }
.figure-stage.is-zoomed img { width: auto; max-width: none; max-height: none; margin: 0; }
.figure-dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; font-size: 12px; }
.figure-dialog [aria-pressed="true"] { background: var(--tint); border-color: var(--blue); }
@media (max-width: 1000px) {
  .academic-grid { grid-template-columns: 206px minmax(0, 1fr); gap: 26px; }
  .profile { padding: 15px; }
  .publication { grid-template-columns: 190px minmax(0, 1fr); gap: 18px; }
  .publication-visual img { height: 140px; }
}
@media (max-width: 900px) and (min-width: 701px) {
  .site-main, .header-inner, .site-footer, .theme-preview-inner { width: calc(100% - 56px); }
  .academic-grid { grid-template-columns: 194px minmax(0, 1fr); gap: 24px; }
  .profile { padding: 13px; }
  .portrait img { height: 202px; }
  h1 { font-size: 24px; }
  .profile .email-link { font-size: 10px; gap: 5px; }
  .profile .email-link .profile-icon { width: 14px; height: 14px; flex-basis: 14px; }
  .publication { grid-template-columns: 1fr; gap: 13px; }
  .publication-visual { width: min(100%, 320px); }
  .publication-visual img { height: 190px; }
  .about-section { padding: 18px; }
  .career-item { grid-template-columns: 1fr; gap: 5px; }
  nav { gap: 19px; }
}
@media (max-width: 700px) {
  .site-main, .header-inner, .site-footer, .theme-preview-inner { width: calc(100% - 40px); }
  .academic-grid { display: block; padding-top: 22px; }
  .profile { grid-template-columns: 104px minmax(0, 1fr); gap: 0 19px; padding: 17px; margin-bottom: 23px; }
  .portrait { width: 104px; margin: 0; }
  .portrait img { height: 132px; }
  h1 { font-size: 26px; }
  .profile-contact { padding: 15px 0 0; margin-top: 17px; border-top: 1px solid var(--line); border-bottom: 0; }
  .profile .email-link { font-size: 12px; }
  .profile-links { gap: 1px 14px; }
  .profile-links a { font-size: 11px; gap: 5px; min-height: 31px; }
  .profile-icon { width: 15px; height: 15px; flex-basis: 15px; }
  .about-section { padding: 17px; }
  .about-section p { font-size: 14px; }
  .about-section .collaboration-note { padding-top: 9px; }
  .publication { grid-template-columns: 1fr; gap: 14px; }
  .publication-visual { width: 100%; margin: 0; }
  .publication-visual img { height: 210px; padding: 10px; }
  .publication h3 { font-size: 19px; }
  .publication-abstract, .authors { font-size: 13px; }
  .resource-links a { font-size: 12px; min-height: 36px; }
  .figure-label { font-size: 11px; padding: 6px 9px; }
  .career-item { grid-template-columns: 1fr; gap: 5px; padding: 11px 12px; }
  .career-copy.has-logo { grid-template-columns: 48px minmax(0, 1fr); gap: 10px; }
  .institution-logo { width: 48px; height: 44px; padding: 2px; }
  nav { gap: 8px; }
  .figure-dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); padding: 12px; }
  .figure-dialog-heading { gap: 10px; }
  .figure-dialog h2 { font-size: 14px; }
  .figure-stage { max-height: calc(100vh - 220px); }
  .figure-stage img { max-height: calc(100vh - 225px); }
}
@media (max-width: 360px) {
  .site-main, .header-inner, .site-footer, .theme-preview-inner { width: calc(100% - 32px); }
  .profile { grid-template-columns: 90px minmax(0, 1fr); gap: 0 14px; padding: 14px; }
  .portrait { width: 90px; }
  .portrait img { height: 118px; }
  h1 { font-size: 23px; }
  .institution { font-size: 12px; }
  .profile-links { column-gap: 11px; }
  .publication-visual img { height: 180px; }
}
@media print { .figure-dialog { display: none; } .profile, .about-section { border: 0; padding: 0; } }
