:root {
  --accent: #f49300;
  --accent-dark: #6e3519;
  --accent-soft: #fff8e8;
  --ink: #222222;
  --muted: #555555;
  --line: rgba(17, 17, 17, 0.16);
  --page-width: 800px;
}

* {
  box-sizing: border-box;
}

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

body,
td,
th,
tr,
p,
a,
button {
  font-family: "Lato", Verdana, Helvetica, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  line-height: 1.55;
}

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

a:hover,
a:focus-visible {
  color: var(--accent-dark);
}

button {
  color: inherit;
}

img {
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 8px 12px;
  background: var(--ink);
  color: #ffffff;
  transform: translateY(-150%);
}

.skip-link:focus {
  color: #ffffff;
  transform: translateY(0);
}

.homepage {
  width: min(100% - 32px, var(--page-width));
  margin: 0 auto;
  padding: 18px 0 42px;
}

.page-section {
  scroll-margin-top: 24px;
}

.about-section {
  margin-bottom: 20px;
}

.profile-table {
  width: 100%;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.profile-copy {
  width: 68%;
  padding: 2.5%;
  vertical-align: middle;
}

.profile-photo-cell {
  width: 32%;
  padding: 2.5%;
  text-align: center;
  vertical-align: middle;
}

.profile-name {
  margin: 0 0 18px;
  text-align: center;
}

name {
  font-size: 28px;
  line-height: 1.2;
}

.profile-copy > p:not(.profile-name):not(.contact-links) {
  margin: 0 0 13px;
}

.profile-divider {
  height: 1px;
  margin: 14px 0 10px;
  background: #d6d6d6;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0;
  line-height: 1.8;
}

.contact-links button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}

.contact-links button:hover,
.contact-links button:focus-visible {
  color: var(--accent-dark);
}

.contact-links span {
  color: #888888;
}

.profile-photo {
  width: 88%;
  height: auto;
  display: block;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  object-fit: cover;
}

.content-section {
  margin-top: 34px;
  padding: 0 2.5%;
}

heading {
  display: inline-block;
  font-size: 25px;
  line-height: 1.25;
  text-decoration: underline;
  text-decoration-color: #fba524;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

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

.news-entry {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 5px 0;
  line-height: 1.45;
}

.news-date-badge {
  flex: 0 0 auto;
  min-width: 68px;
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid #555555;
  border-radius: 2px;
  background: var(--accent-soft);
  color: #111111;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
}

.news-highlight {
  text-decoration: underline;
  text-decoration-color: #fba524;
  text-underline-offset: 2px;
}

.publication-note {
  margin: 15px 0 0;
}

.tag-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 16px auto 0;
}

