/* Modern Color Palette */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --dark-bg: #0a0e27;
  --light-bg: #f8f9fa;
  --text-primary: #1a1a2e;
  --text-secondary: #6c757d;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.3);
}

body {
  font-family: 'Inter', 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Subtle background pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 1px 1px, rgba(102, 126, 234, 0.03) 1px, transparent 0);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Hero Section Enhancement */
.hero {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.12) 0%, transparent 50%);
  pointer-events: none;
  animation: pulse 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: float 20s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

.hero-body {
  position: relative;
  z-index: 1;
}

.footer .icon-link {
    font-size: 25px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.footer .icon-link:hover {
    color: #667eea;
    transform: translateY(-2px);
}

.link-block a {
    margin-top: 8px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-weight: 500;
    padding: 0.85rem 1.75rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.link-block a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.link-block a::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s;
}

.link-block a:hover::before {
    left: 100%;
}

.link-block a:hover::after {
    opacity: 1;
}

.link-block a:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4), var(--shadow-glow);
}

.link-block > a {
  font-weight: 500;
  background: white;
  color: var(--text-primary);
  border: 2px solid #e9ecef;
}

.link-block > a:active, .link-block > a:hover, .link-block > a:focus {
  color: white;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

#active-button {
  color: white;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

#arxiv-button {
  background: linear-gradient(135deg, #b31b1b 0%, #801313 100%) !important;
  color: white !important;
  border-color: transparent !important;
}

#arxiv-button:hover {
  background: linear-gradient(135deg, #d42020 0%, #9e1717 100%) !important;
  box-shadow: 0 6px 20px rgba(179, 27, 27, 0.3) !important;
}

.teaser .hero-body {
  padding-top: 0;
  padding-bottom: 3rem;
}

.teaser {
  font-family: 'Google Sans', sans-serif;
}

.zoom-container .column {
  padding: 0;
  font-size: 0;
  background: #000;
}

.zoom-container canvas {
  width: 100%;
}

.zoom-gt-container {
  padding: 0;
  border: 1px solid #000;
}

.zoom-gt-img {
  display: none;
}

.zoom-lens {
  width: 100%;
  height: 50%;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
}

.zoom-lens:first-child {
  border-top: 1px solid #000;
}

.publication-banner {
  max-height: parent;
}

.publication-banner video {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  object-fit: fit;
}

.publication-title {
    font-family: 'Inter', 'Google Sans', sans-serif;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    line-height: 1.2;
    animation: gradient-shift 5s ease infinite;
    text-shadow: 0 0 30px rgba(102, 126, 234, 0.1);
    position: relative;
    font-size: 3rem;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.publication-title::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(20px);
    opacity: 0.5;
    transform: scale(1.05);
    animation: glow-pulse 3s ease-in-out infinite;
}

.publication-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.6), rgba(118, 75, 162, 0.6), transparent);
    border-radius: 2px;
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.4);
    animation: underline-expand 1.5s ease-out;
}

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

@keyframes glow-pulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1.05);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.08);
  }
}

@keyframes underline-expand {
  0% {
    width: 0;
    opacity: 0;
  }
  100% {
    width: 120px;
    opacity: 1;
  }
}

.publication-authors {
    font-family: 'Inter', 'Google Sans', sans-serif;
    color: var(--text-secondary);
}

.publication-venue {
    margin-top: 0.5em;
    font-family: 'Google Sans', sans-serif;
}

.publication-awards {
    color: #ff3860;
    width: fit-content;
    font-weight: bolder;
}

.publication-authors a {
   color: #667eea !important;
   text-decoration: none;
   transition: all 0.3s ease;
   position: relative;
}

.publication-authors a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.publication-authors a:hover {
    color: #764ba2 !important;
    transform: translateY(-1px);
}

.publication-authors a:hover::after {
    width: 100%;
}

.author-block {
  display: inline-block;
  /* font-size: 14pt; */
}

.publication-banner img {
  display: block;
}

.publication-video {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;

    overflow: hidden;
    border-radius: 10px !important;
}

.publication-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.publication-body img {
  display: block;
}

.results-carousel {
  overflow: hidden;
}

.results-carousel .item {
  margin: 5px;
  overflow: hidden;
  border: 1px solid #bbb;
  border-radius: 10px;
  padding: 0;
  font-size: 0;
}

.results-carousel video {
  margin: 0;
}


.interpolation-panel {
  background: #f5f5f5;
  border-radius: 10px;
}

.interpolation-panel .interpolation-image {
  width: 100%;
  border-radius: 5px;
}

