:root {
  --background: #ffffff;
  --foreground: #40464c;
  --heading: #2f3336;
  --primary: #224b8d;
  --muted: #6f777e;
  --border: #e5e7e9;
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid #c66b2d;
  outline-offset: 3px;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: rgb(255 255 255 / 96%);
}

.topbar-inner {
  display: flex;
  width: min(1120px, calc(100% - 40px));
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin: 0 auto;
}

.topbar-name {
  flex: 0 0 auto;
  color: var(--heading);
  font-size: 1rem;
  font-weight: 700;
}

.topbar-name:hover {
  text-decoration: none;
}

.topbar-name span {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 500;
}

.topbar nav {
  display: flex;
  align-self: stretch;
  gap: 2rem;
}

.topbar nav a {
  position: relative;
  display: flex;
  align-items: center;
  color: #6e767d;
  font-size: 0.84rem;
  font-weight: 600;
}

.topbar nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #aeb4b9;
  content: "";
  opacity: 0;
}

.topbar nav a:hover {
  color: var(--heading);
  text-decoration: none;
}

.topbar nav a:hover::after {
  opacity: 1;
}

.academic-layout {
  display: grid;
  width: min(1080px, calc(100% - 40px));
  grid-template-columns: 190px minmax(0, 760px);
  gap: clamp(42px, 6vw, 72px);
  justify-content: center;
  margin: 0 auto;
  padding: 48px 0 72px;
}

.profile {
  position: sticky;
  top: 96px;
  align-self: start;
}

.profile-photo-frame {
  display: block;
  width: 164px;
  height: 164px;
  overflow: hidden;
  border: 1px solid #eceeef;
  border-radius: 50%;
  background: #ffffff;
}

.profile-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.12);
  transform-origin: center 42%;
}

.profile h1 {
  margin: 1.15rem 0 0;
  color: var(--heading);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.profile-chinese {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.profile-role {
  margin: 0.85rem 0 0;
  color: #555d63;
  font-size: 0.86rem;
  line-height: 1.55;
}

.profile-location {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.profile-location svg {
  width: 0.85rem;
  height: 0.85rem;
}

.profile-links {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

.profile-links a {
  display: flex;
  min-height: 28px;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
}

.profile-links svg {
  width: 0.9rem;
  height: 0.9rem;
}

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

.academic-section {
  margin: 0 0 52px;
  scroll-margin-top: 88px;
}

.academic-section h2 {
  margin: 0 0 1.25rem;
  padding-bottom: 0.52rem;
  border-bottom: 1px solid #eef0f1;
  color: var(--heading);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.academic-section > p {
  margin: 0 0 1rem;
}

.academic-section strong {
  color: #32383d;
  font-weight: 700;
}

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

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

.news-list time {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.9;
}

.research-list article {
  margin-bottom: 1.35rem;
  padding: 0 0 1.3rem;
  border-bottom: 1px solid #eef0f1;
}

.research-list article:last-child {
  margin-bottom: 0;
}

.research-list h3,
.activity-columns h3 {
  margin: 0;
  color: var(--heading);
  font-size: 1rem;
  font-weight: 700;
}

.item-meta {
  margin: 0.1rem 0 0.5rem;
  color: var(--primary);
  font-size: 0.78rem;
}

.research-list article > p:last-child {
  margin: 0;
}

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

.publication-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 0.45rem;
}

.publication-index {
  color: #7d858b;
  font-size: 0.78rem;
  line-height: 1.7;
}

.publication-list h3 {
  margin: 0;
  color: #30363b;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.45;
}

.publication-authors {
  margin: 0.32rem 0 0;
  font-size: 0.86rem;
}

.publication-venue {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.publication-venue span {
  color: var(--primary);
}

.timeline {
  display: grid;
  gap: 1.35rem;
  margin: 0;
}

.timeline > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 1.2rem;
}

.timeline dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.95;
}

.timeline dd {
  margin: 0;
}

.timeline dd strong {
  display: block;
  font-size: 0.9rem;
}

.timeline dd span {
  display: block;
  margin-top: 0.12rem;
  color: #626a70;
  font-size: 0.86rem;
}

.activity-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
}

.activity-columns ul {
  margin: 0.65rem 0 0;
  padding-left: 1.1rem;
}

.activity-columns li {
  margin-bottom: 0.36rem;
  padding-left: 0.1rem;
  font-size: 0.86rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.76rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 860px) {
  .academic-layout {
    display: block;
    width: min(760px, calc(100% - 36px));
    padding-top: 36px;
  }

  .profile {
    position: static;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 1.5rem;
    margin-bottom: 44px;
  }

  .profile-photo-frame {
    width: 120px;
    height: 120px;
  }

  .profile h1 {
    margin-top: 0;
  }

  .profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.1rem;
  }
}

@media (max-width: 700px) {
  .topbar-inner {
    width: calc(100% - 28px);
    gap: 1rem;
  }

  .topbar nav {
    gap: 1rem;
  }

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

  .academic-layout {
    width: calc(100% - 30px);
  }

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

@media (max-width: 480px) {
  .topbar-name span,
  .topbar nav a:first-child {
    display: none;
  }

  .profile {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 1rem;
  }

  .profile-photo-frame {
    width: 84px;
    height: 84px;
  }

  .profile-role {
    margin-top: 0.5rem;
  }

  .profile-location,
  .profile-links {
    grid-column: 1 / -1;
    margin-top: 0;
  }

  .timeline > div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .site-footer {
    display: block;
  }

  .site-footer p + p {
    margin-top: 0.35rem;
  }
}

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