:root {
  --main-color: #003366;
  --muted: #6c757d;
  --line: #dee2e6;
  --paper: #ffffff;
  --soft: #f8f9fa;
  --ink: #212529;
  --accent: #003366;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Open Sans", Arial, Helvetica, "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

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

a:hover {
  color: #1a1e21;
  text-decoration: underline;
  text-decoration-color: #930a41;
}

.container {
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
}

.sticky-top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(9px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.home {
  padding: 18px 0 14px;
  color: var(--ink);
  font-family: "Great Vibes", Georgia, "Times New Roman", serif;
  font-size: 2.05rem;
  font-style: normal;
  line-height: 1;
  text-decoration: none;
}

.topbar nav {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
}

.topbar nav a {
  padding: 14px 0;
  color: var(--ink);
  text-decoration: none;
}

.topbar nav a:hover {
  color: var(--main-color);
}

.layout {
  display: grid;
  grid-template-columns: 34% 66%;
  gap: 28px;
}

.sidebar {
  min-width: 0;
}

.photo-wrap {
  display: flex;
  justify-content: center;
}

.photo-wrap img {
  width: 280px;
  height: 280px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  margin: 8px 0 22px;
}

.info-table {
  border-bottom: 1px solid var(--line);
  padding: 2px 0 13px;
}

.info-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin-bottom: 8px;
}

.info-icon {
  color: var(--main-color);
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: center;
}

.info-row p {
  margin-bottom: 0;
  line-height: 1.45;
}

.info-row:first-child p {
  font-weight: 600;
}

p {
  margin: 0 0 12px;
}

.intro p,
.research-list,
.row-body,
.paper-meta {
  color: var(--ink);
  font-family: "Open Sans", Arial, Helvetica, "Microsoft YaHei", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
}

.info-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  line-height: 1.45;
}

.info-links a + a::before {
  content: "/";
  margin-right: 10px;
  color: #adb5bd;
}

.section-title {
  margin: 0 0 20px;
  padding: 18px 0 9px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: none;
}

.sidebar-title {
  margin: 18px 0 4px;
  padding: 0 0 7px;
  border-bottom: 1px solid var(--line);
  font-size: 1.02rem;
  line-height: 1.25;
  text-shadow: none;
}

.updates-accordion {
  display: grid;
  gap: 0;
}

.updates-accordion details {
  border-bottom: 0;
  padding: 0;
}

.updates-accordion summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  padding: 10px 0 6px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
}

.updates-accordion summary::-webkit-details-marker {
  display: none;
}

.updates-accordion summary::after {
  content: "+";
  margin-left: auto;
  color: #9aa0a6;
  font-size: 0.9rem;
  font-weight: 400;
}

.updates-accordion details[open] summary::after {
  content: "-";
}

.updates {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 7px 14px;
  margin: 0;
  padding: 2px 0 12px;
}

.updates dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
}

.updates dd {
  margin: 0 0 2px;
  padding-bottom: 7px;
  border-bottom: 1px solid #f1f3f5;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: left;
}

.content {
  min-width: 0;
}

.intro h1 {
  margin: 0 0 8px;
  font-size: 2.15rem;
  line-height: 1.15;
}

.intro h1 span {
  color: var(--ink);
  font-size: 2rem;
  font-weight: 700;
}

.position {
  color: var(--muted);
}

.border-bottom {
  border-bottom: 0;
  margin-bottom: 24px;
  padding-bottom: 8px;
}

.row-line {
  display: grid;
  grid-template-columns: 25% 75%;
  gap: 20px;
  padding: 10px 0;
}

.row-label {
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}

.row-body {
  min-width: 0;
}

.project-list {
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
}

.project-list li {
  margin-bottom: 8px;
  padding-left: 2px;
}

.course-rows {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 8px 24px;
  align-items: baseline;
}

.course-rows > div:nth-child(2n) {
  color: var(--muted);
  text-align: right;
}

.talk-list {
  display: grid;
  gap: 14px;
}

.talk {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 8px 0;
}

.talk-thumb {
  width: 210px;
  aspect-ratio: 3 / 2;
  border: 1px solid #d8dee6;
  border-radius: 4px;
  overflow: hidden;
  background: #f7f8fa;
}

.talk-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #f7f8fa;
}

.talk-body h5 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  line-height: 1.35;
}

.talk-time {
  margin: 0;
  color: var(--muted);
}

.research-figure {
  margin: 18px 0 2px;
}

.research-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.service-rows {
  margin-bottom: 16px;
}

.service-rows-three {
  display: grid;
  grid-template-columns: 24% 28% minmax(0, 48%);
  gap: 6px 18px;
}

.service-rows-two {
  display: grid;
  grid-template-columns: 24% minmax(0, 76%);
  gap: 6px 18px;
}

.service-category {
  font-weight: 700;
}

.publication-list {
  display: grid;
  gap: 16px;
}

.publication-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.publication-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 11px 8px 10px;
  text-align: center;
}

.publication-tab:hover {
  color: var(--ink);
}

.publication-tab.active {
  border-color: var(--main-color);
  color: var(--ink);
}

.publication-panel {
  display: grid;
  gap: 16px;
}

.publication-panel[hidden] {
  display: none;
}

.paper {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.paper:last-child {
  border-bottom: 0;
}

.paper-thumb {
  display: block;
  width: 210px;
  aspect-ratio: 3 / 2;
  border: 1px solid #d8dee6;
  border-radius: 4px;
  overflow: hidden;
  background: #f7f8fa;
}

.paper-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #f7f8fa;
}

.paper-meta h5 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 700;
}

.paper-title-link {
  color: var(--accent);
  text-decoration: none;
}

.paper-title-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.authors {
  margin-bottom: 5px;
}

.authors strong {
  font-weight: 700;
}

.paper-desc {
  margin-bottom: 8px;
  color: var(--ink);
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.venue,
.year-tag,
.tag {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.venue {
  background: var(--main-color);
  color: #ffffff;
}

.tag {
  background: #eef2f7;
  color: var(--main-color);
}

.year-tag {
  background: #f1f3f5;
  color: #495057;
}

.semibold {
  font-weight: 600;
}

.scmargin {
  scroll-margin-top: 72px;
}

.footer {
  margin-top: 34px;
  border-top: 1px solid var(--line);
  padding: 18px 0 28px;
  color: var(--muted);
  text-align: center;
  font-weight: 300;
}

.back-to-top {
  position: fixed;
  right: max(24px, calc((100vw - 1140px) / 2 + 12px));
  bottom: 24px;
  z-index: 100;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(33, 37, 41, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(33, 37, 41, 0.12);
  font: 700 1.05rem/1 Arial, Helvetica, sans-serif;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 140ms ease, transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.back-to-top.is-visible {
  opacity: 0.96;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: rgba(33, 37, 41, 0.42);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(33, 37, 41, 0.16);
  opacity: 1;
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }

  .topbar nav {
    justify-content: flex-start;
    gap: 14px;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .row-line,
  .talk,
  .paper {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .talk-thumb {
    width: 210px;
  }

  .row-label,
  .updates dt {
    text-align: left;
  }

  .service-rows-three,
  .service-rows-two,
  .course-rows {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .course-rows > div:nth-child(2n) {
    margin-bottom: 8px;
    text-align: left;
  }

  .service-rows-three > div:empty {
    display: none;
  }

  .updates {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .back-to-top {
    right: 16px;
    bottom: 18px;
    width: 38px;
    height: 38px;
  }
}
