:root {
  --page-bg: #f6f8fa;
  --surface: #fff;
  --surface-soft: #f6f8fa;
  --text: #24292f;
  --muted: #57606a;
  --light-muted: #6e7781;
  --line: #d8dee4;
  --line-soft: #eaeef2;
  --accent: #0969da;
  --accent-dark: #0550ae;
  --accent-soft: #ddf4ff;
  --teal: #0f6f7d;
  --teal-soft: #e7f4f6;
  --shadow: 0 14px 36px rgba(27, 31, 36, 0.08);
}

html {
  color-scheme: light;
  font-size: 15px;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(9, 105, 218, 0.045), transparent 32%),
    linear-gradient(180deg, #fff 0, #fff 360px, var(--page-bg) 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei",
    sans-serif;
  line-height: 1.58;
  text-rendering: optimizeLegibility;
}

a {
  color: #125f9f;
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 28px 48px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0 12px;
  margin-bottom: 32px;
  border-bottom: 1px solid rgba(216, 222, 228, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.site-name {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: 0;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  font-size: 13px;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 6px;
  color: var(--muted);
}

nav a:hover,
nav a.is-active {
  background: var(--accent-soft);
  color: var(--accent-dark);
  text-decoration: none;
}

.nav-toggle {
  display: none;
}

.profile {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  padding: 10px 0 34px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--line-soft);
}

.portrait-wrap {
  padding-top: 4px;
}

.portrait {
  display: block;
  width: 176px;
  height: 228px;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(27, 31, 36, 0.1);
  background: var(--surface);
}

h1 {
  margin: 0 0 5px;
  color: #1f2328;
  font-size: 32px;
  line-height: 1.12;
  font-weight: 760;
  letter-spacing: 0;
}

.role,
.affiliation {
  margin: 0 0 4px;
  color: var(--muted);
  line-height: 1.45;
}

.role {
  font-size: 15.5px;
  font-weight: 650;
}

.affiliation {
  margin-bottom: 18px;
  color: var(--light-muted);
}

.bio p:not(.role):not(.affiliation) {
  max-width: 780px;
  font-size: 14.5px;
}

.links {
  margin-bottom: 0;
}

section {
  margin: 34px 0;
  scroll-margin-top: 86px;
}

h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 15px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
  color: #1f2328;
  font-size: 18.5px;
  line-height: 1.2;
  font-weight: 720;
  letter-spacing: 0;
}

h2::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
}

h3 {
  margin: 22px 0 9px;
  color: #252b33;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 720;
}

p {
  margin: 0 0 13px;
}

ul,
ol {
  margin: 0;
  padding-left: 24px;
}

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

li::marker {
  color: var(--accent);
}

section > ul {
  color: #2d343d;
}

section > ul li {
  padding-top: 1px;
  padding-bottom: 1px;
}

.pub-note {
  margin-top: -4px;
  color: var(--muted);
  font-size: 12px;
}

.section-note {
  margin: -6px 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.pub-summary {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.disclosure {
  margin-top: 14px;
  border-bottom: 1px solid var(--line);
}

.disclosure summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 0;
  color: #303843;
  font-size: 13.5px;
  font-weight: 680;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

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

.disclosure summary:focus-visible {
  outline: 2px solid rgba(15, 111, 125, 0.35);
  outline-offset: 2px;
  border-radius: 2px;
}

.disclosure summary span {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 450;
}

.disclosure summary::after {
  content: "+";
  margin-left: auto;
  color: var(--accent-dark);
  font-size: 17px;
  font-weight: 450;
  line-height: 1;
}

.disclosure[open] summary::after {
  content: "−";
}

.disclosure > ul,
.disclosure > ol {
  margin: 4px 0 12px;
}

.publication-disclosure {
  margin-top: 20px;
}

.section-disclosure {
  margin-top: 0;
}

.section-disclosure summary {
  margin: 0;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
  color: #1f2328;
  font-size: 18.5px;
  line-height: 1.2;
  font-weight: 720;
}

.section-disclosure summary::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  flex: 0 0 auto;
}

.publications {
  padding-left: 24px;
  list-style: decimal;
}

.publications li {
  margin-bottom: 15px;
  padding-left: 2px;
}

.publications li::marker {
  color: var(--accent-dark);
  font-weight: 650;
}

.pub-title {
  color: #111827;
  font-size: 14px;
  font-weight: 690;
  line-height: 1.42;
}

.secondary-title {
  color: #444;
  font-weight: 400;
}

.pub-authors,
.pub-venue {
  margin-top: 2px;
  color: #374151;
  font-size: 13px;
  line-height: 1.44;
}

.badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 6px;
  border: 1px solid #bbb;
  border-radius: 3px;
  background: transparent;
  color: #555;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
}

.pub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.pub-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid #bbb;
  border-radius: 3px;
  background: transparent;
  color: #555;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
}

a.pub-button:hover {
  border-color: #125f9f;
  color: #125f9f;
  text-decoration: none;
}

.pub-button.disabled {
  cursor: default;
  opacity: 0.65;
}

.project-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}

.project-filter {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 11px;
  border: 1px solid #d0d7de;
  border-radius: 999px;
  background: #fff;
  color: #57606a;
  font: inherit;
  font-size: 12px;
  font-weight: 520;
  cursor: pointer;
}

.project-filter:hover {
  border-color: #afb8c1;
  background: #f6f8fa;
}

