/* ===================================================================
   Academic Homepage — Refined Minimal Theme v2
   Author: Huanxuan Liao
   =================================================================== */

:root {
  --max-width: 1000px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 400ms;

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #3b82f6;
  --accent-soft: rgba(37, 99, 235, 0.07);
  --accent-badge: #eff6ff;
  --accent-badge-text: #1e40af;

  --secondary: #d97706;
  --secondary-light: #f59e0b;
  --secondary-soft: rgba(217, 119, 6, 0.08);
  --secondary-badge: #fffbeb;
  --secondary-badge-text: #92400e;

  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-card: #ffffff;

  --text: #1a1a2e;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;

  --border: #e5e7eb;
  --border-light: #f3f4f6;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-accent: 0 4px 14px -2px rgba(37, 99, 235, 0.15);

  --navbar-bg: rgba(255, 255, 255, 0.85);
  --navbar-scroll: rgba(255, 255, 255, 0.96);

  --ring: 0 0 0 4px rgba(37, 99, 235, 0.14);
  --ring-dark: 0 0 0 4px rgba(96, 165, 250, 0.16);
  --accent-border: rgba(37, 99, 235, 0.28);
  --accent-stroke: rgba(37, 99, 235, 0.18);
}

[data-theme="dark"] {
  --accent: #60a5fa;
  --accent-hover: #93bbfc;
  --accent-light: #93c5fd;
  --accent-soft: rgba(96, 165, 250, 0.1);
  --accent-badge: rgba(96, 165, 250, 0.12);
  --accent-badge-text: #93c5fd;

  --secondary: #fbbf24;
  --secondary-light: #fcd34d;
  --secondary-soft: rgba(251, 191, 36, 0.1);
  --secondary-badge: rgba(251, 191, 36, 0.12);
  --secondary-badge-text: #fcd34d;

  --bg: #0f1117;
  --bg-alt: #1d2033;
  --bg-card: #181b28;

  --text: #e8ecf1;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --border: #2a2d3e;
  --border-light: #1f2233;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
  --shadow-accent: 0 4px 14px -2px rgba(96, 165, 250, 0.2);

  --navbar-bg: rgba(15, 17, 23, 0.85);
  --navbar-scroll: rgba(15, 17, 23, 0.96);

  --ring: var(--ring-dark);
  --accent-border: rgba(96, 165, 250, 0.32);
  --accent-stroke: rgba(96, 165, 250, 0.22);
}

/* --- Reset & Base --- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--dur-slow) var(--ease), color var(--dur-slow) var(--ease);
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

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

a:hover {
  color: var(--accent-hover);
}

p {
  text-wrap: pretty;
}

main {
  overflow-x: clip;
}

::selection {
  background: var(--accent);
  color: #fff;
}

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

img {
  max-width: 100%;
  height: auto;
}

/* --- Navbar --- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}

.navbar.scrolled {
  background: var(--navbar-scroll);
  box-shadow: var(--shadow-sm);
}

.navbar-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem var(--sp-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
}

.navbar-brand {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.text-gradient {
  color: var(--accent);
}

.navbar-nav {
  display: flex;
  gap: var(--sp-1);
  list-style: none;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-action {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.nav-action:hover,
.nav-dropdown.open .nav-action {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle i {
  font-size: 0.75rem;
  margin-left: 0.4rem;
  opacity: 0.8;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  padding: 0.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}

.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.nav-dropdown-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0.35rem 0.4rem;
}

/* --- Theme Toggle --- */

.theme-toggle {
  position: fixed;
  top: var(--sp-2);
  right: var(--sp-6);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-base) var(--ease);
  z-index: 1001;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .theme-toggle {
  color: var(--secondary);
}

.theme-toggle:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
  transform: rotate(15deg);
  box-shadow: var(--shadow-accent);
}

[data-theme="dark"] .theme-toggle:hover {
  background: var(--secondary-soft);
  color: var(--secondary);
  border-color: var(--secondary);
}

.theme-toggle:active {
  transform: scale(0.9) rotate(15deg);
}

.theme-toggle i {
  font-size: 0.95rem;
}

.theme-toggle .sun-icon {
  display: block;
}

.theme-toggle .moon-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: block;
}

/* --- Profile / Hero --- */

.profile-section {
  padding: var(--sp-16) var(--sp-6) var(--sp-12);
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}

.profile-section::before {
  content: "";
  position: absolute;
  inset: -40px -24px auto -24px;
  height: 420px;
  border-radius: 28px;
  background:
    radial-gradient(1200px 420px at 10% 10%, rgba(37, 99, 235, 0.12), transparent 60%),
    radial-gradient(900px 360px at 80% 10%, rgba(217, 119, 6, 0.10), transparent 55%);
  pointer-events: none;
  z-index: -1;
}

