/* Layout and link palette adapted from https://github.com/jonbarron/jonbarron.github.io */
:root { color-scheme: light; --ink: #222; --muted: #666; --link: #1772d0; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--ink); font: 16px/1.65 Lato, 'Helvetica Neue', Arial, sans-serif; }
a { color: var(--link); text-decoration: none; overflow-wrap: anywhere; }
a:hover { color: #b86608; text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }
img, video { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 14px; }
h1, h2, h3 { line-height: 1.3; }
h1 { font-size: 32px; font-weight: 400; margin: 0 0 20px; }
h2 { font-size: 23px; font-weight: 400; margin: 0 0 19px; }
h3 { font-size: 16px; margin: 0 0 4px; }
main, footer { max-width: 840px; margin: auto; padding: 0 24px; }
main { padding-top: 58px; }
section { margin-bottom: 42px; scroll-margin-top: 24px; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 220px; align-items: center; gap: 38px; margin-bottom: 40px; }
.intro h1 { text-align: center; }
.chinese-name { font-size: 23px; white-space: nowrap; }
.portrait { width: 220px; border-radius: 50%; aspect-ratio: 1; object-fit: cover; }
.profile-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 10px; margin: 20px 0 0; }
.profile-links a + a::before { content: '/'; color: #999; display: inline-block; margin-right: 10px; }
.dated-list { list-style: none; margin: 0; padding: 0; }
.dated-list li, .experience { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.date, .muted, .note { color: var(--muted); }
.date, .note { font-size: 14px; }
.paper { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 26px; align-items: center; margin-bottom: 30px; }
.paper h3 { line-height: 1.45; }
.paper p { margin-bottom: 5px; }
.paper-image img { width: 190px; }
.paper .authors, .paper .summary, .paper .paper-links { font-size: 14px; line-height: 1.6; }
.venue { font-size: 14px; font-style: italic; }
.paper-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.github-stars { display: inline-flex; align-items: center; min-height: 24px; }
.github-stars img { height: 20px; width: auto; }
.facts { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 6px 18px; margin: 0; }
dt { color: var(--muted); } dd { margin: 0; overflow-wrap: anywhere; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
label { display: block; font-size: 14px; margin-bottom: 5px; }
input, textarea { width: 100%; padding: 9px 11px; border: 1px solid #ccc; border-radius: 3px; background: #fff; color: var(--ink); font: inherit; margin-bottom: 12px; }
textarea { min-height: 120px; resize: vertical; }
button { border: 1px solid var(--link); border-radius: 3px; padding: 9px 17px; background: var(--link); color: #fff; font: inherit; cursor: pointer; }
button:disabled { opacity: .65; cursor: wait; }
.form-status { font-size: 14px; margin-top: 12px; }
.form-status[data-state='error'] { color: #a32424; }
.form-status[data-state='success'] { color: #226c36; }
footer { padding-top: 20px; padding-bottom: 30px; text-align: right; color: var(--muted); font-size: 12px; }
.skip-link { position: absolute; left: 16px; top: -100px; background: white; padding: 8px; }
.skip-link:focus { top: 8px; }
.project-header { text-align: center; margin: 32px 0; }
.project-header h1 { font-size: 30px; }
.project-header .paper-links { justify-content: center; }
figure { margin: 28px 0; }
figure img, figure video { width: 100%; }
figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); text-align: center; }
@media (max-width: 640px) {
  main, footer { padding-left: 20px; padding-right: 20px; }
  main { padding-top: 32px; }
  .intro { grid-template-columns: 1fr; gap: 24px; }
  .intro > a { justify-self: center; }
  .portrait { width: 180px; }
  .paper { grid-template-columns: 1fr; gap: 15px; margin-bottom: 34px; }
  .paper-image img { width: 240px; max-width: 100%; }
  .dated-list li, .experience { grid-template-columns: 1fr; gap: 3px; }
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .project-header h1 { font-size: 25px; }
  section { margin-bottom: 34px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
