/* Custom scrollbar for Webkit */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Header scroll state */
header {
  transition: all 0.3s ease;
}

header.scrolled {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: #e2e8f0;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

header:not(.scrolled) {
  background-color: transparent;
  border-bottom-color: transparent;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

/* Active nav link */
nav a.active {
  color: #2563eb;
}

/* Publication card hover */
.pub-card {
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.pub-card:hover {
  background-color: #f8fafc;
  border-color: #f1f5f9;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

/* Teaser image hover */
.pub-card:hover .teaser-image {
  transform: translateY(-4px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.teaser-image {
  transition: all 0.3s ease;
}

/* Link underline animation */
.link-animated {
  position: relative;
}

.link-animated::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background-color: #2563eb;
  transition: width 0.3s ease;
}

.link-animated:hover::after {
  width: 100%;
}

/* Gallery image hover */
.gallery-item img {
  transition: transform 0.7s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item .overlay {
  transition: opacity 0.3s ease;
}

/* Section title gradient bar */
.section-title-bar {
  background: linear-gradient(to right, #2563eb, #6366f1);
}

/* Waving emoji animation */
@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(20deg); }
  75% { transform: rotate(-10deg); }
}

.wave-emoji {
  display: inline-block;
  animation: wave 2s ease-in-out infinite;
  transform-origin: 70% 70%;
}

/* Details/Summary styling */
details summary {
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

/* Smooth animations for details */
details[open] .details-content {
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tag colors */
.tag-ccf-a {
  background-color: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.tag-ccf-b {
  background-color: #f8fafc;
  color: #475569;
  border-color: #e2e8f0;
}

.tag-oral {
  background-color: #faf5ff;
  color: #7c3aed;
  border-color: #e9d5ff;
}

.tag-accept {
  background-color: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.tag-tsinghua-a {
  background-color: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.tag-default {
  background-color: #f8fafc;
  color: #475569;
  border-color: #e2e8f0;
}

/* Button hover effects */
.btn-primary {
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: scale(0.98);
}

.btn-primary:active {
  transform: scale(0.95);
}

/* Profile image hover */
.profile-image {
  transition: transform 0.5s ease;
}

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

/* Green dot pulse */
.green-dot {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
/* Enhanced tagline styling with tech feel */
.tech-tagline {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
  letter-spacing: 0.5px;
  position: relative;
}

.tech-tagline::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
  background-size: 200% 100%;
  animation: gradientShift 3s ease-in-out infinite;
  border-radius: 1px;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Alternative tech tagline with glow effect */
.tech-tagline-glow {
  color: #1e293b;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
  position: relative;
}

.tech-tagline-glow::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  z-index: -1;
}

/* Futuristic font styling */
.futuristic-text {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #db2777 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientMove 4s ease-in-out infinite;
}

@keyframes gradientMove {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Subtle tech accent */
.tech-accent {
  position: relative;
  display: inline-block;
}

.tech-accent::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #667eea, transparent);
  animation: techPulse 2s ease-in-out infinite;
}

@keyframes techPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
/* Bio link styling - highlighted and attractive */
.bio-link {
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  position: relative;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.1));
  border: 1px solid rgba(37, 99, 235, 0.2);
  transition: all 0.3s ease;
}

.bio-link:hover {
  color: #1d4ed8;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(124, 58, 237, 0.15));
  border-color: rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.bio-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 6px;
  right: 6px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #2563eb, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bio-link:hover::after {
  opacity: 1;
}

/* Alternative bio link style with glow effect */
.bio-link-glow {
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  padding: 2px 4px;
  border-radius: 3px;
  transition: all 0.3s ease;
  text-shadow: 0 0 0 transparent;
}

.bio-link-glow:hover {
  color: #1d4ed8;
  text-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
  background: rgba(37, 99, 235, 0.1);
}
/* Highlights section styling for better readability */
.highlights-box {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-left: 4px solid #0ea5e9;
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

.highlights-box p {
  margin: 0;
  line-height: 1.6;
  color: #0f172a;
}

.highlights-box ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.highlights-box li {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: #1e293b;
  font-weight: 500;
}

.highlights-box li::before {
  content: '✨';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1rem;
}

/* Alternative bullet style */
.highlights-bullet li::before {
  content: '▶';
  color: #0ea5e9;
  font-weight: bold;
}

/* Tech-style highlights */
.highlights-tech {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #e2e8f0;
  border-left: 4px solid #3b82f6;
}

.highlights-tech li {
  color: #e2e8f0;
}

.highlights-tech li::before {
  content: '⚡';
}
/* News section styling */
.news-content {
  line-height: 1.6;
  font-size: inherit;
  font-weight: inherit;
}

/* Achievement badges styling - unified yellow theme */
.achievement-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border: 1px solid #f59e0b;
  box-shadow: 0 1px 2px rgba(245, 158, 11, 0.2);
}

.achievement-direct-accept {
  /* Uses the same yellow styling as base achievement-badge */
}

.achievement-oral {
  /* Uses the same yellow styling as base achievement-badge */
}

/* News item hover effect */
.news-item {
  transition: all 0.2s ease;
  padding: 0.5rem;
  border-radius: 8px;
  margin: -0.5rem;
}

.news-item:hover {
  background-color: #f8fafc;
  transform: translateX(4px);
}
/* Research collaboration note styling */
.collaboration-note {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-left: 4px solid #3b82f6;
  border-radius: 0 8px 8px 0;
  padding: 1rem;
  margin: 1rem 0;
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.1);
}

.collaboration-note .note-icon {
  font-size: 1.25rem;
  margin-right: 0.5rem;
}

.collaboration-note .main-text {
  font-weight: 500;
  color: #1e40af;
  line-height: 1.5;
}

.collaboration-note .sub-text {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.25rem;
  font-style: italic;
}

/* Hover effect for the collaboration note */
.collaboration-note:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.15);
  transition: all 0.2s ease;
}
/* Subsection title styling for Selected Publications */
.section-subtitle-bar {
  background: linear-gradient(to right, #64748b, #94a3b8);
}

/* Subsection styling */
section h3 {
  position: relative;
}

/* Add subtle indentation for subsections */
.subsection-content {
  margin-left: 1rem;
}

/* Responsive adjustments for subsection titles */
@media (max-width: 768px) {
  section h3 {
    margin-left: 0.5rem;
  }
}
/* Section collapsible functionality */
section details {
  margin: 0;
}

section details summary {
  list-style: none;
  outline: none;
  transition: all 0.2s ease;
}

section details summary::-webkit-details-marker {
  display: none;
}

section details summary:hover {
  color: #2563eb;
}

section details summary svg {
  color: #64748b;
  transition: all 0.3s ease;
}

section details summary:hover svg {
  color: #2563eb;
}

/* Collapsible content animation */
section details .details-content {
  animation: slideDown 0.3s ease-out;
  overflow: hidden;
}

section details:not([open]) .details-content {
  animation: slideUp 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 1000px;
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateY(0);
    max-height: 1000px;
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
  }
}

/* Different arrow sizes for different levels */
section details.group summary svg {
  flex-shrink: 0;
}

/* Primary section arrows (larger) */
section > details.group > summary > svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Secondary section arrows (smaller) */
section details.group summary svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Hover effects for collapsible sections */
section details summary {
  border-radius: 8px;
  padding: 4px;
  margin: -4px;
}

section details summary:hover {
  background-color: rgba(59, 130, 246, 0.05);
}

/* Ensure proper spacing when collapsed */
section details:not([open]) {
  margin-bottom: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  section details summary {
    padding: 2px;
    margin: -2px;
  }
}
/* Publication venue badges - tech style */
.venue-rank-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 4px;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff;
  border: 1px solid #991b1b;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.3);
  position: relative;
  overflow: hidden;
}

.venue-rank-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.venue-rank-badge:hover::before {
  left: 100%;
}

.venue-short-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  border-radius: 4px;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  color: #ffffff;
  border: 1px solid #4f46e5;
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3);
}

/* Hover effects for venue badges */
.venue-rank-badge:hover,
.venue-short-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

/* Updated tag styles for consistency */
.tag-oral {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border-color: #f59e0b;
}

.tag-accept {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border-color: #f59e0b;
}
/* TLDR styling - hide preview when expanded */
.tldr-details summary {
  list-style: none;
}

.tldr-details summary::-webkit-details-marker {
  display: none;
}

/* Preview is visible by default */
.tldr-details .tldr-preview {
  display: inline;
}

/* Hide preview when details is open */
.tldr-details[open] .tldr-preview {
  display: none;
}

/* Full text is hidden by default */
.tldr-full {
  display: none !important;
}

/* Show full text only when open */
.tldr-details[open] .tldr-full {
  display: block !important;
  animation: fadeIn 0.2s ease-out;
}

/* Ensure single line for preview */
.tldr-details:not([open]) summary {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.tldr-details[open] summary {
  white-space: normal;
  overflow: visible;
}
/* Award Highlight - Eye-catching and cool styling */
.award-highlight {
  margin-top: 0.5rem;
}

.award-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4), 0 0 20px rgba(251, 191, 36, 0.2);
  position: relative;
  overflow: hidden;
  animation: awardPulse 2s ease-in-out infinite;
}

.award-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: awardShine 3s ease-in-out infinite;
}