.profile-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--sp-8);
  align-items: start;
}

.profile-image-wrapper {
  width: 180px;
  height: 180px;
  justify-self: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  filter:
    drop-shadow(0 18px 36px rgba(37, 99, 235, 0.14)) drop-shadow(0 10px 22px rgba(217, 119, 6, 0.10));
  transition: transform var(--dur-slow) var(--ease), filter var(--dur-slow) var(--ease), border-color var(--dur-fast) var(--ease);
}

.profile-image-wrapper:hover {
  border-color: rgba(37, 99, 235, 0.22);
  transform: translateY(-1px);
  filter:
    drop-shadow(0 22px 44px rgba(37, 99, 235, 0.16)) drop-shadow(0 12px 28px rgba(217, 119, 6, 0.12));
}

.profile-image-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120px 120px at 18% 18%, rgba(255, 255, 255, 0.22), transparent 55%),
    radial-gradient(140px 140px at 80% 10%, rgba(37, 99, 235, 0.10), transparent 60%);
  pointer-events: none;
}

[data-theme="dark"] .profile-image-wrapper {
  filter:
    drop-shadow(0 18px 36px rgba(96, 165, 250, 0.14)) drop-shadow(0 10px 22px rgba(251, 191, 36, 0.10));
}

[data-theme="dark"] .profile-image-wrapper:hover {
  border-color: rgba(96, 165, 250, 0.26);
  filter:
    drop-shadow(0 22px 44px rgba(96, 165, 250, 0.16)) drop-shadow(0 12px 28px rgba(251, 191, 36, 0.12));
}

.profile-image-ring {
  display: none;
}

.profile-image {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: none;
  transition: transform var(--dur-slow) var(--ease);
}

.profile-image-wrapper:hover .profile-image {
  transform: scale(1.04);
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.profile-name {
  font-size: 2.125rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.025em;
  margin-bottom: var(--sp-1);
}

.profile-title {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--sp-4);
  line-height: 1.55;
}

.profile-title a {
  font-weight: 600;
  border-bottom: 1px dashed var(--accent);
  transition: border-color var(--dur-fast) var(--ease);
}

.profile-title a:hover {
  border-bottom-style: solid;
}

.profile-bio {
  color: var(--text-secondary);
  margin-bottom: var(--sp-3);
  line-height: 1.75;
  font-size: 0.9375rem;
}

.profile-bio a {
  font-weight: 600;
}

.interest-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  list-style: none;
  margin-bottom: var(--sp-3);
}

.interest-list li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.interest-list li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.interest-highlight {
  color: var(--text);
  font-weight: 600;
  background: var(--accent-soft);
  padding: 1px 6px;
  border-radius: 4px;
  cursor: default;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.interest-highlight:hover {
  background: var(--accent);
  color: #fff;
}

.inline-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 3px;
  border-radius: 3px;
}

.profile-email {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: var(--sp-2) 0 var(--sp-4);
}

.profile-email i {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.profile-email a {
  font-weight: 500;
}

.profile-email a:hover {
  text-decoration: underline;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-4);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  background: var(--bg-card);
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--accent-border);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  box-shadow: var(--shadow-sm), var(--ring);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-secondary {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}

.btn-secondary:hover {
  background: rgba(37, 99, 235, 0.14);
}

[data-theme="dark"] .btn-secondary:hover {
  background: rgba(96, 165, 250, 0.16);
}

.btn-ghost {
  background: transparent;
  box-shadow: none;
}

.btn-ghost:hover {
  background: var(--bg-alt);
  box-shadow: none;
  border-color: var(--border);
}

.social-links {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  transition: all var(--dur-base) var(--ease-spring);
  will-change: transform;
}

.social-link:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-accent);
}

.social-link i {
  font-size: 1.7rem;
}

.ai-2x,
.fa-2x {
  font-size: 2em;
}

.ai-4x,
.fa-4x {
  font-size: 1.45rem;
}

/* --- Content Sections --- */

.content-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-6) var(--sp-10);
}

.content-section+.content-section {
  padding-top: 0;
}

.section-card {
  padding: var(--sp-8);
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}

.section-card:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  box-shadow: var(--shadow-xs);
}

.section-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border);
}

