/* ========================================================
   Tianyang Han - Academic Personal Website
   Design System: Apple-Inspired Premium
   Typography: SF Pro Display / System UI
   ======================================================== */

/* --- CSS Custom Properties (Light Mode) --- */
:root {
  /* Apple Color Palette - Light (warm, subtle tones) */
  --color-background: #fbfbfd;
  --color-background-alt: #f5f5f7;
  --color-surface: #ffffff;
  --color-surface-elevated: #ffffff;
  --color-text-primary: #1d1d1f;
  --color-text-secondary: #86868b;
  --color-text-tertiary: #a1a1a6;
  --color-accent: #0071e3;
  --color-accent-hover: #0077ed;
  --color-accent-light: rgba(0, 113, 227, 0.08);
  --color-border: rgba(0, 0, 0, 0.06);
  --color-border-light: rgba(0, 0, 0, 0.04);

  /* Gradient Text */
  --gradient-hero: linear-gradient(135deg, #1d1d1f 0%, #434343 40%, #0071e3 100%);

  /* Shadows - Softer, more diffused Apple-style */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.03);
  --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-nav: 0 0.5px 0 rgba(0, 0, 0, 0.08);
  --shadow-elevated: 0 20px 60px rgba(0, 0, 0, 0.1), 0 8px 20px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(0, 113, 227, 0.15);

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-bg-heavy: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(255, 255, 255, 0.5);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-pill: 999px;

  /* Typography */
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'SF Mono', SFMono-Regular, ui-monospace, Menlo, Monaco, monospace;

  /* Spacing */
  --section-padding: 120px;
  --section-padding-bottom: 100px;
  --container-max: 980px;
  --container-hero-max: 1200px;
  --container-padding: 24px;

  /* Transitions - Apple spring-like easing */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-apple: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.35s;
  --duration-slow: 0.6s;
  --duration-reveal: 0.8s;

  /* Venue badge colors */
  --badge-eccv: #1d7d5c;
  --badge-eccv-bg: #e8f5f0;
  --badge-emnlp: #6b4fbb;
  --badge-emnlp-bg: #f3f0fa;
  --badge-colm: #c05621;
  --badge-colm-bg: #fef4eb;
  --badge-iclr: #0891b2;
  --badge-iclr-bg: #ecfeff;
  --badge-acl: #7c3aed;
  --badge-acl-bg: #f5f3ff;
  --badge-cvpr: #c2410c;
  --badge-cvpr-bg: #fff7ed;
  --badge-tpami: #0f766e;
  --badge-tpami-bg: #ecfdf5;
  --badge-arxiv: #6b7280;
  --badge-arxiv-bg: #f4f4f5;
  --badge-oral: #dc2626;
  --badge-oral-bg: #fef2f2;
  --badge-first: #0071e3;
  --badge-first-bg: rgba(0, 113, 227, 0.08);
  --badge-equal: #92400e;
  --badge-equal-bg: #fef3c7;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern' 1;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--color-text-secondary);
  background-color: var(--color-background);
  overflow-x: hidden;
}

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

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

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

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

img {
  max-width: 100%;
  display: block;
}

strong {
  font-weight: 600;
  color: var(--color-text-primary);
}

/* --- Layout Containers --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* --- Scroll Reveal Animation (Spring-like) --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--duration-reveal) var(--ease-smooth),
    transform var(--duration-reveal) var(--ease-smooth);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ==========================================
   NAVIGATION - Floating Pill (Apple-inspired)
   ========================================== */
.nav {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0;
  display: flex;
  justify-content: center;
  background: transparent;
  pointer-events: none;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow:
    0 2px 20px rgba(0, 0, 0, 0.08),
    0 0 0 0.5px rgba(0, 0, 0, 0.05);
  pointer-events: auto;
  position: relative;
  transition:
    box-shadow var(--duration-normal) var(--ease-apple),
    background var(--duration-normal) var(--ease-apple);
}

.nav.scrolled .nav-pill {
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.1),
    0 0 0 0.5px rgba(0, 0, 0, 0.06);
}

