:root {
  --surface: #ffffff;
  --ink: #202522;
  --text: #3f4743;
  --muted: #69716d;
  --line: #e1e6e3;
  --accent: #125744;
  --accent-dark: #0d4435;
  --focus: #096b9c;
  --header-height: 56px;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 22px);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.62;
}

body.modal-open {
  overflow: hidden;
}

body,
button {
  letter-spacing: 0;
}

button {
  font: inherit;
}

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

a {
  color: var(--accent);
  text-decoration-color: rgba(18, 87, 68, 0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 170ms ease, text-decoration-color 170ms ease;
}

a:hover {
  color: var(--accent-dark);
  text-decoration-color: currentColor;
}

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

h1,
h2,
h3,
p,
dd,
li {
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
p,
figure,
dl,
dd,
ul {
  margin: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 650;
  letter-spacing: 0;
}

h1 {
  font-size: 1.72rem;
  line-height: 1.18;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.25;
}

h3 {
  font-size: 1.08rem;
  line-height: 1.36;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-160%);
  border: 2px solid var(--accent);
  border-radius: 2px;
  background: var(--surface);
  padding: 7px 11px;
  font-weight: 700;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-height);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.header-inner {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  width: min(1180px, calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
}

.site-mark {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

#site-nav {
  display: flex;
  min-width: 0;
  gap: 25px;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

#site-nav::-webkit-scrollbar {
  display: none;
}

#site-nav a {
  position: relative;
  flex: 0 0 auto;
  padding: 17px 0 15px;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 170ms ease;
}

#site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  content: "";
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 190ms ease;
}

#site-nav a:hover,
#site-nav a[aria-current="location"] {
  color: var(--ink);
}

#site-nav a:hover::after,
#site-nav a[aria-current="location"]::after {
  transform: scaleX(1);
}

.language-switch {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
  align-items: center;
  color: var(--line);
}

.language-switch button {
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  padding: 3px 1px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: border-color 170ms ease, color 170ms ease;
}

.language-switch button:hover,
.language-switch button.is-active {
  border-bottom-color: currentColor;
  color: var(--accent);
}

.site-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 820px);
  gap: 48px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.profile-rail {
  position: sticky;
  top: calc(var(--header-height) + 26px);
  align-self: start;
  max-height: calc(100vh - var(--header-height) - 42px);
  overflow-y: auto;
  padding: 34px 0 28px;
}

.portrait {
  width: 190px;
  height: 190px;
  border: 1px solid var(--line);
  border-radius: 2px;
  object-fit: cover;
  object-position: center 67%;
}

.identity {
  padding-top: 17px;
}

.secondary-name {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.profile-role {
  margin-top: 9px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 650;
}

.affiliations {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.affiliations a {
  color: inherit;
}

.profile-links {
  display: grid;
  gap: 6px;
  justify-items: start;
  margin-top: 17px;
  font-size: 0.85rem;
}

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

.profile-link::before {
  color: var(--muted);
  content: "[";
}

.profile-link::after {
  color: var(--muted);
  content: "]";
}

main {
  min-width: 0;
}

.intro-section,
.page-section {
  padding: 34px 0 38px;
  border-bottom: 1px solid var(--line);
}

.intro-section {
  padding-top: 36px;
}

.intro-title {
  font-size: 1.55rem;
}

.intro-copy {
  display: grid;
  gap: 10px;
  max-width: 760px;
  margin-top: 13px;
}

.advisors-line {
  margin-top: 14px;
}

.advisors-line strong,
.research-focus > p,
.recruitment-note strong {
  color: var(--ink);
  font-weight: 650;
}

.research-focus {
  margin-top: 15px;
}

.research-focus ul {
  display: grid;
  gap: 2px;
  margin-top: 5px;
  padding-left: 20px;
}

.recruitment-note {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
  font-size: 0.91rem;
}

.section-heading {
  display: flex;
  gap: 18px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
}

.section-heading h2 {
  font-size: 1.43rem;
}

.section-note,
.project-category,
.paper-status,
.paper-meta-column,
.entry-meta,
.news-item time,
.compact-entry time,
.timeline-entry time,
.last-updated,
.primary-marker {
  font-size: 0.74rem;
}

.section-note {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
}

.news-list,
.research-list,
.paper-list,
.platform-list,
.compact-list,
.timeline,
.award-list {
  min-width: 0;
}

.news-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--line);
}

