:root {
  --ink: #10222d;
  --ink-soft: #253b46;
  --muted: #617078;
  --paper: #f4f1e9;
  --paper-deep: #ebe5d9;
  --card: #fffdf8;
  --accent: #e46f42;
  --accent-dark: #b64c28;
  --teal: #1f6a6c;
  --plum: #5a486d;
  --line: rgba(16, 34, 45, 0.16);
  --line-light: rgba(255, 255, 255, 0.2);
  --shadow: 0 24px 70px rgba(28, 45, 52, 0.12);
  --serif: "Newsreader", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --page-width: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 4% 5%, rgba(228, 111, 66, 0.13), transparent 24rem),
    radial-gradient(circle at 96% 32%, rgba(31, 106, 108, 0.08), transparent 28rem),
    var(--paper);
  font-family: var(--sans);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p, figure { margin-top: 0; }

::selection {
  color: white;
  background: var(--teal);
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 200;
  padding: 0.75rem 1rem;
  border-radius: 0.4rem;
  color: white;
  background: var(--ink);
}

.skip-link:focus { top: 1rem; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 241, 233, 0.9);
  backdrop-filter: blur(16px);
}

.header-inner,
.hero,
.section,
footer {
  width: min(var(--page-width), calc(100% - 3rem));
  margin-inline: auto;
}

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

.wordmark {
  flex: 0 0 auto;
  font: 600 1.55rem/1 var(--serif);
  letter-spacing: -0.04em;
  text-decoration: none;
}

.wordmark span,
h1 span { color: var(--accent); }

nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.9rem, 2.6vw, 2.1rem);
}