.project-filter.is-active {
  border-color: rgba(9, 105, 218, 0.35);
  background: #ddf4ff;
  color: #0969da;
}

.projects {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 13px;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.project-card {
  padding: 0;
}

.project-card[hidden] {
  display: none;
}

.project-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 1px;
}

.project-title {
  color: #0969da;
  font-size: 13.5px;
  font-weight: 650;
}

.project-card .project-title:hover {
  color: #0550ae;
}

.project-meta {
  color: var(--light-muted);
  font-size: 11.25px;
}

.project-note {
  display: none;
}

.project-desc {
  margin: 3px 0 5px;
  max-width: 900px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.46;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 0;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 7px;
  border: 1px solid #d0d7de;
  border-radius: 999px;
  background: #f6f8fa;
  color: #57606a;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 17px;
  white-space: nowrap;
}

.project-tag--npu {
  border-color: #9ec5fe;
  background: #ddf4ff;
  color: #0969da;
}

strong {
  font-weight: 700;
}

footer {
  display: none;
}

@media (max-width: 820px) {
  .page {
    padding: 0 20px 40px;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    margin: 0 -20px 30px;
    padding: 14px 20px 10px;
    overflow: visible;
  }

  .site-name {
    display: inline-block;
    margin-bottom: 0;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
  }

  .nav-toggle:hover {
    border-color: #c7d4dd;
    color: var(--accent-dark);
    background: var(--surface-soft);
  }

  .nav-toggle-mark {
    position: relative;
    display: inline-block;
    width: 16px;
    height: 12px;
  }

  .nav-toggle-mark::before,
  .nav-toggle-mark::after {
    content: "";
    position: absolute;
    right: 0;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 160ms ease, top 160ms ease;
  }

  .nav-toggle-mark::before {
    top: 2px;
  }

  .nav-toggle-mark::after {
    top: 8px;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-mark::before {
    top: 5px;
    transform: rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-mark::after {
    top: 5px;
    transform: rotate(-45deg);
  }

  nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 20px;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 2px;
    width: min(230px, calc(100vw - 40px));
    max-height: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: max-height 180ms ease, opacity 150ms ease, transform 160ms ease;
  }

  nav.is-open {
    max-height: 320px;
    padding: 6px;
    border-color: var(--line);
    box-shadow: 0 14px 32px rgba(27, 31, 36, 0.13);
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  nav a {
    justify-content: flex-start;
    min-height: 34px;
    padding: 7px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    white-space: nowrap;
  }

  .profile {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 16px;
    padding: 4px 0 28px;
    margin-bottom: 32px;
  }

  .portrait-wrap {
    grid-row: span 3;
  }

  .portrait {
    width: 112px;
    height: 146px;
    box-shadow: 0 8px 22px rgba(27, 31, 36, 0.08);
  }

  .bio {
    display: contents;
  }

  .bio h1,
  .bio .role,
  .bio .affiliation {
    grid-column: 2;
  }

  .bio h1 {
    align-self: end;
    margin-top: 4px;
    font-size: 27px;
  }

  .role {
    font-size: 14px;
  }

  .affiliation {
    margin-bottom: 0;
    font-size: 13.5px;
  }

  .bio p:not(.role):not(.affiliation) {
    grid-column: 1 / -1;
    max-width: none;
    margin-top: 4px;
  }

  section {
    margin: 30px 0;
    scroll-margin-top: 104px;
  }

  h2 {
    margin-bottom: 14px;
    font-size: 18px;
  }

}

@media (max-width: 520px) {
  body {
    line-height: 1.58;
  }

  .page {
    padding: 0 16px 34px;
  }

  .topbar {
    margin-right: -16px;
    margin-left: -16px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .profile {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
    padding-bottom: 24px;
  }

  .portrait {
    width: 88px;
    height: 116px;
    border-radius: 6px;
  }

  .bio h1 {
    font-size: 24px;
  }

  .role,
  .affiliation {
    font-size: 12.5px;
  }

  .bio p:not(.role):not(.affiliation),
  section > ul,
  section > ol {
    font-size: 14px;
  }

  h2 {
    font-size: 17.5px;
  }

  h3 {
    margin-top: 20px;
  }

  .disclosure summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 10px;
  }

  .disclosure summary span {
    grid-column: 1;
    grid-row: 2;
  }

  .disclosure summary::after {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    margin-left: 0;
  }

  .section-disclosure summary {
    display: flex;
    align-items: center;
  }

  .section-disclosure summary span {
    margin-left: 2px;
  }

  .section-disclosure summary::after {
    margin-left: auto;
  }

  ul,
  ol {
    padding-left: 20px;
  }

  .publications li {
    margin-bottom: 13px;
  }

  .pub-title {
    font-size: 13.5px;
  }

  .pub-authors,
  .pub-venue {
    font-size: 12.5px;
  }

  .badge {
    margin-top: 4px;
    margin-left: 0;
  }

  .project-controls {
    flex-wrap: nowrap;
    margin-right: -16px;
    padding-right: 16px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .project-controls::-webkit-scrollbar {
    display: none;
  }

  .project-filter {
    flex: 0 0 auto;
  }

  .project-head {
    display: block;
  }

  .project-meta {
    display: block;
    margin-top: 1px;
  }
}


.protected-disclosure:not([data-unlocked="true"]) summary span::after {
  content: " / locked";
}

.protected-disclosure.unlock-failed summary {
  color: #8a2424;
}

.protected-disclosure.unlock-failed summary::after {
  color: #8a2424;
}