.news-item:last-child,
.research-entry:last-child,
.paper-entry:last-child,
.platform-entry:last-child,
.compact-entry:last-child,
.timeline-entry:last-child,
.award-list article:last-child {
  border-bottom: 0;
}

.news-item time,
.compact-entry time,
.timeline-entry time {
  color: var(--muted);
  font-weight: 600;
}

.news-item h3 {
  margin-bottom: 1px;
  font-size: 0.95rem;
}

.news-item p {
  color: var(--muted);
  font-size: 0.9rem;
}

.research-entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 25px;
  padding: 25px 0 28px;
  border-bottom: 1px solid var(--line);
}

.research-entry:first-child {
  padding-top: 2px;
}

.anchor-alias {
  position: absolute;
  top: 0;
}

.research-copy {
  min-width: 0;
}

.project-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  align-items: center;
}

.project-category {
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
}

.primary-marker {
  color: var(--muted);
  font-weight: 600;
}

.primary-marker::before {
  margin-right: 12px;
  color: var(--line);
  content: "/";
}

.research-entry h3 {
  margin-top: 4px;
  font-size: 1.2rem;
}

.paper-title {
  max-width: 650px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.89rem;
  line-height: 1.5;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin-top: 8px;
  color: var(--muted);
}

.entry-meta span:first-child {
  color: var(--text);
  font-weight: 650;
}

.entry-meta span:not(:last-child)::after {
  margin: 0 7px;
  color: #a4aaa7;
  content: "\00b7";
}

.project-prose {
  display: grid;
  gap: 8px;
  max-width: 660px;
  margin-top: 12px;
  font-size: 0.94rem;
}

.people-line {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
  font-size: 0.84rem;
}

.people-line > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
}

.people-line p {
  color: var(--muted);
}

.people-line a {
  color: var(--text);
}

.people-line strong {
  color: var(--accent);
}

.resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 13px;
  margin-top: 11px;
}

.resource-link {
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}

.resource-link::before {
  color: var(--muted);
  content: "[";
}

.resource-link::after {
  color: var(--muted);
  content: "]";
}

.research-figure {
  width: 100%;
  margin: 2px 0 0;
}

.image-frame {
  display: flex;
  width: 100%;
  aspect-ratio: 4 / 3;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface);
  padding: 5px;
  cursor: zoom-in;
  transition: border-color 190ms ease, transform 210ms ease;
}

.image-frame:hover {
  border-color: var(--accent);
  transform: scale(1.01);
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.research-figure figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.45;
}

.paper-entry {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 22px;
  padding: 19px 0 22px;
  border-bottom: 1px solid var(--line);
}

.paper-meta-column {
  display: grid;
  align-content: start;
  gap: 4px;
  color: var(--muted);
}

.paper-meta-column span:first-child,
.paper-status {
  color: var(--text);
  font-weight: 650;
}

.paper-entry h3 {
  margin-top: 3px;
  font-size: 1.12rem;
}

.paper-status {
  margin: 5px 0 7px;
  text-transform: uppercase;
}

.paper-entry > div:last-child > p:not(.paper-status, .project-category) {
  max-width: 670px;
  font-size: 0.93rem;
}

.people-line.compact {
  grid-template-columns: 78px minmax(0, 1fr);
  margin-top: 10px;
}

.platform-entry {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
  padding: 18px 0 21px;
  border-bottom: 1px solid var(--line);
}

.platform-entry h3 {
  margin-bottom: 5px;
  font-size: 1.08rem;
}

.platform-entry .entry-meta {
  display: grid;
  gap: 2px;
  margin-top: 0;
}

.platform-entry .entry-meta span::after {
  content: none;
}

.platform-entry > p {
  font-size: 0.93rem;
}

.compact-entry,
.timeline-entry {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 22px;
  padding: 17px 0 20px;
  border-bottom: 1px solid var(--line);
}

.compact-entry h3,
.timeline-entry h3 {
  margin-bottom: 3px;
  font-size: 1.04rem;
}

.compact-entry p,
.timeline-entry p {
  color: var(--muted);
  font-size: 0.91rem;
}

.award-list article {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
  padding: 16px 0 19px;
  border-bottom: 1px solid var(--line);
}

.award-list h3 {
  font-size: 0.98rem;
}

.award-list p {
  color: var(--muted);
  font-size: 0.91rem;
}

