:root {
  --bg: #fff8ee;
  --bg-2: #f5eadc;
  --panel: rgba(255, 253, 247, 0.64);
  --panel-2: rgba(249, 239, 224, 0.52);
  --ink: #27383a;
  --muted: #637372;
  --line: rgba(50, 78, 80, 0.16);
  --cyan: #35bfc6;
  --blue: #78a8df;
  --sand: #d8a837;
  --coral: #e97861;
  --shadow: 0 18px 48px rgba(82, 59, 35, 0.13);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(39, 56, 58, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 56, 58, 0.045) 1px, transparent 1px),
    linear-gradient(135deg, rgba(53, 191, 198, 0.12), transparent 30%),
    linear-gradient(315deg, rgba(233, 120, 97, 0.1), transparent 34%),
    var(--bg);
  background-size: 48px 48px, 48px 48px, auto, auto, auto;
  font-family: Inter, "Helvetica Neue", Arial, "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.62;
}

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

main {
  display: flex;
  flex-direction: column;
}

#top {
  order: 1;
}

.stats-strip {
  order: 2;
}

#research {
  order: 3;
}

#projects {
  order: 4;
}

#background {
  order: 5;
}

#activity {
  order: 6;
}

#gallery {
  order: 7;
}

#publications {
  order: 8;
}

#contact {
  order: 9;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: #fffdf7;
  border-radius: var(--radius);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 248, 238, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(65, 49, 32, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(111, 212, 220, 0.62);
  border-radius: 14px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(53, 191, 198, 0.72), rgba(255, 224, 133, 0.62)),
    rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 26px rgba(53, 191, 198, 0.18);
  isolation: isolate;
  overflow: hidden;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.brand-mark::before {
  inset: 7px;
  border: 1px solid rgba(39, 56, 58, 0.2);
  border-radius: 10px;
}

.brand-mark::after {
  width: 38px;
  height: 1px;
  background: rgba(39, 56, 58, 0.26);
  transform: rotate(-34deg);
}

.brand-mark-main {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.brand-mark-dot {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(233, 135, 115, 0.18);
}

.brand-wordmark {
  position: relative;
  display: grid;
  gap: 3px;
  padding-left: 12px;
}

.brand-wordmark::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 1px;
  background: linear-gradient(var(--cyan), rgba(216, 168, 55, 0.55));
}

.brand-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand strong,
.brand em {
  font-style: normal;
  line-height: 1.15;
}

.brand strong {
  color: var(--ink);
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}

.brand em {
  color: var(--cyan);
  font-size: 0.86rem;
  font-weight: 700;
}

.brand-subline {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  line-height: 1;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  background: rgba(53, 191, 198, 0.12);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.68;
  filter: saturate(1.14) contrast(0.96) brightness(1.08);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(53, 191, 198, 0.18), transparent 34%),
    linear-gradient(315deg, rgba(233, 120, 97, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(216, 168, 55, 0.1));
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 248, 238, 0.9) 0%, rgba(255, 248, 238, 0.68) 42%, rgba(255, 248, 238, 0.18) 100%),
    linear-gradient(0deg, rgba(255, 248, 238, 0.72) 0%, rgba(255, 248, 238, 0.03) 48%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  min-height: 720px;
  padding: 116px clamp(250px, 24vw, 320px) 76px 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bilingual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 34px);
}

.hero-grid {
  max-width: 900px;
  align-items: start;
}

.hero-grid .lang-block {
  display: flex;
  flex-direction: column;
}

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

h1 {
  margin: 0 0 18px;
  min-height: 1.95em;
  font-family: Inter, "Helvetica Neue", Arial, "Noto Sans SC", "Source Han Sans SC", "PingFang SC", sans-serif;
  font-size: clamp(3.15rem, 6vw, 5.35rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: 0;
}

.zh h1 {
  font-size: clamp(3.15rem, 6vw, 5.35rem);
  font-weight: 800;
}

.en h1 {
  max-width: 9.8ch;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 3.7vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 12px;
  font-size: clamp(1.08rem, 1.6vw, 1.35rem);
  line-height: 1.25;
}

.lead {
  margin: 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.22vw, 1.08rem);
  font-weight: 450;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

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

.profile-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(53, 191, 198, 0.34);
  border-radius: 999px;
  color: #25484b;
  background: rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(12px);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.profile-links a:hover,
.profile-links a:focus-visible {
  border-color: rgba(233, 120, 97, 0.68);
  color: #8b3d31;
  background: rgba(233, 120, 97, 0.1);
}

.hero-portrait {
  position: absolute;
  top: 130px;
  right: 0;
  width: clamp(180px, 19vw, 252px);
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(50, 78, 80, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 253, 247, 0.7), rgba(255, 247, 236, 0.5));
  box-shadow: 0 18px 46px rgba(82, 59, 35, 0.14);
  backdrop-filter: blur(16px);
}

