:root {
  color-scheme: light;
  --ink: #0c1b31;
  --muted: #536279;
  --soft: #eef4f8;
  --line: rgba(128, 153, 181, 0.28);
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.76);
  --accent: #d89a43;
  --accent-dark: #9d661f;
  --accent-soft: rgba(216, 154, 67, 0.18);
  --blue: #527fa8;
  --shadow: 0 18px 50px rgba(28, 47, 72, 0.13);
  --shadow-soft: 0 10px 28px rgba(28, 47, 72, 0.08);
  --shadow-hover: 0 24px 64px rgba(28, 47, 72, 0.16);
  --radius: 18px;
  --page-bg:
    radial-gradient(circle at 16% 12%, rgba(216, 154, 67, 0.16), transparent 28vw),
    radial-gradient(circle at 84% 18%, rgba(82, 127, 168, 0.16), transparent 26vw),
    linear-gradient(145deg, #fbf9f4 0%, #f6fbff 48%, #ffffff 100%);
  --grid-line: rgba(12, 27, 49, 0.035);
  --header-bg: rgba(250, 251, 250, 0.64);
  --nav-text: #3b4b62;
  --nav-bg-active: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.72);
  --glass-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.38));
  --glass-shine:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), transparent 38%),
    radial-gradient(circle at 16% 8%, rgba(255, 255, 255, 0.72), transparent 22%);
  --liquid-a: linear-gradient(135deg, rgba(216, 154, 67, 0.46), rgba(255, 255, 255, 0.1));
  --liquid-b: linear-gradient(135deg, rgba(82, 127, 168, 0.45), rgba(255, 255, 255, 0.12));
  --title: #061b34;
  --body-text: #142642;
  --subtle-text: #52647c;
  --panel-text: #324259;
  --social-bg: rgba(255, 255, 255, 0.36);
  --social-bg-hover: rgba(255, 255, 255, 0.72);
  --code-bg: rgba(255, 255, 255, 0.68);
  --tag-bg: rgba(82, 127, 168, 0.12);
  --paper-link-bg: rgba(216, 154, 67, 0.14);
  --theme-track: rgba(255, 255, 255, 0.66);
  --theme-thumb: #ffffff;
  --theme-icon: #43536a;
  --max: 1240px;
  --shell-width: 1120px;
  --sidebar-width: 300px;
  --column-gap: 56px;
  --header-pad-x: 16px;
  --nav-gap: 8px;
  --nav-link-pad-x: 16px;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-serif: Charter, "Iowan Old Style", Georgia, "Times New Roman", serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf5ff;
  --muted: #aab8ca;
  --soft: #172335;
  --line: rgba(168, 190, 219, 0.25);
  --glass: rgba(18, 30, 48, 0.62);
  --glass-strong: rgba(28, 43, 67, 0.78);
  --accent: #f0b85b;
  --accent-dark: #ffd28b;
  --accent-soft: rgba(240, 184, 91, 0.18);
  --blue: #8fb7df;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.24);
  --shadow-hover: 0 28px 70px rgba(0, 0, 0, 0.42);
  --page-bg:
    radial-gradient(circle at 14% 12%, rgba(240, 184, 91, 0.16), transparent 28vw),
    radial-gradient(circle at 86% 18%, rgba(112, 165, 217, 0.2), transparent 28vw),
    linear-gradient(145deg, #07111f 0%, #101b2c 48%, #17243a 100%);
  --grid-line: rgba(220, 234, 255, 0.045);
  --header-bg: rgba(8, 16, 29, 0.68);
  --nav-text: #c2d0e2;
  --nav-bg-active: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(197, 215, 239, 0.2);
  --glass-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  --glass-shine:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 40%),
    radial-gradient(circle at 16% 8%, rgba(255, 255, 255, 0.1), transparent 24%);
  --liquid-a: linear-gradient(135deg, rgba(240, 184, 91, 0.28), rgba(255, 255, 255, 0.02));
  --liquid-b: linear-gradient(135deg, rgba(112, 165, 217, 0.32), rgba(255, 255, 255, 0.03));
  --title: #f2f7ff;
  --body-text: #dce8f7;
  --subtle-text: #afbed1;
  --panel-text: #d4dfed;
  --social-bg: rgba(255, 255, 255, 0.08);
  --social-bg-hover: rgba(255, 255, 255, 0.14);
  --code-bg: rgba(255, 255, 255, 0.1);
  --tag-bg: rgba(143, 183, 223, 0.14);
  --paper-link-bg: rgba(240, 184, 91, 0.16);
  --theme-track: rgba(10, 17, 30, 0.72);
  --theme-thumb: #f3c777;
  --theme-icon: #d7e4f4;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeScaleIn {
  from {
    opacity: 0;
    transform: scale(0.975);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.65;
  background: var(--page-bg);
  overflow-x: hidden;
  transition:
    color 520ms ease,
    background 520ms ease;
}