.nav-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--color-accent);
  letter-spacing: -0.02em;
  padding: 8px 14px;
  border-radius: 999px;
  transition:
    background var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.nav-name:hover {
  color: var(--color-accent);
  background: var(--color-accent-light);
}

.nav-divider {
  width: 1px;
  height: 16px;
  background: var(--color-border);
  margin: 0 4px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 2px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  letter-spacing: -0.008em;
  transition: all 0.2s var(--ease-out);
}

.nav-links a:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--color-text-primary);
}

.nav-links a.active {
  background: var(--color-accent-light);
  color: var(--color-accent);
  font-weight: 600;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 999px;
  transition: background var(--duration-fast) var(--ease-out);
}

.nav-toggle:hover {
  background: rgba(0, 0, 0, 0.04);
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--color-text-primary);
  margin: 4px 0;
  transition:
    transform var(--duration-normal) var(--ease-smooth),
    opacity var(--duration-normal) var(--ease-smooth);
  border-radius: 1px;
}

/* ==========================================
   HERO SECTION - Large, Centered, Gradient Text
   ========================================== */
.hero {
  padding: 160px 0 100px;
  position: relative;
  overflow: hidden;
}

/* Subtle radial gradient background */
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 140%;
  height: 100%;
  background: radial-gradient(
    ellipse 60% 50% at 50% 30%,
    rgba(0, 113, 227, 0.03) 0%,
    rgba(120, 80, 220, 0.015) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  max-width: var(--container-hero-max);
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 32px;
}

.hero-photo-wrapper {
  position: relative;
}

/* Subtle ring / glow around photo */
.hero-photo-wrapper::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.12), rgba(120, 80, 220, 0.08), rgba(0, 113, 227, 0.06));
  z-index: 0;
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-smooth);
}

.hero-photo-wrapper:hover::before {
  opacity: 1;
}

.hero-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, var(--color-surface), #e8e8ed);
  position: relative;
  z-index: 1;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.06),
    0 12px 40px rgba(0, 0, 0, 0.04);
  transition: transform var(--duration-normal) var(--ease-smooth);
}

.hero-photo:hover {
  transform: scale(1.02);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 600;
  color: var(--color-text-tertiary);
  background: linear-gradient(145deg, #f5f5f7, #e8e8ed);
  letter-spacing: -0.03em;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Gradient text on hero name */
.hero-name {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 4px;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-name-cn {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  color: var(--color-text-tertiary);
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}

.hero-tagline {
  font-size: 21px;
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 36px;
  max-width: 600px;
}

.hero-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
  background: var(--color-accent);
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.2);
  transition:
    background var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-spring),
    box-shadow var(--duration-fast) var(--ease-out);
}

.hero-link:hover {
  color: #ffffff;
  background: var(--color-accent-hover);
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(0, 113, 227, 0.3);
}

.hero-link:first-child {
  background: var(--color-text-primary);
  box-shadow: 0 2px 8px rgba(29, 29, 31, 0.15);
}

.hero-link:first-child:hover {
  background: #333336;
  box-shadow: 0 4px 16px rgba(29, 29, 31, 0.25);
}

.hero-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Hero decorative glow */
.hero-glow {
  position: absolute;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 113, 227, 0.04) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

/* ==========================================
   SECTION COMMON - Generous Whitespace
   ========================================== */
.section {
  padding: var(--section-padding) 0 var(--section-padding-bottom);
  position: relative;
}

/* Alternating subtle backgrounds */
#interests {
  background: var(--color-background-alt);
}

#experience {
  background: var(--color-background-alt);
}

/* Very subtle gradient overlays for depth */
.section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--color-border) 20%,
    var(--color-border) 80%,
    transparent 100%
  );
  opacity: 0;
  pointer-events: none;
}

#interests::after,
#experience::after {
  opacity: 1;
}

.section-header {
  margin-bottom: 56px;
  text-align: center;
}

.section-title {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.035em;
  line-height: 1.08;
}


