/* Layout inspired by https://zhuang2002.github.io/ */
:root {
  --ink: #152235;
  --muted: #5f6c7b;
  --soft: #8b96a5;
  --line: #dfe4ea;
  --paper: #ffffff;
  --canvas: #ffffff;
  --accent: #2459a9;
  --accent-strong: #163f79;
  --accent-wash: #eef4fc;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 82px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font: 15.5px/1.72 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
img { display: block; max-width: 100%; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--ink); color: white; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(223, 228, 234, .92);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
}
.nav {
  width: min(980px, calc(100% - 40px));
  min-height: 58px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { color: var(--ink); font-weight: 760; letter-spacing: -.02em; font-size: 16px; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: var(--muted); font-size: 13px; font-weight: 620; letter-spacing: .01em; }
.nav-links a:hover { color: var(--ink); }

.page { width: min(980px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 64px; }
.hero {
  display: grid;
  grid-template-columns: 152px 1fr;
  gap: 34px;
  align-items: center;
  padding: 18px 0 30px;
}
.portrait-wrap { position: relative; }
.portrait-wrap::after { content: none; }
.portrait {
  position: relative;
  z-index: 1;
  width: 152px;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #e7ebf0;
}
.eyebrow { margin: 0 0 6px; color: var(--accent); font-size: 10.5px; font-weight: 760; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; font: 700 clamp(31px, 4vw, 44px)/1.06 var(--serif); letter-spacing: -.035em; }
.role { margin: 10px 0 14px; color: var(--muted); font-size: 15px; }
.motto { margin: 16px 0 16px; color: var(--soft); font: italic 13px/1.8 var(--serif); }
.intro { max-width: 720px; margin: 0; color: #344154; font-size: 14px; }
.intro strong { color: var(--ink); font-weight: 680; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 11px; color: var(--muted); font-size: 12.5px; }
.profile-meta span::before { content: "·"; margin-right: 7px; color: var(--accent); font-weight: 800; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: var(--paper);
  font-size: 13px;
  font-weight: 660;
  white-space: nowrap;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.button:hover { transform: translateY(-1px); border-color: #aebdce; color: var(--ink); box-shadow: 0 6px 18px rgba(25, 42, 66, .08); }
.button.primary { color: white; background: var(--accent); border-color: var(--accent); }
.button.primary:hover { color: white; background: var(--accent-strong); border-color: var(--accent-strong); }
.button svg { width: 16px; height: 16px; flex-shrink: 0; fill: currentColor; }

.about-section { padding-top: 30px; }
.about-section .section-head { grid-template-columns: 170px 1fr; align-items: start; margin-bottom: 22px; }
.about-section h2 { font: 720 21px/1.3 var(--sans); letter-spacing: -.015em; white-space: nowrap; }
.about-copy { color: #344154; font-size: 14.5px; }
.about-copy p { margin: 0 0 10px; }
.about-copy strong { color: var(--ink); font-weight: 680; }

.focus-strip {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 22px;
  margin: 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.focus-strip b { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; }
.focus-strip span { color: var(--muted); font-size: 13.5px; }

section { padding-top: 52px; }
.section-head { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 26px; margin-bottom: 24px; align-items: end; }
.section-kicker { color: var(--accent); font-size: 11.5px; font-weight: 760; letter-spacing: .15em; text-transform: uppercase; }
h2 { margin: 4px 0 0; font: 700 clamp(28px, 4vw, 39px)/1.12 var(--serif); letter-spacing: -.025em; }
.section-note { margin: 0; color: var(--muted); max-width: 680px; }

.news-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.news-item { display: grid; grid-template-columns: 98px 1fr; gap: 24px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.news-date { color: var(--soft); font: 650 12px/1.72 var(--sans); letter-spacing: .04em; }
.news-item strong { color: var(--ink); }

.papers { border-top: 1px solid var(--line); }
.paper {
  display: grid;
  grid-template-columns: 205px 1fr;
  min-height: 160px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.paper:hover { background: #fbfcfe; }
.paper-media { min-height: 150px; padding: 4px 20px 4px 0; display: grid; place-items: center; }
.paper-media img { width: 100%; height: auto; max-height: 145px; object-fit: contain; border-radius: 5px; }
.paper-body { padding: 0; }
.paper-topline { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.paper h3 { margin: 0; font: 700 18px/1.34 var(--serif); letter-spacing: -.01em; }
.venue { flex: 0 0 auto; padding: 4px 8px; border-radius: 6px; background: var(--accent-wash); color: var(--accent-strong); font-size: 11px; font-weight: 760; letter-spacing: .03em; }
.authors { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.authors b { color: var(--ink); font-weight: 720; }
.paper-desc { margin: 10px 0 0; color: #455267; font-size: 13px; line-height: 1.65; }
.paper-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; }
.paper-links a { font-size: 12.5px; font-weight: 680; }
.paper-links a::after { content: " ↗"; font-size: 10px; }
.paper-links .github-stars { display: inline-flex; align-items: center; line-height: 1; }
.paper-links .github-stars::after { content: none; }
.github-stars img { width: auto; height: 20px; max-width: 150px; border-radius: 3px; }
.equal-note { margin: -14px 0 18px; color: var(--soft); font-size: 13.5px; line-height: 1.55; }

.timeline { border-left: 1px solid #cfd7e1; margin-left: 8px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 135px 1fr; gap: 28px; padding: 0 0 32px 30px; }
.timeline-item::before { content: ""; position: absolute; width: 9px; height: 9px; left: -5px; top: 8px; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); }
.timeline-date { color: var(--soft); font-size: 12px; font-weight: 650; }
.timeline-item h3 { margin: 0; font: 700 18px/1.35 var(--serif); }
.timeline-item .position { color: var(--accent); font-size: 13px; font-weight: 680; }
.timeline-item p { margin: 5px 0 0; color: var(--muted); font-size: 13.5px; }

.honors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.honor { padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.honor b { display: block; font: 700 16px/1.35 var(--serif); }
.honor span { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; }


footer { margin-top: 76px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; color: var(--soft); font-size: 12px; }

@media (max-width: 780px) {
  .nav { min-height: 58px; }
  .nav-links { gap: 14px; }
  .page { padding-top: 24px; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding: 16px 0 24px; }
  .portrait-wrap { width: 142px; }
  .portrait { width: 142px; }
  .focus-strip, .section-head { grid-template-columns: 1fr; gap: 10px; }
  .about-section .section-head { grid-template-columns: 1fr; }
  .paper { grid-template-columns: 1fr; }
  .paper { padding: 22px 0; }
  .paper-media { min-height: 0; height: 176px; padding: 0 0 16px; }
  .paper-media img { max-height: 164px; }
  .timeline-item { grid-template-columns: 1fr; gap: 4px; }
  .honors { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 15px; }
  .nav, .page { width: min(100% - 28px, 1040px); }
  .brand { font-size: 15px; }
  .nav { flex-wrap: wrap; gap: 4px; padding: 10px 0; }
  .nav-links { width: 100%; justify-content: space-between; gap: 12px; }
  html { scroll-padding-top: 100px; }
  .hero { padding: 22px; border-radius: 16px; }
  .news-item { grid-template-columns: 78px 1fr; gap: 12px; }
  .paper-body { padding: 19px; }
  .paper-topline { display: block; }
  .venue { display: inline-block; margin-top: 8px; }
  footer { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Keep the longer name and all five navigation links readable at every width. */
.hero > div, .paper-body { min-width: 0; }
h1 { overflow-wrap: anywhere; }
.paper h3 a { color: inherit; }
.paper h3 a:hover { color: var(--accent); }
.authors strong { color: var(--ink); font-weight: 720; }
@media (min-width: 521px) and (max-width: 900px) {
  .nav { flex-wrap: wrap; gap: 4px; padding: 10px 0; }
  .nav-links { width: 100%; justify-content: space-between; }
  html { scroll-padding-top: 110px; }
}
@media (max-width: 520px) {
  .hero { padding: 16px 0 24px; }
  .paper-links { column-gap: 8px; }
  .nav-links { gap: 8px; flex-wrap: wrap; }
  .nav-links a { font-size: 12px; }
  .paper-body { padding: 0; }
}