.award-badge svg {
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5));
  animation: starTwinkle 1.5s ease-in-out infinite;
}

.award-text {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Award badge hover effect */
.award-badge:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5), 0 0 30px rgba(251, 191, 36, 0.3);
  transition: all 0.3s ease;
}

/* Animations */
@keyframes awardPulse {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4), 0 0 20px rgba(251, 191, 36, 0.2);
  }
  50% {
    box-shadow: 0 2px 12px rgba(245, 158, 11, 0.6), 0 0 30px rgba(251, 191, 36, 0.4);
  }
}

@keyframes awardShine {
  0% {
    left: -100%;
  }
  50%, 100% {
    left: 100%;
  }
}

@keyframes starTwinkle {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.1) rotate(10deg);
    opacity: 0.9;
  }
}
/* Publication links with icons */
.pub-link {
  padding: 4px 8px;
  border-radius: 6px;
  background-color: transparent;
  transition: all 0.2s ease;
}

.pub-link:hover {
  background-color: rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.pub-link svg {
  transition: transform 0.2s ease;
}

.pub-link:hover svg {
  transform: scale(1.1);
}
/* Award badge inline - same row as venue badges */
.award-badge-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  border-radius: 4px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.4);
  position: relative;
  overflow: hidden;
  animation: awardPulseInline 2s ease-in-out infinite;
}

