:root {
  --header-height: 46px;
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-soft: #f7f7f7;
  --text: #1d1d1f;
  --heading: #1d1d1f;
  --body: #333336;
  --muted: #515154;
  --fill: #f5f5f7;
  --fill-strong: #e8e8ed;
  --line: #e3e3e6;
  --divider-major: #1f1f1f;
  --divider-minor: #e0e3e6;
  --accent: #0071e3;
  --accent-soft: #5b95c7;
  --blue: #0071e3;
  --amber: #8a6a22;
  --rose: #94524d;
  --accent-ink: #0058b8;
  --shadow: none;
  --relief-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 5px 14px rgba(0, 0, 0, 0.075),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 12px);
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
  font-synthesis-weight: none;
}

::selection {
  background: rgba(0, 113, 227, 0.16);
}

a {
  color: inherit;
  text-decoration: none;
}

.coin-companion {
  --coin-border: rgba(126, 126, 126, 0.34);
  --coin-highlight: rgba(255, 255, 255, 0.42);
  --coin-ring: rgba(145, 145, 145, 0.24);
  --coin-shadow: rgba(110, 110, 110, 0.12);
  --coin-a: #f7f7f7;
  --coin-b: #dddddd;
  --coin-c: #bdbdbd;
  --coin-d: #949494;
  --coin-mark: rgba(86, 86, 86, 0.44);
  --coin-mark-shadow: rgba(255, 255, 255, 0.46);
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 9;
  width: 72px;
  height: 84px;
  padding: 0;
  border: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  transform-origin: 50% 80%;
  opacity: 0.48;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.08));
  transition: opacity 160ms ease, filter 160ms ease;
}

.coin-companion:focus-visible {
  outline: 2px solid #0f4d82;
  outline-offset: 2px;
  border-radius: 50%;
}

.coin-companion:hover {
  --coin-border: rgba(139, 96, 16, 0.86);
  --coin-highlight: rgba(255, 255, 255, 0.72);
  --coin-ring: rgba(255, 238, 157, 0.52);
  --coin-shadow: rgba(112, 72, 14, 0.2);
  --coin-a: #fff1a8;
  --coin-b: #ffe68a;
  --coin-c: #d69a22;
  --coin-d: #9f6511;
  --coin-mark: rgba(103, 64, 8, 0.9);
  --coin-mark-shadow: rgba(255, 246, 181, 0.62);
  opacity: 0.9;
  filter: drop-shadow(0 12px 18px rgba(112, 72, 14, 0.14));
}

.coin-sprite {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: 54px;
  aspect-ratio: 1;
  border: 2px solid var(--coin-border);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, var(--coin-highlight) 0 9%, transparent 10%),
    radial-gradient(circle at 54% 56%, var(--coin-b) 0 30%, var(--coin-c) 61%, var(--coin-d) 100%);
  box-shadow:
    inset 0 0 0 4px var(--coin-ring),
    inset 0 -8px 12px rgba(80, 80, 80, 0.18),
    0 12px 18px var(--coin-shadow);
  opacity: 1;
  pointer-events: none;
  transform: translate(-50%, -50%) translateY(0) scale(0.86) rotate(0deg);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.coin-sprite::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid var(--coin-ring);
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.coin-sprite::after {
  content: "$";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--coin-mark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 0 var(--coin-mark-shadow);
}

