:root {
  --paper: #fefefd;
  --ink: #202020;
  --muted: #444947;
  --quiet: #646a68;
  --accent: #365f91;
  --page-width: 900px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
main > section[id], footer[id] { scroll-margin-top: calc(var(--header-height, 110px) + 12px); }
body {
  position: relative;
  isolation: isolate;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Roboto, "Noto Sans JP", "Yu Gothic", YuGothic, Meiryo, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Plain near-white background; retain the contour assets for future reuse. */
body::before {
  content: none;
  position: absolute;
  inset: 0 0 auto;
  height: max(1300px, 90.277778vw);
  z-index: -1;
  pointer-events: none;
  background: url("assets/background-contours.svg") center top / max(1440px, 100%) auto no-repeat;
}
a { color: var(--accent); text-decoration: none; }
a:hover { opacity: 0.72; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button, a { -webkit-tap-highlight-color: transparent; }
.header-inner, .page-shell, .footer-inner { width: min(var(--page-width), calc(100% - 48px)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); }
.header-inner { min-height: 58px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 28px; }
.profile-links, .site-nav { display: flex; align-items: center; }
.profile-links { gap: 19px; }
.profile-links a { display: inline-grid; width: 24px; height: 30px; place-items: center; color: #171717; }
.profile-links img { display: block; width: 21px; height: 21px; object-fit: contain; }
.menu-toggle { display: none; width: 40px; height: 40px; padding: 10px 8px; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: currentColor; border-radius: 1px; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.profile-links a:hover { color: var(--accent); opacity: 1; }
.site-nav { flex-wrap: wrap; gap: 8px 31px; }
.site-nav a { color: var(--ink); font-size: 14px; font-weight: 500; }
.site-nav a:hover { color: var(--accent); opacity: 1; }
.language-switch { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.language-switch > span { color: var(--quiet); font-size: 12px; }
.language-switch a { color: var(--quiet); padding-block: 6px; }
.language-switch a[aria-current="true"] { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 5px; }
.about { display: grid; grid-template-columns: minmax(0, 1fr) 112px; column-gap: 28px; padding: 44px 0 25px; }
.profile-avatar { grid-column: 2; grid-row: 1 / 3; align-self: center; display: block; width: 112px; height: 112px; padding: 5px; border: 1px solid #d7dfe8; border-radius: 50%; background: #fff; object-fit: contain; box-shadow: 0 2px 7px rgba(36,61,93,.08); }
.about h1, .about .affiliation { grid-column: 1; }
.about h1 { margin: 0 0 12px; font-size: clamp(32px, 4.2vw, 40px); font-weight: 300; line-height: 1.2; letter-spacing: .025em; word-spacing: .04em; }
.about h1 strong { font-weight: 700; }
.about h1 span { margin-left: 8px; font-size: .62em; font-weight: 300; letter-spacing: .08em; white-space: nowrap; }
.affiliation p, .bio p { margin: 0; }
.affiliation { font-size: 16px; line-height: 1.45; }
.affiliation p:first-child { margin-bottom: 3px; }
.affiliation p[lang="ja"] { color: var(--muted); font-size: 15px; }
.cv-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding-block: 2px; font-size: 15px; font-weight: 400; line-height: 1.5; }
.cv-link svg { flex: 0 0 18px; width: 18px; height: 18px; }
.cv-link:hover > span { text-decoration: underline; text-underline-offset: 3px; }
.bio { max-width: 850px; margin-top: 22px; }
.bio p { font-size: 16px; line-height: 1.55; }
.bio p[lang="ja"] { margin-top: 3px; color: var(--muted); font-size: 15px; }
.primary-link { display: inline-block; margin-top: 17px; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.section { padding: 20px 0 48px; }
.section h2 { margin: 0 0 25px; font-size: clamp(27px, 3.4vw, 32px); font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; }
.section h2 span { margin-left: 9px; color: var(--muted); font-size: 0.56em; font-weight: 400; letter-spacing: 0; white-space: nowrap; }
.topic-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.topics-intro { margin: -3px 0 28px; color: var(--ink); font-size: 16px; font-weight: 400; line-height: 1.8; }
.topics-intro strong { color: var(--accent); font-size: 20px; font-weight: 700; }
.topic-card { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: center; overflow: hidden; border-radius: 3px; background: #fff; box-shadow: 0 2px 9px rgba(0,0,0,.15); cursor: pointer; transition: background-color .18s ease, box-shadow .18s ease; }
.topic-more { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 16px; color: var(--accent); font-size: 14px; font-weight: 500; }
.topic-more > span { transition: transform .18s ease; }
@media (hover: hover) {
  .topic-card:hover { background: #f6f8fb; box-shadow: 0 4px 14px rgba(36,61,93,.2); }
  .topic-card:hover .topic-more { text-decoration: underline; text-underline-offset: 3px; }
  .topic-card:hover .topic-more > span { transform: translateX(3px); }
}
.topic-visual { display: grid; aspect-ratio: 4 / 3; padding: 10px; place-items: center; }
.topic-visual img { display: block; width: 100%; height: 100%; object-fit: contain; }
.topic-content { padding: 17px 20px 12px; }
.topic-content h3, .topic-content p { margin: 0; }
.topic-content h3 { font-size: 23px; font-weight: 500; line-height: 1.3; }
.topic-content p { margin-top: 4px; font-size: 15px; font-weight: 500; }
.topic-content small { display: block; margin-top: 13px; color: var(--muted); font-size: 15px; font-weight: 400; line-height: 1.55; }
.topic-content small span { display: block; margin-top: 3px; }
.topic-card, .topic-card:hover { color: var(--ink); opacity: 1; }
.topic-detail { padding: 32px 0 56px; }
.topic-page { min-height: 100vh; display: flex; flex-direction: column; }
.topic-page > main { flex: 1; }
.topic-page::before { max-height: 100%; }
.topic-back { display: inline-block; margin-bottom: 24px; font-size: 15px; }
.topic-detail h1 { margin: 0; font-size: clamp(25px, 3.2vw, 34px); font-weight: 500; line-height: 1.45; }
.topic-detail-image { display: block; width: min(520px, 100%); height: auto; margin: 24px 0; }
.topic-detail h1 + .topic-article { margin-top: 24px; }
.topic-detail-summary { margin: 0; font-size: 16px; font-weight: 400; line-height: 1.85; }
.topic-article { font-size: 16px; font-weight: 400; line-height: 1.85; }
.topic-article > * { margin: 0; }
.topic-article > * + * { margin-top: 24px; }
.topic-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.topic-gallery figure { min-width: 0; margin: 0; }
.topic-gallery-image img { display: block; width: 100%; height: auto; }
.topic-gallery figcaption { margin-top: 8px; font-size: 14px; text-align: center; }
.topic-gallery figcaption a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.caption-term { white-space: nowrap; }
@media (max-width: 600px) {
  .topic-gallery { grid-template-columns: 1fr; gap: 24px; }
}
.research-list { display: grid; gap: 34px; }
.selected-research { padding-top: 20px; }
.publications-intro { margin: 0 0 28px; font-size: 16px; font-weight: 400; line-height: 1.8; }
.research-item { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; padding: 0; align-items: center; }
.research-image {
  display: grid;
  width: 180px;
  height: 126px;
  aspect-ratio: 10 / 7;
  padding: 8px;
  overflow: hidden;
  place-items: center;
  background: #f3f4f3;
}
.research-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.research-body h3 { margin: -3px 0 5px; font-size: 17px; font-weight: 500; line-height: 1.4; }
.research-authors { margin: 0 0 3px; color: var(--muted); font-size: 14px; font-weight: 400; line-height: 1.55; }
.research-authors strong { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.research-citation { margin: 0; color: var(--muted); font-size: 14px; font-weight: 400; line-height: 1.55; }
.journal-link { font-weight: 500; text-decoration: none; text-underline-offset: 2px; }
.pdf-button { display: inline-block; margin-left: 5px; padding: 1px 7px; border: 1px solid currentColor; border-radius: 2px; font-size: 12px; font-weight: 500; line-height: 1.45; letter-spacing: .05em; vertical-align: 1px; }
.conference-links { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; font-weight: 400; line-height: 1.55; }
.conference-label { margin-right: 4px; color: var(--quiet); font-size: 11.5px; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
.conference-links a { text-decoration: none; text-underline-offset: 2px; }
.presentation-entry { display: inline-block; font-weight: 500; }
.presentation-resources { display: inline-flex; gap: 6px; margin-left: 8px; }
.conference-links .pdf-button { margin-left: 0; text-decoration: none; letter-spacing: 0; }
.research-awards, .research-press { margin: 7px 0 0; color: var(--quiet); font-size: 13px; font-weight: 400; line-height: 1.65; }
.award-link, .press-link { display: inline; margin: 0; padding: 0; border: 0; border-bottom: 1px dotted color-mix(in srgb, currentColor 42%, transparent); color: inherit; background: transparent; font: inherit; cursor: pointer; }
.award-link:hover, .press-link:hover { color: var(--accent); border-bottom-color: currentColor; }
.award-icon, .press-icon { display: inline-block; width: 14px; height: 14px; margin-right: 2px; vertical-align: -3px; fill: currentColor; }
.research-awards, .research-press { word-spacing: 6px; }
.award-link, .press-link { word-spacing: normal; }
.press-link { white-space: nowrap; }
.all-research { margin: 38px 0 0; color: var(--muted); font-size: 15px; }
.all-research a { text-decoration: none; text-underline-offset: 2px; }
.journal-link:is(:hover, :focus-visible),
.presentation-entry a:is(:hover, :focus-visible),
.all-research a:is(:hover, :focus-visible) { text-decoration: underline; }
.site-footer { margin-top: 24px; }
.footer-upper { position: relative; min-height: 118px; display: grid; place-items: center; background: #fff; }
.footer-social { display: flex; align-items: center; gap: 17px; }
.footer-social a { display: grid; width: 30px; height: 36px; place-items: center; }
.footer-social img { display: block; width: 26px; height: 26px; object-fit: contain; }
.back-to-top { position: absolute; right: 38px; top: 50%; display: grid; width: 56px; height: 56px; translate: 0 -50%; place-items: center; border-radius: 50%; color: #fff; background: #999; box-shadow: 0 3px 9px rgba(0,0,0,.24); }
.back-to-top span { margin-top: 8px; font-size: 27px; font-weight: 500; line-height: 1; }
.back-to-top:hover { color: #fff; background: #7e7e7e; opacity: 1; }
.footer-copyright { min-height: 50px; display: grid; place-items: center; padding: 12px 24px; color: #fff; background: #1e1e1e; font-size: 14px; font-weight: 400; text-align: center; }
.award-dialog { width: fit-content; max-width: min(980px, 94vw); max-height: 92vh; padding: 0; border: 0; background: #fff; box-shadow: 0 24px 70px rgba(0,0,0,.3); }
.award-dialog::backdrop { background: rgba(20,23,22,.7); }
.award-dialog form { display: flex; justify-content: flex-end; }
.dialog-close { padding: 9px 13px; border: 0; background: #fff; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.award-dialog img { display: block; max-width: 100%; max-height: calc(92vh - 85px); object-fit: contain; }
.award-dialog img[hidden], .dialog-status[hidden] { display: none; }
.dialog-status { margin: 0; padding: 40px 24px; min-width: min(320px, 85vw); color: var(--muted); font-size: 14px; text-align: center; }
.dialog-caption { display: flex; flex-wrap: wrap; gap: 4px 13px; margin: 0; padding: 11px 15px 13px; border-top: 1px solid var(--line); font-size: 13px; }
.dialog-caption span { color: var(--muted); }

@media (min-width: 1441px) {
  body::before { background-image: url("assets/background-contours-wide.svg"); opacity: .85; }
}

@media (max-width: 720px) {
  body::before { background-size: 1000px auto; background-position: right top; mask-image: linear-gradient(to right, transparent 15%, #000 100%); }
  .header-inner, .page-shell, .footer-inner { width: min(var(--page-width), calc(100% - 32px)); }
  .header-inner { padding: 14px 0 13px; align-items: flex-start; flex-direction: column; gap: 10px; }
  .profile-links, .site-nav { flex-wrap: wrap; gap: 6px 15px; }
  .menu-ready .header-inner { flex-direction: row; align-items: center; gap: 12px; padding: 8px 0; }
  .menu-ready .profile-links { flex-wrap: nowrap; gap: 12px; }
  .menu-ready .profile-links a { width: 22px; height: 40px; }
  .menu-ready .menu-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; flex: 0 0 40px; }
  .menu-ready .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 12px 24px 20px; background: #fff; box-shadow: 0 8px 14px rgba(20,35,50,.08); max-height: calc(100dvh - var(--header-height, 58px)); overflow-y: auto; }
  .menu-ready.menu-open .site-nav { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .menu-ready .site-nav > a { padding: 12px 0; }
  .menu-ready .language-switch { padding-top: 10px; gap: 12px; }
  .site-nav a { font-size: 14px; }
  .about { padding: 40px 0 36px; }
  .about h1 span { display: block; margin: 5px 0 0; font-size: .72em; }
  .affiliation, .bio p { font-size: 16px; }
  .affiliation p[lang="ja"], .bio p[lang="ja"] { font-size: 15px; }
  .section { padding: 29px 0 40px; }
  .topic-list { gap: 18px; }
  .topic-card { grid-template-columns: 170px minmax(0, 1fr); }
  .research-item { grid-template-columns: 150px minmax(0, 1fr); gap: 20px; }
  .research-image { width: 150px; height: 105px; }
  .research-body h3 { font-size: 16px; }
  .research-citation { font-size: 14px; }
}

@media (max-width: 520px) {
  .about { grid-template-columns: minmax(0, 1fr); }
  .profile-avatar { grid-column: 1; grid-row: auto; width: 80px; height: 80px; margin-bottom: 16px; }
  .topic-card { grid-template-columns: minmax(0, 1fr); }
  .topic-visual { width: 180px; height: 120px; aspect-ratio: auto; padding: 0; margin: 8px auto 0; }
  .topic-content { padding-top: 8px; }
  .research-item { grid-template-columns: 1fr; gap: 18px; }
  .research-image { width: min(280px, 100%); height: auto; aspect-ratio: 10 / 7; }
  .research-title-line { align-items: flex-start; }
  .footer-upper { min-height: 104px; padding: 0 72px 0 12px; }
  .footer-social { gap: 8px; flex-wrap: wrap; justify-content: center; }
  .footer-social a { width: 26px; }
  .footer-social img { width: 23px; height: 23px; }
  .back-to-top { right: 16px; width: 46px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .topic-card, .topic-more > span { transition: none; }
}

@media print { body::before { display: none; } }
