:root {
  --bg-page: #f3f6fb;
  --bg-surface: #ffffff;
  --bg-muted: #eef3f9;
  --ink-strong: #1e2a3b;
  --ink-main: #2d3a4d;
  --ink-soft: #5f6e85;
  --line-soft: #d9e2ef;
  --line-strong: #bfcee3;
  --brand: #0b4f8a;
  --brand-2: #1f6fb6;
  --title-blue: #0a5fa8;
  --brand-soft: #deebf8;
  --ok: #166e3e;
  --shadow-card: 0 8px 26px rgba(15, 38, 68, 0.08);
  --shadow-hover: 0 12px 32px rgba(15, 38, 68, 0.14);
}

html {
  scroll-behavior: smooth;
}

body.academic-home {
  font-family: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1200px 360px at 5% -5%, #dce9f8 0%, transparent 60%),
    radial-gradient(1200px 380px at 95% -10%, #edf4fc 0%, transparent 58%),
    var(--bg-page);
  color: var(--ink-main);
}

.resume-wrapper {
  padding-top: 36px;
  padding-bottom: 56px;
}

.resume-wrapper-inner {
  max-width: 1160px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 56px rgba(17, 41, 73, 0.12) !important;
}

.resume-header {
  position: relative;
  background:
    linear-gradient(120deg, rgba(9, 50, 88, 0.95), rgba(16, 72, 122, 0.95)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
  min-height: 290px;
  height: auto;
  padding: 26px 28px 20px;
}

.hero-shell {
  align-items: center;
  gap: 20px;
}

.hero-avatar-wrap {
  flex: 0 0 auto;
  border-radius: 14px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(2px);
}

.resume-header .picture {
  width: 176px;
  height: 176px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: linear-gradient(145deg, #dbe8f7, #f7fbff);
}

.resume-header .primary-info {
  max-width: 760px;
}

.hero-name-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 0.7rem;
}

.hero-name-cn {
  font-family: "Spectral", Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(230, 240, 251, 0.78);
  line-height: 1.1;
}

.resume-header .name {
  font-family: "Spectral", Georgia, "Times New Roman", serif;
  font-size: 2.55rem;
  letter-spacing: 0.01em;
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 0 !important;
}

.hero-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.resume-header .title {
  font-size: 1.06rem;
  color: rgba(255, 255, 255, 0.94);
  font-weight: 600;
  margin-bottom: 0 !important;
}

.hero-title-en {
  font-size: 0.88rem;
  color: rgba(219, 232, 248, 0.72);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-affiliation {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(244, 248, 253, 0.9);
  margin-bottom: 0.5rem;
}

.hero-summary {
  color: rgba(231, 240, 250, 0.82);
  margin: 0;
  max-width: 58ch;
  font-size: 0.98rem;
  line-height: 1.7;
}

.hero-contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  margin-top: 0.9rem;
}

.hero-contact-list li {
  display: inline-flex;
  align-items: center;
  margin: 0 !important;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(241, 247, 255, 0.82);
}

body[data-lang="zh"] .hero-name-cn {
  display: block;
  order: 1;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.98);
}

body[data-lang="zh"] .resume-header .name {
  display: none;
}

body[data-lang="zh"] .resume-header .title {
  display: block;
  color: rgba(255, 255, 255, 0.96);
}

body[data-lang="zh"] .hero-title-en {
  display: none;
}

body[data-lang="en"] .hero-name-cn {
  display: none;
}

body[data-lang="en"] .resume-header .name {
  display: block;
  order: 1;
  font-size: 2.55rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.98);
}

body[data-lang="en"] .resume-header .title {
  display: none;
}

body[data-lang="en"] .hero-title-en {
  display: block;
  font-size: 0.96rem;
  color: rgba(255, 255, 255, 0.92);
}

.section-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(8px);
}

.lang-toggle {
  margin-left: 8px;
  padding: 6px 11px;
  border: 1px solid #8B4545;
  border-radius: 999px;
  background: #A52A2A;
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 160ms ease;
}

.lang-toggle:hover {
  background: #8B0000;
  border-color: #6B0000;
}

.lang-toggle:focus-visible {
  outline: 2px solid #D5624B;
  outline-offset: 2px;
}

.section-nav .nav-link {
  color: var(--ink-main);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 160ms ease;
}

.section-nav .nav-link:hover {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: #b9d2ee;
  text-decoration: none;
}

.section-nav .nav-link.active {
  color: #ffffff;
  background: var(--brand);
  border-color: var(--brand);
}

.resume-body {
  background: transparent;
  padding-top: 2rem !important;
  padding-bottom: 2rem !important;
}