.award-badge-inline::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: awardShine 3s ease-in-out infinite;
}

.award-badge-inline svg {
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.5));
}

.award-badge-inline:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.5);
  transition: all 0.2s ease;
}

@keyframes awardPulseInline {
  0%, 100% {
    box-shadow: 0 1px 4px rgba(245, 158, 11, 0.4);
  }
  50% {
    box-shadow: 0 1px 8px rgba(245, 158, 11, 0.6);
  }
}
/* Social links vertical layout under profile photo */
.social-link-vertical {
  width: 100%;
  transition: all 0.2s ease;
}

.social-link-vertical:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-link-vertical svg {
  transition: transform 0.2s ease;
}

.social-link-vertical:hover svg {
  transform: scale(1.1);
}
/* News scrollable container */
.news-scroll-container {
  max-height: 280px;
  overflow-y: auto;
  padding: 1rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
}

/* Custom scrollbar for news container */
.news-scroll-container::-webkit-scrollbar {
  width: 6px;
}

.news-scroll-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.news-scroll-container::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #94a3b8, #64748b);
  border-radius: 3px;
}

.news-scroll-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #64748b, #475569);
}

/* News item row styling */
.news-item-row {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
  transition: background-color 0.2s ease;
}

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

.news-item-row:hover {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  margin: 0 -0.5rem;
  padding: 0.5rem;
}

/* Smaller emoji for news */
.news-item-row .text-sm {
  font-size: 0.875rem;
}

/* Fade effect at bottom to indicate more content */
.news-scroll-container::after {
  content: '';
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(transparent, rgba(241, 245, 249, 0.9));
  pointer-events: none;
  display: block;
  margin-top: -20px;
}


/* HuggingFace link styling - yellow theme */
.pub-link:has(svg + span:contains("HuggingFace")):hover {
  color: #eab308;
}

/* HuggingFace link hover effect */
a.pub-link[href*="huggingface"]:hover {
  color: #eab308 !important;
  background-color: rgba(234, 179, 8, 0.1);
}

a.pub-link[href*="huggingface"]:hover svg {
  color: #eab308;
}
