:root {
  --system-font: -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", Arial, sans-serif;
  --chinese-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --text: #494e52;
  --muted: #626e79;
  --link: #237c95;
  --rule: #f2f3f3;
  font-size: 16px;
  color-scheme: light;
  scroll-padding-top: 5.25rem;
}

@font-face {
  font-family: "Sidebar Icons";
  src: url("assets/fa-solid-900.woff2") format("woff2");
  font-weight: 900;
  font-display: block;
}

@media (min-width: 48em) {
  :root {
    font-size: 18px;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--system-font);
  line-height: 1.5;
}

html[lang="zh-CN"] body {
  font-family: var(--chinese-font);
}

html[lang="zh-CN"] main {
  line-height: 1.85;
}

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

h1, h2, h3 {
  font-family: var(--system-font);
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: var(--link);
  text-underline-offset: 0.13em;
}

a:hover {
  color: #17566b;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 4px;
}

.shell {
  width: min(100%, 1280px);
  margin-inline: auto;
  padding-inline: 1rem;
}

.skip-link {
  position: absolute;
  z-index: 3;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.4rem 0.65rem;
  transform: translateY(-200%);
  background: #fff;
}

.skip-link:focus {
  transform: none;
}

.masthead {
  position: sticky;
  z-index: 2;
  top: 0;
  background: #fff;
  border-bottom: 1px solid var(--rule);
  font-family: var(--system-font);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  min-height: 69px;
  padding-block: 0.65rem;
}

.header-inner a, .profile-links a {
  color: inherit;
  text-decoration: none;
}

.header-inner a:hover, .profile-links a:hover {
  color: var(--link);
  text-decoration: underline;
}

.site-name {
  min-width: 0;
  margin-inline-end: auto;
  font-weight: 700;
}

.site-nav {
  display: flex;
  gap: 1.35rem;
  order: 1;
}

.language-switch {
  flex: none;
  order: 2;
  padding-inline-start: 1.15rem;
  border-inline-start: 1px solid #dce1e6;
  font-size: 0.9em;
}

.nav-toggle, .contact-toggle {
  display: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 17.5%) minmax(0, 62%);
  gap: 3.7%;
  align-items: start;
  padding-block: 2rem 4rem;
}

.profile {
  font-family: var(--system-font);
}

.portrait {
  display: block;
  width: min(100%, 175px);
  height: auto;
  padding: 5px;
  border: 1px solid var(--rule);
  border-radius: 50%;
}

.profile h1 {
  margin-top: 10px;
  font-size: 1em;
}

.profile-details p, .profile-links {
  font-size: 0.75rem;
  line-height: 1.5;
}

.profile-details p {
  margin-top: 0.55em;
}

.profile-links {
  display: grid;
  gap: 0.35em;
  margin: 0.85em 0 0;
  padding: 0;
  list-style: none;
  overflow-wrap: anywhere;
}

.profile-links li, .profile-links a {
  display: flex;
  align-items: center;
  gap: 0.55em;
}

.profile-icon {
  flex: none;
  width: 16px;
  height: 16px;
}

.solid-icon {
  font: 900 14px/16px "Sidebar Icons";
  text-align: center;
}

main {
  min-width: 0;
  overflow-wrap: anywhere;
}

main section + section {
  margin-top: 2.65rem;
}

main h2 {
  margin-bottom: 0.5em;
  padding-bottom: 0.5em;
  border-bottom: 1px solid var(--rule);
  font-size: 1.25em;
}

main .education-title {
  margin-bottom: 0.6em;
  padding-bottom: 0;
  border-bottom: 0;
  font-size: 1.45em;
}

main h3 {
  font-size: 1em;
}

main h3 + p {
  margin-top: 0.3em;
}

.education-list {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 2rem 0 0;
  list-style: none;
}