.hero-portrait img {
  width: 100%;
  height: clamp(225px, 23vw, 315px);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 36%;
  border-bottom: 1px solid var(--line);
  background: #fffdf7;
}

.hero-portrait figcaption {
  padding: 12px 14px 14px;
}

.hero-portrait figcaption span {
  color: var(--cyan);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.hero-portrait figcaption strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid rgba(50, 78, 80, 0.14);
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  color: #fffdf7;
  background: var(--ink);
  border-color: rgba(39, 56, 58, 0.72);
}

.button.ghost {
  color: var(--ink);
  background: rgba(255, 253, 247, 0.48);
  backdrop-filter: blur(14px);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.42);
  backdrop-filter: blur(18px);
}

.stats-strip div {
  padding: 22px clamp(18px, 4vw, 56px);
  border-right: 1px solid var(--line);
}

.stats-strip div:last-child {
  border-right: 0;
}

.stats-strip strong,
.stats-strip span {
  display: block;
}

.stats-strip span {
  color: var(--muted);
  font-size: 0.92rem;
}

.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.section-padded {
  padding: clamp(70px, 10vw, 118px) 0;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 32px;
}

.section-heading.wide {
  max-width: 960px;
}

.section-heading p:last-child,
.featured-figure p,
.project-card p,
.text-panel p,
.contact-copy p {
  color: var(--muted);
}

.text-panel,
.project-card,
.timeline-card,
.featured-figure,
.gallery-card,
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.text-panel {
  padding: clamp(22px, 4vw, 34px);
}

.text-panel p {
  margin: 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 224, 133, 0.2);
  color: #5b4a20;
  font-size: 0.86rem;
  font-weight: 700;
}

.research-tags {
  margin-top: 24px;
}

.featured-figure {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 22px;
  align-items: center;
  padding: 14px;
  margin-bottom: 18px;
}

.featured-figure img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: calc(var(--radius) - 2px);
  background: #ffffff;
  opacity: 1;
}

.featured-figure > div {
  padding: 16px 16px 16px 0;
}

.figure-group {
  margin-top: 18px;
}

.figure-group + .figure-group {
  margin-top: 24px;
}

.figure-group > h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.gallery-card {
  grid-column: span 2;
  margin: 0;
  overflow: hidden;
}

.gallery-card.wide {
  grid-column: span 3;
}

.gallery-card.full {
  grid-column: 1 / -1;
}

.map-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.map-matrix .map-card {
  grid-column: auto;
}

.map-composite .map-matrix {
  padding: 8px;
  background: #ffffff;
}

.map-composite {
  max-width: 980px;
  margin-inline: auto;
}

.map-tile {
  overflow: hidden;
  border-radius: 4px;
}

.method-grid .gallery-card img {
  aspect-ratio: 3.1 / 1;
}

.evidence-grid .gallery-card.wide img {
  aspect-ratio: 2.1 / 1;
}

.evidence-grid .gallery-card.full img {
  aspect-ratio: 2.15 / 1;
}

.image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #ffffff;
  cursor: zoom-in;
}

.gallery-card img {
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: contain;
  padding: 6px;
  background: #ffffff;
  opacity: 1;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.gallery-card.full img {
  max-height: 640px;
}

.map-card img {
  aspect-ratio: 3507 / 2480;
  padding: 4px;
}

.map-tile img {
  aspect-ratio: 3507 / 2480;
  padding: 0;
}

.map-card figcaption {
  padding: 9px 11px 11px;
}

.sample-after-matrix {
  margin-top: 12px;
}

.sample-after-matrix img {
  aspect-ratio: 2200 / 454;
  max-height: 300px;
}

.spatial-difference-card img {
  aspect-ratio: 2001 / 2200;
  max-height: 760px;
}

.triptych-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  background: #ffffff;
}

.triptych-grid .image-button {
  overflow: hidden;
  border-radius: 4px;
}

.triptych-grid img {
  aspect-ratio: 3507 / 2480;
  padding: 0;
}

.paired-figure-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.paired-card {
  grid-column: auto;
}

.paired-card img {
  height: clamp(460px, 56vw, 680px);
  object-fit: contain;
}

.image-button:hover img,
.image-button:focus-visible img {
  transform: scale(1.018);
  opacity: 0.98;
}

figcaption {
  padding: 14px 16px 16px;
}

