/* ============================================
   Cursor Glow Effect
   ============================================ */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  opacity: 0;
  will-change: left, top;
  mix-blend-mode: screen;
}

.cursor-glow.active {
  opacity: 1;
}

@media (max-width: 768px) {
  .cursor-glow {
    display: none;
  }
}

/* ============================================
   CSS Custom Properties & Reset
   ============================================ */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #1f1f35;
  --text-primary: #e8e8f0;
  --text-secondary: #a0a0b8;
  --text-muted: #6b6b80;
  --accent-cyan: #00d4ff;
  --accent-purple: #7b2ff7;
  --accent-pink: #f72fff;
  --gradient-primary: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  --gradient-text: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  --border-subtle: rgba(255, 255, 255, 0.06);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 8px 40px rgba(0, 212, 255, 0.1);
  --font-main: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
  --section-padding: 80px 0;
  --container-width: 1100px;
  --card-radius: 16px;
  --nav-height: 64px;
  --transition-fast: 0.2s ease;
  --transition-medium: 0.4s ease;
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

  --badge-cvpr: #2563eb;
  --badge-iccv: #1d4ed8;
  --badge-eccv: #1e40af;
  --badge-miccai: #059669;
  --badge-tmi: #7c3aed;
  --badge-tcsvt: #6d28d9;
  --badge-media: #8b5cf6;
  --badge-acmmm: #dc2626;
  --badge-aaai: #0891b2;
  --badge-arxiv: #6b7280;
  --badge-neurips: #ea580c;
  --badge-report: #d97706;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

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

a:hover {
  color: #5de8ff;
}

ul {
  list-style: none;
}

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

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============================================
   Navbar
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.6);
  border-bottom: 1px solid transparent;
  z-index: 1000;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.92);
  border-bottom-color: var(--border-subtle);
}

.navbar-inner {
  max-width: var(--container-width);
  width: 100%;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  font-size: 1.3rem;
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-links {
  display: flex;
  gap: 2rem;
}

.navbar-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-medium);
  border-radius: 1px;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--text-primary);
}

.navbar-links a.active::after,
.navbar-links a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(123, 47, 247, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

.hero-text h1 {
  font-family: 'Dancing Script', cursive;
  font-size: 3.8rem;
  font-weight: 700;
  line-height: 1.2;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.hero-text .subtitle {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

.hero-text .affiliation {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.hero-text .research-tags {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.research-tag {
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--accent-cyan);
  background: rgba(0, 212, 255, 0.06);
}

.job-market {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.social-links a:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.3);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.hero-photo {
  position: relative;
}

.hero-photo img {
  width: 220px;
  height: auto;
  object-fit: contain;
  border-radius: 24px;
  border: 2px solid transparent;
  background-origin: border-box;
  background-clip: padding-box, border-box;
  background-image: linear-gradient(var(--bg-primary), var(--bg-primary)), var(--gradient-primary);
}

.hero-photo::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 28px;
  background: var(--gradient-primary);
  opacity: 0.3;
  filter: blur(16px);
  z-index: -1;
}

/* ============================================
   Photo Strip (SnapWidget / Instagram embed)
   ============================================ */
.photo-strip {
  overflow: hidden;
  padding: 2rem 0;
}

.photo-strip-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.photo-strip-container iframe {
  width: 100%;
  height: 200px;
  border: none;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .photo-strip-container iframe {
    height: 160px;
  }
}

/* ============================================
   Section Common
   ============================================ */
.section {
  padding: var(--section-padding);
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* ============================================
   News Section
   ============================================ */
.news-list {
  max-height: 320px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.news-list::-webkit-scrollbar {
  width: 4px;
}

.news-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 2px;
}

.news-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.news-item {
  padding: 0.6rem 0 0.6rem 1rem;
  border-left: 2px solid var(--border-subtle);
  transition: border-color var(--transition-fast);
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.news-item:hover {
  border-left-color: var(--accent-cyan);
}

.news-date {
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 0.85rem;
  margin-right: 0.5rem;
}

/* ============================================
   Biography
   ============================================ */
.bio-content {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.bio-content p {
  margin-bottom: 1rem;
}

.bio-content em {
  color: var(--accent-cyan);
  font-style: normal;
  font-weight: 500;
}

/* ============================================
   Experience Timeline
   ============================================ */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-purple));
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-cyan);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
  z-index: 1;
}

.timeline-item:nth-child(2)::before { background: #3b82f6; box-shadow: 0 0 10px rgba(59, 130, 246, 0.4); }
.timeline-item:nth-child(3)::before { background: #8b5cf6; box-shadow: 0 0 10px rgba(139, 92, 246, 0.4); }
.timeline-item:nth-child(4)::before { background: var(--accent-purple); box-shadow: 0 0 10px rgba(123, 47, 247, 0.4); }

.timeline-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.timeline-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  padding: 2px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
}

.timeline-detail {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.3rem;
}

.timeline-topic {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.2rem;
  font-style: italic;
}

/* ============================================
   Publications
   ============================================ */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pub-card {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  transition: transform var(--transition-medium), box-shadow var(--transition-medium), border-color var(--transition-medium);
}

.pub-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(0, 212, 255, 0.15);
}

.pub-thumb {
  width: 220px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pub-thumb img,
.pub-thumb video {
  width: 100%;
  height: auto;
}

.pub-thumb .placeholder {
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.08);
}

.pub-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pub-info h3 {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
}

.pub-info h3 a {
  color: var(--text-primary);
}

.pub-info h3 a:hover {
  color: var(--accent-cyan);
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

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

.pub-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

.venue-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
}

.venue-badge.iccv { background: var(--badge-iccv); }
.venue-badge.cvpr { background: var(--badge-cvpr); }
.venue-badge.eccv { background: var(--badge-eccv); }
.venue-badge.ijcv { background: var(--badge-tmi); }
.venue-badge.npjdm { background: var(--badge-tmi); }
.venue-badge.miccai { background: var(--badge-miccai); }
.venue-badge.tmi { background: var(--badge-tmi); }
.venue-badge.tcsvt { background: var(--badge-tcsvt); }
.venue-badge.media { background: var(--badge-media); }
.venue-badge.acmmm { background: var(--badge-acmmm); }
.venue-badge.aaai { background: var(--badge-aaai); }
.venue-badge.arxiv { background: var(--badge-arxiv); }
.venue-badge.neurips { background: var(--badge-neurips); }
.venue-badge.report { background: var(--badge-report); }

.pub-note {
  font-size: 0.8rem;
  color: #f87171;
  font-weight: 500;
}

.pub-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}

.pub-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.pub-links a:hover {
  color: var(--accent-cyan);
  border-color: rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.06);
}

