:root {
  --paper: #f7f9fc;
  --paper-deep: #eef3f9;
  --ink: #111111;
  --muted: #111111;
  --faint: #111111;
  --line: #dedede;
  --blue-light: #111111;
  --blue: #111111;
  --blue-deep: #000000;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.1);
}

@font-face {
  font-family: "Test National 2";
  src: url("./assets/TestNational2-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: #111111;
  background: #ffffff;
  font-family: "Test National 2", Arial, sans-serif;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.14);
}

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

a {
  color: var(--blue-light);
  text-decoration-color: rgba(0, 0, 0, 0.42);
  text-underline-offset: 0.18em;
  transition:
    color 180ms ease,
    text-decoration-color 180ms ease,
    transform 180ms ease;
}

a:hover {
  color: var(--blue-deep);
  text-decoration-color: currentColor;
}

a:focus-visible {
  border-radius: 3px;
  outline: 2px solid var(--blue-light);
  outline-offset: 4px;
}

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

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.018em;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  padding: 0.55rem 0.8rem;
  color: var(--white);
  background: var(--blue-deep);
  border-radius: 6px;
  transform: translateY(-180%);
}

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

.site-header {
  border-bottom: 1px solid #e8e8e8;
  background: rgba(255, 255, 255, 0.96);
}

.site-nav {
  display: flex;
  gap: 3rem;
  align-items: center;
  width: min(1200px, calc(100% - 3rem));
  min-height: 66px;
  margin: 0 auto;
}

.site-nav__brand {
  display: block;
  width: 32px;
  height: 32px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav__brand svg {
  display: block;
  width: 100%;
  height: 100%;
}

.site-nav__links {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.site-nav__links a {
  color: #111111;
  font-size: 0.93rem;
  text-decoration: none;
}

.site-nav__links a:hover {
  color: var(--blue-deep);
}

.page-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 820px);
  gap: clamp(3rem, 5vw, 5rem);
  width: min(1160px, calc(100% - 3rem));
  margin: 0 auto;
  padding: clamp(2.8rem, 5vw, 4.75rem) 0 4rem;
}

.profile {
  padding-right: 0;
}

.profile__inner {
  position: sticky;
  top: 3rem;
  text-align: center;
}

.profile__header {
  margin-bottom: 1rem;
}

.profile__photo {
  width: 140px;
  height: 140px;
  margin: 0 auto 1.3rem;
  border: 1px solid #e2e2e2;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.09);
}