.site-footer {
  padding: 29px 0 50px;
}

#contact-content {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  justify-content: space-between;
}

.footer-title {
  margin-bottom: 4px;
  color: var(--ink);
  font-weight: 650;
}

.last-updated {
  flex: 0 0 auto;
  max-width: 220px;
  color: var(--muted);
  text-align: right;
}

.noscript-fallback {
  width: min(720px, calc(100% - 40px));
  margin: 40px auto;
  border: 1px solid var(--line);
  padding: 26px;
}

.noscript-fallback p {
  margin-top: 14px;
}

.noscript-fallback a + a {
  margin-left: 14px;
}

.image-viewer {
  width: min(1080px, calc(100% - 36px));
  max-width: none;
  max-height: calc(100vh - 36px);
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface);
  padding: 0;
}

.image-viewer::backdrop {
  background: rgba(19, 24, 22, 0.78);
}

.image-viewer-panel {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 43px 20px 18px;
}

.image-viewer-close {
  position: absolute;
  top: 7px;
  right: 9px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
}

.image-viewer img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
}

.image-viewer p {
  max-width: 760px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
}

.motion-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 290ms ease-out var(--reveal-delay, 0ms),
    transform 290ms ease-out var(--reveal-delay, 0ms);
}

@media (max-width: 1100px) {
  .header-inner,
  .site-shell {
    width: min(100% - 32px, 980px);
  }

  .header-inner {
    grid-template-columns: 190px minmax(0, 1fr) auto;
    gap: 22px;
  }

  #site-nav {
    gap: 20px;
  }

  .site-shell {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 34px;
  }

  .portrait {
    width: 170px;
    height: 170px;
  }

  .research-entry {
    grid-template-columns: minmax(0, 1fr) 158px;
    gap: 21px;
  }
}

@media (max-width: 820px) {
  .site-mark {
    display: none;
  }

  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .site-shell {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 28px;
  }

  .portrait {
    width: 158px;
    height: 158px;
  }

  .profile-role,
  .affiliations {
    font-size: 0.8rem;
  }

  .research-entry {
    grid-template-columns: minmax(0, 1fr) 142px;
    gap: 18px;
  }
}

@media (max-width: 700px) {
  :root {
    --header-height: 54px;
  }

  html {
    scroll-padding-top: calc(var(--header-height) + 14px);
  }

  .header-inner {
    width: calc(100% - 24px);
    gap: 14px;
  }

  #site-nav {
    gap: 18px;
  }

  #site-nav a {
    padding-top: 16px;
    font-size: 0.8rem;
  }

  .site-shell {
    display: block;
    width: min(680px, calc(100% - 32px));
  }

  .profile-rail {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 24px 0 26px;
    border-bottom: 1px solid var(--line);
  }

  .profile-main {
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr);
    gap: 19px;
    align-items: center;
  }

  .portrait {
    width: 126px;
    height: 126px;
  }

  .identity {
    padding-top: 0;
  }

  .profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 14px;
    margin-top: 14px;
  }

  .intro-section,
  .page-section {
    padding: 29px 0 32px;
  }

  .research-entry {
    grid-template-columns: minmax(0, 1fr) 150px;
  }

  .paper-entry {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 17px;
  }

  .platform-entry,
  .award-list article {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 18px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .language-switch {
    gap: 3px;
  }

  .language-switch button {
    font-size: 0.75rem;
  }

  .profile-main {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 15px;
  }

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

  h1 {
    font-size: 1.42rem;
  }

  .secondary-name {
    font-size: 0.7rem;
  }

  .profile-role,
  .affiliations {
    font-size: 0.76rem;
  }

  .section-heading {
    gap: 10px;
  }

  .section-heading h2,
  .intro-title {
    font-size: 1.32rem;
  }

  .section-note {
    font-size: 0.65rem;
  }

  .news-item,
  .paper-entry,
  .platform-entry,
  .compact-entry,
  .timeline-entry,
  .award-list article {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .paper-meta-column,
  .platform-entry .entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .research-entry {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .research-figure {
    width: min(100%, 300px);
  }

  .people-line,
  .people-line.compact {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  #contact-content {
    display: grid;
    gap: 12px;
  }

  .last-updated {
    max-width: none;
    text-align: left;
  }

  .image-viewer {
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
  }

  .image-viewer-panel {
    padding: 42px 10px 14px;
  }
}

@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;
  }

  .motion-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
