:root {
  --text: #202124;
  --muted: #5f6368;
  --link: #1f5d99;
  --line: #d9dde2;
  --width: 1060px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 15.5px;
  line-height: 1.6;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.header-inner,
.page-shell,
footer {
  width: min(calc(100% - 40px), var(--width));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
}

.name-link {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

nav {
  display: flex;
  gap: 1rem;
}

nav a {
  color: var(--muted);
  font-size: 0.92rem;
}

.page-shell {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 2.75rem;
  align-items: start;
}

.profile-sidebar {
  padding: 2.4rem 0 2rem;
}

.portrait {
  display: block;
  width: 158px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 2px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 1.05rem 0 0.2rem;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

h1 span {
  display: block;
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 400;
}

h2 {
  margin-bottom: 1.1rem;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.25;
}

h3 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.45;
}

.position {
  margin-bottom: 1rem;
  font-size: 0.93rem;
}

.affiliation {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.93rem;
}

.profile-meta {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  font-size: 0.92rem;
}

.profile-meta li:first-child {
  color: var(--muted);
}

.paper-links a {
  font-weight: 600;
}

.section {
  padding: 1.9rem 0;
  border-top: 1px solid var(--line);
}

.about-section {
  padding-top: 2.4rem;
  border-top: 0;
}

.about-section p {
  margin-bottom: 0.75rem;
}

.about-section h2 {
  margin-top: 1.55rem;
  margin-bottom: 0.65rem;
}

.research-list {
  margin: 0.4rem 0 0;
  padding-left: 1.25rem;
}

.research-list li {
  margin-bottom: 0.45rem;
}

.opportunity-note {
  margin-top: 1rem;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.section-heading h2 {
  margin-bottom: 0.25rem;
}

.section-note {
  margin-bottom: 1.4rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.news-list {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 0.8rem;
}

.news-list time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.publication-list {
  border-top: 1px solid var(--line);
}

.publication {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.publication-media {
  display: flex;
  width: 100%;
  aspect-ratio: 16 / 10;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 2px;
}

.publication-media img,
.publication-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.publication-content {
  min-width: 0;
}

.publication h3 {
  max-width: 820px;
  font-size: 1rem;
}

.publication p {
  margin-bottom: 0.12rem;
}

.authors,
.venue {
  font-size: 0.94rem;
}

.venue {
  color: var(--muted);
  font-style: italic;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  padding-top: 0.2rem;
  font-size: 0.9rem;
}

.github-stars {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 0.45rem;
  border: 1px solid #d0d7de;
  border-radius: 999px;
  color: #24292f;
  background: #f6f8fa;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
}

.experience-list {
  border-top: 1px solid var(--line);
}

.experience-list article {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.experience-logo {
  display: flex;
  width: 90px;
  height: 48px;
  align-items: center;
  justify-content: flex-start;
}

.experience-logo img {
  display: block;
  max-width: 100%;
  max-height: 40px;
  object-fit: contain;
}

.experience-logo.square img {
  max-width: 50px;
}

.experience-list h3 a {
  color: var(--text);
}

.experience-list p,
.experience-list time {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.experience-list time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.service-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
}

.service-grid h3 {
  margin-bottom: 0.75rem;
}

.service-grid p {
  margin-bottom: 0.7rem;
}

.service-grid ul {
  margin: 0;
  padding-left: 1.15rem;
}

.service-grid li {
  margin-bottom: 0.35rem;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.8rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

footer p {
  margin-bottom: 0;
}

@media (max-width: 860px) {
  .page-shell {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .profile-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 0.25rem 1.5rem;
    padding: 2.2rem 0 1.8rem;
    border-bottom: 1px solid var(--line);
  }

  .profile-sidebar .portrait {
    grid-row: 1 / span 5;
    width: 140px;
  }

  .profile-sidebar h1 {
    margin-top: 0;
  }

  .profile-meta {
    grid-template-columns: repeat(2, minmax(0, max-content));
    gap: 0.25rem 1.25rem;
    padding-top: 0.65rem;
    border-top: 0;
  }
}

@media (max-width: 680px) {
  .header-inner {
    min-height: 56px;
  }

  nav {
    gap: 0.8rem;
  }

  nav a:nth-child(2),
  nav a:nth-child(4),
  nav a:nth-child(5) {
    display: none;
  }

  .profile-sidebar {
    display: block;
    padding-top: 2rem;
  }

  .profile-sidebar .portrait {
    width: 145px;
  }

  .profile-sidebar h1 {
    margin-top: 1rem;
  }

  .profile-meta {
    grid-template-columns: repeat(2, minmax(0, max-content));
  }

  h1 {
    font-size: 1.65rem;
  }

  .news-list li,
  .experience-list article {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .publication {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .publication-media {
    max-width: 520px;
    aspect-ratio: 16 / 9;
  }

  .experience-list article {
    grid-template-columns: 76px 1fr;
    gap: 0.5rem 1rem;
  }

  .experience-logo {
    grid-row: 1 / span 2;
    width: 72px;
  }

  .experience-list time {
    grid-column: 2;
  }

  .service-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .section-heading,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