.pub-links a i {
  font-size: 0.85rem;
}

.pub-media {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.1rem;
}

.pub-media a {
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.pub-media a:hover {
  color: var(--accent-cyan);
}

/* ============================================
   Activities
   ============================================ */
.activities-subsection {
  margin-bottom: 2rem;
}

.activities-subsection h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.talk-item {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.review-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.review-badge {
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

/* ============================================
   Awards
   ============================================ */
.awards-list li {
  padding: 0.7rem 0 0.7rem 1.5rem;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.awards-list li::before {
  content: '\f091';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.awards-list li strong {
  color: var(--text-primary);
}

.award-highlight {
  color: #fbbf24 !important;
}

.award-highlight::before {
  color: #fbbf24 !important;
}

/* ============================================
   Hobbies
   ============================================ */
.hobbies-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.hobby-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.hobby-tag i {
  font-size: 1.1rem;
  color: var(--accent-cyan);
}

.hobby-link {
  text-decoration: none;
  transition: all var(--transition-fast);
}

.hobby-link:hover {
  border-color: rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.06);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.hobby-link i {
  color: #e1306c;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.footer-maps {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

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

/* ============================================
   Back to Top
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-fast);
  z-index: 999;
  font-size: 1rem;
}

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

.back-to-top:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.3);
  color: var(--accent-cyan);
}

/* ============================================
   Scroll Animations
   ============================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

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

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  :root {
    --section-padding: 60px 0;
  }

  .navbar-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    flex-direction: column;
    background: rgba(10, 10, 15, 0.96);
    backdrop-filter: blur(20px);
    padding: 1rem 2rem 2rem;
    gap: 0.8rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition-medium), opacity var(--transition-medium);
    border-bottom: 1px solid var(--border-subtle);
  }

  .navbar-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .menu-toggle {
    display: flex;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .hero-text .research-tags {
    justify-content: center;
  }

  .hero-text .social-links {
    justify-content: center;
  }

  .hero-text .job-market {
    display: inline-block;
  }

  .hero-photo {
    order: -1;
  }

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

  .hero-text h1 {
    font-size: 2.4rem;
  }

  .pub-card {
    flex-direction: column;
  }

  .pub-thumb {
    width: 100%;
    height: 180px;
  }

  .footer-maps {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

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

  .navbar-inner {
    padding: 0 1rem;
  }
}