figcaption span,
.project-kicker {
  display: block;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

figcaption strong {
  display: block;
  margin-top: 4px;
  line-height: 1.3;
}

.project-list {
  display: grid;
  gap: 16px;
}

.timeline-block + .timeline-block {
  margin-top: 30px;
}

.timeline-block > h3 {
  margin-bottom: 14px;
}

.timeline-card {
  padding: clamp(20px, 3vw, 30px);
}

.timeline-card + .timeline-card {
  margin-top: 12px;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.activity-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.activity-card img {
  display: block;
  width: 100%;
  height: clamp(300px, 30vw, 390px);
  object-fit: cover;
  background: #ffffff;
}

.activity-card figcaption {
  background: linear-gradient(180deg, rgba(255, 253, 247, 0.68), rgba(255, 247, 236, 0.52));
}

.activity-card figcaption p {
  margin: 8px 0 0;
  color: var(--muted);
}

.project-card {
  padding: clamp(22px, 3vw, 32px);
}

.project-kicker {
  margin: 0 0 14px;
}

.project-card .compact {
  gap: 26px;
}

.project-card p {
  margin: 0;
}

.detail-list {
  display: grid;
  gap: 7px;
  margin: 12px 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.detail-list li::marker {
  color: var(--cyan);
}

.pub-list {
  margin: 0;
  padding-left: 1.3rem;
  color: var(--muted);
}

.pub-list li + li {
  margin-top: 10px;
}

.pub-list a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.pub-list a:hover,
.pub-list a:focus-visible {
  color: #27383a;
}

.compact-links {
  margin-top: 20px;
}

.service-list {
  display: grid;
  gap: 14px;
}

.service-item {
  display: grid;
  gap: 7px;
  padding-left: 14px;
  border-left: 2px solid rgba(53, 191, 198, 0.72);
}

.service-item p {
  margin: 0;
}

.service-item .zh-text {
  color: var(--ink);
  font-weight: 750;
}

.contact-section {
  position: relative;
  overflow: hidden;
  padding: clamp(80px, 10vw, 128px) 18px;
  background:
    linear-gradient(90deg, rgba(255, 248, 238, 0.9), rgba(255, 248, 238, 0.62)),
    url("assets/atmosphere/footer.png") center / cover no-repeat,
    linear-gradient(135deg, rgba(53, 191, 198, 0.16), transparent 36%),
    var(--bg-2);
}

.contact-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 34%),
    linear-gradient(315deg, rgba(233, 120, 97, 0.1), transparent 34%);
  pointer-events: none;
}

.contact-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 38px);
}

.contact-links {
  grid-column: 1 / -1;
  margin-top: -10px;
}

.contact-copy h2 {
  margin-bottom: 12px;
  font-size: clamp(1.35rem, 2.4vw, 2.15rem);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 248, 238, 0.82);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  place-items: center;
  padding: 54px 20px 24px;
  background: rgba(2, 6, 7, 0.92);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(1280px, 100%);
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius);
  background: #ffffff;
}

.lightbox p {
  margin: 0;
  color: #f8f5ea;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  right: 22px;
  top: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  color: #f8f5ea;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.8rem;
  line-height: 1;
}

@media (max-width: 1060px) {
  .featured-figure,
  .bilingual,
  .stats-strip,
  .contact-card,
  .activity-grid {
    grid-template-columns: 1fr;
  }

  .activity-card img {
    height: auto;
    min-height: 0;
  }

  .featured-figure > div {
    padding: 0 10px 12px;
  }

  .hero-content {
    min-height: 0;
    padding-right: 0;
  }

  .hero-grid {
    max-width: 100%;
  }

  .hero-portrait {
    position: relative;
    top: auto;
    right: auto;
    width: min(260px, 72vw);
    margin-top: 28px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-matrix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .triptych-grid,
  .paired-figure-grid {
    grid-template-columns: 1fr;
  }

  .gallery-card,
  .gallery-card.wide {
    grid-column: span 1;
  }

  .gallery-card.full {
    grid-column: 1 / -1;
  }

  .stats-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: center;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 66px;
    left: 18px;
    right: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 253, 247, 0.96);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .brand-wordmark {
    gap: 2px;
    padding-left: 10px;
  }

  .brand-line {
    display: grid;
    gap: 0;
  }

  .brand strong {
    font-size: 0.9rem;
  }

  .brand em {
    font-size: 0.78rem;
  }

  .brand-subline {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    padding-top: 86px;
  }

  h1,
  .zh h1 {
    min-height: auto;
    font-size: clamp(2.9rem, 15vw, 4.4rem);
  }

  .en h1 {
    max-width: 100%;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .map-matrix {
    grid-template-columns: 1fr;
  }

  .paired-card img {
    height: auto;
  }

  .gallery-card.full img {
    max-height: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
  }
}