.section-title i {
  font-size: 1.1rem;
  color: var(--accent);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.section-title i {
  box-shadow: inset 0 0 0 1px var(--accent-stroke);
}

/* --- Timeline --- */

.timeline {
  position: relative;
  padding-left: var(--sp-8);
  border-left: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--sp-8);
  padding-left: var(--sp-3);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: calc(-1 * var(--sp-8) - var(--sp-3) - 5px);
  top: 0.35rem;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 0 2px var(--accent);
  transition: box-shadow var(--dur-base) var(--ease);
}

.timeline-item:hover .timeline-marker {
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 6px var(--accent-soft);
}

.timeline-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: var(--sp-2);
  color: var(--text);
}

.timeline-org {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.timeline-org a {
  font-weight: 500;
}

.timeline-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-feature-settings: "tnum";
  margin-left: auto;
  background: var(--bg-alt);
  padding: 0.2rem 0.625rem;
  border-radius: var(--radius-full);
  font-weight: 500;
}

.timeline-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: var(--sp-2);
  padding-left: var(--sp-4);
  border-left: 2px solid var(--accent-soft);
}

.school-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  margin-right: var(--sp-1);
  opacity: 0.8;
}

/* --- News --- */

.news-list {
  list-style: none;
}

.news-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-2);
  border-bottom: 1px solid var(--border-light);
  align-items: baseline;
  border-radius: var(--radius-md);
  transition: background var(--dur-fast) var(--ease);
}

.news-item:hover {
  background: var(--accent-soft);
}

.news-item:last-child {
  border-bottom: none;
}

.news-date {
  font-size: 0.8125rem;
  color: var(--accent);
  font-weight: 600;
  font-feature-settings: "tnum";
  white-space: nowrap;
}

.news-content {
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.6;
}

.news-content a {
  font-weight: 600;
}

.news-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--secondary-badge);
  color: var(--secondary-badge-text);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: var(--sp-1);
  vertical-align: middle;
}

/* --- Publications --- */

.section-description {
  margin-bottom: var(--sp-6);
}

.google-scholar-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 500;
  font-size: 0.9rem;
}

.citation-info {
  margin-left: var(--sp-3);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.search-controls {
  margin-bottom: var(--sp-6);
}

.search-box {
  position: relative;
  margin-bottom: var(--sp-4);
  max-width: 480px;
}

.search-input {
  width: 100%;
  padding: 0.55rem 0.875rem 0.55rem 2.25rem;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-box i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.filter-controls {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.4rem 0.875rem;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: var(--font-sans);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
  position: relative;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
}

.filter-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}

.publication-category {
  margin-bottom: var(--sp-8);
}

.publication-category:last-child {
  margin-bottom: 0;
}

.category-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--border-light);
}

.publication-list {
  list-style: none;
}

.publication-item {
  padding: var(--sp-4);
  border-bottom: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  border-left: 3px solid transparent;
  transition: background var(--dur-fast) var(--ease),
    border-color var(--dur-base) var(--ease),
    transform var(--dur-fast) var(--ease);
}

.publication-item:hover {
  background: var(--bg-alt);
  border-left-color: var(--accent);
  transform: translateX(4px);
}

.publication-item:last-child {
  border-bottom: none;
}

.publication-title {
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--sp-1);
  line-height: 1.45;
}

.publication-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}

.publication-title a:hover {
  color: var(--accent);
}

.publication-authors {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: var(--sp-1);
  line-height: 1.5;
}

.publication-authors strong {
  color: var(--accent);
  font-weight: 600;
}

.publication-venue {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
}

.venue-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  background: var(--accent-badge);
  color: var(--accent-badge-text);
  font-weight: 700;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.01em;
}

.year-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  background: var(--secondary-soft);
  color: var(--secondary);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.publication-links {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 0.35rem 0.75rem;
  background: var(--bg-alt);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease);
}

.pub-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.pub-link i {
  font-size: 1.0rem;
}

.publication-abstract {
  margin-top: var(--sp-3);
  padding: var(--sp-4);
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent);
  font-size: 0.875rem;
  animation: abstractReveal 0.3s var(--ease-out);
}

@keyframes abstractReveal {
  from {
    opacity: 0;
    max-height: 0;
    padding: 0 var(--sp-4);
    margin-top: 0;
  }

  to {
    opacity: 1;
    max-height: 600px;
  }
}

.publication-abstract p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--sp-3);
}

.publication-abstract p:last-child {
  margin-bottom: 0;
}

.keywords {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-top: var(--sp-3);
}

.keywords strong {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.keyword-tag {
  padding: 0.15rem 0.5rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  transition: all var(--dur-fast) var(--ease);
}

.keyword-tag:hover {
  background: var(--accent);
  color: #fff;
}

/* --- Awards --- */

.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-8);
}