.wechat-dialog {
  position: fixed;
  inset: auto 96px 110px auto;
  z-index: 20;
  width: fit-content;
  max-width: calc(100vw - 112px);
  max-height: calc(100vh - 128px);
  max-height: calc(100dvh - 128px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(18, 24, 32, 0.2);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(18, 24, 32, 0.2);
  color-scheme: light;
}

.wechat-qr {
  display: block;
  width: auto;
  height: auto;
  max-width: min(280px, calc(100vw - 112px));
  max-height: calc(100vh - 128px);
  max-height: calc(100dvh - 128px);
  object-fit: contain;
  background: #ffffff;
}

.wechat-dialog-close {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 1;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(18, 24, 32, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #111820;
  box-shadow: 0 4px 14px rgba(18, 24, 32, 0.12);
  cursor: pointer;
  font: inherit;
  font-size: 23px;
  line-height: 1;
}

.wechat-dialog-close span {
  position: relative;
  display: block;
  width: 14px;
  height: 14px;
  font-size: 0;
}

.wechat-dialog-close span::before,
.wechat-dialog-close span::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  transform: translate(-50%, -50%) rotate(45deg);
}

.wechat-dialog-close span::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.wechat-dialog-close:hover {
  background: #ffffff;
  border-color: rgba(15, 77, 130, 0.5);
  color: #0f4d82;
}

.wechat-dialog-close:focus-visible {
  outline: 2px solid #0f4d82;
  outline-offset: 2px;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-height);
  padding: 0 max(28px, calc((100vw - 1180px) / 2));
  padding-left: max(28px, calc((100% - 1180px) / 2 + 28px));
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

main {
  padding-top: var(--header-height);
}

main > section + section {
  border-top: 1px solid var(--divider-major);
}

.brand {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.014em;
  text-transform: none;
}

.brand-colors {
  display: inline-block;
  color: #7c3aed;
  background: linear-gradient(
    90deg,
    #e11d48 0%,
    #f97316 18%,
    #10b981 38%,
    #0891b2 55%,
    #2563eb 72%,
    #7c3aed 87%,
    #c026d3 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (forced-colors: active) {
  .brand-colors {
    background: none;
    -webkit-text-fill-color: currentColor;
  }
}

.header-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--heading);
  font-size: 14px;
  white-space: nowrap;
}

.nav a {
  padding: 0;
  border-radius: 0;
  border-bottom: 0;
  transition: background 160ms ease, color 160ms ease;
}

.nav a:hover {
  color: var(--accent);
  background: transparent;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  min-width: 58px;
  padding: 4px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--heading);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: color 160ms ease;
}

.language-toggle:hover {
  color: var(--accent-ink);
}

.language-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.section {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 74px 28px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(230px, 260px) minmax(0, 1fr);
  gap: clamp(44px, 6vw, 82px);
  align-items: start;
  min-height: auto;
  padding-top: 66px;
  padding-bottom: 70px;
}

.hero-copy {
  order: 2;
  margin-left: clamp(84px, 10.5vw, 154px);
}

.hero-copy,
.profile-panel,
.section-body,
.timeline,
.publication-list,
.education-summary,
.project-grid,
.expertise-grid,
.skills-grid {
  min-width: 0;
}

