/* Jialei Li academic homepage, closely following the referenced academic layout. */
:root {
  --paper: #fbfaf6;
  --paper-tint: #f4f0e6;
  --ink: #1a1d24;
  --ink-soft: #3a3f49;
  --muted: #6b7280;
  --muted-2: #9099a4;
  --rule: #e7e1d3;
  --rule-strong: #d8d1bd;
  --accent: #6b2d2f;
  --accent-dark: #4c1f21;
  --accent-soft: #f1e8e6;
  --ink-blue: #14274e;
  --highlight: #b23a48;
  --badge-default: #6b7280;
  --font-display: "Fraunces", "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-serif: "Source Serif 4", "Charter", "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --font-cjk: "Noto Serif SC", "Songti SC", "STSong", "PingFang SC", "Microsoft YaHei", serif;
  --measure: 980px;
  --measure-wide: 1240px;
  --gutter: 40px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(1400px 700px at 85% -160px, rgba(107, 45, 47, 0.06), transparent 70%),
    radial-gradient(1100px 600px at -10% 8%, rgba(20, 39, 78, 0.05), transparent 70%);
  background-attachment: fixed;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #fff; }

a {
  position: relative;
  color: var(--accent);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
  transition: color 0.2s ease, background-size 0.3s var(--ease-out);
}
a:hover {
  color: var(--accent-dark);
  background-size: 100% 2px;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 18px;
  z-index: 100;
  padding: 8px 12px;
  color: #fff;
  background: var(--ink);
  font-family: var(--font-sans);
  font-weight: 700;
}
.skip-link:focus { top: 14px; }

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--ink-blue));
  pointer-events: none;
  transition: width 0.08s linear;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(26, 29, 36, 0.06);
  background: rgba(251, 250, 246, 0.72);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.site-nav.is-scrolled,
.site-nav[data-elevated="true"] {
  border-bottom-color: rgba(26, 29, 36, 0.1);
  background: rgba(251, 250, 246, 0.92);
}

.nav-wrapper {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background-image: none;
}
.nav-brand:hover { color: var(--accent); background-image: none; }
.dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.55;
  animation: pulse-ring 2.4s var(--ease-out) infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.55; }
  70%, 100% { transform: scale(2.8); opacity: 0; }
}

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-left: auto;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background-image: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}
.nav-actions { display: flex; align-items: center; }
.lang-toggle {
  min-width: 42px;
  height: 34px;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.35);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }

