@font-face {
  font-family: "Manrope"; src: url("./fonts/manrope.woff") format("woff");
  font-weight: 400 700; font-display: swap;
}
@font-face {
  font-family: "Noto Sans SC"; src: url("./fonts/noto-sc.woff") format("woff");
  font-weight: 400 650; font-display: swap;
}
@font-face {
  font-family: "M PLUS 1"; src: url("./fonts/mplus1.woff") format("woff");
  font-weight: 400 650; font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #1e2630;
  --muted: #4d5865;
  --light: #52606f;
  --line: #e2e6eb;
  --accent: #285373;
  --tint: #f1f5f8;
  --width: 1390px;
  --pad: clamp(20px, 4vw, 36px);
  --font-en: "Manrope", "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --font-zh: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-ja: "M PLUS 1", "Hiragino Kaku Gothic ProN", Meiryo, "Noto Sans CJK JP", sans-serif;
  --font: var(--font-zh);
  --section-gap: clamp(22px, 4vw, 34px);
}
html:lang(en) { --font: var(--font-en); }
html:lang(ja) { --font: var(--font-ja); }
html:lang(ja) body { font-weight: 440; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.72 var(--font); }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: #133e60; }
:focus-visible { outline: 2px solid #356690; outline-offset: 4px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.28; }
h1 { font-size: clamp(34px, 4.3vw, 52px); font-weight: 570; letter-spacing: -.018em; }
h2 { font-size: clamp(22px, 2.3vw, 27px); font-weight: 580; }

.skip { position: fixed; top: .5rem; left: .5rem; background: var(--paper); padding: 7px 12px; transform: translateY(-200%); z-index: 10; }
.skip:focus { transform: none; }
.masthead { border-bottom: 1px solid var(--line); }
.mast-inner, .page-layout, .foot-inner { max-width: var(--width); padding-inline: var(--pad); margin-inline: auto; }
.mast-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { color: var(--ink); font-weight: 590; text-decoration: none; }
.languages { display: flex; align-items: center; gap: 4px; }
.languages a { display: inline-block; padding: 7px 9px; border-radius: 4px; color: var(--muted); text-decoration: none; font-size: 13px; white-space: nowrap; }
.languages a:hover, .languages [aria-current="true"] { color: var(--accent); background: var(--tint); }
.languages [aria-current="true"] { font-weight: 590; }

/* A compact sidebar leaves the full remaining width for reading. */
.page-layout { display: grid; grid-template-columns: clamp(168px, 17vw, 220px) minmax(0,1fr); gap: clamp(28px, 4.3vw, 65px); align-items: start; min-height: calc(100svh - 124px); padding-block: 36px 60px; }
.sidebar { position: sticky; top: 22px; min-width: 0; }
#main { min-width: 0; }
.section-nav { display: grid; gap: 21px; }
.nav-label { padding: 0 11px 5px; font-size: 12px; font-weight: 550; color: var(--light); }
.section-nav a { display: flex; justify-content: space-between; align-items: baseline; gap: 7px; padding: 8px 10px; border-left: 2px solid transparent; color: var(--muted); font-size: 15px; text-decoration: none; line-height: 1.45; }
.section-nav a:hover { color: var(--accent); background: var(--tint); }
.section-nav a[aria-current="page"] { border-left-color: var(--accent); background: var(--tint); color: var(--accent); font-weight: 570; }
.nav-count { color: var(--light); font-size: 11px; font-variant-numeric: tabular-nums; }
.mobile-menu { display: none; }
.identity { display: grid; grid-template-columns: auto minmax(0,1fr); gap: clamp(17px, 4vw, 31px); align-items: center; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.portrait { display: block; width: 111px; height: 148px; object-fit: cover; border-radius: 5px; }
.name-alt { color: var(--muted); font-size: 19px; line-height: 1.4; margin: 4px 0 10px; }
.affiliation { font-weight: 590; }
.department { color: var(--muted); font-size: 15px; line-height: 1.45; }
.profile-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; }
.profile-links a, .record-links a { font-size: 13px; font-weight: 600; text-decoration: none; }
.profile-links a:hover, .record-links a:hover { text-decoration: underline; }
.external::after { content: ' ↗'; font-weight: 400; }

.overview-section { padding-block: var(--section-gap); border-bottom: 1px solid var(--line); }
.overview-section:last-child { border-bottom: 0; padding-bottom: 0; }
.bio { max-width: min(100%, 920px); color: var(--muted); margin-top: 10px; line-height: 1.72; }
.keyword-list { display: flex; flex-wrap: wrap; gap: 5px 12px; margin: 11px 0 8px; padding: 0; list-style: none; color: var(--accent); font-size: 14px; }
.keyword-list li + li::before { content: '·'; padding-right: 12px; color: var(--light); }
.statement { margin-top: 4px; }
.statement summary { width: fit-content; cursor: pointer; color: var(--muted); font-size: 14px; }
.statement summary:hover { color: var(--accent); }
.statement blockquote { margin: 8px 0 10px; padding: 0 0 0 13px; border-left: 2px solid var(--line); color: var(--muted); }
.statement p + p { margin-top: 6px; }
.areas { margin: 6px 0 9px; padding-inline-start: 20px; color: var(--muted); font-size: 14px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.panel-head a { font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.panel-head a:hover { text-decoration: underline; }
.overview-section .record:first-child { border-top: 0; }
.selected-work .record { grid-template-columns: 61px minmax(0,1fr); }


.page-head { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(29px, 3.5vw, 39px); }
.page-head p { color: var(--muted); margin-top: 7px; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 19px 0 8px; }
.filters label { display: grid; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
.filters label:first-child { flex: 1 1 min(60%, 225px); }
.filters input, .filters select { min-height: 40px; min-width: 0; width: 100%; padding: 7px 10px; font-size: 14px; border: 1px solid #c9d0d8; background: var(--paper); border-radius: 4px; }
.result-count { color: var(--light); font-size: 12px; min-height: 22px; }
.records { list-style: none; padding: 0; margin: 0; }
.record { display: grid; grid-template-columns: clamp(110px, 13%, 150px) minmax(0,1fr); gap: 19px; border-top: 1px solid var(--line); padding: 16px 0; overflow-wrap: anywhere; scroll-margin-top: 16px; }
.record-date { color: var(--light); font-size: 13px; font-variant-numeric: tabular-nums; line-height: 1.5; padding-top: 3px; }
.record-date span { display: block; }
.record h3 { font-weight: 540; font-size: 19px; line-height: 1.48; }
[lang="en"]:not(html) { font-family: var(--font-en); }
[lang="ja"]:not(html) { font-family: var(--font-ja); }
[lang="zh-CN"]:not(html) { font-family: var(--font-zh); }
.record h3 a { text-decoration: none; color: inherit; }
.record h3 a:hover { color: var(--accent); text-decoration: underline; }
.record p { color: var(--muted); font-size: 15px; margin-top: 4px; line-height: 1.6; }
.work-signals { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 6px; font-size: 12px; line-height: 1.4; }
.original-language { background: #edf2f6; color: #264c66; padding: 3px 8px; border-radius: 4px; font-weight: 540; }
.review-mark { color: #2c5b50; display: inline-flex; align-items: center; gap: 6px; }
.review-mark::before { content: ""; background: #4a796a; border-radius: 50%; width: 6px; height: 6px; }
.people { display: flex; gap: 5px 11px; align-items: baseline; flex-wrap: wrap; }
.people strong { font-weight: 620; }
.author-roles { display: inline-flex; flex-wrap: wrap; gap: 3px 6px; color: #4b5461; font-size: 11px; line-height: 1.3; }
.author-roles > span { border: 1px solid #d9e0e6; border-radius: 4px; padding: 2px 6px; }
.work-record .record-date { padding-top: 5px; }
.citation { color: #405264; }
.record .record-links { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.record-links span, .record-links a { font-size: 13px; }
.record-links .no-doi { color: var(--muted); }
.record-links .web-link { color: var(--muted); overflow-wrap: anywhere; }
.web-link .external::after { content: none; }
.web-link a { font-weight: 400; text-decoration: underline; }
.record-heading, .identity-affiliation { display: flex; align-items: center; gap: 10px; }
.record-heading h3 { min-width: 0; }
.institution-logo { display: block; object-fit: contain; object-position: left center; flex: 0 0 auto; }
.institution-logo.primary-logo { width: 68px; height: 45px; }
.institution-logo.row-logo { width: 43px; height: 33px; }

.compact .record { padding-block: 12px; }
.compact p { margin-top: 3px; }
.section-block { margin-top: 32px; }
.section-block h2 { margin-bottom: 10px; }
/* Each résumé row has distinct columns for institution, qualification and period. */
#main > .career-grid, .overview-degrees > .career-grid { margin-top: 13px; }
.overview-degrees .career-row { padding-block: 10px; }
.overview-degrees { border-bottom: 0; padding-bottom: 9px; }
.career-grid { --columns: minmax(0,1.07fr) minmax(0,1.2fr) minmax(126px,.68fr); }
.career-columns, .career-row { display: grid; grid-template-columns: var(--columns); column-gap: clamp(15px, 3vw, 36px); align-items: start; padding-inline: 14px; }
.career-columns { background: var(--tint); color: var(--muted); font-size: 12px; padding-block: 8px; }
.career-columns span:last-child, .career-period { text-align: end; }
.career-records { margin: 0; padding: 0; list-style: none; }
.career-row { padding-block: 15px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.career-row h3 { font-size: 17px; line-height: 1.5; font-weight: 560; }
.career-row p { font-size: 14px; color: var(--muted); line-height: 1.55; }
.career-row p + p, .career-row h3 + p { margin-top: 3px; }
.career-row .career-qualification { color: var(--ink); font-size: 16px; font-weight: 500; }
.career-organization { display: flex; align-items: center; gap: 9px; }
.career-organization > div { min-width: 0; }
.career-period { font-size: 13px; color: var(--light); font-variant-numeric: tabular-nums; line-height: 1.55; padding-top: 3px; }
.empty { margin-top: 8px; padding: 15px; background: var(--tint); color: var(--muted); }
footer { border-top: 1px solid var(--line); color: var(--muted); }
.foot-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 18px; padding-block: 17px; font-size: 12px; }
.foot-inner a { text-decoration: none; }

@media (max-width: 900px) {
  .page-layout { display: block; padding-block: 10px 40px; }
  .mast-inner { min-height: 57px; }
  .sidebar { position: static; margin-bottom: 21px; border-bottom: 1px solid var(--line); }
  .mobile-menu { display: flex; width: 100%; min-height: 41px; align-items: center; justify-content: space-between; padding: 0; background: var(--paper); border: 0; text-align: left; font-size: 14px; font-weight: 550; }
  .mobile-menu::after { content: '▾'; color: var(--accent); }
  .mobile-menu[aria-expanded="true"]::after { content: '▴'; }
  .section-nav { display: none; gap: 9px; padding: 0 0 12px; }
  .mobile-menu[aria-expanded="true"] + .section-nav { display: grid; }
  .nav-group { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .nav-label { grid-column: 1/-1; }
  .section-nav a { padding: 7px 9px; font-size: 14px; }
  .identity { padding-bottom: 21px; }
}
@media (max-width: 630px) {
  .career-columns { display: none; }
  .career-row { grid-template-columns: minmax(0,1fr) auto; gap: 5px 14px; padding-inline: 0; }
  .career-period { grid-area: 1/2; max-width: 15ch; }
  .career-detail { grid-area: 2/1/3/-1; }
  .career-detail:empty { display: none; }
  .career-row h3 { font-size: 16px; }
}
@media (max-width: 570px) {
  .work-record, .selected-work .record { grid-template-columns: minmax(0,1fr); gap: 6px; }
  .work-record .record-date { padding-top: 0; }
  .work-record .record-date span { display: inline; }
  .work-record .record-date span + span { margin-inline-start: 4px; }
}
@media (max-width: 450px) {
  .portrait { width: 75px; height: 100px; }
  .identity { align-items: start; }
  .brand { font-size: 14px; }
  .languages { gap: 1px; }
  .languages a { padding-inline: 6px; }
  .name-alt { font-size: 16px; margin-bottom: 8px; }
  .affiliation { font-size: 14px; }
  .department, .profile-links a { font-size: 12px; }
  .profile-links { gap: 3px 11px; }
  .record { grid-template-columns: 71px minmax(0,1fr); gap: 8px; }
  .record-date { font-size: 11px; }
  .record h3 { font-size: 17px; }
  .work-record, .selected-work .record { grid-template-columns: minmax(0,1fr); }
  .overview-section { padding-block: 20px; }
}