.section-card {
  background: var(--bg-surface);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}

.resume-section + .resume-section {
  margin-top: 0;
}

.resume-section.mb-5 {
  margin-bottom: 16px !important;
}

.resume-section-title {
  font-family: "Spectral", Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  letter-spacing: 0.03em;
  color: var(--title-blue);
  font-weight: 800;
}

.resume-section-title:after {
  background: linear-gradient(90deg, var(--brand-2), #8cbbe8);
  height: 2px;
  border-radius: 99px;
}

.resume-section-content {
  color: var(--ink-main);
}

.summary-section .resume-section-content {
  font-size: 1.02rem;
  line-height: 1.8;
}

.experience-row {
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.experience-row > [class*="col-"] {
  display: flex;
}

.experience-row .experience-card {
  flex: 1;
  margin-bottom: 0 !important;
}

.timeline-list {
  position: relative;
  margin: 0;
  padding-left: 1.2rem;
}

.timeline-list::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 2px;
  background: linear-gradient(180deg, #9ec2e7, #dce8f6);
}

.timeline-list > li {
  position: relative;
  margin-bottom: 14px !important;
  padding: 10px 12px 10px 14px;
  border-radius: 10px;
  background: #fbfdff;
  border: 1px solid #e5edf7;
}

.timeline-list > li::before {
  content: "";
  position: absolute;
  left: -1.02rem;
  top: 1rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-2);
  box-shadow: 0 0 0 3px #dceaf8;
}

#C3 .timeline-list {
  padding-left: 0.95rem;
}

#C3 .timeline-list > li {
  display: grid;
  grid-template-columns: minmax(88px, 1.1fr) minmax(88px, 1fr) minmax(130px, 1.35fr);
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 8px !important;
  padding: 8px 12px 8px 12px;
}

#C3 .timeline-list > li::before {
  top: 0.9rem;
}

#C3 .timeline-list > li .resume-degree,
#C3 .timeline-list > li .resume-degree-org,
#C3 .timeline-list > li .resume-degree-time {
  margin: 0;
  line-height: 1.35;
}

#C3 .timeline-list > li .resume-degree {
  font-size: 0.96rem;
}

#C3 .timeline-list > li .resume-degree-org {
  font-size: 0.92rem;
}

#C3 .timeline-list > li .resume-degree-time {
  font-size: 0.88rem;
  white-space: nowrap;
  text-align: right;
}

#C3 {
  height: 100%;
}

.project-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: 12px;
}

.project-column-title {
  margin: 0 0 7px;
  font-family: "Spectral", Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--title-blue);
  white-space: nowrap;
}

.project-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-grid > li {
  margin: 0 !important;
  padding: 9px 12px;
  border: 1px solid #dbe6f3;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f9fcff);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.project-grid > li:hover {
  transform: translateY(-2px);
  border-color: #b8cde6;
  box-shadow: var(--shadow-hover);
}

@media (max-width: 991.98px) {
  .project-columns {
    grid-template-columns: 1fr;
  }
}

.resume-degree {
  color: var(--ink-strong);
  font-size: 1rem;
  line-height: 1.45;
}

.degree-honor-note {
  font-size: 0.88em;
  color: #8f1d2c;
  font-weight: 600;
}

.resume-degree-org {
  color: var(--ink-main);
  margin-top: 3px;
}

.resume-degree-time {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-top: 3px;
}

.experience-row .col-lg-6:nth-child(2) .timeline-list > li {
  padding-top: 8px;
  padding-bottom: 8px;
}

.experience-row .col-lg-6:nth-child(2) .timeline-list > li .resume-degree-org,
.experience-row .col-lg-6:nth-child(2) .timeline-list > li .resume-degree-time {
  display: inline;
  margin-top: 2px;
}

.experience-row .col-lg-6:nth-child(2) .timeline-list > li .resume-degree-time {
  margin-left: 8px;
  white-space: nowrap;
}

.experience-row .col-lg-6:nth-child(2) .timeline-list > li .resume-degree-time::before {
  content: "|";
  margin-right: 8px;
  color: var(--ink-soft);
}

.projects-section .project-grid .resume-degree-org,
.projects-section .project-grid .resume-degree-time {
  display: inline;
  margin-top: 1px;
}

.projects-section .project-grid .resume-degree-time {
  margin-left: 8px;
}

.projects-section .project-grid .resume-degree-time::before {
  content: "|";
  margin-right: 8px;
  color: var(--ink-soft);
}

.publication-section .resume-section-content {
  display: grid;
  gap: 16px;
}

