@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600&family=Source+Serif+4:ital,opsz,wght@0,8..60,500;0,8..60,600;1,8..60,500;1,8..60,600&display=swap");

/* ================================================================
   1. Design tokens and base styles
   ================================================================ */

:root {
  --navy: #163f75;
  --ink: #253746;
  --muted: #607282;
  --paper: #ffffff;
  --soft: #f3f6fa;
  --line: #d8e1ea;
  --accent: #315f8f;
  --control-line: #b4c1ce;
  --code-ink: #33495d;
  --hero-background: #020102;
  --serif: "Source Serif 4", "Songti SC", "Noto Serif CJK SC", Georgia, serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --content-width: 1120px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-synthesis: none;
  font-size: 17px;
  line-height: 1.58;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

#page-content {
  flex: 1;
}

::selection {
  background: rgb(49 95 143 / 20%);
  color: var(--ink);
}

#page-content,
#site-footer {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 360ms var(--ease-out),
    transform 360ms var(--ease-out);
}

body.page-ready #page-content,
body.page-ready #site-footer {
  opacity: 1;
  transform: translateY(0);
}

body.page-leaving #page-content,
body.page-leaving #site-footer {
  opacity: 0;
  transform: translateY(-7px);
  transition-duration: 170ms;
}

body.language-changing #page-content {
  opacity: 0.35;
  transform: translateY(3px);
  transition-duration: 100ms;
}

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

a {
  color: inherit;
  transition:
    color 220ms var(--ease-out),
    background-color 220ms var(--ease-out),
    border-color 220ms var(--ease-out),
    transform 220ms var(--ease-out);
}

button,
input,
img {
  transition:
    color 220ms var(--ease-out),
    background-color 220ms var(--ease-out),
    border-color 220ms var(--ease-out),
    opacity 220ms var(--ease-out),
    transform 320ms var(--ease-out),
    filter 320ms var(--ease-out);
}

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

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* ================================================================
   2. Shared header and navigation
   ================================================================ */

.site-header {
  position: relative;
  z-index: 100;
  min-height: 78px;
  padding: 0 max(24px, calc((100vw - var(--content-width)) / 2));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  background: var(--paper);
  border-top: 5px solid var(--navy);
  border-bottom: 1px solid var(--line);
}

.menu-toggle {
  display: none;
}

.site-header nav {
  grid-column: 1;
  display: flex;
  justify-content: flex-end;
  gap: 27px;
}

