/* Academic homepage, inspired by the classic jemdoc layout. */
:root {
  color-scheme: light;
  --link: #224b8d;
  --heading: #1a52ad;
  --rule: #aaa;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body {
  margin: 0;
  color: #161616;
  background: #fff;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: 16px;
  line-height: 1.5;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--heading); outline-offset: 4px; }
img { display: block; max-width: 100%; }
p { margin: 0 0 13px; }
strong { font-weight: 700; }
.skip-link {
  position: absolute;
  top: -80px;
  left: 16px;
  z-index: 2;
  background: #fff;
  padding: 8px 12px;
}
.skip-link:focus { top: 8px; }
.page-layout {
  display: grid;
  grid-template-columns: 136px minmax(0, 1030px);
  min-height: 100vh;
  align-items: stretch;
  padding: 3px;
}
.sidebar {
  padding: 15px 12px;
  border: 1px solid #ddd;
  background: #f6f6f6;
}
.sidebar nav { position: sticky; top: 18px; }
.menu-category {
  font-weight: bold;
  border-bottom: 1px solid #888;
  margin-bottom: 7px;
  padding-bottom: 2px;
}
.sidebar a {
  display: block;
  width: fit-content;
  margin: 5px 0 5px 8px;
  color: #527bbd;
  line-height: 1.55;
}
.sidebar a.current { color: #022b6d; text-decoration: underline; text-underline-offset: 4px; }
main { min-width: 0; padding: 0 26px 22px; }
.page-title {
  margin-bottom: 25px;
  padding: 17px 0 11px;
  border-bottom: 3px double #888;
}
h1 { margin: 0; color: var(--heading); font-size: 28px; line-height: 1.2; }
h2 {
  color: var(--heading);
  font-size: 21px;
  line-height: 1.25;
  margin: 29px 0 13px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--rule);
}
h3 { margin: 0 0 5px; font-size: 16px; line-height: 1.45; }
.profile { display: flex; align-items: center; gap: 24px; margin-bottom: 25px; }
.profile-photo { flex: 0 0 150px; width: 150px; height: 184px; object-fit: cover; }
.profile-details p { margin-bottom: 10px; }
.profile-details p:last-child { margin-bottom: 0; }
.profile-links, .paper-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.news-list, .activities-list { padding-left: 24px; margin: 8px 0 18px; list-style-type: square; }
li { padding-left: 2px; margin-bottom: 8px; }
.news-date { white-space: nowrap; }
.publication {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin: 22px 0 27px;
}
.publication-image { display: block; }
.publication-image img { width: 180px; height: auto; }
.publication-copy { min-width: 0; }
.publication-copy p { margin-bottom: 5px; }
.publication-copy .paper-links { margin: 6px 0 0; }
.experience-entry {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin: 20px 0;
}
.experience-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  padding: 9px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
}
.experience-copy h3 { margin-bottom: 8px; font-size: 20px; }
.experience-copy p { margin: 0; }
.experience-date { margin: 0; color: #666; white-space: nowrap; }
footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 42px;
  padding-top: 10px;
  border-top: 1px solid #ccc;
  color: #666;
  font-size: 13px;
}
@media (max-width: 760px) {
  html { scroll-padding-top: 12px; }
  .page-layout { display: block; padding: 0; }
  .sidebar { padding: 10px 18px; border: 0; border-bottom: 1px solid #ddd; }
  .sidebar nav { position: static; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 17px; }
  .menu-category { display: none; }
  .sidebar a { margin: 0; font-size: 14px; }
  main { padding: 0 20px 22px; }
  .page-title { padding-top: 22px; margin-bottom: 22px; }
  .profile { gap: 20px; }
  .profile-photo { flex-basis: 130px; width: 130px; height: 159px; }
  .publication { grid-template-columns: 150px minmax(0, 1fr); gap: 18px; }
  .publication-image img { width: 150px; }
  .experience-entry { grid-template-columns: 76px minmax(0, 1fr); gap: 6px 18px; }
  .experience-logo { grid-row: 1 / 3; width: 76px; height: 76px; }
  .experience-date { grid-column: 2; font-size: 14px; }
}
@media (max-width: 480px) {
  main { padding-right: 16px; padding-left: 16px; }
  h1 { font-size: 26px; }
  .profile { align-items: flex-start; flex-direction: column; gap: 16px; }
  .profile-photo { flex-basis: auto; width: 150px; height: 184px; }
  .publication { grid-template-columns: minmax(0, 1fr); gap: 13px; margin-bottom: 30px; }
  .publication-image img { width: 180px; }
  .experience-entry { grid-template-columns: 66px minmax(0, 1fr); column-gap: 15px; }
  .experience-logo { width: 66px; height: 66px; padding: 7px; }
  h2 { margin-top: 27px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  .page-layout { display: block; }
  .sidebar, .skip-link { display: none; }
  main { padding: 0; }
  .publication, .experience-entry { break-inside: avoid; }
}
