:root {
  --text: #1f2933;
  --muted: #5f6b76;
  --line: #d8dee5;
  --link: #8a1538;
  --link-hover: #0f5e7a;
  --paper: #ffffff;
  --wash: #f7f8fa;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--paper);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 17px;
  line-height: 1.6;
}

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

a:hover,
a:focus {
  color: var(--link-hover);
  text-decoration: underline;
}

.site-header {
  position: relative;
  min-height: 176px;
  border-bottom: 1px solid var(--line);
  background-color: #1f3948;
  background-image: url("/images/victoria-harbour.jpg");
  background-position: center 54%;
  background-size: cover;
}

.site-header::after {
  position: absolute;
  inset: 0;
  background: rgba(10, 28, 40, 0.52);
  content: "";
}

.site-header__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  width: min(1100px, calc(100% - 40px));
  min-height: 176px;
  margin: 0 auto;
  padding: 26px 0;
}

.site-header__controls {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-title {
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

.site-nav a {
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.site-nav a:hover,
.site-nav a:focus {
  color: #ffffff;
}

.language-toggle {
  min-width: 58px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 4px;
  color: #ffffff;
  background: rgba(10, 28, 40, 0.34);
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.3;
}

.language-toggle:hover,
.language-toggle:focus-visible {
  border-color: #ffffff;
  background: rgba(10, 28, 40, 0.62);
}

[data-lang][hidden] {
  display: none !important;
}

html[lang="zh-CN"] body {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
}

html[lang="zh-CN"] .content h1,
html[lang="zh-CN"] .content h2,
html[lang="zh-CN"] .content h3,
html[lang="zh-CN"] .profile-panel h1,
html[lang="zh-CN"] .site-nav,
html[lang="zh-CN"] .profile-list dt,
html[lang="zh-CN"] .date,
html[lang="zh-CN"] .tag,
html[lang="zh-CN"] .site-footer,
html[lang="zh-CN"] .language-toggle {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

.page-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 46px;
  width: min(1100px, calc(100% - 40px));
  margin: 34px auto 42px;
}

.profile-panel {
  border-right: 1px solid var(--line);
  padding-right: 26px;
  font-size: 15px;
  color: var(--muted);
}

.profile-photo {
  display: block;
  width: 190px;
  height: 232px;
  object-fit: cover;
  object-position: center 26%;
  border: 1px solid var(--line);
  margin-bottom: 18px;
}

.profile-panel h1 {
  margin: 0 0 4px;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 26px;
  line-height: 1.2;
}

.profile-title {
  margin: 0 0 16px;
  color: var(--text);
  font-weight: 700;
}

.profile-list {
  margin: 18px 0 0;
}

.profile-list dt {
  margin-top: 14px;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.profile-list dd {
  margin: 3px 0 0;
}

.content {
  max-width: 780px;
}

.content h1 {
  margin: 0 0 3px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 34px;
  line-height: 1.2;
}

.subtitle {
  margin: 0 0 22px;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
}

.content h2 {
  margin: 30px 0 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
  color: #273444;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 21px;
  line-height: 1.3;
}

.content h3 {
  margin: 22px 0 8px;
  color: #273444;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
}

.content p {
  margin: 0 0 14px;
}

.content ul,
.content ol {
  margin: 8px 0 16px 22px;
  padding: 0;
}

.content li {
  margin: 5px 0;
}

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

.news-list li {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  margin: 8px 0;
}

.date {
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  white-space: nowrap;
}

.pub-list {
  margin-left: 0;
  list-style: none;
  counter-reset: publication;
}

.pub-list li {
  position: relative;
  margin: 12px 0 17px;
  padding-left: 34px;
  counter-increment: publication;
}

.pub-list li::before {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--muted);
  content: counter(publication) ".";
  font-family: Arial, Helvetica, sans-serif;
}

.paper-title {
  color: var(--text);
  font-weight: 700;
}

.venue {
  color: var(--link);
  font-weight: 700;
}

.tag {
  display: inline-block;
  margin-left: 4px;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.timeline {
  margin-left: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 14px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
}

.site-footer {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
}

@media (max-width: 820px) {
  .site-header__inner,
  .page-shell,
  .site-footer {
    width: min(100% - 28px, 680px);
  }

  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
  }

  .site-header__controls {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .page-shell {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 24px;
  }

  .profile-panel {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    column-gap: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 20px;
  }

  .profile-photo {
    grid-row: span 4;
    width: 132px;
    height: 162px;
  }

  .profile-list {
    margin-top: 8px;
  }

  .content h1 {
    font-size: 28px;
  }

  .news-list li,
  .timeline li {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }

  .profile-panel {
    display: block;
  }

  .profile-photo {
    width: 150px;
    height: 184px;
  }

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