.tag-btn {
  min-height: 31px;
  padding: 5px 13px;
  border: 1px solid rgba(17, 17, 17, 0.18);
  border-radius: 18px;
  background: rgba(251, 165, 36, 0.06);
  color: var(--accent-dark);
  font-size: 13px;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tag-btn:hover,
.tag-btn:focus-visible {
  border-color: rgba(17, 17, 17, 0.38);
  background: rgba(251, 165, 36, 0.12);
  outline: none;
}

.tag-btn.active {
  border-color: rgba(17, 17, 17, 0.62);
  background: #ad7020;
  color: #ffffff;
}

.tag-count {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  margin-left: 5px;
  border-radius: 50%;
  background: rgba(251, 165, 36, 0.14);
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.tag-btn.active .tag-count {
  background: rgba(255, 255, 255, 0.22);
}

.publications-table {
  width: 100%;
  margin-top: 1px;
  border: 0;
  border-collapse: separate;
  border-spacing: 0 16px;
}

.publication-row > td {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.publication-row > td:first-child {
  border-left: 1px solid var(--line);
  border-radius: 8px 0 0 8px;
}

.publication-row > td:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 8px 8px 0;
}

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

.paper-image-cell {
  width: 38%;
  padding: 12px;
  vertical-align: middle;
}

.paper-info-cell {
  width: 62%;
  padding: 18px 18px 18px 8px;
  vertical-align: middle;
}

.paper-image-link {
  width: 235px;
  max-width: 100%;
  height: 165px;
  display: block;
  overflow: hidden;
  border-radius: 5px;
  background: #f5f5f5;
}

.publication-row.media-emphasis .paper-image-link {
  width: 260px;
}

.paper-image {
  width: 100%;
  height: 100%;
  display: block;
}

.paper-image-cover {
  object-fit: cover;
}

.paper-image-contain {
  padding: 3px;
  background: #ffffff;
  object-fit: contain;
}

.paper-placeholder {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 5px;
  padding: 16px 10px 28px;
  border: 1px solid #e3e3e3;
  color: #333333;
  text-align: center;
}

.paper-placeholder:hover,
.paper-placeholder:focus-visible {
  color: #333333;
}

.placeholder-before,
.placeholder-after {
  min-height: 63px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
}

.placeholder-before {
  background: #353535;
  color: #ffffff;
}

.placeholder-after {
  border: 1px solid #dedede;
  background: #ffffff;
  color: #333333;
}

.placeholder-arrow {
  color: var(--accent);
  font-size: 18px;
}

.paper-placeholder small {
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  color: #777777;
  font-size: 10px;
}

papertitle {
  display: inline;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.authors {
  margin: 7px 0 5px;
  color: #333333;
  font-size: 12px;
  line-height: 1.45;
}

.authors strong,
.venue strong {
  font-size: inherit;
}

.paper-links {
  line-height: 1.6;
}

.venue {
  margin: 3px 0 0;
  color: #b3261e;
}

.paper-summary {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.publication-row.no-media .paper-info-cell {
  width: 100%;
  padding: 22px 24px;
}

.experience-list {
  margin-top: 16px;
}

.experience-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 96px;
  padding: 14px 20px;
  border-bottom: 1px solid #e5e5e5;
}

.experience-item:first-child {
  border-top: 1px solid #e5e5e5;
}

.experience-logo-wrap {
  width: 82px;
  height: 64px;
  display: grid;
  place-items: center;
  padding: 4px;
}

.experience-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.experience-logo-wide {
  width: 100%;
  height: auto;
}

.experience-logo-njupt {
  width: 60%;
  height: 60%;
  margin: auto;
  transform: translateY(-3px);
}

.experience-item strong {
  font-size: 14px;
}

.experience-item p {
  margin: 2px 0 0;
  color: var(--muted);
}

.services-list {
  margin-top: 16px;
  border-top: 1px solid #e5e5e5;
}

.service-item {
  padding: 17px 20px;
  border-bottom: 1px solid #e5e5e5;
}

.service-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
}

.service-item p {
  margin: 3px 0;
  color: var(--muted);
}

.service-item p strong {
  color: var(--ink);
  font-size: inherit;
}

.service-links {
  margin-top: 7px !important;
}

.site-footer {
  margin-top: 50px;
  padding: 22px 2.5% 0;
  border-top: 1px solid #dddddd;
  color: #777777;
  text-align: center;
}

.site-footer p {
  margin: 3px 0;
  font-size: 12px;
}

.section-drip-nav {
  position: fixed;
  top: 50%;
  left: calc(50% + 435px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(-50%);
}

.section-drip-nav::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 8px;
  width: 1px;
  background: #dddddd;
  content: "";
}

.section-drip-nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 18px;
  color: #777777;
}

.section-drip-nav a::before {
  z-index: 1;
  width: 8px;
  height: 11px;
  margin: 0 11px 0 4px;
  border: 1px solid #d0d0d0;
  border-radius: 8px 8px 8px 2px;
  background: #ffffff;
  content: "";
  transform: rotate(-45deg);
}

.section-drip-nav span {
  font-size: 11px;
  opacity: 0.75;
  white-space: nowrap;
}

.section-drip-nav a:hover::before,
.section-drip-nav a:focus-visible::before {
  border-color: var(--accent);
  background: var(--accent-soft);
}

#back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(50, 50, 50, 0.82);
  color: #ffffff;
  font-size: 18px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  cursor: pointer;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 200;
  padding: 8px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.16);
  color: #333333;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1120px) {
  .section-drip-nav {
    display: none;
  }
}

@media (max-width: 680px) {
  .homepage {
    width: min(100% - 24px, var(--page-width));
    padding-top: 8px;
  }

  .profile-row {
    display: flex;
    flex-direction: column;
  }

  .profile-copy,
  .profile-photo-cell {
    width: 100%;
    display: block;
  }

  .profile-copy {
    padding: 18px 8px 8px;
  }

  .profile-photo-cell {
    padding: 12px 8px 4px;
  }

  .profile-photo {
    width: 178px;
  }

  .content-section {
    margin-top: 32px;
    padding: 0 8px;
  }

  heading {
    font-size: 23px;
  }

  .news-entry {
    align-items: flex-start;
  }

  .tag-filter {
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 4px;
    overflow-x: auto;
  }

  .tag-btn {
    flex: 0 0 auto;
  }

  .publications-table,
  .publications-table tbody {
    display: block;
    width: 100%;
  }

  .publication-row {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    margin: 16px 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
  }

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

  .publication-row > td,
  .publication-row > td:first-child,
  .publication-row > td:last-child {
    width: 100%;
    display: block;
    border: 0;
    border-radius: 0;
  }

  .paper-image-cell {
    padding: 12px 12px 0;
  }

  .paper-info-cell {
    padding: 16px;
  }

  .paper-image-link {
    width: 100%;
    max-width: none;
    height: 176px;
  }

  .publication-row.media-emphasis .paper-image-link {
    width: 100%;
  }

  .paper-image-cover {
    object-position: center;
  }

  .experience-item {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 4px;
  }

  .experience-logo-wrap {
    width: 68px;
    height: 56px;
    padding: 3px;
  }

  .service-item {
    padding: 15px 4px;
  }

  #back-to-top {
    right: 14px;
    bottom: 14px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
