:root {
  --ink: #1f2623;
  --muted: #68726e;
  --line: #dce3df;
  --soft: #f5f8f6;
  --accent: #176b66;
  --accent-dark: #0d4e4a;
  --selection: #f5c9a9;
  --hover-line: #e59b66;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --content: 1040px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.25rem;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.68;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  color: var(--ink);
  background: var(--selection);
}

a {
  color: var(--accent);
  text-decoration-color: rgba(23, 107, 102, 0.42);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

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

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.55rem 0.8rem;
  color: #fff;
  background: var(--ink);
  transform: translateY(-160%);
}

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

.nav-shell,
.page-shell,
.footer-shell {
  width: min(var(--content), calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(220, 227, 223, 0.9);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
}

.nav-shell {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.wordmark {
  flex: 0 0 auto;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.05rem;
}

.nav-links a,
.nav-menu-panel a {
  color: #46504c;
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}

.nav-links a:hover,
.nav-menu-panel a:hover {
  color: var(--accent);
}

.nav-menu {
  position: relative;
  display: none;
}

.nav-menu summary {
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  list-style: none;
}

.nav-menu summary::-webkit-details-marker {
  display: none;
}

.nav-menu summary:hover,
.nav-menu[open] summary {
  color: var(--accent-dark);
  border-color: rgba(23, 107, 102, 0.42);
  background: var(--soft);
}

.nav-menu summary:focus-visible {
  outline: 2px solid var(--selection);
  outline-offset: 3px;
}

.nav-menu summary svg {
  width: 1.15rem;
  height: 1.15rem;
}

.nav-menu-panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  width: 220px;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(31, 38, 35, 0.12);
}

.nav-menu-panel a {
  display: block;
  padding: 0.6rem 0.7rem;
  border-radius: 4px;
}

.nav-menu-panel a:hover {
  background: var(--soft);
}

.page-shell {
  padding-bottom: 5rem;
}

.intro {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  gap: 3.8rem;
  align-items: start;
  padding: 4.75rem 0 4.8rem;
  border-bottom: 1px solid var(--line);
}

.portrait-wrap {
  padding-top: 0.45rem;
}

.portrait {
  width: 218px;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 42%;
  border: 1px solid var(--line);
}

.research-meta {
  margin: 0;
  color: var(--accent);
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.intro h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.2em;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.55rem, 4.25vw, 3.4rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: 0;
}

.intro h1 .nickname {
  color: var(--muted);
  font-size: 0.6em;
  white-space: nowrap;
}

.intro h1 .chinese-name {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: 0.68em;
  font-weight: 400;
  white-space: nowrap;
}

.intro-copy > p {
  max-width: 715px;
  margin: 0 0 1.05rem;
}

.intro-copy > h1 + p {
  margin-top: 1.85rem;
  color: #313936;
  font-size: 1.06rem;
  line-height: 1.7;
}

.profile-links,
.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.2rem;
}

.profile-links {
  gap: 0.7rem;
  margin-top: 1.55rem;
}

.paper-links a {
  font-size: 0.92rem;
  font-weight: 700;
}

.profile-links .icon-link {
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 50%;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.profile-links .icon-link:hover {
  color: var(--accent-dark);
  border-color: rgba(23, 107, 102, 0.42);
  background: var(--soft);
  transform: translateY(-1px);
}

.profile-links svg {
  width: 1.15rem;
  height: 1.15rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section {
  padding: 4.8rem 0 0;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0;
}

.section-heading {
  margin-bottom: 2.15rem;
}

.section-heading h2 {
  font-size: 2.3rem;
  line-height: 1.2;
}

.research-item {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 2.35rem;
  padding: 2.45rem 0 2.45rem 1.1rem;
  border-left: 2px solid transparent;
  border-top: 1px solid var(--line);
  transition: border-color 160ms ease;
}

.research-item:last-child {
  border-bottom: 1px solid var(--line);
}

.research-image {
  width: 270px;
  height: 166px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--soft);
  text-decoration: none;
}

.research-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  transition: transform 180ms ease;
}

a.research-image:hover img {
  transform: scale(1.015);
}

.research-copy h3,
.compact-row h3,
.detail-heading h3 {
  margin: 0;
  letter-spacing: 0;
}