.eyebrow {
  margin-bottom: 0.72rem;
  color: var(--blue);
  font-family:
    "Lato", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.profile h1 {
  margin: 0;
  font-family: inherit;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.profile h1 span {
  margin-left: 0.12rem;
  color: var(--muted);
  font-family: "Long Cang", "STKaiti", "KaiTi", cursive;
  font-size: 0.66em;
  font-weight: 400;
  letter-spacing: 0;
}

.profile__role {
  display: grid;
  gap: 0.08rem;
  justify-items: center;
  margin-bottom: 1.45rem;
  color: #111111;
  font-size: 0.84rem;
  line-height: 1.55;
}

.profile__degree {
  display: inline-flex;
  gap: 0.32rem;
  align-items: center;
}

.profile__degree > i {
  color: #111111;
}

.profile__institution {
  font-weight: 700;
}

.contact-list {
  display: grid;
  gap: 0.08rem;
  width: 178px;
  margin: 0 auto;
  padding-top: 1rem;
  border-top: 1px solid #e8e8e8;
  text-align: left;
}

.contact-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  padding: 0.43rem 0;
  color: #111111;
  text-decoration: none;
}

.contact-item:hover {
  color: var(--blue-deep);
  transform: translateX(3px);
}

.contact-item__mark {
  display: block;
  width: 20px;
  height: 20px;
  color: #111111;
  font-size: 1rem;
  object-fit: contain;
  text-align: center;
}

.contact-item > span {
  color: inherit;
  font-size: 0.84rem;
  font-weight: 400;
}

main {
  min-width: 0;
}

.section {
  padding: 0 0 clamp(4.5rem, 8vw, 6.5rem);
  scroll-margin-top: 2rem;
}

.biography {
  padding-bottom: clamp(3.5rem, 7vw, 5.5rem);
  color: #111111;
  font-size: 0.98rem;
}

.biography p {
  max-width: 76ch;
}

.biography p:last-child {
  margin-bottom: 0;
}

.biography strong {
  color: #111111;
  font-weight: 700;
}

.biography a.advisor-link,
.biography a.advisor-link:visited {
  color: #2c73d2;
  text-decoration: none !important;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  transition:
    color 180ms ease,
    background-size 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.biography a.advisor-link:hover {
  color: #4c88d8;
  text-decoration: none !important;
  background-size: 100% 1px;
}

.welcome-heading {
  margin: 0 0 1.6rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid #e8e8e8;
  color: #111111;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.phd-note {
  max-width: 680px;
  margin: 1.5rem 0 0;
  color: #c62828;
  font-weight: 700;
  line-height: 1.55;
}

.phd-note strong {
  display: inline;
  color: inherit;
}

.heading-emoji,
.inline-emoji {
  font-family:
    "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
}

.heading-emoji {
  display: inline-block;
  margin-right: 0.18em;
}

.inline-emoji {
  margin-left: 0.12em;
}

.section-heading {
  margin-bottom: 0.35rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid #e8e8e8;
}

.section-heading h2 {
  margin: 0;
  font-family: inherit;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

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

.publication-list > li {
  border-bottom: 1px solid var(--line);
}

.publication-list > li:last-child {
  border-bottom: 0;
}

.publication {
  padding: 2rem 0;
  transition: transform 180ms ease;
}

.publication-list > li:first-child .publication {
  padding-top: 1.15rem;
}

.publication-list > li:hover .publication {
  transform: translateX(5px);
}

.publication__venue {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: -0.25rem 0 0.55rem;
  color: #777777;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.publication__venue img {
  flex: 0 0 auto;
  width: 58px;
  height: 18px;
  object-fit: contain;
  object-position: left center;
}

.publication h3 {
  margin-bottom: 0.7rem;
  font-size: 1.1rem;
  font-weight: 590;
  line-height: 1.36;
  letter-spacing: -0.02em;
}

.publication h3 a {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  transition:
    color 180ms ease,
    background-size 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.publication h3 a:hover {
  background-size: 100% 1px;
}

.publication__authors {
  margin-bottom: 0.55rem;
  color: #777777;
  font-size: 0.82rem;
  line-height: 1.55;
}

.publication__authors strong {
  color: var(--ink);
  font-weight: 700;
}

.equal-contrib {
  position: relative;
  top: -0.12em;
  margin-left: 0.04em;
  font-size: 0.72em;
  font-weight: 700;
  line-height: 0;
}

.publication__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.publication__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.45rem 0.62rem;
  border: 1px solid #d2d5d2;
  border-radius: 2px;
  color: #5d625f;
  background: #fafbfa;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

.publication__link:hover {
  color: #111111;
  background: #f1f3f1;
  border-color: #aeb3af;
}

.publication__link:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 2px;
}

.external-arrow {
  margin-left: 0.28rem;
  font-size: 0.95em;
  line-height: 1;
}

.bibtex-toggle {
  min-width: 58px;
}

.bibtex-toggle[aria-expanded="true"] {
  color: #ffffff;
  background: #111111;
  border-color: #111111;
}

.bibtex-panel {
  max-width: 100%;
  margin-top: 0.7rem;
  overflow-x: auto;
  border: 1px solid #d2d5d2;
  border-radius: 2px;
  background: #f7f8f7;
}

.bibtex-panel[hidden] {
  display: none;
}

.bibtex-panel pre {
  min-width: max-content;
  margin: 0;
  padding: 0.9rem 1rem;
  color: #303330;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.68rem;
  line-height: 1.55;
  white-space: pre;
}

.bibtex-panel pre:focus-visible {
  outline: 2px solid #111111;
  outline-offset: -2px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 0 1rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.76rem;
}

footer a {
  margin-left: auto;
}

@media (max-width: 860px) {
  .site-nav {
    width: min(680px, calc(100% - 2.5rem));
  }

  .page-shell {
    grid-template-columns: 1fr;
    gap: 4.5rem;
    width: min(680px, calc(100% - 2.5rem));
    padding-top: 2.5rem;
  }

  .profile {
    padding: 0 0 2.5rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .profile__inner {
    position: static;
    display: block;
    text-align: center;
  }

  .profile__header {
    margin-bottom: 1rem;
  }

  .profile__photo {
    width: 140px;
    height: 140px;
    margin: 0 auto 1.3rem;
    border-radius: 4px;
  }

  .profile__role {
    margin-bottom: 1.45rem;
  }

  .contact-list {
    margin: 0 auto;
  }

  .section {
    padding-bottom: 4.5rem;
  }
}

@media (max-width: 540px) {
  .site-nav {
    width: calc(100% - 2rem);
    min-height: 60px;
  }

  .site-nav__brand {
    display: none;
  }

  .site-nav__links {
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
  }

  .site-nav__links a {
    font-size: 0.85rem;
  }

  .page-shell {
    width: min(100% - 2rem, 680px);
    gap: 4rem;
  }

  .profile__photo {
    width: 104px;
    height: 104px;
  }

  .contact-list {
    margin: 0 auto;
  }

  .profile h1 {
    font-size: 1.55rem;
  }

  .profile__role,
  .profile__institution {
    font-size: 0.82rem;
  }

  .publication-list > li:hover .publication {
    transform: none;
  }

  footer {
    flex-direction: column;
    gap: 0.5rem;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