/* ==========================================
   NEWS SECTION - Refined & Clean
   ========================================== */
.news-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 740px;
  margin: 0 auto;
}

.news-item {
  display: flex;
  gap: 28px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--color-border-light);
  transition: background var(--duration-fast) var(--ease-out);
}

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

.news-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 70px;
  letter-spacing: -0.02em;
}

.news-text {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

.news-text strong {
  font-weight: 600;
  color: var(--color-text-primary);
}

.news-highlight {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 8px;
}

.news-highlight--oral {
  background: var(--badge-oral-bg);
  color: var(--badge-oral);
}

.news-highlight--new {
  background: var(--badge-first-bg);
  color: var(--badge-first);
}

/* ==========================================
   RESEARCH INTERESTS - Glass Morphism Pills
   ========================================== */
.interests-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.interest-tag {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-primary);
  background: var(--glass-bg-heavy);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  transition:
    background var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-spring),
    box-shadow var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.interest-tag:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-3px) scale(1.01);
  box-shadow: var(--shadow-card);
  border-color: rgba(0, 113, 227, 0.15);
}

/* ==========================================
   PUBLICATIONS - Apple Product-Style Cards
   ========================================== */
.pub-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
}

.pub-card {
  position: relative;
  padding: 32px 36px;
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition:
    transform var(--duration-normal) var(--ease-smooth),
    box-shadow var(--duration-normal) var(--ease-smooth),
    border-color var(--duration-normal) var(--ease-smooth);
}

.pub-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: transparent;
}

/* Gradient border effect on hover */
.pub-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius-xl) + 1px);
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.2), rgba(120, 80, 220, 0.1), rgba(0, 113, 227, 0.05));
  z-index: -1;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-smooth);
}

.pub-card:hover::before {
  opacity: 1;
}

.pub-card--first-author {
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.03) 0%, var(--color-surface) 100%);
  border-color: rgba(0, 113, 227, 0.1);
}

.pub-card--first-author:hover {
  border-color: transparent;
}

.pub-card--first-author::before {
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.25), rgba(120, 80, 220, 0.15), rgba(0, 200, 200, 0.08));
}


.pub-venues {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.pub-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.pub-badge--eccv {
  background: var(--badge-eccv-bg);
  color: var(--badge-eccv);
}

.pub-badge--oral {
  background: var(--badge-oral-bg);
  color: var(--badge-oral);
}

.pub-badge--emnlp {
  background: var(--badge-emnlp-bg);
  color: var(--badge-emnlp);
}

.pub-badge--colm {
  background: var(--badge-colm-bg);
  color: var(--badge-colm);
}

.pub-badge--arxiv {
  background: var(--badge-arxiv-bg);
  color: var(--badge-arxiv);
}

.pub-badge--iclr {
  background: var(--badge-iclr-bg);
  color: var(--badge-iclr);
}

.pub-badge--acl {
  background: var(--badge-acl-bg);
  color: var(--badge-acl);
}

.pub-badge--cvpr {
  background: var(--badge-cvpr-bg);
  color: var(--badge-cvpr);
}

.pub-badge--tpami {
  background: var(--badge-tpami-bg);
  color: var(--badge-tpami);
}

.pub-badge--first {
  background: var(--badge-first-bg);
  color: var(--badge-first);
}

.pub-badge--equal {
  background: var(--badge-equal-bg);
  color: var(--badge-equal);
}

.pub-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.4;
  margin-bottom: 10px;
  letter-spacing: -0.015em;
}

.pub-authors {
  font-size: 14px;
  color: var(--color-text-tertiary);
  line-height: 1.65;
  margin-bottom: 18px;
}

.pub-authors .me {
  color: var(--color-accent);
  font-weight: 600;
}

.pub-authors .equal-mark {
  font-size: 10px;
  vertical-align: super;
  color: var(--color-text-tertiary);
}