.research-copy h3 {
  margin-top: 0.2rem;
  font-family: var(--serif);
  font-size: 1.62rem;
  font-weight: 600;
  line-height: 1.22;
}

.research-copy h3 a {
  color: var(--ink);
  text-decoration: none;
}

.research-copy h3 a:hover {
  color: var(--accent);
}

.research-copy p {
  margin: 0.58rem 0 0;
  color: #4c5551;
  font-size: 0.98rem;
  line-height: 1.58;
}

.research-copy .paper-title {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.5;
}

.research-copy .author-list {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.58;
}

.author-list strong {
  padding: 0;
  color: inherit;
  background: transparent;
  font-weight: 700;
}

.paper-links {
  margin-top: 0.7rem;
}

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

.compact-row {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.65rem 0 1.65rem 1.1rem;
  border-left: 2px solid transparent;
  border-bottom: 1px solid var(--line);
  transition: border-color 160ms ease;
}

.compact-row h3,
.detail-heading h3 {
  font-size: 1.18rem;
  font-weight: 700;
}

.compact-row p {
  max-width: 780px;
  margin: 0.32rem 0 0;
  color: #343b38;
  font-size: 1.1rem;
  line-height: 1.62;
}

.compact-row time {
  flex: 0 0 auto;
  color: #4e5753;
  font-size: 1.08rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

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

.detail-row {
  padding: 1.6rem 0 1.65rem 1.1rem;
  border-left: 2px solid transparent;
  border-bottom: 1px solid var(--line);
  transition: border-color 160ms ease;
}

:is(.research-item, .compact-row, .detail-row):is(:hover, :focus-within) {
  border-left-color: var(--hover-line);
}

.detail-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.45;
}

.detail-heading p,
.detail-copy p,
.detail-copy time {
  margin: 0;
  color: #343b38;
  font-size: 1.1rem;
  line-height: 1.62;
}

.detail-heading p,
.detail-copy time {
  color: #4e5753;
  font-weight: 500;
}

.detail-heading p {
  margin-top: 0.2rem;
}

.detail-copy {
  max-width: 820px;
  margin-top: 0.35rem;
}

.detail-copy time {
  display: block;
  margin-bottom: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--soft);
}

.footer-shell {
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-shell p {
  margin: 0;
}

@media (max-width: 760px) {
  .nav-shell,
  .page-shell,
  .footer-shell {
    width: min(100% - 34px, var(--content));
  }

  .nav-shell {
    min-height: 60px;
  }

  .intro {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 1.35rem;
    padding: 3rem 0 3.3rem;
  }

  .portrait {
    width: 118px;
  }

  .portrait-wrap {
    grid-row: 1;
  }

  .intro h1 {
    font-size: 2.12rem;
  }

  .intro-copy > p,
  .profile-links {
    grid-column: 1 / -1;
  }

  .intro-copy {
    display: contents;
  }

  .intro-copy h1 {
    grid-column: 2;
  }

  .intro-copy > h1 + p {
    margin-top: 1.5rem;
  }

  .section {
    padding-top: 3.4rem;
  }

  .research-item {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 1.2rem;
  }

  .research-image {
    width: 180px;
    height: 118px;
  }

  .footer-shell {
    min-height: 120px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.4rem;
  }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .nav-menu {
    display: block;
  }
}

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

  .intro {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 1.15rem;
  }

  .portrait {
    width: 104px;
  }

  .intro h1 {
    font-size: 1.92rem;
  }

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

  .research-item {
    grid-template-columns: 1fr;
    gap: 1.15rem;
    padding: 1.8rem 0;
  }

  .research-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 8.5;
  }

  .compact-row {
    flex-direction: column;
    gap: 0.45rem;
  }

  .detail-row {
    padding: 1.4rem 0 1.45rem 0.8rem;
  }

  .research-item {
    padding-left: 0.8rem;
  }

  .compact-row {
    padding-left: 0.8rem;
  }

}

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

  .research-image img {
    transition: none;
  }

  .profile-links .icon-link {
    transition: none;
  }

  .detail-row {
    transition: none;
  }

  .research-item,
  .compact-row {
    transition: none;
  }
}
