:root {
  --text: #222;
  --muted: #666;
  --light: #f5f6f7;
  --border: #d9dee3;
  --accent: #245a87;
  --accent-dark: #163f63;
  --award: #9a4c13;
  --width: 1020px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: #151515;
  line-height: 1.3;
}

.container {
  width: min(calc(100% - 40px), var(--width));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  color: #fff;
  background: var(--accent-dark);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  gap: 30px;
}

.site-name {
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 700;
}

.site-name:hover {
  color: var(--text);
  text-decoration: none;
}

nav {
  display: flex;
  gap: 24px;
  font-size: 14px;
}

nav a {
  color: #444;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 188px;
  gap: 48px;
  align-items: start;
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
}

.portrait-frame {
  width: 188px;
  height: 282px;
  justify-self: end;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: #eee;
}

.portrait {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.intro-copy {
  max-width: 760px;
}

.intro h1 {
  margin-bottom: 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.intro h1 span {
  margin-left: 8px;
  font-family: "Songti SC", "Noto Serif CJK SC", serif;
  font-size: 25px;
  font-weight: 400;
}

.position {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 17px;
}

.intro-copy > p:not(.position):not(.profile-links) {
  max-width: 720px;
  margin-bottom: 14px;
}

.profile-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  font-size: 15px;
}

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.profile-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background-color: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.icon-email {
  -webkit-mask-image: url("assets/icons/mail.svg");
  mask-image: url("assets/icons/mail.svg");
}

.icon-github {
  -webkit-mask-image: url("assets/icons/github.svg");
  mask-image: url("assets/icons/github.svg");
}

.icon-scholar {
  -webkit-mask-image: url("assets/icons/google-scholar.svg");
  mask-image: url("assets/icons/google-scholar.svg");
}

.icon-cv {
  -webkit-mask-image: url("assets/icons/file-text.svg");
  mask-image: url("assets/icons/file-text.svg");
}

.profile-separator {
  color: #aaa;
}

.section {
  padding: 46px 0;
  border-bottom: 1px solid var(--border);
}

.section h2 {
  margin-bottom: 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 600;
}

.news-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  margin-bottom: 10px;
}

.news-list li:last-child {
  margin-bottom: 0;
}

.news-list time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.news-section {
  padding-top: 34px;
}

.news-section .section-title-row h2 {
  margin-bottom: 24px;
}

.news-archive {
  margin-top: 18px;
  border-top: 1px solid var(--border);
}

.news-archive summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0 0;
  cursor: pointer;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  list-style: none;
}

.news-archive summary::-webkit-details-marker {
  display: none;
}

.news-archive .news-list {
  padding-top: 18px;
}

.summary-mark {
  color: var(--muted);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

.news-archive[open] .summary-mark {
  transform: rotate(45deg);
}

.research-interests p {
  margin-bottom: 0;
  color: #444;
}

.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.section-title-row p {
  color: var(--muted);
  font-size: 13px;
}

.paper {
  display: grid;
  grid-template-columns: 285px 1fr;
  gap: 28px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
}

.paper:last-child {
  border-bottom: 1px solid var(--border);
}

.paper-figure {
  align-self: start;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: #fff;
}

.paper-figure:hover {
  border-color: #aab5bf;
}

.paper-figure img {
  width: 100%;
  height: 158px;
  object-fit: contain;
}

.paper:nth-child(4) .paper-figure img {
  object-fit: cover;
  object-position: top;
}

.paper-year {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.paper h3 {
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 600;
}

.authors {
  margin-bottom: 5px;
  color: #555;
  font-size: 14px;
  line-height: 1.5;
}

.venue {
  margin-bottom: 3px;
  font-size: 14px;
  font-style: italic;
}

.award {
  margin-bottom: 4px;
  color: var(--award);
  font-size: 14px;
  font-weight: 600;
}

.paper-links {
  display: flex;
  gap: 16px;
  margin: 9px 0 0;
  font-size: 14px;
}

.more-publications {
  margin-top: 20px;
}

.more-publications summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
}

.more-publications ol {
  margin: 18px 0 0;
  padding-left: 24px;
}

.more-publications li {
  margin-bottom: 8px;
  padding-left: 4px;
  font-size: 14px;
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.education-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  min-height: 174px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fcfcfd;
}

.education-logo {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e5e7ea;
  border-radius: 50%;
  background: #fff;
}

.education-logo img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.education-date {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.education-card h3 {
  margin-bottom: 3px;
  font-size: 16px;
  line-height: 1.35;
}

.education-card h3 a {
  color: var(--text);
}

.education-card p {
  margin-bottom: 2px;
  font-size: 14px;
}

.secondary {
  color: var(--muted);
}

.honors-block {
  margin-top: 52px;
}

.honors-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 56px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.honors-list li {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  padding: 12px 0 13px;
  border-top: 1px solid #e7eaed;
}

.honor-year {
  padding-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.honor-copy {
  min-width: 0;
}

.honor-title {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.38;
}

.honor-context {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
}

.service-section p {
  margin-bottom: 0;
}

.service-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 44px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-list li {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  font-size: 14px;
}

.service-list span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

footer {
  padding: 28px 0 42px;
  color: var(--muted);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .container {
    width: min(calc(100% - 30px), var(--width));
  }

  .header-inner {
    min-height: 56px;
  }

  nav {
    gap: 16px;
  }

  nav a:nth-child(1),
  nav a:nth-child(3) {
    display: none;
  }

  .intro {
    grid-template-columns: minmax(0, 1fr) 142px;
    gap: 24px;
    padding-top: 42px;
  }

  .portrait-frame {
    width: 142px;
    height: 213px;
  }

  .intro h1 {
    font-size: 30px;
  }

  .intro h1 span {
    display: block;
    margin: 3px 0 0;
    font-size: 21px;
  }

  .position {
    font-size: 15px;
  }

  .paper {
    grid-template-columns: 220px 1fr;
    gap: 20px;
  }

  .paper-figure img {
    height: 135px;
  }

  .education-grid,
  .honors-list {
    grid-template-columns: 1fr;
  }

  .honors-list {
    column-gap: 0;
  }

  .service-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 570px) {
  body {
    font-size: 15px;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .portrait-frame {
    width: 150px;
    height: 225px;
    justify-self: start;
    order: -1;
  }

  .intro h1 {
    font-size: 25px;
  }

  .position {
    margin-bottom: 0;
    line-height: 1.4;
  }

  .section {
    padding: 38px 0;
  }

  .section h2 {
    font-size: 23px;
  }

  .news-list li {
    grid-template-columns: 76px 1fr;
    gap: 10px;
  }

  .section-title-row {
    display: block;
  }

  .education-card {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 15px;
    min-height: 0;
    padding: 18px;
  }

  .education-logo {
    width: 56px;
    height: 56px;
  }

  .education-logo img {
    width: 48px;
    height: 48px;
  }

  .paper {
    grid-template-columns: 1fr;
  }

  .paper-figure img {
    height: auto;
    max-height: 220px;
  }

  .footer-inner {
    display: block;
  }

  .footer-inner p + p {
    margin-top: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
