/* Local editorial refinement: preserve composition and content. */
:root {
  --surface: #f7f5f0;
  --ink: #292b29;
  --body: #4e534f;
  --muted: #656b65;
  --metadata: #626a60;
  --news-date: #626a60;
  --news-marker: #858d80;
  --rule: #d9ddd3;
  --signal: #526b59;
  --signal-text: #46604d;
  --ease-editorial: cubic-bezier(.22, 1, .36, 1);
}
:root[data-theme="dark"] {
  --surface: #191d1b;
  --ink: #edece5;
  --body: #c6cbc3;
  --muted: #a5afa4;
  --metadata: #abb8a7;
  --news-date: #abb8a7;
  --news-marker: #7e927e;
  --rule: #353f37;
  --signal: #a5c0a5;
  --signal-text: #a5c0a5;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --surface: #191d1b; --ink: #edece5; --body: #c6cbc3;
    --muted: #a5afa4; --metadata: #abb8a7; --news-date: #abb8a7;
    --news-marker: #7e927e; --rule: #353f37;
    --signal: #a5c0a5; --signal-text: #a5c0a5;
  }
}
body { font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
.bio-copy p { line-height: 1.68; }
.identity h1 .name-en { letter-spacing: -.035em; line-height: 1.04; }
.identity h1 .name-zh { color: var(--body); letter-spacing: .055em; }
.label { font-size: 12px; letter-spacing: .095em; color: var(--muted); }
.papers h3 { line-height: 1.32; letter-spacing: -.015em; }
.stacked-list h3 { line-height: 1.3; }
.papers p { line-height: 1.65; }
time { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.bio { border-bottom-color: var(--rule); }
.papers h3 a { text-decoration-color: color-mix(in srgb, var(--ink) 25%, transparent); text-underline-offset: .2em; }
a { transition: color 180ms ease, box-shadow 180ms ease, text-decoration-color 180ms ease; }
.compact-list a { font-weight: 600; }
@keyframes editorial-enter {
  from { opacity: .45; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}
@keyframes portrait-enter {
  from { opacity: .5; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}
.identity h1 .name-en, .identity h1 .name-zh, .bio-copy, .bio-portrait-frame {
  animation-duration: 480ms; animation-timing-function: var(--ease-editorial);
}
.bio-portrait-frame { animation-delay: 80ms; }
.contact-links a { transition: color 180ms ease, transform 220ms var(--ease-editorial); }
@media (hover: hover) and (pointer: fine) {
  .contact-links a:hover { transform: none; }
}
@media (max-width: 640px) {
  .bio-copy p { text-align: left; text-wrap: pretty; hyphens: none; line-height: 1.68; }
  .site-nav-links a, .site-nav .theme-toggle { letter-spacing: 0; }
  .label { font-size: 12px; }
}
/* Stable control geometry and quiet, reversible micro-interactions. */
.theme-toggle-label { display: inline-flex; align-items: center; height: 16px; line-height: 16px; min-width: 5ch; text-align: left; }
.site-nav-links a { position: relative; }
.site-nav-links a::after {
  content: ""; position: absolute; inset: auto 0 0; height: 2px;
  background: var(--signal); transform: scaleX(0); transform-origin: left;
  transition: transform 240ms var(--ease-editorial);
}
.site-nav-links a:hover, .site-nav-links a.is-active { box-shadow: none; }
.site-nav-links a:hover::after, .site-nav-links a.is-active::after { transform: scaleX(1); }
.contact-links a::after { transform: none; transition: background-color 180ms ease; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}