.eyebrow,
.section-kicker,
.time,
.stack {
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.eyebrow,
.section-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.section-kicker {
  margin-bottom: 14px;
}

.section-kicker + .expertise-grid {
  margin-top: 30px;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 16px;
  font-size: clamp(34px, 4.4vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.028em;
  color: var(--heading);
  font-weight: 740;
}

.han-name {
  display: inline-block;
  margin-left: 12px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 500;
  white-space: nowrap;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.12;
  letter-spacing: -0.021em;
  color: var(--heading);
  font-weight: 760;
  text-wrap: balance;
}

h3 {
  margin-bottom: 10px;
  font-size: 21px;
  line-height: 1.26;
  letter-spacing: -0.014em;
  color: var(--heading);
  font-weight: 700;
  text-wrap: balance;
}

.lead {
  max-width: 680px;
  color: var(--body);
  font-size: clamp(18px, 2.1vw, 23px);
  margin-bottom: 14px;
  line-height: 1.45;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-availability {
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 680px;
  margin: 0;
  color: #0f7a45;
  font-size: clamp(16px, 1.7vw, 18.5px);
  font-weight: 650;
  letter-spacing: -0.008em;
}

.hero-availability::before {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 3.5px rgba(22, 163, 74, 0.16);
  content: "";
}

.cv-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 700;
  letter-spacing: -0.021em;
  line-height: 1.12;
  transition: color 160ms ease;
}

.cv-link::after {
  font-size: 0.72em;
  line-height: 1;
  transition: transform 180ms cubic-bezier(0.2, 0.7, 0.2, 1);
  content: "\2197";
}

.cv-link:hover {
  color: var(--accent-ink);
}

.cv-link:hover::after {
  transform: translate(3px, -3px);
}

.cv-link:focus-visible {
  border-radius: 3px;
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.footer-links {
  align-self: start;
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.footer-links.email-popover-open > button[data-copy-email] {
  margin-bottom: 54px;
}

.footer-links.email-popover-open {
  align-items: start;
}

.button,
.footer-links a,
.footer-links button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 980px;
  background: var(--fill);
  box-shadow: none;
  color: var(--heading);
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.004em;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.button.primary {
  border-color: transparent;
  background: var(--accent);
  color: #ffffff;
  box-shadow:
    0 1px 2px rgba(0, 60, 130, 0.18),
    0 6px 16px rgba(0, 90, 190, 0.22);
}

.button:hover,
.footer-links a:hover,
.footer-links button:hover {
  border-color: transparent;
  color: var(--heading);
  background: var(--fill-strong);
  box-shadow: none;
  transform: translateY(-1px);
}

.button:focus-visible,
.footer-links button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.button.primary:hover {
  color: #ffffff;
  background: #0077ed;
  border-color: transparent;
  box-shadow:
    0 2px 4px rgba(0, 60, 130, 0.2),
    0 10px 24px rgba(0, 90, 190, 0.26);
}

.email-copy-popover {
  position: fixed;
  z-index: 15;
  max-width: calc(100vw - 24px);
  padding: 9px 13px;
  border: 1px solid rgba(0, 113, 227, 0.22);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 34, 58, 0.13);
  color: var(--heading);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.email-copy-popover[hidden] {
  display: none;
}

.button:active,
.footer-links a:active,
.footer-links button:active {
  background: #dcdce1;
  box-shadow: none;
  transform: translateY(0);
}

.profile-panel {
  order: 1;
  justify-self: start;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  width: 260px;
  max-width: 260px;
}

.portrait-ring {
  --portrait-shadow-x: 0px;
  --portrait-shadow-y: 7px;
  --portrait-tilt-x: 0deg;
  --portrait-tilt-y: 0deg;
  position: relative;
  width: 196px;
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 3px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.035);
  box-shadow: var(--relief-shadow);
  overflow: hidden;
  transform: perspective(700px) rotateX(var(--portrait-tilt-x)) rotateY(var(--portrait-tilt-y));
  transform-style: preserve-3d;
  transition:
    transform 140ms ease-out,
    box-shadow 140ms ease-out;
  will-change: transform;
}

.portrait-ring:hover {
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    var(--portrait-shadow-x) var(--portrait-shadow-y) 20px rgba(0, 0, 0, 0.11);
}

.portrait-ring.is-pressed {
  transform: perspective(700px) rotateX(var(--portrait-tilt-x)) rotateY(var(--portrait-tilt-y)) scale(0.985);
  transition-duration: 70ms;
}

.profile-panel img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel);
  border: 0;
  box-shadow: none;
}

.role {
  margin-bottom: 2px;
  font-weight: 700;
  letter-spacing: -0.008em;
  color: var(--heading);
}

.profile-panel p:last-child {
  margin-bottom: 0;
}

.program {
  margin-bottom: 10px;
  color: var(--heading);
  font-size: clamp(13px, 1.55vw, 16px);
  font-weight: 600;
  letter-spacing: -0.006em;
  line-height: 1.3;
  white-space: nowrap;
}

.muted {
  color: var(--muted);
}

.location-link {
  color: var(--muted);
  transition: color 160ms ease;
}

.location-link:hover {
  color: var(--accent);
}

.institution-link {
  color: inherit;
  transition: color 160ms ease;
}

.institution-link:hover {
  color: var(--accent);
}

.split {
  display: grid;
  grid-template-columns: minmax(240px, 0.42fr) minmax(0, 0.58fr);
  gap: 64px;
}

.section-body p,
.timeline-item p,
.publication p,
.project-grid p,
.expertise-grid p {
  color: var(--body);
}

.direction-link {
  color: var(--heading);
  font-weight: 760;
  transition: color 160ms ease;
}

.direction-link:hover {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.direction-link:focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.expertise-card h3 {
  font-size: 19px;
}

.skills-band {
  border-top: 0;
  background: #ffffff;
}

.skills-inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 52px 28px 58px;
  border-top: 1px solid var(--divider-minor);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 34px;
}

.skill-card {
  min-height: auto;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
}

.skill-card h3 {
  margin-bottom: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.008em;
  line-height: 1.3;
}

.skill-list {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.skill-list li {
  position: relative;
  padding-left: 15px;
  color: var(--body);
  font-size: 13.5px;
  font-weight: 550;
  line-height: 1.45;
}

.skill-list li::before {
  position: absolute;
  top: 0.7em;
  left: 0;
  width: 7px;
  height: 1.5px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
}

.project-grid > article,
.publication,
.timeline-item {
  border-top: 2px solid var(--divider-minor);
  padding-top: 28px;
}

.expertise-card,
.project-card {
  position: relative;
}

.expertise-card::before,
.project-card::before {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: none;
}

.agent-card::before,
.code-card::before {
  background: #2878bd;
}

.sequence-card::before {
  background: #d9822b;
}

.product-card::before {
  background: #5f7f9f;
}

.systems-card::before {
  background: #3f9d68;
}

.learning-card::before {
  background: #8a6a22;
}

.timeline,
.publication-list {
  display: grid;
  gap: 36px;
}

.education-summary {
  display: grid;
  gap: 14px;
  padding-top: 22px;
  margin: 0;
  border-top: 2px solid var(--divider-minor);
}

.education-entry {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  align-items: baseline;
}

.education-entry dt {
  color: var(--heading);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.education-entry dd {
  min-width: 0;
  margin: 0;
  color: var(--body);
  line-height: 1.5;
}

.education-entry .institution-link,
.education-entry .institution-name {
  color: var(--heading);
  font-weight: 760;
}

.education-divider {
  margin: 0 7px;
  color: #b8bcc2;
}

.education-program {
  color: var(--body);
}

.education-content,
.award-list {
  display: grid;
  gap: 28px;
}

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

.section-heading > :last-child {
  margin-bottom: 0;
}

.publication {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 30px;
  row-gap: 10px;
}

.publication-meta {
  grid-column: 1;
  grid-row: 1 / span 6;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  text-align: left;
}

.publication h3,
.publication p,
.publication a,
.publication .paper-links {
  grid-column: 2;
}

.publication.no-thumbnail h3,
.publication.no-thumbnail p,
.publication.no-thumbnail a,
.publication.no-thumbnail .paper-links {
  grid-column: 2 / -1;
}

.publication-meta .time {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.45;
}

.publication-note {
  display: block;
  width: fit-content;
  padding-bottom: 2px;
  border-bottom: 2px solid rgba(217, 138, 36, 0.5);
  color: #d98a24;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.publication-note.neurips-note {
  color: var(--heading);
  border-bottom: 0;
  padding-bottom: 0;
  line-height: 1.34;
}

.neurips-note .neurips-year,
.neurips-note .neurips-track {
  display: block;
  white-space: nowrap;
}

.neurips-note .neurips-year {
  font-size: 15px;
  font-weight: 900;
  text-transform: none;
}

.neurips-note .neurips-track {
  color: var(--heading);
  text-transform: none;
}

.paper-type {
  display: block;
  color: var(--heading);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-transform: uppercase;
}

.highlight-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid #c9cdd2;
  border-radius: 999px;
  background: transparent;
  color: #4f5358;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.06em;
  line-height: 1.15;
  box-shadow: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.highlight-badge-inline {
  position: relative;
  top: -1px;
  margin-left: 8px;
  vertical-align: middle;
}

.service-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.award-list {
  border-top: 2px solid var(--divider-minor);
  padding-top: 26px;
}

.award-card {
  display: block;
}

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

.award-copy .service-entry {
  margin-top: 14px;
  margin-bottom: 0;
}

.publication a,
.project-card a {
  width: fit-content;
  color: var(--accent);
  font-weight: 700;
}

.publication h3 a {
  color: var(--heading);
  font-weight: inherit;
}

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

.publication-summary {
  max-width: 680px;
}

.internship-role {
  margin-left: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
}

.publication .publication-keywords {
  margin: 6px 0 0;
  color: var(--heading);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.6;
  text-wrap: pretty;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.paper-links a {
  display: inline-flex;
  width: auto;
  color: var(--accent);
  font-weight: 700;
}

.paper-links a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.paper-links a + a::before {
  content: "|";
  margin: 0 8px;
  color: #b2b2b2;
  font-weight: 500;
}

.paper-id {
  color: var(--accent) !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13.5px;
}

.paper-id:hover {
  color: #0f4d82 !important;
}

.paper-thumbnail {
  position: relative;
  grid-column: 3;
  grid-row: 1 / span 6;
  align-self: start;
  width: 100%;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(0, 0, 0, 0.035);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--relief-shadow);
  transition:
    transform 180ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 180ms ease;
  will-change: transform;
}

a.paper-thumbnail {
  grid-column: 3;
  cursor: pointer;
}

a.paper-thumbnail:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .paper-thumbnail:hover {
    z-index: 1;
    box-shadow:
      0 2px 4px rgba(0, 0, 0, 0.055),
      0 10px 24px rgba(0, 0, 0, 0.11),
      inset 0 1px 0 rgba(255, 255, 255, 0.96);
    transform: translateY(-3px) scale(1.01);
  }

  a.paper-thumbnail:active {
    box-shadow: var(--relief-shadow);
    transform: translateY(-1px) scale(0.995);
  }
}

.paper-thumbnail img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 9px;
  object-fit: contain;
}

.paper-thumbnail-wide img {
  aspect-ratio: 141 / 41;
}

.paper-thumbnail-figure1 img {
  height: auto;
  aspect-ratio: auto;
}

.paper-thumbnail-stack img {
  aspect-ratio: 5 / 3;
}

.internship-thumbnail img {
  aspect-ratio: 784 / 301;
}

.work-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.work-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid #cfe3f3;
  border-radius: 4px;
  background: #f6fafe;
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.work-links a:hover {
  border-color: #9fc1dd;
  background: #edf6fc;
  color: #0f4d82;
}

.project-card a {
  display: inline-flex;
  margin-top: 8px;
  color: var(--accent);
  font-size: 14px;
}

.project-card a:hover {
  color: #0f4d82;
}

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

.footer {
  display: grid;
  grid-template-columns: minmax(320px, 0.56fr) minmax(320px, 0.44fr);
  gap: 54px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 74px 28px 52px;
  border-top: 1px solid var(--divider-major);
}

.footer h2 {
  max-width: 640px;
  color: #0f7a45;
  font-size: clamp(16px, 1.7vw, 18.5px);
  font-weight: 650;
  letter-spacing: -0.008em;
  line-height: 1.45;
}

.footer-links a,
.footer-links button {
  justify-content: center;
  width: 100%;
  min-height: 48px;
  text-align: center;
}

.copyright {
  grid-column: 1 / -1;
  margin-top: 26px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 1180px) {
  .coin-companion {
    right: 12px;
    bottom: 22px;
    width: 68px;
    height: 80px;
  }

  .wechat-dialog {
    right: 88px;
  }
}

@media (max-width: 860px) {
  :root {
    --header-height: 90px;
  }

  .coin-companion {
    right: 12px;
    bottom: 18px;
    width: 64px;
    height: 76px;
    transform: none;
  }

  .wechat-dialog {
    right: 84px;
    bottom: 102px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
    max-width: 100vw;
  }

  .header-controls {
    width: 100%;
  }

  .nav {
    flex: 1;
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

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

  .nav a {
    padding: 7px 8px;
  }

  .hero,
  .split,
  .footer {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .education-section {
    gap: 24px;
  }

  .hero {
    gap: 32px;
    min-height: auto;
    padding-top: 34px;
    padding-bottom: 30px;
  }

  .hero-copy,
  .profile-panel {
    order: initial;
  }

  .hero-copy {
    margin-left: 0;
  }

  .profile-panel {
    width: 200px;
    max-width: 200px;
  }

  .portrait-ring {
    width: 168px;
  }

  .expertise-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

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

  .publication {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .publication h3,
  .publication p,
  .publication a,
  .publication .paper-links,
  .publication .paper-thumbnail,
  .publication-meta {
    grid-column: 1;
    grid-row: auto;
  }

  .publication-meta {
    gap: 8px;
  }
}

@media (max-width: 600px) {
  .section,
  .footer,
  .skills-inner {
    width: 390px;
    max-width: 100%;
    margin-left: 0;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
  }

  .site-header {
    width: 390px;
    max-width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }

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

  .skill-card {
    min-height: auto;
  }

  .nav {
    max-width: 100%;
    font-size: 12.5px;
  }

  .language-toggle {
    min-width: 52px;
    padding: 6px 10px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .footer-links {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .button,
  .footer-links a,
  .footer-links button {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 420px) {
  .coin-companion {
    right: 8px;
    bottom: 10px;
    width: 82px;
    height: 96px;
    transform: scale(0.82);
  }

  .wechat-dialog {
    bottom: 97px;
  }

  .nav {
    font-size: 13px;
  }

  .lead {
    font-size: 20px;
  }

  h1 {
    font-size: 38px;
  }

  .profile-panel {
    width: 176px;
    max-width: 176px;
  }

  .portrait-ring {
    width: 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .paper-thumbnail,
  .portrait-ring {
    transition: none;
  }

  .paper-thumbnail:hover,
  a.paper-thumbnail:active,
  .portrait-ring,
  .portrait-ring.is-pressed,
  .cv-link:hover::after {
    transform: none;
  }

  .cv-link::after {
    transition: none;
  }
}
