:root {
  --bg: #ebe4d9;
  --surface: rgba(245, 238, 229, 0.9);
  --surface-strong: #f5eee5;
  --text: #1d2433;
  --muted: #5e6574;
  --line: rgba(31, 41, 55, 0.14);
  --primary: #0f5f78;
  --primary-strong: #0a4457;
  --accent: #bf5f2f;
  --shadow: 0 22px 60px rgba(23, 29, 42, 0.15);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --content-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans SC", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(215, 168, 112, 0.38), transparent 32%),
    radial-gradient(circle at 85% 15%, rgba(82, 133, 150, 0.26), transparent 28%),
    linear-gradient(180deg, #eee5d9 0%, #e7dfd3 52%, #ddd6cb 100%);
  line-height: 1.75;
}

img,
video {
  display: block;
  width: 100%;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

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

p,
h1,
h2,
h3 {
  margin: 0;
}

.page-shell {
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto;
  padding: 108px 0 72px;
}

.top-nav {
  position: fixed;
  top: 18px;
  z-index: 1000;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.top-nav-inner {
  width: min(calc(100% - 32px), var(--content-width));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  overflow-x: auto;
  white-space: nowrap;
  border: 1px solid rgba(20, 76, 94, 0.12);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(232, 242, 244, 0.9), rgba(220, 235, 238, 0.82));
  box-shadow: 0 18px 42px rgba(16, 52, 64, 0.12);
  backdrop-filter: blur(18px);
  scrollbar-width: none;
  pointer-events: auto;
}

.top-nav-inner::-webkit-scrollbar {
  display: none;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.98rem;
  font-weight: 500;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  background: rgba(15, 95, 120, 0.08);
  border-color: rgba(15, 95, 120, 0.08);
  color: var(--primary);
  transform: translateY(-1px);
}

.page-glow {
  position: fixed;
  inset: auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(48px);
  pointer-events: none;
  opacity: 0.6;
}

.page-glow-left {
  top: 64px;
  left: -80px;
  background: rgba(216, 166, 106, 0.32);
}

.page-glow-right {
  top: 220px;
  right: -96px;
  background: rgba(64, 126, 143, 0.24);
}

.section-card {
  position: relative;
  margin-bottom: 28px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-xl);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.publications-section {
  padding: 42px 40px 38px;
  border-color: rgba(255, 255, 255, 0.65);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.8fr);
  gap: 28px;
  align-items: center;
}

.hero-copy .section-heading {
  margin-bottom: 8px;
}

.hero-copy .section-heading .eyebrow {
  margin-bottom: 0;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.project h3,
.service-grid h3 {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.03em;
}

.hero h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  margin-bottom: 18px;
  font-size: clamp(2.1rem, 3.1vw, 3.35rem);
  line-height: 0.96;
}

.hero-name-cn {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.45vw, 1.32rem);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.hero-copy p + p {
  margin-top: 14px;
}

.hero-lead {
  max-width: 60ch;
  font-size: 1.08rem;
}

.hero-pills,
.hero-links,
.project-meta,
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-pills {
  margin-top: 24px;
}

.hero-pills span,
.tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 95, 120, 0.08);
  color: var(--primary-strong);
  font-size: 0.85rem;
  font-weight: 600;
}

.tag-strong {
  background: rgba(182, 46, 93, 0.16);
  color: #9d1f4e;
  border: 1px solid rgba(157, 31, 78, 0.16);
}

.tag-strong::before {
  content: "*";
  margin-right: 6px;
  font-size: 0.78rem;
  line-height: 1;
}

.tag-accent {
  background: rgba(255, 193, 133, 0.28);
  color: #9a4a1f;
}

.hero-links {
  margin-top: 26px;
}

.hero-links a,
.links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(250, 246, 240, 0.78);
  color: var(--text);
  font-weight: 500;
}

.hero-links a {
  gap: 9px;
  justify-content: flex-start;
}

.hero-links a svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: currentColor;
}