.site-header nav a {
  padding: 27px 0 23px;
  border-bottom: 3px solid transparent;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 500;
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a.current {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.language-toggle {
  grid-column: 2;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid var(--control-line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--muted);
  font-family: var(--sans);
  cursor: pointer;
}

.language-toggle i {
  width: 20px;
  height: 10px;
  position: relative;
  border-radius: 10px;
  background: var(--navy);
}

.language-toggle i::after {
  content: "";
  width: 6px;
  height: 6px;
  position: absolute;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: var(--paper);
  transition: transform 180ms ease;
}

.language-toggle.en i::after {
  transform: translateX(10px);
}

.language-toggle .active {
  color: var(--navy);
  font-weight: 600;
}

/* ================================================================
   3. Shared typography and controls
   ================================================================ */

.tag {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ================================================================
   4. Home page
   ================================================================ */

.hero {
  max-width: var(--content-width);
  margin: auto;
  padding: 36px 0 54px;
}

.hero-banner {
  position: relative;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border: 1px solid #1c1a1c;
  background: var(--hero-background);
}

.hero-banner > .hero-animation {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right center;
}

.hero-banner-mask {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: clamp(30px, 5vw, 62px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--paper);
  background: linear-gradient(
    90deg,
    rgb(2 1 2 / 96%) 0%,
    rgb(2 1 2 / 78%) 28%,
    rgb(2 1 2 / 22%) 50%,
    transparent 68%
  );
}

.hero-media-credit {
  position: absolute;
  right: 14px;
  bottom: 13px;
  z-index: 2;
  padding: 4px 7px;
  border-radius: 2px;
  background: rgb(2 1 2 / 58%);
  color: rgb(255 255 255 / 72%);
  font-size: 10px;
  letter-spacing: 0.025em;
}

.hero-banner-mask h2 {
  max-width: 620px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 5.2vw, 64px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.02;
}

.hero-eyebrow {
  margin: 0 0 14px;
  color: rgb(255 255 255 / 78%);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-head h2 {
  margin: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 39px;
  font-weight: 500;
  line-height: 1.15;
}

.content-section {
  max-width: var(--content-width);
  margin: auto;
  padding: 50px 0 56px;
}

.section-head {
  margin-bottom: 23px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.section-head > a {
  color: var(--accent);
  font-size: 14px;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.featured-grid article {
  padding-top: 13px;
  display: flex;
  flex-direction: column;
  border-top: 2px solid var(--navy);
}

.featured-grid article:hover img {
  filter: saturate(0.95);
  transform: translateY(-4px);
}

.featured-grid img {
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 6px;
  border: 1px solid var(--line);
  background: var(--paper);
  object-fit: contain;
  filter: saturate(0.8);
}

.featured-grid p {
  margin: 12px 0 0;
  color: var(--accent);
  font-size: 12px;
}

.featured-grid p em {
  font-family: var(--serif);
  font-style: italic;
}

.featured-grid h3 {
  margin: 8px 0 14px;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.23;
}

.featured-grid a {
  margin-top: auto;
  color: var(--accent);
  font-size: 13px;
  text-underline-offset: 4px;
}

.news-section {
  border-top: 1px solid var(--line);
}

.news-list {
  border-top: 1px solid var(--line);
}

.news-list a {
  padding: 16px 10px;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) 110px;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.news-list a:hover > span {
  color: var(--accent);
}

.news-list a:hover {
  background: var(--soft);
}

.news-list time,
.news-list b {
  color: var(--muted);
  font-size: 12px;
}

.news-list b {
  color: var(--accent);
  text-align: right;
}

.news-archive {
  max-width: 1000px;
  margin: auto;
  padding: 46px 0 84px;
}

.news-archive > .news-list {
  border-top: 1px solid rgb(22 63 117 / 28%);
}

.news-archive > .news-list a {
  position: relative;
  padding: 20px 4px;
  border: 0;
  border-bottom: 1px solid rgb(22 63 117 / 16%);
  transition: padding-left 180ms ease, background 180ms ease;
}

.news-archive > .news-list a::before {
  position: absolute;
  top: -1px;
  left: 0;
  width: 38px;
  height: 2px;
  background: var(--accent);
  content: "";
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: opacity 180ms ease, transform 180ms ease;
}

.news-archive > .news-list a:hover,
.news-archive > .news-list a:focus-visible {
  padding-left: 10px;
  background: linear-gradient(90deg, rgb(49 95 143 / 5%), transparent 48%);
}

.news-archive > .news-list a:hover::before,
.news-archive > .news-list a:focus-visible::before {
  opacity: 0.8;
  transform: scaleX(1);
}

/* ================================================================
   5. Interior page headers
   ================================================================ */

.page-hero {
  padding: 44px max(24px, calc((100vw - var(--content-width)) / 2)) 40px;
  background: linear-gradient(110deg, var(--soft) 0%, #f8fafc 76%);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  max-width: 980px;
  margin: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(44px, 5.7vw, 68px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.07;
}

/* ================================================================
   6. Research listing and detail pages
   ================================================================ */

.research-card-list {
  max-width: var(--content-width);
  margin: auto;
  padding: 48px 0 82px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 36px;
  row-gap: 40px;
}

.research-card {
  min-width: 0;
  padding: 0 0 24px;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition:
    border-color 260ms var(--ease-out),
    transform 260ms var(--ease-out);
}

.research-card img {
  width: 100%;
  aspect-ratio: 8 / 5;
  object-fit: cover;
  filter: saturate(0.82);
  transition:
    filter 260ms var(--ease-out),
    transform 260ms var(--ease-out);
}

.research-card > div {
  padding: 18px 4px 0;
}

.research-card h2 {
  margin: 0 0 11px;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.1;
}

.research-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.55;
}

.research-card div > span:last-child {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.research-card:hover h2 {
  color: var(--accent);
}

.research-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.research-card:hover img {
  filter: saturate(0.95);
  transform: scale(1.012);
}

.project-page {
  max-width: 960px;
  margin: auto;
  padding: 58px 0 88px;
}

.back-link {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-underline-offset: 4px;
}

.project-page > h1 {
  margin: 24px 0 32px;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(42px, 5.7vw, 64px);
  font-weight: 500;
  line-height: 1.05;
}

.project-copy {
  max-width: 760px;
  margin: 14px auto 38px;
}

.project-copy > p {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.72;
}

.project-copy h2 {
  margin-top: 40px;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
}

.project-figure {
  margin: 38px 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.project-figure img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background: var(--paper);
}

.project-figure figcaption {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
}

.project-figure figcaption a,
.project-figure .figure-credit {
  color: var(--accent);
  font-weight: 600;
}

.project-figure figcaption a {
  text-underline-offset: 3px;
}

.project-figure figcaption a:hover {
  color: var(--navy);
  text-underline-offset: 5px;
}

.related-publications {
  margin-top: 10px;
}

/* ================================================================
   7. About page
   ================================================================ */

.about-profile {
  max-width: 1000px;
  margin: auto;
  padding: 56px 0 88px;
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 56px;
  align-items: start;
}

.about-profile > img {
  width: 100%;
  padding: 6px;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  object-fit: cover;
  filter: saturate(0.84);
}

.about-profile h2 {
  margin: 4px 0 6px;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 45px;
  font-weight: 500;
}

.about-profile h3 {
  margin: 0 0 20px;
  color: var(--accent);
  font-size: 17px;
  font-weight: 500;
}

.about-profile p {
  color: var(--ink);
  line-height: 1.68;
}

.about-biography p {
  margin: 0 0 14px;
}

.about-biography a {
  color: var(--navy);
  font-weight: 500;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  text-underline-offset: 3px;
}

.about-biography a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
  text-underline-offset: 5px;
}

.profile-links {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.profile-links a {
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  text-underline-offset: 4px;
}

.profile-links a:hover,
.back-link:hover,
.section-head > a:hover {
  color: var(--accent);
  text-underline-offset: 7px;
}

/* ================================================================
   8. Teaching page
   ================================================================ */

.teaching-page {
  max-width: 1000px;
  margin: auto;
  padding: 50px 0 88px;
}

.teaching-history {
  max-width: 850px;
  margin: auto;
}

.teaching-entry {
  padding: 24px 0 26px;
  display: grid;
  grid-template-columns: 135px minmax(0, 1fr);
  gap: 24px;
  border-top: 1px solid var(--line);
}

.teaching-entry:first-of-type {
  border-top: 2px solid var(--navy);
}

.teaching-meta p {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.035em;
}

.teaching-meta p:last-child {
  color: var(--muted);
  font-weight: 400;
}

.teaching-entry h2 {
  margin: -3px 0 9px;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
}

.teaching-entry h3 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.teaching-entry > div:last-child > p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* ================================================================
   9. Publication browser
   ================================================================ */

.bib-browser {
  max-width: 1000px;
  margin: auto;
  padding: 48px 0 88px;
}

.bib-browser label {
  margin-bottom: 7px;
  display: block;
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.015em;
}

.bib-browser input {
  width: 100%;
  margin-bottom: 0;
  padding: 13px 14px;
  border: 1px solid var(--control-line);
  border-radius: 2px;
  background: #f8fafc;
  color: var(--ink);
  font: 16px var(--sans);
}

.corresponding-note {
  margin: 8px 0 38px;
  color: var(--muted);
  font-size: 13px;
}

.bib-browser input:focus {
  border-color: var(--accent);
  background: var(--paper);
}

.pub-section-title {
  margin: 46px 0 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--navy);
  color: var(--navy);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
}

.year-heading {
  margin-top: 38px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--navy);
  color: var(--navy);
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 500;
}

.bib-entry {
  padding: 22px 0;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
  border-bottom: 1px solid var(--line);
  animation: publication-in 360ms var(--ease-out) both;
}

@keyframes publication-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.related-publications .bib-entry {
  grid-template-columns: 135px minmax(0, 1fr);
}

.pub-media {
  align-self: start;
}

.pub-media > span {
  max-width: 100%;
  margin-bottom: 5px;
  padding: 3px 7px;
  display: block;
  overflow: hidden;
  border: 1px solid rgb(22 63 117 / 42%);
  border-radius: 2px;
  background: rgb(22 63 117 / 84%);
  color: rgb(255 255 255 / 96%);
  font-family: var(--serif);
  font-size: 14px;
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.05;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pub-media img {
  width: 100%;
  height: 108px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  object-fit: contain;
}

.bib-main {
  min-width: 0;
}

.bib-entry h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
}

.authors,
.venue {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}

.authors {
  margin: 3px 0 0;
}

.venue {
  margin: 2px 0 0;
}

.venue em {
  font-family: var(--serif);
  font-style: italic;
}

.authors strong {
  color: var(--ink);
  font-weight: 600;
}

.corresponding-mark {
  margin-left: 1px;
  color: inherit;
  font-size: 0.82em;
  font-weight: 600;
  line-height: 0;
}

.more-authors {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.authors-more-names {
  max-width: 0;
  display: inline-block;
  overflow: hidden;
  font-size: 0;
  line-height: 0;
  opacity: 0;
  vertical-align: baseline;
  white-space: nowrap;
  transform: translateX(-4px);
  transition:
    max-width 520ms var(--ease-out),
    opacity 260ms ease,
    transform 360ms var(--ease-out);
}

.authors-more.expanded .authors-more-names {
  max-width: 70rem;
  font-size: inherit;
  line-height: inherit;
  opacity: 1;
  text-decoration-color: color-mix(in srgb, var(--muted) 38%, transparent);
  text-decoration-line: underline;
  text-decoration-style: dashed;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transform: translateX(0);
  cursor: pointer;
}

.authors-more.expanded .authors-more-names:hover {
  text-decoration-color: color-mix(in srgb, var(--muted) 68%, transparent);
}

.authors-more.expanded .more-authors {
  display: none;
}

.more-authors:hover {
  color: var(--navy);
}

.pub-actions {
  margin-top: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pub-actions button,
.pub-actions a {
  padding: 4px 9px;
  border: 1px solid var(--control-line);
  border-radius: 2px;
  background: var(--paper);
  color: var(--navy);
  font: 600 11px var(--sans);
  letter-spacing: 0.035em;
  text-decoration: none;
  cursor: pointer;
}

.pub-actions button:active,
.pub-actions a:active {
  transform: translateY(1px);
}

.pub-actions button:hover,
.pub-actions button.active,
.pub-actions a:hover {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--paper);
}

.pub-extra {
  margin-top: 0;
  padding: 0 16px;
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  border-left: 2px solid transparent;
  background: var(--soft);
  font-size: 14px;
  opacity: 0;
  transform: translateY(-5px);
  transition:
    grid-template-rows 420ms var(--ease-out),
    margin 420ms var(--ease-out),
    padding 420ms var(--ease-out),
    opacity 220ms ease,
    transform 420ms var(--ease-out);
}

.pub-extra-inner {
  min-height: 0;
  overflow: hidden;
}

.pub-extra.open {
  margin-top: 12px;
  padding: 16px;
  grid-template-rows: 1fr;
  border-left-color: var(--accent);
  opacity: 1;
  transform: translateY(0);
}

.bibtex-panel code {
  display: block;
  color: var(--code-ink);
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
}

.abstract-panel p {
  margin: 0;
  color: var(--ink);
  line-height: 1.65;
}

.bib-copy {
  margin: 0 0 10px;
}

.no-results {
  padding: 40px 0;
  color: var(--muted);
}

/* ================================================================
   10. Footer
   ================================================================ */

.compact-footer {
  padding: 23px max(24px, calc((100vw - var(--content-width)) / 2));
  background: var(--navy);
  color: var(--paper);
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.02em;
}

/* ================================================================
   11. Responsive layout
   ================================================================ */

@media (max-width: 1168px) {
  .hero,
  .content-section,
  .research-card-list,
  .about-profile,
  .project-page,
  .bib-browser,
  .news-archive,
  .teaching-page {
    margin-right: 24px;
    margin-left: 24px;
  }
}

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

  .site-header {
    min-height: 64px;
    padding: 10px 18px;
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
    grid-column: 1;
    justify-self: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 10px;
    border: 0;
    background: transparent;
    color: var(--navy);
    cursor: pointer;
  }

  .menu-toggle span {
    width: 22px;
    height: 2px;
    display: block;
    border-radius: 2px;
    background: currentColor;
    transform-origin: center;
    transition:
      opacity 180ms var(--ease-out),
      transform 240ms var(--ease-out);
  }

  .site-header.menu-open .menu-toggle span:first-child {
    transform: translateY(7px) rotate(45deg);
  }

  .site-header.menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .site-header.menu-open .menu-toggle span:last-child {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-header nav {
    width: 100%;
    max-height: 0;
    position: absolute;
    top: 100%;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    visibility: hidden;
    border-bottom: 1px solid var(--line);
    background: rgb(255 255 255 / 98%);
    box-shadow: 0 14px 24px rgb(22 63 117 / 10%);
    opacity: 0;
    transform: translateY(-6px);
    transition:
      max-height 360ms var(--ease-out),
      opacity 220ms var(--ease-out),
      transform 280ms var(--ease-out),
      visibility 0s linear 360ms;
  }

  .site-header.menu-open nav {
    max-height: 390px;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s;
  }

  .site-header nav a {
    margin: 0 18px;
    padding: 12px 3px;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
  }

  .site-header nav a:last-child {
    border-bottom: 0;
  }

  .site-header nav a:hover,
  .site-header nav a.current {
    border-bottom-color: var(--line);
    color: var(--accent);
  }

  .language-toggle {
    grid-column: 2;
  }

  .hero {
    margin: 0;
    padding: 24px 24px 40px;
  }

  .hero-banner {
    aspect-ratio: 4 / 5;
  }

  .hero-banner > .hero-animation {
    object-position: center;
  }

  .hero-banner-mask {
    padding: 26px 24px;
    background: linear-gradient(
      0deg,
      rgb(2 1 2 / 96%) 0%,
      rgb(2 1 2 / 72%) 42%,
      transparent 76%
    );
  }

  .hero-banner-mask h2 {
    font-size: 40px;
  }

  .hero-eyebrow {
    margin-bottom: 10px;
    font-size: 11px;
  }

  .featured-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .content-section {
    padding-top: 40px;
    padding-bottom: 46px;
  }

  .section-head h2 {
    font-size: 35px;
  }

  .research-card-list {
    grid-template-columns: 1fr;
    row-gap: 28px;
  }

  .news-list a {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .news-list b {
    text-align: left;
  }

  .teaching-entry {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .page-hero {
    padding: 36px 24px 34px;
  }

  .page-hero h1 {
    font-size: 43px;
  }

  .about-profile {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 40px;
  }

  .research-card img {
    height: auto;
    aspect-ratio: 3 / 2;
  }

  .project-page {
    padding-top: 38px;
  }

  .bib-entry,
  .related-publications .bib-entry {
    grid-template-columns: 1fr;
  }

  .pub-media {
    max-width: 180px;
  }

  .pub-media img {
    height: 118px;
  }

  .authors-more.expanded .authors-more-names {
    max-width: 100%;
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .site-header nav a {
    font-size: 14.5px;
  }

  .language-toggle {
    gap: 6px;
    padding: 5px 7px;
    font-size: 12px;
  }

  .hero-banner-mask h2 {
    font-size: 36px;
  }

  .hero-media-credit {
    right: 10px;
    bottom: 9px;
    font-size: 9px;
  }

  .section-head {
    gap: 18px;
    align-items: flex-end;
  }

  .section-head h2 {
    font-size: 32px;
  }

  .section-head > a {
    flex: 0 0 auto;
    font-size: 12px;
  }

  .page-hero h1 {
    font-size: 39px;
  }

  .research-card h2 {
    font-size: 28px;
  }

  .about-profile h2 {
    font-size: 39px;
  }

  .project-page > h1 {
    font-size: 39px;
  }

  .project-copy > p {
    font-size: 17px;
  }
}

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

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