.featured-publications {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.featured-card {
  background: #f3f8ff;
  border: 1px solid #cfe0f5;
  border-radius: 12px;
  padding: 12px 12px 11px;
}

.featured-card-label {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  background: #e5f0fc;
  border: 1px solid #bfd8f4;
  border-radius: 999px;
  padding: 2px 8px;
  margin-bottom: 8px;
}

.featured-card-title {
  color: var(--ink-strong);
  font-size: 0.98rem;
  line-height: 1.45;
  margin: 0;
}

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

.publication-list h3 {
  margin: 14px 0 6px;
  padding-top: 2px;
}

.publication-list h3:first-child {
  margin-top: 0;
}

.publication-section .resume-section-title {
  margin-bottom: 6px !important;
  padding-bottom: 6px !important;
}

.publication-list h3 font {
  font-family: "Spectral", Georgia, "Times New Roman", serif;
  color: var(--title-blue);
  font-weight: 800;
  font-size: 1.2rem !important;
}

.publication-list > li {
  margin: 0 0 7px !important;
}

.pub-item {
  position: relative;
  border: 1px solid #d9e5f3;
  border-radius: 11px;
  background: #ffffff;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.pub-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 11px 0 0 11px;
  background: #9db6d1;
}

.pub-item.publication-journal::before {
  background: #1f6fb6;
}

.pub-item.publication-conference::before {
  background: #2f8d57;
}

.pub-item:hover {
  transform: translateY(-1px);
  border-color: #b7cce5;
  box-shadow: 0 8px 18px rgba(31, 72, 117, 0.12);
}

.pub-entry {
  position: relative;
  padding: 9px 88px 9px 14px;
}

.pub-title {
  color: var(--ink-strong);
  font-weight: 600;
  line-height: 1.42;
  margin-right: 4px;
}

.pub-item b {
  color: #000000 !important;
  font-weight: 700 !important;
}

.pub-meta b {
  color: #000000 !important;
  font-weight: 700 !important;
}

.pub-meta {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.35;
}

.pub-year {
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand);
  background: #e5effb;
  border: 1px solid #cadcf4;
  border-radius: 999px;
  padding: 2px 9px;
}

.course-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.course-list h3 {
  margin-bottom: 10px;
}

.course-list h3 font {
  font-family: "Spectral", Georgia, "Times New Roman", serif;
  color: var(--title-blue);
  font-weight: 800;
  font-size: 1.15rem !important;
}

.course-list > li {
  margin: 0 0 10px !important;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fbfdff;
  border: 1px solid #e0e9f5;
}

.course-list a {
  display: inline-block;
  margin-top: 5px;
  color: var(--brand-2);
  font-weight: 600;
  text-decoration: none;
}

.course-list a:hover {
  color: var(--brand);
  text-decoration: underline;
}

@media (max-width: 991.98px) {
  .resume-wrapper {
    padding-top: 20px;
    padding-bottom: 30px;
  }

  .resume-body {
    padding-left: 1.2rem !important;
    padding-right: 1.2rem !important;
  }

  .section-card {
    padding: 14px 14px;
  }

  .experience-row {
    margin-bottom: 1rem;
  }
}

@media (max-width: 767.98px) {
  .resume-wrapper-inner {
    border-radius: 0;
  }

  .resume-header {
    padding: 18px 14px 14px;
  }

  .hero-shell {
    gap: 14px;
  }

  .hero-avatar-wrap {
    align-self: center;
  }

  .resume-header .picture {
    width: 120px;
    height: 120px;
  }

  .resume-header .name {
    font-size: 1.85rem;
  }

  .hero-name-cn {
    font-size: 1rem;
  }

  .resume-header .title {
    font-size: 1rem;
  }

  .hero-affiliation,
  .hero-summary,
  .hero-title-en {
    font-size: 0.9rem;
  }

  .hero-contact-list {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-nav {
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 10px;
  }

  .section-nav .nav-link {
    font-size: 0.92rem;
    padding: 6px 10px;
  }

  .lang-toggle {
    flex: 0 0 auto;
  }

  body[data-lang="zh"] .hero-name-cn {
    font-size: 1.9rem;
  }

  body[data-lang="en"] .resume-header .name {
    font-size: 1.95rem;
  }

  .pub-year {
    position: static;
    margin-top: 6px;
    display: inline-block;
  }

  .publication-list h3 {
    margin-top: 14px;
  }

  #C3 .timeline-list > li {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 10px 10px;
  }

  #C3 .timeline-list > li .resume-degree-time {
    text-align: left;
    white-space: normal;
  }
}

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

  * {
    transition: none !important;
    animation: none !important;
  }
}
