/* Static GitHub Pages academic style: compact, readable, and data-driven. */
:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #5f6b7a;
  --line: #dde3ea;
  --accent: #1f6feb;
  --accent-dark: #174ea6;
  --accent-soft: #eaf2ff;
  --chip: #edf5f2;
  --chip-text: #1f6652;
  --shadow: 0 18px 48px rgba(31, 41, 51, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "Noto Sans",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.68;
}

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 20;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.45rem 0.7rem;
}

.skip-link:focus {
  top: 1rem;
}

.page {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 2.2rem;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.2rem 0 4rem;
}

.profile {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.portrait {
  width: 172px;
  height: 172px;
  margin: 0 auto 1.1rem;
  overflow: hidden;
  border: 1px solid #bfd3ec;
  border-radius: 50%;
  background: #f0f4f8;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.profile h1 {
  margin: 0;
  text-align: center;
  font-size: 1.72rem;
  line-height: 1.2;
}

.name-cn {
  margin: 0.1rem 0 0.8rem;
  text-align: center;
  color: var(--muted);
  font-size: 1.05rem;
}

.profile-title,
.profile-meta {
  margin: 0.55rem 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.profile-title {
  color: var(--text);
  font-weight: 700;
  text-align: center;
}

.profile-links {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.2rem;
}

.profile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  min-height: 42px;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-weight: 600;
}

.profile-link svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.profile-link:hover {
  border-color: #9cbef0;
  background: var(--accent-soft);
  text-decoration: none;
}

.content {
  min-width: 0;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.8rem 0;
  background: rgba(247, 248, 250, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.1rem 0.58rem;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.top-nav a:hover,
.top-nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-dark);
  text-decoration: none;
}

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

.section h2 {
  margin: 0 0 0.8rem;
  color: var(--text);
  font-size: 1.58rem;
  line-height: 1.25;
}

.section h3,
.section h4 {
  margin: 0;
  line-height: 1.38;
}

.section h3 {
  font-size: 1.12rem;
}

.section h4 {
  font-size: 1.04rem;
}

.section p {
  margin: 0.35rem 0;
}

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

.section-heading p,
.publication-note,
.cv-intro {
  color: var(--muted);
  font-size: 0.95rem;
}

.tags,
.publication-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.tags span,
.publication-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.16rem 0.55rem;
  border: 1px solid #cfe1db;
  border-radius: 999px;
  background: var(--chip);
  color: var(--chip-text);
  font-size: 0.83rem;
  font-weight: 700;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
}

.timeline-date {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.role {
  color: var(--accent-dark);
  font-weight: 700;
}

.publication-groups {
  display: grid;
  gap: 2rem;
  margin-top: 1.2rem;
}

.publication-category {
  display: grid;
  gap: 1rem;
}

.publication-category > h3 {
  margin: 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 1.18rem;
}

.publication-year {
  padding-top: 0.2rem;
}

.publication-year > h4 {
  margin: 0 0 0.45rem;
  color: var(--accent-dark);
  font-size: 1.08rem;
}

.publication-list {
  display: grid;
  gap: 0.95rem;
  margin: 0;
  padding: 0;
  list-style-position: inside;
}

.publication {
  position: relative;
  padding: 1rem 0;
  border-bottom: 1px solid #edf1f5;
}

.publication::marker {
  color: var(--muted);
  font-weight: 700;
}

.publication-header {
  display: block;
}

.authors {
  color: var(--text);
  font-size: 0.95rem;
}

.author-name {
  font-weight: 800;
}

.author-marker {
  margin-left: 0.08rem;
  color: #9b4a00;
  font-size: 0.78em;
  font-weight: 800;
  line-height: 0;
}

.highlight-name,
.self-author {
  text-decoration: underline;
  text-underline-offset: 0.16em;
  text-decoration-thickness: 0.08em;
}

.highlight-name {
  font-weight: 800;
}

.venue {
  color: #364557;
  font-weight: 700;
}

.paper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.paper-link,
.primary-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.18rem 0.62rem;
  border: 1px solid #a8c7fa;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.88rem;
  font-weight: 800;
}

.paper-link:hover,
.primary-link:hover {
  background: #dceaff;
  text-decoration: none;
}

.paper-link.disabled {
  border-color: var(--line);
  background: #f3f5f7;
  color: #8a96a3;
}

.award-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.award-list li {
  display: grid;
  grid-template-columns: 5.2rem 1fr;
  gap: 0.9rem;
  padding: 0.36rem 0;
}

.award-list span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.award-list p {
  margin: 0;
}

.cv-frame {
  width: 100%;
  height: 760px;
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

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

  .profile {
    position: static;
  }

  .top-nav {
    overflow-x: auto;
    padding-bottom: 0.65rem;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .page {
    width: min(100% - 1rem, 1120px);
  }

  .profile {
    padding: 1rem;
  }

  .portrait {
    width: 142px;
    height: 142px;
  }

  .section-heading {
    display: block;
  }

  .award-list li,
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .cv-frame {
    height: 560px;
  }
}