::selection {
  color: var(--title);
  background: var(--accent-soft);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.62), transparent 76%);
  transition: background-image 520ms ease;
}

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

a:hover {
  text-decoration: none;
}

.liquid {
  position: fixed;
  z-index: -2;
  width: 34vw;
  min-width: 320px;
  aspect-ratio: 1;
  border-radius: 42% 58% 63% 37% / 44% 37% 63% 56%;
  filter: blur(14px);
  opacity: 0.28;
  animation: drift 18s ease-in-out infinite alternate;
  pointer-events: none;
  transition:
    background 520ms ease,
    opacity 520ms ease;
}

.liquid-a {
  top: 11vh;
  left: -10vw;
  background: var(--liquid-a);
}

.liquid-b {
  right: -12vw;
  bottom: 8vh;
  background: var(--liquid-b);
  animation-delay: -5s;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
    border-radius: 42% 58% 63% 37% / 44% 37% 63% 56%;
  }

  to {
    transform: translate3d(44px, -24px, 0) rotate(12deg) scale(1.08);
    border-radius: 58% 42% 39% 61% / 54% 58% 42% 46%;
  }
}

.glass {
  position: relative;
  border: 1px solid var(--glass-border);
  background:
    var(--glass-gradient),
    var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(148%);
  -webkit-backdrop-filter: blur(24px) saturate(148%);
  transition:
    transform 220ms ease,
    border-color 520ms ease,
    background 520ms ease,
    box-shadow 520ms ease;
}

.glass::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  content: "";
  background: var(--glass-shine);
  opacity: 0.68;
  transition:
    background 520ms ease,
    opacity 520ms ease;
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: grid;
  grid-template-columns: calc(var(--sidebar-width) - var(--header-pad-x)) minmax(0, 1fr) auto;
  align-items: center;
  column-gap: var(--column-gap);
  width: min(var(--shell-width), calc(100% - 42px));
  min-height: 60px;
  margin: 12px auto 0;
  padding: 8px var(--header-pad-x);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 44%),
    var(--header-bg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition:
    border-color 520ms ease,
    background 520ms ease,
    box-shadow 520ms ease;
  animation: fadeSlideUp 680ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.home-link,
.nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding-inline: var(--nav-link-pad-x);
  white-space: nowrap;
  color: var(--nav-text);
  font-size: 0.95rem;
  font-weight: 620;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.home-link {
  justify-self: start;
}

.nav {
  display: flex;
  justify-content: flex-start;
  gap: var(--nav-gap);
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  flex: 0 0 auto;
  min-width: 0;
  scroll-snap-align: start;
}

.home-link:hover,
.nav a:hover,
.nav a.active {
  color: var(--ink);
  border-color: var(--line);
  background: var(--nav-bg-active);
  box-shadow:
    0 10px 24px rgba(28, 47, 72, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.header-tools {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
}

.theme-toggle {
  font: inherit;
  cursor: pointer;
  border: 0;
  padding: 0;
  background: transparent;
}

.theme-toggle-track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 76px;
  height: 40px;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--theme-icon);
  background: var(--theme-track);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 10px 24px rgba(28, 47, 72, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition:
    border-color 520ms ease,
    background 520ms ease,
    box-shadow 520ms ease;
}

.theme-toggle-thumb {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--theme-thumb);
  box-shadow: 0 8px 18px rgba(28, 47, 72, 0.2);
  transition:
    transform 420ms cubic-bezier(0.34, 1.56, 0.64, 1),
    background 520ms ease,
    box-shadow 520ms ease;
}

.theme-icon {
  position: relative;
  z-index: 1;
  width: 17px;
  height: 17px;
  justify-self: center;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition:
    color 420ms ease,
    opacity 420ms ease,
    transform 420ms ease;
}

.theme-icon-moon {
  opacity: 0.62;
}

[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(36px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.36);
}

[data-theme="dark"] .theme-icon-sun {
  opacity: 0.56;
  transform: rotate(-18deg) scale(0.92);
}

[data-theme="dark"] .theme-icon-moon {
  opacity: 1;
  transform: rotate(-8deg) scale(1.04);
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: var(--column-gap);
  width: min(var(--shell-width), calc(100% - 42px));
  margin: 52px auto 88px;
}

.sidebar {
  display: grid;
  align-content: start;
  gap: 24px;
}

.identity-card,
.contact-card,
.mini-card,
.publication-card,
.service-card,
.entry-card {
  overflow: hidden;
  border-radius: var(--radius);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 520ms ease,
    background 520ms ease;
}

.identity-card:hover,
.contact-card:hover,
.mini-card:hover,
.publication-card:hover,
.service-card:hover,
.entry-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.identity-card {
  padding: 0 0 24px;
  text-align: center;
  animation: fadeScaleIn 760ms 120ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.identity-card > * {
  position: relative;
  z-index: 1;
}

.avatar-frame {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius) var(--radius) 10px 10px;
  border-bottom: 1px solid var(--glass-border);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(82, 127, 168, 0.1)),
    var(--soft);
  animation: fadeScaleIn 900ms 180ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.avatar-frame::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
}

.avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  transition: opacity 260ms ease;
}

.avatar.is-loaded {
  opacity: 1;
}

.identity-card h1 {
  margin: 24px 18px 16px;
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 3.2vw, 2.05rem);
  line-height: 1.12;
  font-weight: 780;
  letter-spacing: 0;
}

.role,
.affiliation {
  display: none;
  margin: 0;
}

.role {
  color: var(--accent-dark);
  font-size: 1.08rem;
  font-weight: 650;
}

.affiliation {
  color: var(--muted);
}

.contact-card {
  padding: 20px;
  animation: fadeScaleIn 760ms 180ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.contact-card > * {
  position: relative;
  z-index: 1;
}

.profile-contact {
  display: grid;
  gap: 7px;
  margin: 0;
  text-align: left;
}

.profile-contact a,
.profile-contact button {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  min-height: 28px;
  width: 100%;
  border-radius: 10px;
  border: 0;
  padding: 3px 8px;
  color: var(--panel-text);
  background: transparent;
  font: inherit;
  text-align: left;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.profile-contact button {
  cursor: pointer;
}

.profile-contact a:hover,
.profile-contact button:hover {
  color: var(--accent-dark);
  background: var(--social-bg);
  transform: translateY(-1px);
}

.profile-contact button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.profile-contact span {
  color: var(--subtle-text);
  font-size: 0.76rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-contact strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.35;
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.social-row a {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(128, 153, 181, 0.2);
  color: var(--theme-icon);
  background: var(--social-bg);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.social-row img,
.social-row .ai {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
}

.social-row img {
  display: block;
  object-fit: contain;
}

.social-row .ai {
  color: currentColor;
  font-size: 20px;
  line-height: 20px;
  text-align: center;
}

.social-row a[data-link="email"] img {
  width: 19px;
  height: 19px;
}

.social-row a[data-link="google_scholar"] {
  color: #4285f4;
}

.social-row a[data-link="google_scholar"] .ai {
  font-size: 22px;
}

.social-row a[data-link="orcid"] {
  color: #a6ce39;
}

.social-row a[data-link="orcid"] .ai {
  font-size: 19px;
}

.social-row a[data-link="wos"] {
  color: #4f46e5;
}

.social-row a[data-link="wos"] .ai {
  font-size: 21px;
}

.social-row a[data-link="github"] img {
  width: 19px;
  height: 19px;
}

[data-theme="dark"] .social-row a[data-link="github"] img {
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.social-row a:hover {
  color: var(--accent-dark);
  border-color: rgba(216, 154, 67, 0.35);
  background: var(--social-bg-hover);
  transform: translateY(-2px);
}

.is-hidden {
  display: none !important;
}

.mini-card {
  padding: 20px;
  animation: fadeSlideUp 720ms 220ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.mini-card > * {
  position: relative;
  z-index: 1;
}

.mini-card-head,
.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.mini-card h2 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 680;
  letter-spacing: 0;
}

.mini-card-head a,
.section-title-row a {
  color: var(--accent-dark);
  font-size: 0.88rem;
  font-weight: 640;
  white-space: nowrap;
}

.mini-card ul,
.service-card ul,
.entry-card ul {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: var(--panel-text);
}

.mini-card li {
  position: relative;
  padding-left: 14px;
  font-size: 0.98rem;
}

.mini-card li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
}

.content {
  min-width: 0;
}

.panel {
  scroll-margin-top: 86px;
  animation: fadeSlideUp 760ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.panel:nth-child(1) {
  animation-delay: 180ms;
}

.panel:nth-child(2) {
  animation-delay: 260ms;
}

.panel:nth-child(3) {
  animation-delay: 340ms;
}

.panel:nth-child(4) {
  animation-delay: 420ms;
}

.panel:nth-child(5) {
  animation-delay: 500ms;
}

.panel + .panel {
  margin-top: 54px;
}

.about-panel {
  padding-top: 4px;
}

.panel h2 {
  position: relative;
  margin: 0 0 22px;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.5rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0;
}

.panel h2::after {
  display: block;
  width: 100%;
  height: 3px;
  margin-top: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), transparent);
  content: "";
}

.about-copy {
  max-width: 790px;
  color: var(--body-text);
  font-size: 1.03rem;
}

.about-copy p {
  margin: 0 0 18px;
}

.about-copy p,
.publication-card .summary,
.publication-card .summary p,
.service-card p,
.entry-card p,
.entry-card .summary,
.entry-card .summary p {
  text-align: justify;
  text-justify: inter-word;
}

.about-copy strong {
  color: var(--accent-dark);
}

code {
  padding: 0.12em 0.36em;
  border-radius: 6px;
  background: var(--code-bg);
  color: var(--accent-dark);
}

.publication-list,
.service-grid,
.entry-grid,
.resume-list,
.skill-list {
  display: grid;
  gap: 18px;
}

.skill-list {
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 9px;
}

.skill-list li {
  position: relative;
  min-height: 40px;
  padding: 8px 14px 8px 32px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--panel-text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent),
    var(--social-bg);
  font-weight: 560;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.skill-list li:hover {
  border-color: rgba(216, 154, 67, 0.34);
  transform: translateX(2px);
}

.skill-list li::before {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
  transform: translateY(-50%);
}

.publication-group {
  display: grid;
  gap: 12px;
}

.publication-group + .publication-group {
  margin-top: 30px;
}

.publication-group h3 {
  margin: 0;
  color: var(--title);
  font-family: var(--font-serif);
  font-size: 1.28rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
}

.publication-group-list {
  display: grid;
  gap: 16px;
}

.empty-publication-group {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.publication-card,
.service-card,
.entry-card {
  padding: 24px 26px;
  animation: fadeSlideUp 520ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.publication-card > *,
.service-card > *,
.entry-card > * {
  position: relative;
  z-index: 1;
}

.publication-card::before {
  position: absolute;
  inset: 20px auto 20px 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  content: "";
  opacity: 0.78;
}

.publication-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 10px;
}

.publication-card h4 {
  flex: 1;
  margin: 0;
  color: var(--title);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: 0;
}

.publication-year {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  color: var(--accent-dark);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent),
    var(--paper-link-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 8px 18px rgba(28, 47, 72, 0.06);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1;
}

.publication-card .authors,
.publication-card .venue,
.publication-card .summary,
.service-card p,
.entry-card p,
.entry-card .summary {
  margin: 0 0 7px;
}

.publication-card .authors {
  color: var(--panel-text);
  font-size: 0.96rem;
}

.publication-card .authors strong {
  color: var(--accent-dark);
}

.publication-card .author-marker {
  margin-left: 1px;
  font-weight: 780;
}

.publication-card .author-marker-first {
  color: #b7791f;
}

.publication-card .author-marker-corresponding {
  color: #4f6fa8;
}

[data-theme="dark"] .publication-card .author-marker-first {
  color: #ffd28b;
}

[data-theme="dark"] .publication-card .author-marker-corresponding {
  color: #9fc4f3;
}

.publication-card .venue {
  color: var(--body-text);
  font-size: 0.98rem;
}

.publication-card .summary,
.service-card p,
.entry-card p,
.entry-card .summary {
  color: var(--subtle-text);
}

.publication-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  margin-top: 14px;
}

.publication-actions .publication-meta,
.publication-actions .publication-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.publication-actions .publication-links {
  justify-content: flex-end;
  margin-left: auto;
}

.tag,
.publication-links a {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 0.82rem;
  font-weight: 650;
}

.tag {
  border-color: rgba(82, 127, 168, 0.16);
  color: var(--blue);
  background: var(--tag-bg);
}

.publication-links a {
  border-color: rgba(216, 154, 67, 0.2);
  color: var(--accent-dark);
  background: var(--paper-link-bg);
  transition:
    background 180ms ease,
    transform 180ms ease;
}

.publication-links a:hover {
  border-color: rgba(216, 154, 67, 0.38);
  background: rgba(216, 154, 67, 0.22);
  transform: translateY(-1px);
}

.resume-list {
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 12px;
  border-left: 1px solid color-mix(in srgb, var(--line), var(--accent) 16%);
  margin-left: 4px;
}

.resume-list li {
  position: relative;
  padding-left: 24px;
  color: var(--body-text);
  font-size: 0.98rem;
  line-height: 1.58;
  animation: fadeSlideUp 520ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.resume-list li::before {
  position: absolute;
  top: 0.72em;
  left: -4px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  content: "";
}

.education-item {
  display: grid;
  gap: 3px;
}

.resume-list .education-item::before {
  top: 0.52em;
}

.education-period {
  display: block;
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 760;
  line-height: 1.35;
}

.education-detail {
  display: block;
  color: var(--body-text);
  font-size: 1rem;
  line-height: 1.56;
}

.education-detail a {
  color: var(--accent-dark);
  font-weight: 640;
}

.education-detail a:hover {
  text-decoration: underline;
}

.resume-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: 8px;
}

.resume-links a {
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 640;
}

.resume-rank {
  display: inline-flex;
  margin-left: 8px;
  color: var(--accent-dark);
  font-weight: 640;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transform: none !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}

.service-grid,
.entry-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-card h3,
.entry-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.loading {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(var(--max), calc(100% - 42px));
  margin: 0 auto;
  padding: 24px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
}

.visit-counter {
  color: var(--subtle-text);
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .site-header {
    position: sticky;
    top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
  }

  .home-link {
    flex: 0 0 auto;
  }

  .nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    scrollbar-width: none;
    mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent);
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent);
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .header-tools {
    flex: 0 0 auto;
    justify-content: flex-end;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 34px;
    margin-top: 32px;
  }

  .sidebar {
    grid-template-columns: minmax(240px, 320px) minmax(240px, 1fr);
    grid-template-areas:
      "identity research"
      "identity contact";
    align-items: start;
  }

  .identity-card {
    grid-area: identity;
  }

  #research {
    grid-area: research;
  }

  .contact-card {
    grid-area: contact;
  }
}