.pub-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Pipeline image */
.pub-pipeline {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  background: var(--color-background-alt);
  border: 1px solid var(--color-border-light);
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-accent);
  background: var(--color-accent-light);
  transition:
    background var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-spring);
}

.pub-link:hover {
  color: #ffffff;
  background: var(--color-accent);
  transform: scale(1.03);
}

.pub-link svg {
  width: 14px;
  height: 14px;
}

/* ==========================================
   EXPERIENCE - Refined Timeline
   ========================================== */
.timeline {
  position: relative;
  max-width: 740px;
  margin: 0 auto;
  padding-left: 36px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: linear-gradient(
    180deg,
    var(--color-border) 0%,
    var(--color-border) 70%,
    transparent 100%
  );
}

.timeline-item {
  position: relative;
  margin-bottom: 44px;
}

.timeline-item > div {
  display: flex;
  align-items: flex-start;
}

.timeline-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  margin-right: 16px;
  flex-shrink: 0;
}

.timeline-item .timeline-org {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.timeline-date {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-text-tertiary);
  letter-spacing: -0.02em;
}

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

.timeline-item::before {
  content: '';
  position: absolute;
  left: -36px;
  top: 8px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--color-background-alt);
  border: 2px solid var(--color-accent);
  z-index: 1;
  transition:
    background var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-spring),
    box-shadow var(--duration-fast) var(--ease-out);
}

.timeline-item:hover::before {
  background: var(--color-accent);
  transform: scale(1.25);
  box-shadow: 0 0 12px rgba(0, 113, 227, 0.3);
}

.timeline-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.timeline-role {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}

.timeline-advisor {
  font-size: 14px;
  color: var(--color-text-tertiary);
  margin-bottom: 12px;
}

.timeline-details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.timeline-details li {
  font-size: 14px;
  color: var(--color-text-secondary);
  padding-left: 20px;
  position: relative;
  line-height: 1.65;
}

.timeline-details li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-text-tertiary);
}

/* ==========================================
   EDUCATION - Frosted Glass Cards
   ========================================== */
.edu-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 740px;
  margin: 0 auto;
}

.edu-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 28px 32px;
  border-radius: var(--radius-xl);
  background: var(--glass-bg-heavy);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  transition:
    transform var(--duration-normal) var(--ease-smooth),
    box-shadow var(--duration-normal) var(--ease-smooth),
    border-color var(--duration-normal) var(--ease-smooth);
}

.edu-item:hover {
  box-shadow: var(--shadow-card);
  border-color: rgba(0, 113, 227, 0.1);
}

.edu-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  margin-right: 20px;
  flex-shrink: 0;
}

.edu-item > div {
  display: flex;
  align-items: flex-start;
}

.edu-school {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.edu-degree {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.edu-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-text-tertiary);
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

/* ==========================================
   FOOTER - Minimal Apple Style
   ========================================== */
.footer {
  padding: 48px 0 36px;
  background: var(--color-background-alt);
  text-align: center;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--color-border) 15%,
    var(--color-border) 85%,
    transparent 100%
  );
}

.footer-text {
  font-size: 12px;
  color: var(--color-text-tertiary);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 14px;
}

.footer-links a {
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 400;
  transition: color var(--duration-fast) var(--ease-out);
}

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

/* ==========================================
   BACK TO TOP - Apple Style
   ========================================== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--glass-bg-heavy);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    all var(--duration-normal) var(--ease-smooth);
  box-shadow: var(--shadow-card);
  z-index: 100;
}

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

.back-to-top:hover {
  color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
  border-color: rgba(0, 113, 227, 0.15);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* ==========================================
   DARK MODE - Apple Dark (Elegant Grays)
   ========================================== */