section {
  padding-top: 64px;
  padding-bottom: 8px;
  scroll-margin-top: 96px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 88px;
  align-items: start;
  padding-top: 80px;
  padding-bottom: 24px;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.hero-eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--muted-2);
  transform-origin: left center;
  animation: line-grow 0.9s var(--ease-out) 0.2s backwards;
}
@keyframes line-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.name-title {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 3.9rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 30, "WONK" 0;
}
.chinese-name {
  display: inline-block;
  margin-left: 16px;
  color: var(--muted);
  font-family: var(--font-cjk);
  font-size: 0.42em;
  font-weight: 500;
  letter-spacing: 0.04em;
  vertical-align: 0.32em;
}
.motto {
  margin: 0 0 30px;
  padding-left: 18px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-style: italic;
  line-height: 1.55;
}
.bio p {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.72;
}
.bio p.lede::first-letter {
  float: left;
  padding: 6px 12px 0 0;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 3.4em;
  font-weight: 600;
  line-height: 0.95;
}
.interests {
  margin-top: 22px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.75;
}
.interests .label {
  margin-right: 12px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.interests .item {
  display: inline-block;
  color: var(--ink-soft);
  transition: color 0.2s ease, transform 0.2s ease;
}
.interests .item:hover { color: var(--accent); transform: translateY(-1px); }
.interests .item + .item::before {
  content: " · ";
  color: var(--muted-2);
  margin: 0 6px;
}
.social-icons {
  margin-top: 30px;
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.social-icons a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  background-image: none;
  transition: color 0.2s ease, transform 0.25s var(--ease-out);
}
.social-icons a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}
.link-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 1.08em;
  height: 1.08em;
  background-color: currentColor;
  vertical-align: -0.14em;
  transition: transform 0.2s ease;
}
a:hover .link-icon,
.btn:hover .link-icon {
  transform: translateY(-1px);
}
.icon-email {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='16' x='2' y='4' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='16' x='2' y='4' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E") center / contain no-repeat;
}
.icon-github {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 .5a12 12 0 0 0-3.79 23.39c.6.11.82-.26.82-.58v-2.04c-3.34.73-4.04-1.41-4.04-1.41-.55-1.39-1.34-1.76-1.34-1.76-1.09-.75.08-.73.08-.73 1.2.08 1.84 1.24 1.84 1.24 1.07 1.83 2.81 1.3 3.49.99.11-.78.42-1.3.76-1.6-2.66-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.13-.3-.54-1.52.12-3.18 0 0 1.01-.32 3.3 1.23A11.45 11.45 0 0 1 12 6c1.02 0 2.04.14 3 .4 2.29-1.55 3.3-1.23 3.3-1.23.66 1.66.25 2.88.12 3.18.77.84 1.24 1.91 1.24 3.22 0 4.61-2.81 5.63-5.49 5.93.43.37.82 1.1.82 2.22v3.29c0 .32.22.7.83.58A12 12 0 0 0 12 .5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 .5a12 12 0 0 0-3.79 23.39c.6.11.82-.26.82-.58v-2.04c-3.34.73-4.04-1.41-4.04-1.41-.55-1.39-1.34-1.76-1.34-1.76-1.09-.75.08-.73.08-.73 1.2.08 1.84 1.24 1.84 1.24 1.07 1.83 2.81 1.3 3.49.99.11-.78.42-1.3.76-1.6-2.66-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.13-.3-.54-1.52.12-3.18 0 0 1.01-.32 3.3 1.23A11.45 11.45 0 0 1 12 6c1.02 0 2.04.14 3 .4 2.29-1.55 3.3-1.23 3.3-1.23.66 1.66.25 2.88.12 3.18.77.84 1.24 1.91 1.24 3.22 0 4.61-2.81 5.63-5.49 5.93.43.37.82 1.1.82 2.22v3.29c0 .32.22.7.83.58A12 12 0 0 0 12 .5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.icon-paper {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M10 9H8'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M10 9H8'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E") center / contain no-repeat;
}
.icon-pdf {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M7 14h2a1.5 1.5 0 0 1 0 3H7v-5'/%3E%3Cpath d='M12 17v-5h1.5a2.5 2.5 0 0 1 0 5H12Z'/%3E%3Cpath d='M17 17v-5h3'/%3E%3Cpath d='M17 14h2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M7 14h2a1.5 1.5 0 0 1 0 3H7v-5'/%3E%3Cpath d='M12 17v-5h1.5a2.5 2.5 0 0 1 0 5H12Z'/%3E%3Cpath d='M17 17v-5h3'/%3E%3Cpath d='M17 14h2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.icon-code {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m16 18 6-6-6-6'/%3E%3Cpath d='m8 6-6 6 6 6'/%3E%3Cpath d='m14.5 4-5 16'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m16 18 6-6-6-6'/%3E%3Cpath d='m8 6-6 6 6 6'/%3E%3Cpath d='m14.5 4-5 16'/%3E%3C/svg%3E") center / contain no-repeat;
}

.portrait {
  position: relative;
  justify-self: end;
  align-self: start;
  width: 280px;
  max-width: 100%;
  margin: 12px 0 0;
}
.portrait::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  z-index: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  transition: transform 0.4s var(--ease-out);
}
.portrait img,
.avatar-fallback {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 14px 40px -16px rgba(26, 29, 36, 0.32);
}
.portrait img {
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 50% 50%;
  filter: saturate(1.02);
  transition: transform 0.4s var(--ease-out);
}
.avatar-fallback {
  min-height: 280px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px solid var(--rule);
  color: var(--accent);
  background: var(--paper-tint);
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
}
.portrait:hover::before { transform: translate(-8px, 8px); }
.portrait:hover img { transform: translate(2px, -2px); }

.section-sep {
  display: block;
  width: 100%;
  border: 0;
  height: 20px;
  margin: 32px 0 0;
  text-align: center;
  position: relative;
}
.section-sep::after {
  content: "* * *";
  color: var(--muted-2);
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 20px;
  letter-spacing: 0.6em;
  opacity: 0.5;
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 32px;
}
.section-title .num {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}
.section-title h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.95rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.section-title .rule {
  flex: 1;
  height: 1px;
  margin-left: 10px;
  background: linear-gradient(to right, var(--rule) 0%, transparent 85%);
  opacity: 0.7;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.9s var(--ease-out) 0.15s;
}
section.is-visible .section-title .rule,
section.in .section-title .rule { transform: scaleX(1); }

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.news-list li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  align-items: baseline;
  padding: 12px 14px;
  margin: 0 -14px 2px;
  border-radius: 5px;
  color: var(--ink-soft);
  font-size: 1.02rem;
  transition: background-color 0.25s ease, transform 0.25s ease;
}
.news-list li:hover {
  background: rgba(107, 45, 47, 0.04);
  transform: translateX(4px);
}
.news-thumb { display: none; }
.date-tag {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
}
.news-list strong { color: var(--ink); font-weight: 600; }