.award-category h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
}

.award-list {
  list-style: none;
}

.award-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-2);
  border-bottom: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.award-item:hover {
  background: var(--secondary-soft);
  transform: translateX(4px);
}

.award-item:last-child {
  border-bottom: none;
}

.award-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary-soft);
  border-radius: var(--radius-md);
  color: var(--secondary);
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: transform var(--dur-base) var(--ease-spring), box-shadow var(--dur-base) var(--ease);
}

.award-item:hover .award-icon {
  transform: scale(1.1);
  box-shadow: 0 0 0 4px var(--secondary-soft);
}

.award-content {
  flex: 1;
}

.award-title {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.award-org {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: inline;
}

.award-org::before {
  content: "·";
  margin: 0 var(--sp-2);
  color: var(--text-muted);
}

.award-description {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- Services --- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-6);
}

.service-item {
  padding: var(--sp-5);
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all var(--dur-base) var(--ease);
}

.service-item:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.service-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: var(--sp-3);
  transition: transform var(--dur-base) var(--ease-spring);
}

.service-item:hover .service-icon {
  transform: scale(1.08) rotate(-3deg);
}

.service-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--border);
}

.service-item ul {
  list-style: none;
}

.service-item li {
  padding: 0.375rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding-left: 1.25rem;
  position: relative;
}

.service-item li::before {
  content: "›";
  color: var(--accent);
  position: absolute;
  left: 0;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1;
  top: 0.45rem;
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  border: 1px solid var(--border);
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-md);
  margin-top: var(--sp-2);
  background: var(--bg-card);
  font-size: 0.875rem;
  transition: all var(--dur-fast) var(--ease);
}

.github-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.github-link.no-underline::after,
.github-link.no-underline:hover::after {
  display: none !important;
}

.star-count {
  margin-left: var(--sp-1);
  color: var(--secondary);
  font-weight: 600;
  font-size: 0.8125rem;
}

.contribution-list {
  list-style: none;
  margin-top: var(--sp-2);
}

.contribution-list li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: 0.375rem 0;
  padding-left: 0;
  border-bottom: 1px solid var(--border-light);
}

.contribution-list li::before {
  display: none;
}

.contribution-list li:last-child {
  border-bottom: none;
}

.badge-new {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  background: var(--secondary-badge);
  color: var(--secondary-badge-text);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* --- Footer --- */

.footer-wave {
  display: none;
}

.footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-8) 0;
  margin-top: var(--sp-12);
  text-align: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: var(--sp-2);
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--sp-4);
  margin-top: var(--sp-2);
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color var(--dur-fast) var(--ease);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links span {
  color: var(--border);
}

/* --- Mobile --- */

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text);
  cursor: pointer;
  padding: var(--sp-2);
}

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-4);
  box-shadow: var(--shadow-md);
}

.mobile-nav.active {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.mobile-nav-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--sp-2) var(--sp-2) 0;
}

.mobile-nav-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--border-light);
}