@media (prefers-color-scheme: dark) {
  :root {
    /* Backgrounds - elegant dark grays, not pure black */
    --color-background: #1d1d1f;
    --color-background-alt: #161617;
    --color-surface: #2c2c2e;
    --color-surface-elevated: #3a3a3c;

    /* Text - high contrast but not harsh */
    --color-text-primary: #f5f5f7;
    --color-text-secondary: #a1a1a6;
    --color-text-tertiary: #86868b;

    /* Accent - Apple's dark mode blue */
    --color-accent: #2997ff;
    --color-accent-hover: #40a9ff;
    --color-accent-light: rgba(41, 151, 255, 0.15);

    /* Borders */
    --color-border: rgba(255, 255, 255, 0.1);
    --color-border-light: rgba(255, 255, 255, 0.06);

    /* Gradient */
    --gradient-hero: linear-gradient(135deg, #f5f5f7 0%, #a1a1a6 40%, #2997ff 100%);

    /* Shadows */
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.2);
    --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-elevated: 0 20px 60px rgba(0, 0, 0, 0.6);

    /* Glass */
    --glass-bg: rgba(44, 44, 46, 0.8);
    --glass-bg-heavy: rgba(58, 58, 60, 0.9);

    /* Badge colors - vibrant for dark */
    --badge-eccv: #34d399;
    --badge-eccv-bg: rgba(52, 211, 153, 0.15);
    --badge-emnlp: #a78bfa;
    --badge-emnlp-bg: rgba(167, 139, 250, 0.15);
    --badge-colm: #fb923c;
    --badge-colm-bg: rgba(251, 146, 60, 0.15);
    --badge-iclr: #22d3ee;
    --badge-iclr-bg: rgba(34, 211, 238, 0.15);
    --badge-acl: #c4b5fd;
    --badge-acl-bg: rgba(196, 181, 253, 0.15);
    --badge-tpami: #5eead4;
    --badge-tpami-bg: rgba(94, 234, 212, 0.15);
    --badge-arxiv: #9ca3af;
    --badge-arxiv-bg: rgba(156, 163, 175, 0.15);
    --badge-oral: #f87171;
    --badge-oral-bg: rgba(248, 113, 113, 0.15);
    --badge-first: #2997ff;
    --badge-first-bg: rgba(41, 151, 255, 0.15);
    --badge-equal: #fbbf24;
    --badge-equal-bg: rgba(251, 191, 36, 0.15);
  }

  /* Hero adjustments */
  .hero::before {
    background: radial-gradient(
      ellipse 60% 50% at 50% 30%,
      rgba(41, 151, 255, 0.08) 0%,
      rgba(120, 80, 220, 0.04) 40%,
      transparent 70%
    );
  }

  .hero-glow {
    background: radial-gradient(
      ellipse at center,
      rgba(41, 151, 255, 0.08) 0%,
      transparent 70%
    );
  }

  .hero-photo {
    background: linear-gradient(145deg, #2c2c2e, #3a3a3c);
  }

  .hero-photo-placeholder {
    background: linear-gradient(145deg, #2c2c2e, #3a3a3c);
  }

  /* Buttons */
  .hero-link:first-child {
    background: #f5f5f7;
    color: #1d1d1f;
  }

  .hero-link:first-child:hover {
    background: #e8e8ed;
  }

  /* Cards */
  .pub-card {
    background: var(--color-surface);
  }

  .pub-card--first-author {
    background: linear-gradient(135deg, rgba(41, 151, 255, 0.06) 0%, var(--color-surface) 100%);
  }

  .pub-link:hover {
    color: #1d1d1f;
  }

  /* Education */
  .edu-item {
    background: var(--glass-bg-heavy);
  }

  /* Timeline */
  .timeline::before {
    background: linear-gradient(180deg, var(--color-border) 0%, transparent 100%);
  }

  .timeline-item::before {
    background: var(--color-background);
  }

  /* Interest tags */
  .interest-tag {
    background: var(--glass-bg-heavy);
  }

  .interest-tag:hover {
    background: rgba(58, 58, 60, 0.95);
  }

  /* Back to top */
  .back-to-top {
    background: var(--glass-bg-heavy);
  }
}

/* ==========================================
   RESPONSIVE - Tablet (768px)
   ========================================== */
@media (max-width: 768px) {
  :root {
    --section-padding: 80px;
    --section-padding-bottom: 64px;
    --container-padding: 20px;
  }

  body {
    font-size: 16px;
  }

  /* Nav - Pill mobile */
  .nav {
    top: 12px;
  }

  .nav-divider {
    display: none;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    flex-direction: column;
    padding: 8px;
    gap: 2px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.05);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    padding: 0;
    border-bottom: none;
  }

  .nav-links a {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 15px;
    color: var(--color-text-primary);
    width: 100%;
  }

  .nav-links a:hover {
    background: rgba(0, 0, 0, 0.04);
  }

  .nav-links a.active {
    background: var(--color-accent-light);
    color: var(--color-accent);
  }

  .nav-toggle {
    display: block;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
  }

  /* Hero */
  .hero {
    padding: 140px 0 80px;
  }

  .hero-photo {
    width: 160px;
    height: 160px;
  }

  .hero-photo-placeholder {
    font-size: 52px;
  }

  .hero-name {
    font-size: 48px;
  }

  .hero-name-cn {
    font-size: 22px;
  }

  .hero-tagline {
    font-size: 18px;
    margin-bottom: 28px;
  }

  .hero-link {
    padding: 12px 22px;
    font-size: 14px;
  }

  /* Sections */
  .section-title {
    font-size: 36px;
  }

  .section-header {
    margin-bottom: 40px;
  }

  /* News */
  .news-item {
    flex-direction: column;
    gap: 4px;
    padding: 16px 0;
  }

  .news-date {
    min-width: auto;
  }

  /* Publications */
  .pub-card {
    padding: 24px 28px;
  }

  .pub-title {
    font-size: 18px;
  }

  .pub-authors {
    font-size: 13px;
  }

  /* Timeline */
  .timeline {
    padding-left: 32px;
  }

  .timeline-item::before {
    left: -32px;
  }

  .timeline-header {
    flex-direction: column;
    gap: 2px;
  }

  .timeline-org {
    font-size: 19px;
  }

  /* Education */
  .edu-item {
    flex-direction: column;
    gap: 8px;
    padding: 24px 28px;
  }

  .edu-date {
    text-align: left;
  }

  .edu-school {
    font-size: 17px;
  }

  /* Back to top */
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}

/* ==========================================
   RESPONSIVE - Mobile (480px)
   ========================================== */
@media (max-width: 480px) {
  :root {
    --container-padding: 16px;
    --section-padding: 64px;
    --section-padding-bottom: 52px;
  }

  .hero {
    padding: 120px 0 64px;
  }

  .hero-photo {
    width: 140px;
    height: 140px;
  }

  .hero-photo-placeholder {
    font-size: 44px;
  }

  .hero-name {
    font-size: 40px;
  }

  .hero-name-cn {
    font-size: 20px;
  }

  .section-title {
    font-size: 32px;
  }

  .section-header {
    margin-bottom: 32px;
  }

  .hero-links {
    flex-direction: column;
    width: 100%;
  }

  .hero-link {
    width: 100%;
    justify-content: center;
  }

  .pub-card {
    padding: 20px 24px;
    border-radius: var(--radius-lg);
  }

  .pub-badge {
    font-size: 11px;
    padding: 3px 10px;
  }

  .interests-grid {
    gap: 10px;
  }

  .interest-tag {
    padding: 10px 18px;
    font-size: 14px;
  }

  .edu-item {
    padding: 20px 24px;
    border-radius: var(--radius-lg);
  }

  .timeline-item {
    margin-bottom: 36px;
  }
}

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

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

/* --- Print Styles --- */
@media print {
  .nav,
  .back-to-top {
    display: none;
  }

  .hero {
    padding-top: 32px;
  }

  .hero::before {
    display: none;
  }

  .hero-name {
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: #000000;
    color: #000000;
  }

  .section {
    padding: 32px 0;
  }

  .pub-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .pub-card::before {
    display: none;
  }

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

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
  }

  .pub-authors .me {
    color: #000;
    font-weight: 700;
  }

  .edu-item,
  .interest-tag {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

}