.experience-item {
  display: grid;
  grid-template-columns: 168px 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 16px 12px;
  margin: 0 -12px 6px;
  border-radius: 4px;
  transition: background-color 0.25s ease, transform 0.25s ease;
}
.experience-item:hover {
  background: rgba(107, 45, 47, 0.03);
  transform: translateX(4px);
}
.logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
}
.logo-box img {
  max-width: 100%;
  max-height: 64px;
  object-fit: contain;
  object-position: center;
  opacity: 0.95;
  transition: transform 0.4s var(--ease-out);
}
.experience-item:hover .logo-box img { transform: scale(1.04); }
.logo-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 42px;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  color: var(--accent);
  background: rgba(107, 45, 47, 0.04);
  font-family: var(--font-display);
  font-weight: 700;
}
.exp-details { min-width: 0; }
.exp-title {
  margin: 0 0 2px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
}
.timeline-degree,
.exp-subtitle {
  margin: 0;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 0.98rem;
}
.exp-details p:not(.timeline-degree) {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.entry-kicker {
  margin: 0 0 2px;
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.exp-date {
  align-self: start;
  padding-top: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.8rem;
}
.tag-row span + span::before {
  content: "·";
  margin-right: 10px;
  color: var(--muted-2);
}

.paper-item {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 36px;
  align-items: flex-start;
  padding: 28px 12px;
  margin: 0 -12px 8px;
  border-radius: 6px;
  transition: background-color 0.25s ease;
}
.paper-item:hover { background: rgba(107, 45, 47, 0.02); }
.paper-item--text {
  grid-template-columns: minmax(0, 1fr);
}
.paper-item--text .paper-info {
  max-width: 880px;
}
.paper-img-container { width: 100%; }
.paper-img {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 4px 14px -6px rgba(26, 29, 36, 0.15);
}
.paper-img {
  max-height: 260px;
  object-fit: contain;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.paper-img:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -10px rgba(26, 29, 36, 0.26);
}
.conf-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 3px;
  color: #fff;
  background: var(--badge-default);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.paper-title {
  display: inline-block;
  margin: 10px 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  background-image: none;
}
.paper-title::after {
  content: " ↗";
  display: inline-block;
  opacity: 0;
  transform: translate(-6px, 2px);
  color: var(--accent);
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.paper-title:hover { color: var(--accent); background-image: none; }
.paper-title:hover::after { opacity: 1; transform: translate(0, 0); }
.author-list {
  margin-bottom: 4px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.venue {
  margin-bottom: 14px;
  color: var(--muted);
  font-style: italic;
  font-size: 0.96rem;
}
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  color: var(--ink-soft);
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background-image: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn:hover {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
  transform: translateY(-1px);
}

.site-footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 36px var(--gutter) 30px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.in,
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  :root { --gutter: 24px; }
  .hero {
    grid-template-columns: 1fr;
    gap: 38px;
    padding-top: 56px;
  }
  .portrait {
    justify-self: start;
    width: 220px;
  }
  .avatar-fallback { min-height: 220px; }
}

@media (max-width: 640px) {
  :root { --gutter: 18px; }
  body { font-size: 16px; }
  .nav-wrapper {
    align-items: flex-start;
    gap: 12px;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .nav-links a { padding: 6px 9px; font-size: 0.8rem; }
  .name-title { font-size: clamp(2.4rem, 13vw, 3.2rem); }
  .chinese-name {
    display: block;
    margin: 8px 0 0;
    vertical-align: baseline;
  }
  .bio p.lede::first-letter {
    float: none;
    padding: 0;
    font-size: inherit;
    color: inherit;
    font-family: inherit;
  }
  section { padding-top: 48px; }
  .news-list li,
  .experience-item,
  .paper-item {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }
  .logo-box {
    justify-content: flex-start;
    width: 168px;
  }
  .exp-date { padding-top: 0; }
  .paper-img { max-height: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
