:root {
  --paper: #fffdfd;
  --ink: #2b2224;
  --body: #463c3e;
  --muted: #85777a;
  --line: #f1e4e4;
  --rose: #c4545e;
  --rose-deep: #a8404a;
  --rose-soft: #f5dede;
  --rose-wash: #fcf4f4;
  --peach: #e2aaa1;
  --serif: "Fraunces", Georgia, serif;
  --body-font: "Newsreader", Georgia, serif;
  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
  --width: 1000px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 10px 30px rgba(170, 70, 80, 0.08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--paper); color: var(--body); overflow-x: clip;
  font: 420 1.08rem/1.72 var(--body-font); -webkit-font-smoothing: antialiased;
}
::selection { background: var(--rose-soft); color: var(--ink); }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; transition: color 180ms ease, opacity 180ms ease; }
a:hover { color: var(--rose); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--rose); outline-offset: 4px; border-radius: 4px; }
img { max-width: 100%; display: block; }
strong { color: var(--ink); font-weight: 600; }
button { font: inherit; color: inherit; }
.wrap { max-width: var(--width); margin: 0 auto; padding: 0 clamp(22px, 5vw, 56px); }

/* background decoration */
.bg-blob { position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: 0.55; pointer-events: none; }
.bg-blob--1 { width: 460px; height: 460px; top: -160px; right: -120px; background: #f8dcdc; }
.bg-blob--2 { width: 320px; height: 320px; top: 260px; left: -180px; background: #fbe9e4; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 253, 253, 0.82); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color 200ms ease, box-shadow 200ms ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 18px rgba(170, 70, 80, 0.05); }
.nav .wrap { display: flex; align-items: center; gap: 6px; height: 60px; }
.nav__brand { margin-right: auto; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 600 1.08rem var(--serif); }
.nav__brand img { width: 30px; height: 30px; border-radius: 50%; background: #f3e1e1; }
.nav__link {
  position: relative; padding: 6px 12px; border-radius: 999px; text-decoration: none;
  font: 500 0.86rem var(--sans); color: var(--muted); transition: color 160ms, background 160ms;
}
.nav__link:hover { color: var(--rose); background: var(--rose-wash); }
.nav__link.is-active { color: var(--rose-deep); background: var(--rose-soft); }

/* hero */
.hero { position: relative; display: grid; grid-template-columns: 1fr 230px; gap: 56px; align-items: center; padding: 70px 0 54px; }
.hero__eyebrow { font: 500 0.8rem var(--mono); letter-spacing: 0.06em; color: var(--rose); margin: 0 0 10px; }
h1 { font: 600 clamp(2.4rem, 5vw, 3.3rem)/1.05 var(--serif); color: var(--ink); margin: 0 0 18px; letter-spacing: -0.015em; }
h1 .wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.6s ease-in-out 1s 2; }
@keyframes wave { 0%,60%,100% { transform: rotate(0); } 10%,30% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
.hero p { margin: 0 0 12px; }
.logo-word { white-space: nowrap; }
.inline-logo { width: 1em; height: 1em; object-fit: contain; display: inline-block; vertical-align: -0.16em; margin-right: 0.3em; }
.hero a { text-decoration-color: var(--peach); }
/* links */
.links { margin-top: 24px; }
.links__mail { display: inline-flex; align-items: center; gap: 10px; font: 600 1.12rem var(--serif); color: var(--ink); text-decoration: none; border-bottom: 1.5px solid var(--rose-soft); padding-bottom: 2px; }
.links__mail i { color: var(--rose); font-size: 0.9em; }
.links__mail:hover { border-color: var(--rose); }
.links__row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.links__row a, .links__row button { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font: 500 0.9rem var(--sans); color: var(--ink); text-decoration: none; transition: border-color 160ms, background 160ms, color 160ms; }
.links__row i { font-size: 1.05rem; color: var(--rose); }
.links__row a:hover, .links__row button:hover { border-color: var(--rose); background: var(--rose-wash); color: var(--rose-deep); }

/* dual-avatar flip */
.profile { display: grid; justify-items: center; gap: 12px; }
.portrait {
  position: relative; width: 220px; height: 220px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer; perspective: 1000px;
}
.portrait::before {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 1.5px dashed var(--peach); opacity: 0.7; animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.portrait__flip { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 600ms cubic-bezier(0.45, 0, 0.2, 1); }
.portrait.is-flipped .portrait__flip { transform: rotateY(180deg); }
.portrait__face {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 14px 34px rgba(170, 70, 80, 0.16);
}
.portrait__face img { width: 100%; height: 100%; object-fit: cover; }
.portrait__face--front { background: #f3e1e1; }
.portrait__face--back { transform: rotateY(180deg); }
.portrait__face--back img { object-position: 50% 28%; }
.portrait__preview {
  position: absolute; z-index: 2; right: 2px; bottom: 6px; width: 58px; height: 58px;
  border-radius: 50%; overflow: hidden; border: 4px solid var(--paper); background: var(--paper);
  box-shadow: 0 4px 12px rgba(170, 70, 80, 0.18); transition: transform 240ms var(--ease);
}
.portrait__preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.3s; }
.portrait__preview-cartoon { opacity: 0; background: #f3e1e1; }
.portrait__preview-photo { object-position: 50% 28%; }
.portrait.is-flipped .portrait__preview-photo { opacity: 0; }
.portrait.is-flipped .portrait__preview-cartoon { opacity: 1; }
.portrait:hover .portrait__preview { transform: scale(1.08) rotate(-6deg); }
.portrait__hint { font: 400 0.76rem var(--mono); color: var(--muted); }
.portrait__hint span { color: var(--rose); }

/* venue strip */
.venues { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 18px 0 6px; font: 500 0.8rem var(--sans); color: var(--muted); }
.venues__label { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.05em; color: var(--rose); }
.venues b { font: 600 1rem var(--serif); color: var(--ink); }

/* sections */
section.block { padding: 46px 0; border-top: 1px solid var(--line); }
h2 { font: 600 1.85rem/1.2 var(--serif); color: var(--ink); margin: 0 0 24px; letter-spacing: -0.01em; }
h2 .dot { color: var(--rose); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.section-note { font: 400 0.82rem var(--sans); color: var(--muted); margin: 0; }

/* research */
.statement { font: 400 clamp(1.25rem, 2.3vw, 1.5rem)/1.55 var(--body-font); color: var(--ink); margin: 0 0 26px; max-width: 46em; }
.statement em { font-style: italic; color: var(--rose-deep); }
.threads { list-style: none; margin: 0; padding: 0; }
.threads li { display: grid; grid-template-columns: 40px minmax(220px, 1.1fr) 1.2fr auto; gap: 14px; align-items: baseline; padding: 11px 0; border-top: 1px dashed var(--line); }
.threads li:last-child { border-bottom: 1px dashed var(--line); }
.threads__n { font: 500 0.78rem var(--mono); color: var(--peach); }
.threads__t { font: 600 1.05rem var(--serif); color: var(--ink); }
.threads__p { font-size: 0.95rem; color: var(--muted); font-style: italic; }
.threads__w { display: flex; gap: 12px; font: 500 0.82rem var(--sans); }
.threads__w a { color: var(--rose-deep); text-decoration: none; }
.threads__w a:hover { text-decoration: underline; }

/* news */
.news { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; max-height: 330px; overflow: auto; }
.news::before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 1.5px; background: var(--line); }
.news li { position: relative; display: grid; grid-template-columns: 22px 88px 1fr; gap: 8px; padding: 7px 0; }
.news li::before { content: ""; width: 11px; height: 11px; margin-top: 9px; border-radius: 50%; background: #fff; border: 2px solid var(--peach); position: relative; z-index: 1; }
.news li.is-hot::before { background: var(--rose); border-color: var(--rose); box-shadow: 0 0 0 4px var(--rose-soft); }
.news time { font: 500 0.8rem/2.1 var(--mono); color: var(--rose); }
.news p { margin: 0; }

/* experience */
.exp { list-style: none; padding: 0; margin: 0; }
.exp li { display: grid; grid-template-columns: 150px 34px 1fr; gap: 18px; padding: 16px 0; border-top: 1px dashed var(--line); }
.exp li:first-child { border-top: 0; padding-top: 0; }
.exp__date { font: 500 0.78rem/1.9 var(--mono); color: var(--muted); }
.exp__logo { width: 30px; height: 30px; object-fit: contain; margin-top: 2px; }
.exp__logo--tile { border-radius: 7px; }
.exp__logo--icon { display: grid; place-items: center; color: var(--rose); font-size: 1rem; }
.exp h3 { margin: 0; font: 600 1.08rem/1.4 var(--serif); color: var(--ink); }
.exp__unit { font: 400 0.92rem var(--sans); color: var(--muted); }
.exp__role { margin: 1px 0 3px; font-size: 0.97rem; color: var(--rose-deep); }
.exp__desc { margin: 0; font-size: 0.95rem; line-height: 1.55; }

/* publications */
.subhead { font: 500 0.78rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--rose); margin: 8px 0 14px; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 112px 1fr; gap: 16px; padding: 12px 0; border-top: 1px dashed var(--line); }
.row .venue { justify-self: start; align-self: start; margin-top: 3px; }
.row__title { font-size: 1rem; line-height: 1.45; color: var(--ink); text-decoration: none; }
.row__title b { font-weight: 650; }
.row__title:hover { color: var(--rose-deep); }
.row__new { margin-left: 8px; font: 600 0.66rem var(--sans); color: #fff; background: var(--rose); border-radius: 999px; padding: 1px 7px; vertical-align: 2px; }
.row__link { margin-left: 8px; font: 500 0.78rem var(--sans); color: var(--rose-deep); }
.row .pub__authors { margin: 2px 0 0; font-size: 0.86rem; }

/* publications */
.pubs { list-style: none; padding: 0; margin: 0 0 34px; display: grid; gap: 30px; }
.pub { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
.pub.is-hidden { display: none; }
.pub__thumb {
  position: relative; display: block; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff;
  aspect-ratio: 16 / 10;
}
.pub__thumb img { width: 100%; height: 100%; object-fit: contain; padding: 8px; transition: transform 500ms var(--ease); }
.pub__badge {
  position: absolute; top: 8px; left: 8px; z-index: 1; padding: 1px 9px; border-radius: 999px;
  background: var(--rose); color: #fff; font: 600 0.66rem/1.8 var(--sans); letter-spacing: 0.03em;
}
.pub__top { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-bottom: 6px; }
.pub__cites { font: 500 0.78rem var(--mono); color: var(--rose-deep); }
.pub__cites i { font-size: 0.7rem; margin-right: 2px; }
.venue {
  font: 600 0.74rem/1.8 var(--sans); color: var(--rose-deep); background: var(--rose-wash);
  border: 1px solid var(--rose-soft); border-radius: 6px; padding: 0 8px;
}
.venue--plain { color: var(--muted); background: #faf7f7; border-color: var(--line); }
.topics { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0; font: 400 0.76rem var(--sans); color: var(--muted); }
.topics span::before { content: "#"; color: var(--peach); margin-right: 1px; }
.pub__name { font: 650 1.45rem/1.2 var(--serif); color: var(--ink); margin: 0 0 3px; }
.pub__name a { text-decoration: none; }
.pub__name a span { font-size: 0.75em; color: var(--rose); }
.pub__title { margin: 0 0 6px; font-size: 1rem; line-height: 1.45; color: var(--body); }
.pub__authors { margin: 0 0 6px; font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
.me { color: var(--ink); font-weight: 650; background: linear-gradient(transparent 62%, var(--rose-soft) 62%); }
.pub__desc { margin: 0 0 8px; font-size: 0.93rem; line-height: 1.55; }
.pub__desc b { color: var(--rose-deep); font-weight: 600; }
.pub__links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.pub__links a {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 11px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--line); font: 500 0.76rem/1.8 var(--sans); color: var(--body); background: #fff; transition: all 160ms;
}
.pub__links a i { color: var(--rose); font-size: 0.85em; }
.pub__links a img { width: 13px; height: 13px; }
.pub__links a:hover { border-color: var(--rose); color: var(--rose-deep); background: var(--rose-wash); }

/* closing */
.closing { display: flex; align-items: center; justify-content: space-between; gap: 45px; border-block: 1px solid var(--line); padding-block: 37px; margin-top: 24px; }
.closing__text > p { font: 500 1.75rem/1.2 var(--serif); color: var(--ink); margin: 0 0 12px; }
.closing__text > a { display: inline-block; font: 400 0.9375rem var(--sans); color: var(--body); text-decoration: underline; text-decoration-color: #e3c4c7; text-underline-offset: 3px; transition: color 180ms, translate 240ms var(--ease); }
.closing__text > a:hover { color: var(--rose-deep); translate: 0 -2px; }
.visitor-map__content { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.visitor-map__widget { position: relative; width: 230px; min-height: 140px; overflow: hidden; opacity: 0.7; }
.visitor-map__widget > * { max-width: 100%; }
.visitor-map__counter { display: flex; align-items: center; gap: 6px; font: 400 0.875rem var(--sans); color: var(--muted); text-decoration: none; }
footer { display: flex; align-items: center; justify-content: space-between; padding-block: 25px 40px; font: 400 0.875rem var(--sans); color: var(--muted); }
footer a { color: var(--muted); text-decoration: none; transition: color 180ms; }
footer a:hover { color: var(--rose-deep); }

/* wechat popover */
.wechat-pop {
  border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; width: min(320px, 90vw);
  box-shadow: 0 20px 50px rgba(120, 40, 50, 0.18); background: #fff; color: var(--body);
}
.wechat-pop::backdrop { background: rgba(43, 34, 36, 0.18); backdrop-filter: blur(2px); }
.wechat-pop h3 { margin: 0 0 4px; font: 600 1.1rem var(--serif); color: var(--ink); }
.wechat-pop p { margin: 0 0 12px; font-size: 0.9rem; color: var(--muted); }
.wechat-pop__row { display: flex; gap: 8px; }
.wechat-pop__row code { flex: 1; padding: 6px 12px; border-radius: 10px; background: var(--rose-wash); font: 500 0.95rem var(--mono); color: var(--ink); }
.wechat-pop__row button { border: 0; border-radius: 10px; padding: 0 14px; background: var(--rose); color: #fff; cursor: pointer; font: 500 0.82rem var(--sans); }

/* back to top */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 15; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--rose); cursor: pointer; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: all 260ms var(--ease);
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--rose); color: #fff; }

/* reveal */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .closing { gap: 25px; }
  .visitor-map__widget { width: 180px; }
}
@media (max-width: 760px) {
  .closing { align-items: flex-start; flex-direction: column; gap: 25px; padding-block: 27px; }
  .visitor-map { width: 100%; }
  .visitor-map__widget { width: 230px; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; }
  .profile { order: -1; }
  .pub { grid-template-columns: 1fr; gap: 14px; }
  .threads li { grid-template-columns: 32px 1fr; gap: 2px 10px; }
  .threads__p, .threads__w { grid-column: 2; }
  .exp li { grid-template-columns: 30px 1fr; gap: 2px 14px; }
  .exp__logo { grid-column: 1; grid-row: 1 / span 2; }
  .exp__date { grid-column: 2; grid-row: 1; line-height: 1.5; }
  .exp li > div { grid-column: 2; grid-row: 2; min-width: 0; }
  .row { grid-template-columns: 1fr; gap: 4px; }
  .nav__link--hide { display: none; }
  .news li { grid-template-columns: 22px 1fr; }
  .news time { grid-column: 2; line-height: 1.4; }
  .news p { grid-column: 2; }

  /* mobile polish */
  .bg-blob--1 { right: 0; width: 300px; height: 300px; top: -120px; }
  .wrap { padding: 0 18px; }
  .nav .wrap { height: 54px; gap: 2px; }
  .nav__brand { font-size: 1rem; gap: 8px; }
  .nav__brand img { width: 26px; height: 26px; }
  .nav__link { padding: 5px 10px; font-size: 0.82rem; }
  html { scroll-padding-top: 64px; }
  body { font-size: 1.02rem; line-height: 1.65; }
  .hero { padding: 28px 0 32px; gap: 22px; }
  .portrait { width: 168px; height: 168px; }
  .portrait__preview { width: 46px; height: 46px; border-width: 3px; }
  h1 { font-size: 2.2rem; margin-bottom: 14px; text-align: center; }
  .logo-word { white-space: normal; }
  .links { margin-top: 20px; }
  .links__mail { font-size: 1rem; overflow-wrap: anywhere; }
  .links__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .links__row a, .links__row button { justify-content: center; padding: 9px 10px; }
  .venues { gap: 6px 14px; padding-top: 8px; }
  .venues__label { width: 100%; }
  section.block { padding: 34px 0; }
  h2 { font-size: 1.6rem; margin-bottom: 18px; }
  .section-head { margin-bottom: 18px; }
  .exp li { padding: 14px 0; }
  .exp__unit { display: block; margin-top: 1px; }
  .news { max-height: none; overflow: visible; }
  .pubs { gap: 34px; }
  .pub__thumb { aspect-ratio: 16 / 9; }
  .pub__name { font-size: 1.28rem; }
  .pub__links a { padding: 4px 12px; }
  .row { padding: 14px 0; }
  .row__title { font-size: 0.98rem; }
  .closing__text > p { font-size: 1.5rem; }
  .closing__text > a { overflow-wrap: anywhere; }
  .visitor-map__content { align-items: flex-start; }
  footer { padding-block: 20px 32px; font-size: 0.82rem; }
  .to-top { right: 14px; bottom: 14px; width: 40px; height: 40px; }
}
@media (max-width: 380px) {
  .nav__brand span, .nav__brand { font-size: 0.95rem; }
  .nav__link { padding: 5px 7px; }
  h1 { font-size: 2rem; }
  .links__row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
h1 .zh { font: 500 0.42em var(--serif), "Noto Serif SC", serif; font-family: "Noto Serif SC", serif; color: var(--muted); margin-left: 8px; letter-spacing: 0.04em; }