/* --- Animations --- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal.active .timeline-item,
.reveal.active .news-item,
.reveal.active .award-item,
.reveal.active .service-item,
.reveal.active .publication-item {
  animation: staggerFadeIn 0.5s var(--ease-out) backwards;
}

.reveal.active .timeline-item:nth-child(1),
.reveal.active .news-item:nth-child(1),
.reveal.active .award-item:nth-child(1),
.reveal.active .publication-item:nth-child(1) {
  animation-delay: 0ms;
}

.reveal.active .timeline-item:nth-child(2),
.reveal.active .news-item:nth-child(2),
.reveal.active .award-item:nth-child(2),
.reveal.active .publication-item:nth-child(2) {
  animation-delay: 60ms;
}

.reveal.active .timeline-item:nth-child(3),
.reveal.active .news-item:nth-child(3),
.reveal.active .award-item:nth-child(3),
.reveal.active .publication-item:nth-child(3) {
  animation-delay: 120ms;
}

.reveal.active .timeline-item:nth-child(4),
.reveal.active .news-item:nth-child(4),
.reveal.active .award-item:nth-child(4),
.reveal.active .publication-item:nth-child(4) {
  animation-delay: 180ms;
}

.reveal.active .timeline-item:nth-child(5),
.reveal.active .news-item:nth-child(5),
.reveal.active .award-item:nth-child(5),
.reveal.active .publication-item:nth-child(5) {
  animation-delay: 240ms;
}

.reveal.active .timeline-item:nth-child(6),
.reveal.active .news-item:nth-child(6),
.reveal.active .award-item:nth-child(6),
.reveal.active .publication-item:nth-child(6) {
  animation-delay: 300ms;
}

.reveal.active .timeline-item:nth-child(7),
.reveal.active .news-item:nth-child(7),
.reveal.active .award-item:nth-child(7),
.reveal.active .publication-item:nth-child(7) {
  animation-delay: 360ms;
}

.reveal.active .timeline-item:nth-child(8),
.reveal.active .news-item:nth-child(8),
.reveal.active .award-item:nth-child(8),
.reveal.active .publication-item:nth-child(8) {
  animation-delay: 420ms;
}

.reveal.active .timeline-item:nth-child(n+9),
.reveal.active .news-item:nth-child(n+9),
.reveal.active .award-item:nth-child(n+9),
.reveal.active .publication-item:nth-child(n+9) {
  animation-delay: 480ms;
}

.reveal.active .service-item:nth-child(1) {
  animation-delay: 0ms;
}

.reveal.active .service-item:nth-child(2) {
  animation-delay: 80ms;
}

.reveal.active .service-item:nth-child(3) {
  animation-delay: 160ms;
}

.reveal.active .service-item:nth-child(4) {
  animation-delay: 240ms;
}

.reveal.active .service-item:nth-child(n+5) {
  animation-delay: 320ms;
}

@keyframes staggerFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s var(--ease) forwards;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-slide-in {
  animation: slideInLeft 0.5s var(--ease) forwards;
}

.page-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 10000;
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.12);
  transform: scale(0);
  animation: ripple 0.5s ease-out forwards;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .page-loader {
    display: none !important;
  }
}

/* --- Scrollbar --- */

* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* --- Cursor --- */

.social-link,
.filter-btn,
.pub-link,
.keyword-tag,
.theme-toggle,
.mobile-menu-toggle,
.interest-highlight,
.news-item a,
.award-item,
.service-item {
  cursor: pointer;
}

/* --- Responsive --- */

@media (max-width: 768px) {
  :root {
    --max-width: 100%;
  }

  .navbar-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .profile-section {
    padding: var(--sp-8) var(--sp-4);
  }

  .profile-card {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--sp-5);
  }

  .profile-image-wrapper {
    width: 140px;
    height: 140px;
    margin: 0 auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .nav-dropdown-menu {
    display: none;
  }


  .profile-name {
    font-size: 1.75rem;
  }

  .profile-title {
    font-size: 0.95rem;
  }

  .social-links,
  .profile-email {
    justify-content: center;
  }

  .theme-toggle {
    top: 0.75rem;
    right: 0.75rem;
  }

  .content-section {
    padding: var(--sp-4) var(--sp-4) var(--sp-8);
  }

  .section-card {
    padding: var(--sp-5);
  }

  .timeline {
    padding-left: var(--sp-6);
  }

  .timeline-marker {
    left: calc(-1 * var(--sp-6) - 4px);
    width: 8px;
    height: 8px;
  }

  .news-item {
    grid-template-columns: 1fr;
    gap: var(--sp-1);
  }

  .news-date {
    display: inline-block;
  }

  .awards-grid,
  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-5);
  }

  .interest-list {
    justify-content: center;
  }

  .section-card:hover {
    box-shadow: var(--shadow-xs);
  }

  .service-item:hover {
    transform: none;
  }

  .publication-item:hover {
    transform: none;
  }

  .award-item:hover {
    transform: none;
  }
}

@media (max-width: 480px) {
  .profile-name {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.125rem;
  }

  .pub-link {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }

  .pub-link i {
    font-size: 0.9rem;
  }
}

/* --- Print --- */

@media print {
  :root {
    --text: #000;
    --text-secondary: #333;
    --border: #ccc;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
    line-height: 1.5;
  }

  .navbar,
  .theme-toggle,
  .footer,
  .footer-wave,
  .mobile-menu-toggle,
  .search-controls,
  .social-links,
  #services,
  .page-loader {
    display: none !important;
  }

  .content-section {
    padding: 0 !important;
  }

  .section-card {
    margin-bottom: 1.5rem !important;
    border: none;
    box-shadow: none;
  }

  .profile-section {
    padding: 0 !important;
  }

  .profile-card {
    display: block;
  }

  .profile-image-wrapper {
    display: none;
  }

  .profile-name {
    font-size: 20pt;
  }

  .profile-title {
    font-size: 11pt;
  }

  .profile-bio {
    font-size: 10pt;
  }

  a {
    color: #000 !important;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #666;
  }

  .pub-link::after {
    display: none !important;
  }
}