.education-list::before {
  position: absolute;
  top: 0.6rem;
  inset-inline: 24.5%;
  height: 1px;
  background: linear-gradient(90deg, #718297, #0078ae);
  content: "";
}

.education-list li {
  position: relative;
  padding: 1rem;
  border: 1px solid #d6dfe7;
  border-radius: 12px;
  background: linear-gradient(#fafcfd, #f6f8fa);
  box-shadow: 0 8px 20px #203d4e09;
  font-size: 0.78rem;
}

.education-list li::before {
  position: absolute;
  top: -1.4rem;
  left: 50%;
  width: 15px;
  height: 15px;
  transform: translate(-50%, -50%);
  border: 4px solid #fff;
  border-radius: 50%;
  background: #343e4b;
  box-sizing: content-box;
  content: "";
}

.education-list .education-current {
  border-color: #a2cce7;
}

.education-list .education-current::before {
  background: #0078ae;
  box-shadow: 0 0 0 4px #0078ae33;
}

.education-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

html[lang="zh-CN"] .education-meta {
  flex-direction: column;
  align-items: flex-start;
}

.education-period {
  color: var(--muted);
  font-weight: 700;
}

.education-status {
  padding: 0.03rem 0.42rem;
  border: 1px solid #cdd8e1;
  border-radius: 1rem;
  background: #fff;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.education-current .education-status {
  border-color: #b7d6e8;
  color: #195f7f;
}

.education-list h3 {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.education-supervisor {
  margin-top: 0.45rem;
  padding-top: 0.35rem;
  border-top: 1px solid #dce5ed;
}

.author-note {
  margin-bottom: 0.85em;
  color: var(--muted);
  font-size: 0.875em;
}

.honors-list {
  margin: 0;
  padding-inline-start: 1.5em;
}

.honors-list time {
  margin-inline-end: 0.3em;
  font-variant-numeric: tabular-nums;
}

.visit-counter {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.85rem;
  max-width: 100%;
  margin-top: 2rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid #d6dfe7;
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 700;
}

.visit-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.visit-label::before {
  width: 0.43rem;
  height: 0.43rem;
  border-radius: 50%;
  background: #728394;
  box-shadow: 0 0 0 3px #dfe7ee;
  content: "";
}

.visit-counter[data-ready] .visit-label::before {
  background: #376fa8;
}

.visit-total {
  color: #326ca5;
  font-size: 1.12rem;
  font-variant-numeric: tabular-nums;
}

.visit-since, .visit-status {
  padding-inline-start: 0.65rem;
  border-inline-start: 1px solid #d6dfe7;
  white-space: nowrap;
}

.visit-status {
  font-weight: 400;
}

.site-footer {
  padding-block: 1.1rem;
  border-top: 1px solid var(--rule);
  background: #f6f7f8;
  color: var(--muted);
  font-family: var(--system-font);
  font-size: 0.75rem;
}

@media (max-width: 1023px) {
  .page-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .profile {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 0.35rem 0.95rem;
    align-items: start;
  }

  .js .profile {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  .portrait {
    width: 36px;
    padding: 0;
    border: 0;
  }

  .profile h1, .profile-details p {
    margin-top: 0;
  }

  .profile-contacts {
    grid-column: 2;
  }

  .js .profile-contacts {
    position: relative;
    grid-column: auto;
    align-self: center;
  }

  .contact-toggle:not([hidden]) {
    display: block;
    padding: 0.4rem 0.55rem;
    border: 1px solid #b9bec3;
    border-radius: 4px;
    background: #fff;
    font-size: 0.75rem;
    font-weight: 700;
  }

  .contact-toggle:not([hidden]) + .profile-links {
    position: absolute;
    z-index: 1;
    inset-inline-end: 0;
    width: max-content;
    max-width: calc(100vw - 2rem);
    margin-top: 0.3rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid #dce1e6;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 4px 12px #25333d14;
  }

  .contact-toggle:not([hidden])[aria-expanded="false"] + .profile-links {
    display: none;
  }
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 0.55rem 0.8rem;
  }

  .site-name {
    flex: 1;
    font-size: 0.92em;
  }

  .language-switch {
    order: 0;
    padding-inline-start: 0.8rem;
  }

  .nav-toggle:not([hidden]) {
    display: block;
    padding: 0.35rem;
    border: 0;
    background: transparent;
    line-height: 1;
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 0.4rem 1.2rem;
    width: 100%;
  }

  .nav-toggle:not([hidden])[aria-expanded="false"] ~ .site-nav {
    display: none;
  }
}

@media (max-width: 42em) {
  .education-list {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 0 0 1.6rem;
  }

  .education-list::before {
    top: 1rem;
    bottom: 0;
    left: 0.48rem;
    right: auto;
    width: 1px;
    height: auto;
    background: linear-gradient(#718297, #0078ae);
  }

  .education-list li::before {
    top: 1rem;
    left: -1.12rem;
  }
}