.hero-links a:hover,
.hero-links a:focus-visible,
.links a:hover,
.links a:focus-visible {
  border-color: rgba(191, 95, 47, 0.35);
  color: var(--accent);
  transform: translateY(-1px);
}

.hero-portrait {
  display: grid;
  gap: 14px;
  justify-items: center;
}

.portrait-card {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(247, 241, 233, 0.82), rgba(188, 208, 214, 0.58));
  box-shadow: 0 20px 44px rgba(15, 35, 52, 0.16);
}

.portrait-card img {
  height: 100%;
  object-fit: cover;
}

.portrait-overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 220ms ease;
}

.portrait-card.is-swapped .portrait-overlay,
.portrait-card:hover .portrait-overlay,
.portrait-card:focus-within .portrait-overlay {
  opacity: 1;
}

.portrait-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 22px;
}

.publications-section .section-heading {
  max-width: none;
  margin-bottom: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(15, 95, 120, 0.12);
}

.news-scroll {
  position: relative;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 10px;
  mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}

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

.news-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.news-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.news-date {
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.news-scroll::-webkit-scrollbar {
  width: 8px;
}

.news-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 999px;
}

.news-scroll::-webkit-scrollbar-thumb {
  background: rgba(15, 95, 120, 0.28);
  border-radius: 999px;
}

.news-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 95, 120, 0.42);
}

.annotation {
  margin-top: 0;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.95rem;
}

.projects {
  display: grid;
  gap: 22px;
}

.project {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  gap: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.55);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.project:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 95, 120, 0.18);
  box-shadow: 0 14px 32px rgba(18, 31, 45, 0.08);
}

.project-featured {
  border-left: 5px solid #c43a56;
  background: #f9e6ea;
  border-color: rgba(196, 58, 86, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.project-featured h3 a {
  color: #8f1d49;
}

.project-featured:hover {
  border-color: rgba(157, 31, 78, 0.24);
  box-shadow: 0 18px 38px rgba(157, 31, 78, 0.12);
}

.project-media {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: #ffffff;
}

.project-media img,
.project-media video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  max-width: calc(100% - 20px);
  max-height: calc(100% - 20px);
  object-fit: contain;
  transform: translate(-50%, -50%);
  transition: opacity 200ms ease;
}

[data-hover-preview] video {
  opacity: 0;
  pointer-events: none;
}

[data-hover-preview] img {
  opacity: 1;
}

[data-hover-preview].is-previewing video,
[data-hover-preview]:hover video,
[data-hover-preview]:focus-visible video {
  opacity: 1;
}

[data-hover-preview].is-previewing img,
[data-hover-preview]:hover img,
[data-hover-preview]:focus-visible img {
  opacity: 0;
}

.project-body {
  display: grid;
  gap: 10px;
  align-content: start;
}

.project h3 {
  font-size: 1.28rem;
  line-height: 1.15;
}

.authors,
.venue {
  color: var(--muted);
}

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

.links {
  margin-top: 4px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.service-grid > div {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(244, 237, 228, 0.92);
}

.service-grid p + p {
  margin-top: 6px;
}

@media (max-width: 920px) {
  .hero,
  .project {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 24px;
  }

  .hero-portrait {
    justify-items: start;
  }

  .portrait-card {
    width: min(100%, 280px);
  }

  .news-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--content-width));
    padding: 86px 0 42px;
  }

  .top-nav {
    top: 10px;
  }

  .top-nav-inner {
    width: min(calc(100% - 20px), var(--content-width));
    gap: 6px;
    padding: 10px 10px;
  }

  .section-card {
    padding: 22px 18px;
    border-radius: 24px;
  }

  .publications-section {
    padding: 28px 18px 24px;
  }

  .publications-section .section-heading {
    padding-bottom: 14px;
  }

  .hero h1 {
    line-height: 1.02;
  }

  .hero-links a,
  .links a {
    width: 100%;
  }

  .project {
    padding: 14px;
  }
}