.interpolation-video-column {
  display: block;
}

.interpolation-panel .slider {
  margin: 0 !important;
}

.interpolation-panel .slider {
  margin: 0 !important;
}

#interpolation-image-wrapper {
  width: 100%;
}
#interpolation-image-wrapper img {
  border-radius: 5px;
}

.video-comparison {
  font-size: 0;
}

.label-columns > .column {
  padding: 0.1em;
  padding-bottom: 0.5em;
  font-size: 1.3em;
}

.tabs-widget > .tabs-content > div {
  display: hidden;
}

/* Section Styling */
.section {
  padding: 5rem 1.5rem;
  position: relative;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.6s ease;
}

.section:hover::before {
  opacity: 1;
}

.section h2.title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2.5rem;
  position: relative;
  padding-bottom: 1.5rem;
  font-size: 2.25rem;
}

.section h2.title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 5px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.section h3.title {
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 3.5rem;
  margin-bottom: 2rem;
  font-size: 1.75rem;
  position: relative;
  padding-left: 1rem;
}

.section h3.title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

/* Box Styling for Related Works */
.box {
  border: none;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  transform: scaleY(0);
  transition: transform 0.4s ease;
}

.box:hover::before {
  transform: scaleY(1);
}

.box:hover {
  transform: translateY(-6px) translateX(4px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
  border-left: 4px solid transparent;
}

.box a {
  color: #667eea;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.box a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transition: width 0.3s ease;
}

.box a:hover {
  color: #764ba2;
}

.box a:hover::after {
  width: 100%;
}

/* Image Enhancements */
img {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease, filter 0.4s ease;
  will-change: transform;
}

img:hover {
  transform: scale(1.02) translateY(-2px);
  filter: brightness(1.05);
}

.zoom {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
  will-change: transform;
}

.zoom:hover {
  transform: scale(1.015) translateY(-4px);
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.25) !important;
}

/* Video Container */
video {
  border-radius: 16px;
  transition: box-shadow 0.4s ease, transform 0.4s ease;
  will-change: transform;
}

video:hover {
  box-shadow: var(--shadow-xl);
  transform: scale(1.01);
}

/* HR Styling */
hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2), transparent);
  margin: 4rem 0;
  position: relative;
}

hr::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

/* Footer */
.footer {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
  padding: 12rem 0 4rem;
  margin-top: 6rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.3), transparent);
}

.footer a {
  color: #667eea;
  transition: all 0.3s ease;
  text-decoration: none;
  position: relative;
}

.footer a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transition: width 0.3s ease;
}

.footer a:hover {
  color: #764ba2;
}

.footer a:hover::after {
  width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
  .section {
    padding: 2rem 1rem;
  }
  
  .hero {
    padding: 2rem 0;
  }
  
  .publication-title {
    font-size: 2rem !important;
    padding: 0 0.5rem;
    letter-spacing: -0.01em;
  }
  
  .publication-title::after {
    width: 80px;
  }
  
  .link-block a {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
  }
  
  .box {
    padding: 1rem;
  }
  
  .video-container {
    border-radius: 12px;
  }
  
  img {
    border-radius: 12px !important;
  }
}

/* Enhanced mobile experience */
@media (max-width: 480px) {
  .publication-title {
    font-size: 1.5rem !important;
    line-height: 1.3;
    padding: 0 0.5rem;
  }
  
  .publication-title::after {
    width: 60px;
    height: 3px;
  }
  
  .publication-authors {
    font-size: 0.9rem;
  }
  
  .section h2.title {
    font-size: 1.75rem;
  }
  
  .section h3.title {
    font-size: 1.5rem;
  }
}

/* Smooth Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.section {
  animation: fadeInUp 0.8s ease-out;
}

.section:nth-child(even) {
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

/* Stagger animation for boxes */
.box {
  animation: fadeInUp 0.6s ease-out;
}

.box:nth-child(1) { animation-delay: 0.1s; }
.box:nth-child(2) { animation-delay: 0.2s; }
.box:nth-child(3) { animation-delay: 0.3s; }
.box:nth-child(4) { animation-delay: 0.4s; }
.box:nth-child(5) { animation-delay: 0.5s; }
.box:nth-child(6) { animation-delay: 0.6s; }
.box:nth-child(7) { animation-delay: 0.7s; }

/* Code Block Styling */
pre {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  border-left: 4px solid #667eea;
  overflow-x: auto;
}

code {
  font-family: 'Fira Code', 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
}