nav a {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible { color: var(--accent-dark); }

.hero {
  min-height: 690px;
  padding: clamp(4.75rem, 8vw, 7.25rem) 0 clamp(5rem, 9vw, 8rem);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
}

.eyebrow,
.section-number,
.pub-venue,
.project-kicker {
  margin-bottom: 0.85rem;
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 1.45rem;
  font: 600 clamp(5rem, 9vw, 7.6rem)/0.78 var(--serif);
  letter-spacing: -0.065em;
}

.name-cn {
  margin: -0.65rem 0 1.2rem;
  color: var(--muted);
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.role {
  max-width: 680px;
  margin-bottom: 1.15rem;
  color: var(--ink-soft);
  font-size: 1rem;
  font-weight: 700;
}

.lead {
  max-width: 760px;
  margin-bottom: 1.15rem;
  font: 500 clamp(1.2rem, 1.9vw, 1.52rem)/1.45 var(--serif);
}

.affiliation {
  max-width: 700px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.affiliation a,
.inline-link,
.footer-email {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.hero-actions {
  margin-top: 1.8rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.button {
  min-height: 46px;
  padding: 0.68rem 1.08rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.button.primary {
  border-color: var(--ink);
  color: white;
  background: var(--ink);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 34, 45, 0.12);
}

.hero-actions .inline-link {
  margin-left: 0.35rem;
  font-size: 0.84rem;
}

.hero-topics {
  margin: 2rem 0 0;
  padding: 1.05rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.5rem;
  border-top: 1px solid var(--line);
  list-style: none;
}

.hero-topics li {
  position: relative;
  padding-left: 0.85rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-topics li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.portrait-card {
  position: relative;
  width: min(100%, 430px);
  margin: 0;
  justify-self: end;
}

.portrait-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -1.1rem 1.5rem 2.25rem -1.1rem;
  border: 1px solid rgba(31, 106, 108, 0.38);
  border-radius: 44% 56% 48% 52% / 40% 46% 54% 60%;
  transform: rotate(-4deg);
}

.portrait-frame {
  aspect-ratio: 0.82;
  overflow: hidden;
  border: 10px solid var(--card);
  border-radius: 11rem 11rem 1.2rem 1.2rem;
  background: var(--card);
  box-shadow: var(--shadow);
}

.portrait-frame picture,
.portrait-frame img {
  width: 100%;
  height: 100%;
}

.portrait-frame img {
  object-fit: cover;
  object-position: 50% 45%;
}

.portrait-card figcaption {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal-mark {
  height: 21px;
  display: inline-flex;
  align-items: end;
  gap: 4px;
}

.signal-mark i {
  width: 4px;
  border-radius: 3px;
  background: var(--teal);
}

.signal-mark i:nth-child(1) { height: 7px; }
.signal-mark i:nth-child(2) { height: 14px; }
.signal-mark i:nth-child(3) { height: 21px; background: var(--accent); }

.section {
  padding: clamp(5rem, 8vw, 8rem) 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  margin-bottom: clamp(2.6rem, 5vw, 4.25rem);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 3rem;
}

.section-number {
  margin-bottom: 0.55rem;
  color: var(--accent-dark);
}

h2 {
  margin-bottom: 0;
  font: 600 clamp(2.75rem, 5.5vw, 4.7rem)/0.93 var(--serif);
  letter-spacing: -0.048em;
}

.section-intro {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.news-section {
  padding-top: clamp(4rem, 6vw, 5.5rem);
  padding-bottom: clamp(4rem, 6vw, 5.5rem);
}

.compact-heading { margin-bottom: 2.25rem; }
.compact-heading h2 { font-size: clamp(2.5rem, 4.6vw, 3.65rem); }

.news-list {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  list-style: none;
}

.news-list li {
  min-width: 0;
  padding: 1.45rem 1.35rem 1.45rem 0;
}

.news-list li + li {
  padding-left: 1.35rem;
  border-left: 1px solid var(--line);
}

.news-list time {
  display: block;
  margin-bottom: 0.7rem;
  color: var(--accent-dark);
  font: 600 0.86rem var(--serif);
}

.news-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.news-list strong { color: var(--ink); }

.research-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.research-grid article {
  min-height: 330px;
  padding: clamp(1.65rem, 4vw, 2.75rem);
  background: rgba(255, 253, 248, 0.84);
}

.research-index {
  margin-bottom: 2.2rem;
  color: var(--accent);
  font: 600 0.96rem var(--serif);
}

.research-grid h3,
.project-card h3 {
  margin-bottom: 0.95rem;
  font: 600 clamp(1.5rem, 2.4vw, 2rem)/1.12 var(--serif);
  letter-spacing: -0.025em;
}

.research-grid article > p:not(.research-index) {
  max-width: 520px;
  color: var(--muted);
}

.research-grid ul {
  margin: 1.45rem 0 0;
  padding: 1.2rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.1rem;
  border-top: 1px solid var(--line);
  list-style: none;
}

.research-grid li {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 700;
}

.publication-heading .inline-link {
  flex: 0 0 auto;
  font-size: 0.84rem;
}

.publication-group + .publication-group { margin-top: 4rem; }

.publication-group > h3 {
  margin-bottom: 1.2rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.publication {
  padding: 2rem 0;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.publication.featured {
  padding-inline: clamp(1rem, 2.5vw, 1.8rem);
  border-left: 4px solid var(--accent);
  background: rgba(255, 253, 248, 0.72);
}

.pub-meta {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 0.55rem;
}

.pub-year {
  color: var(--accent-dark);
  font: 600 1.08rem var(--serif);
}

.status-badge {
  padding: 0.2rem 0.5rem;
  border: 1px solid rgba(31, 106, 108, 0.32);
  border-radius: 999px;
  color: var(--teal);
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pub-venue {
  margin-bottom: 0.55rem;
  color: var(--teal);
  letter-spacing: 0.08em;
}

.pub-body h4 {
  max-width: 920px;
  margin-bottom: 0.65rem;
  font: 600 clamp(1.28rem, 2.2vw, 1.78rem)/1.17 var(--serif);
  letter-spacing: -0.018em;
}

.authors {
  margin-bottom: 0.85rem;
  color: var(--muted);
  font-size: 0.87rem;
}

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

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
}

.pub-links a {
  color: var(--accent-dark);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-underline-offset: 0.25em;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.project-card {
  position: relative;
  min-height: 410px;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  color: white;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

a.project-card:hover,
a.project-card:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 30px 72px rgba(28, 45, 52, 0.2);
}

.project-navy { background: var(--ink); }
.project-teal { background: var(--teal); }
.project-plum { background: var(--plum); }
.project-rust { background: var(--accent-dark); }

.project-card::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 210px;
  height: 210px;
  right: -85px;
  bottom: -90px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(255, 255, 255, 0.035), 0 0 0 72px rgba(255, 255, 255, 0.025);
}

.project-card > * { position: relative; z-index: 1; }

.project-number {
  position: absolute;
  top: 1.55rem;
  right: 1.8rem;
  color: rgba(255, 255, 255, 0.54);
  font: 600 0.86rem var(--serif);
}

.project-kicker {
  max-width: calc(100% - 3rem);
  color: #f6b89d;
}

.project-card h3 {
  max-width: 510px;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
}

.project-paper-titles {
  max-width: 570px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
  line-height: 1.55;
}

.project-paper-titles p {
  margin-bottom: 0;
}

.project-paper-titles p + p {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.project-card > p:not(.project-kicker),
.testbed-copy > p:not(.project-kicker) {
  max-width: 570px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.tag-list {
  margin: 1.5rem 0 0;
  padding: 1.15rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  border-top: 1px solid var(--line-light);
  list-style: none;
}

.tag-list li {
  padding: 0.28rem 0.58rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.66rem;
  font-weight: 700;
}

.project-link {
  position: absolute;
  left: clamp(1.75rem, 4vw, 2.75rem);
  bottom: 1.8rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.28em;
}

.testbed-card {
  grid-column: 1 / -1;
  min-height: 330px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  align-items: center;
  gap: 3rem;
  border-color: var(--line);
  color: var(--ink);
  background: var(--card);
}

.testbed-card::after { display: none; }
.testbed-card .project-number { color: var(--muted); }
.testbed-card .project-kicker { color: var(--accent-dark); }
.testbed-card .testbed-copy > p:not(.project-kicker) { color: var(--muted); }
.testbed-card .tag-list { border-color: var(--line); }
.testbed-card .tag-list li { border-color: var(--line); color: var(--ink-soft); }
.testbed-card .project-link {
  position: static;
  display: inline-block;
  margin-top: 1.35rem;
  color: var(--accent-dark);
}

.testbed-media {
  min-height: 260px;
  align-self: stretch;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--paper-deep);
}

.testbed-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

footer {
  margin-top: 2rem;
  padding: clamp(4rem, 8vw, 7rem) 0 2.2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3rem 5rem;
  border-top: 1px solid var(--line);
}

.footer-main { max-width: 780px; }
.footer-main h2 { margin-bottom: 1.25rem; }
.footer-main > p:not(.eyebrow) { max-width: 640px; color: var(--muted); }
.footer-email { display: inline-block; margin-top: 0.45rem; font-size: clamp(1rem, 2vw, 1.3rem); }

.footer-links {
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 0.65rem;
}

.footer-links a {
  color: var(--accent-dark);
  font-size: 0.84rem;
  font-weight: 700;
  text-underline-offset: 0.25em;
}

.footer-quote {
  grid-column: 1 / -1;
  margin: 2.5rem 0 0;
  padding-top: 1.8rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  border-top: 1px solid var(--line);
}

.footer-quote p {
  margin: 0;
  font: 500 clamp(1.15rem, 2.2vw, 1.55rem)/1.35 var(--serif);
}

.footer-quote cite {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
}

.copyright {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
}

@media (max-width: 980px) {
  nav { gap: 0.85rem 1.15rem; flex-wrap: wrap; }
  nav a { font-size: 0.72rem; }

  .hero {
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
    gap: 3.5rem;
  }

  .news-list { grid-template-columns: repeat(2, 1fr); }
  .news-list li:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .news-list li:nth-child(4) { border-top: 1px solid var(--line); }
  .project-card { min-height: 440px; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 9rem; }

  .header-inner {
    min-height: auto;
    padding: 1rem 0;
    align-items: flex-start;
  }

  nav {
    max-width: 430px;
    justify-content: flex-end;
  }

  .hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 3.2rem;
  }

  .hero-copy { grid-row: 1; }
  .portrait-card { grid-row: 2; width: min(78vw, 400px); justify-self: start; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 1.35rem; }
  .section-intro { max-width: 620px; }
  .research-grid, .project-grid { grid-template-columns: 1fr; }
  .research-grid article { min-height: auto; }
  .project-card { min-height: 390px; }

  .testbed-card {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  footer { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .header-inner,
  .hero,
  .section,
  footer {
    width: min(var(--page-width), calc(100% - 2rem));
  }

  .header-inner { display: block; }
  .wordmark { display: inline-block; margin-bottom: 0.9rem; }
  nav {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    justify-content: start;
    gap: 0.65rem 1.2rem;
  }

  .hero { padding-top: 4rem; }
  h1 { font-size: clamp(4.25rem, 22vw, 5.8rem); }
  .lead { font-size: 1.18rem; }
  .hero-actions { align-items: flex-start; }
  .hero-actions .inline-link { width: 100%; margin: 0.4rem 0 0; }
  .portrait-card { width: min(88vw, 380px); }

  .news-list { grid-template-columns: 1fr; }
  .news-list li { padding: 1.25rem 0; }
  .news-list li + li,
  .news-list li:nth-child(3),
  .news-list li:nth-child(4) {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .publication { grid-template-columns: 1fr; gap: 0.65rem; }
  .pub-meta { flex-direction: row; align-items: center; }
  .publication.featured { padding-inline: 0.9rem; }
  .publication-heading .inline-link { margin-top: 0.15rem; }

  .project-card { min-height: 430px; }
  .testbed-card { min-height: auto; }
  .testbed-media { min-height: 210px; }
  .footer-quote { align-items: flex-start; flex-direction: column; gap: 0.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
