:root {
  --accent: #1769aa;
  --accent-dark: #073b75;
  --text: #202735;
  --muted: #5b6575;
  --surface: #fff;
  --border: #d9e1ea;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 8%, rgb(71 153 226 / 12%), transparent 28rem),
    radial-gradient(circle at 92% 34%, rgb(99 102 241 / 8%), transparent 24rem),
    var(--surface);
  font: 17px/1.65 Lato, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 64px;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 160ms ease;
}

a:hover,
a:focus-visible { color: #d86f0b; }

h1, h2, p { margin-top: 0; }

h1 {
  margin: 0 0 18px;
  padding: 0.12em 0 0.16em;
  color: var(--accent-dark);
  background: linear-gradient(105deg, var(--accent-dark), #2787cf 65%, #6156c9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: clamp(2.35rem, 6vw, 3.25rem);
  line-height: 1.25;
  letter-spacing: -0.035em;
}

h2 {
  margin: 0 0 22px;
  font-size: clamp(1.7rem, 4vw, 2.05rem);
  line-height: 1.2;
  font-weight: 650;
}

.profile-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  gap: 48px;
}

.profile-row p { margin-bottom: 0; }

.avatar-link {
  padding: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #55b4ed, var(--accent-dark), #7567d5);
  box-shadow: 0 12px 34px rgb(31 53 78 / 18%);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.avatar-link:hover,
.avatar-link:focus-visible {
  transform: rotate(2deg) scale(1.025);
  box-shadow: 0 16px 40px rgb(7 59 117 / 24%);
}

.avatar {
  display: block;
  width: 210px;
  aspect-ratio: 1;
  object-fit: cover;
  border: 4px solid #fff;
  border-radius: 50%;
}

.intro-full {
  margin-top: 28px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--border);
}

.intro-full > p { margin-bottom: 18px; }

.signature {
  margin: 18px 0;
  overflow-x: auto;
  color: #27364a;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.45;
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 20px 0 0;
}

.links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  padding: 8px 18px;
  border: 1.5px solid rgb(23 105 170 / 55%);
  border-radius: 999px;
  background: rgb(255 255 255 / 72%);
  box-shadow: 0 4px 12px rgb(31 53 78 / 7%);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  backdrop-filter: blur(8px);
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease,
    box-shadow 180ms ease, transform 180ms ease;
}

.links a:hover,
.links a:focus-visible {
  color: #fff;
  border-color: var(--accent-dark);
  background: linear-gradient(120deg, var(--accent), var(--accent-dark));
  box-shadow: 0 8px 18px rgb(7 59 117 / 22%);
  transform: translateY(-2px);
}

section { padding-top: 42px; }

.publication {
  display: grid;
  grid-template-columns: minmax(210px, 30%) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 24px;
  border: 4px solid transparent;
  border-radius: 18px;
  background: linear-gradient(135deg, rgb(255 255 255 / 92%), rgb(244 249 255 / 82%));
  box-shadow: 0 5px 20px rgb(31 53 78 / 7%);
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.publication:hover,
.publication:focus-within {
  border-color: var(--accent-dark);
  box-shadow: 0 18px 38px rgb(7 59 117 / 22%);
  transform: translateY(-7px);
}

.publication img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.paper-title {
  display: inline-block;
  margin-bottom: 7px;
  font-size: 1.15rem;
  line-height: 1.4;
  font-weight: 750;
}

.authors,
.venue { margin-bottom: 7px; }

.summary {
  margin: 12px 0 16px;
  color: var(--muted);
}

.paper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 7px 16px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.3;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover,
.button:focus-visible {
  color: #fff;
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.details-list {
  margin: 0;
  padding-left: 1.3em;
}

.details-list li + li { margin-top: 10px; }

.site-footer {
  position: relative;
  overflow: hidden;
  color: rgb(255 255 255 / 76%);
  background: linear-gradient(120deg, #062d58, #0b4d86 62%, #343478);
}

.site-footer::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: 8%;
  bottom: -190px;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgb(255 255 255 / 3%), 0 0 0 90px rgb(255 255 255 / 2%);
  pointer-events: none;
}

.footer-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  width: min(920px, calc(100% - 40px));
  min-height: 180px;
  margin: 0 auto;
  padding: 38px 0;
}

.footer-name {
  margin-bottom: 4px;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.footer-focus {
  margin-bottom: 18px;
  font-size: 0.96rem;
}

.copyright {
  margin-bottom: 0;
  color: rgb(255 255 255 / 58%);
  font-size: 0.86rem;
}

.visit-counter {
  margin: 0 0 8px;
  color: rgb(255 255 255 / 76%);
  font-size: 0.86rem;
}

.visit-counter [hidden] { display: none !important; }

#busuanzi_value_site_uv { font-variant-numeric: tabular-nums; }

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  padding: 9px 17px;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 999px;
  color: #fff;
  background: rgb(255 255 255 / 9%);
  font-size: 0.92rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  color: #fff;
  border-color: rgb(255 255 255 / 70%);
  background: rgb(255 255 255 / 17%);
  transform: translateY(-2px);
}

.back-to-top span {
  font-size: 1.2rem;
  line-height: 1;
}

@media (max-width: 680px) {
  body { font-size: 16px; }

  main {
    width: min(100% - 28px, 920px);
    padding-top: 32px;
  }

  .profile-row {
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 20px;
  }

  .avatar { width: 108px; }

  .links a { min-width: calc(50% - 6px); }

  .publication {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 18px;
  }

  .publication img { max-width: 420px; }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    width: min(100% - 28px, 920px);
    min-height: 0;
    padding: 34px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