@media (max-width: 700px) {
  .site-header,
  .layout,
  .site-footer {
    width: min(100% - 28px, var(--shell-width));
  }

  .site-header {
    top: 6px;
    margin-top: 6px;
    border-radius: 16px;
    padding: 8px;
  }

  .sidebar,
  .service-grid,
  .entry-grid,
  .skill-list {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-template-areas:
      "identity"
      "contact"
      "research";
  }

  .home-link,
  .nav a {
    min-width: 0;
    min-height: 34px;
    padding-inline: 10px;
    font-size: 0.82rem;
  }

  .theme-toggle-track {
    width: 60px;
    height: 34px;
    padding: 3px;
  }

  .theme-toggle-thumb {
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
  }

  .theme-icon {
    width: 15px;
    height: 15px;
  }

  [data-theme="dark"] .theme-toggle-thumb {
    transform: translateX(28px);
  }

  .layout {
    gap: 28px;
    margin-bottom: 58px;
  }

  .panel + .panel {
    margin-top: 34px;
  }

  .publication-card,
  .service-card,
  .entry-card {
    padding: 18px 18px;
  }

  .publication-head {
    flex-direction: column;
    gap: 8px;
  }

  .publication-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .publication-actions .publication-links {
    justify-content: flex-start;
    margin-left: 0;
  }

  .section-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .site-footer {
    flex-direction: column;
  }

  .visit-counter {
    margin-left: 0;
    text-align: left;
  }
}

@media print {
  body {
    background: #fff;
  }

  .liquid,
  .site-header,
  .mini-card,
  .site-footer {
    display: none;
  }

  .layout {
    display: block;
    width: 100%;
    margin: 0;
  }

  .identity-card,
  .publication-card,
  .service-card,
  .entry-card {
    box-shadow: none;
    break-inside: avoid;
  }
}
