/* Reset margins and padding */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Basic typography and layout */
body {
  color: #2c3e50 !important;
  font-family: 'Inter', 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* Prevent horizontal scroll */
  line-height: 1.6;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

/* Fixed cover image that stays in view while scrolling */
.cover-image {
  width: 100%;
  height: 100vh; /* Full viewport height */
  position: relative;
  margin: 0;
  padding: 0;
  display: block;
  overflow: hidden;
}

.cover-gif {
  width: 100%;
  height: 100vh;
  object-fit: cover;
  object-position: center;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.cover-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, 
    rgba(245, 247, 250, 1) 0%, 
    rgba(245, 247, 250, 0.9) 30%, 
    rgba(245, 247, 250, 0.6) 60%, 
    rgba(245, 247, 250, 0) 100%);
  height: 120px;
  margin: 0;
  padding: 0;
  z-index: 2;
}

/* Initial view container - controls how much of image is initially visible */
.initial-view {
  height: 20vh; /* Initial visible height */
  position: relative;
  overflow: hidden;
  transition: height 0.5s ease;
}

/* Content positioning */
.content-wrapper {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
  z-index: 10;
  margin-top: -24px;
}

/* Override Bulma section spacing */
.section {
  padding: 0 !important; /* Override Bulma's default padding */
}

.section.is-light {
  background: transparent;
  margin: 0; /* No margin */
  padding: 60px 0 80px 0 !important;
}

/* Custom spacing for content */
.section.is-light > .columns:first-child {
  padding-top: 20px; /* Add spacing inside first content section */
}

.main-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-right: 15px;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gradient-colorful {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 2.8rem;
  color: #2c3e50;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

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

.publication-authors {
  margin: 20px 0;
  line-height: 1.8;
}

.author-block {
  margin: 0 8px;
  display: inline-block;
}

.author-block a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

.author-block a:hover {
  color: #764ba2;
  border-bottom-color: #764ba2;
}

.link-block {
  margin: 15px;
}

.link-block .button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 50px;
  padding: 12px 24px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.link-block .button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Video containers */
.video-container {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  transition: transform 0.3s ease;
}
.video-container:hover {
  transform: translateY(-5px);
}
.video-container video {
  width: 100%;
  border-radius: 15px;
}

/* Video demo grid */
.video-demo-container {
  text-align: center;
  margin-bottom: 40px;
  cursor: pointer;
  padding: 20px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.video-demo-container:hover {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  transform: translateY(-5px);
}

.gif-preview {
  position: relative;
  display: inline-block;
  max-width: 300px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 3px solid transparent;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.gif-preview:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.3);
}

.demo-gif {
  width: 100%;
  display: block;
  border-radius: 17px;
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 48px;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
  opacity: 0.8;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gif-preview:hover .play-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

.video-demo {
  width: 100%;
  max-width: 280px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-demo:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.video-demo-title {
  margin-top: 20px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #2c3e50;
  text-align: center;
  letter-spacing: 0.5px;
}

/* Video fallback styling */
.video-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  border-radius: 12px;
  background: #f5f5f5;
  border: 2px dashed #ddd;
}

.video-placeholder {
  text-align: center;
  padding: 20px;
}

.video-placeholder p {
  margin: 10px 0;
  color: #666;
  font-size: 0.9rem;
}

/* Video modal */
.video-modal .modal-content {
  max-width: 90vw;
  max-height: 90vh;
  margin: auto;
}

.video-wrapper {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.video-wrapper video {
  width: 100%;
  height: auto;
  display: block;
}

/* Titles within the content sections */
.sub-sub-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: #2c3e50;
  position: relative;
  letter-spacing: -0.01em;
}

.sub-sub-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

/* Container spacing adjustments */
.container.is-max-desktop {
  max-width: 1000px !important;
  padding: 0 40px;
}

.container.is-width-screen {
  max-width: 1200px !important;
  padding: 0 40px;
}

/* Content sections styling */
.content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #4a5568;
  margin-bottom: 2rem;
}

/* Section-specific styling */

/* Hero/Title Section */
.hero-section {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-radius: 0 0 40px 40px;
  padding: 60px 0 80px 0 !important;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23667eea" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23764ba2" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
  z-index: 1;
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

/* Abstract Section */
.abstract-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 30px;
  margin: 40px 20px;
  padding: 60px 40px !important;
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.abstract-section .sub-sub-title {
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.abstract-section .content {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.2rem;
}

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

/* Video Grid Section */
.video-grid-section {
  background: linear-gradient(145deg, #667eea 0%, #764ba2 50%, #8b7ec8 100%);
  padding: 80px 0 !important;
  position: relative;
  overflow: hidden;
}

.video-grid-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  z-index: 1;
}

.video-grid-section .container {
  position: relative;
  z-index: 2;
}

.video-grid-section .sub-sub-title {
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.video-grid-section .video-demo-title {
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  font-weight: 700;
}

/* Motivation Section */
.motivation-section {
  background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
  border-radius: 0;
  position: relative;
  padding: 80px 0 !important;
  margin: 60px 0;
}

.motivation-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60"><polygon points="30,0 60,30 30,60 0,30" fill="%23667eea" opacity="0.1"/></svg>');
  background-size: 60px 60px;
  z-index: 1;
}

.motivation-section .container {
  position: relative;
  z-index: 2;
}

.motivation-section .sub-sub-title {
  color: #2c3e50;
  margin-bottom: 2rem;
}

.motivation-section .content {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Image Gallery Section */
.image-gallery-section {
  background: linear-gradient(135deg, #f0f4f8 0%, #e8ddd4 100%);
  padding: 80px 0 !important;
  position: relative;
  clip-path: polygon(0 5%, 100% 0%, 100% 95%, 0% 100%);
  margin: 60px 0;
}

.image-gallery-section .sub-sub-title {
  color: #2c3e50;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.image-gallery-section .image.is-fullwidth {
  position: relative;
  z-index: 2;
}

.image-gallery-section .image.is-fullwidth img {
  border: 5px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 15px 35px rgba(139, 69, 19, 0.2);
}

/* Standard Content Section */
.standard-section {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 25px;
  margin: 40px 20px;
  padding: 60px 40px !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.standard-section .sub-sub-title {
  color: #2c3e50;
}

/* Card-based Section */
.card-section {
  background: rgba(248, 250, 252, 0.3);
  padding: 80px 0 !important;
}

.card-section .container > .columns > .column {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(15px);
  border-radius: 25px;
  padding: 40px;
  margin: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.3s ease;
}

.card-section .container > .columns > .column:hover {
  transform: translateY(-10px);
}

/* Citation Section */
.citation-section {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  padding: 80px 0 !important;
  position: relative;
  overflow: hidden;
}

.citation-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="100" fill="%23667eea" opacity="0.05">{ }</text></svg>');
  background-size: 200px 200px;
  z-index: 1;
}

.citation-section .container {
  position: relative;
  z-index: 2;
}

.citation-section .sub-sub-title {
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  margin-bottom: 3rem;
}

.citation-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.citation-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
}

.citation-header i.fa-quote-left {
  font-size: 1.5rem;
  margin-right: 15px;
  opacity: 0.8;
}

.citation-header span {
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
}

.copy-button {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  padding: 8px 16px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.copy-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.copy-button i {
  font-size: 0.9rem;
}

.citation-text {
  background: #f8f9fa;
  color: #2c3e50;
  padding: 30px;
  margin: 0;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  border: none;
  white-space: pre-wrap;
  word-wrap: break-word;
  position: relative;
}

.citation-text::selection {
  background: rgba(102, 126, 234, 0.3);
}

.content p {
  margin-bottom: 1.5rem;
}

.content ul {
  padding-left: 2rem;
  margin-bottom: 1.5rem;
}

.content li {
  margin-bottom: 0.8rem;
  position: relative;
}

.content li::before {
  content: '▸';
  color: #667eea;
  font-weight: bold;
  position: absolute;
  left: -1.5rem;
}

.anonymity {
  display: none;
}

/* Fix for any Bulma-specific margins */
.columns {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Hero adjustments */
.hero {
  margin: 0;
  padding: 0;
}

/* Scroll down indicator */
.scroll-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  text-align: center;
  animation: bounce 2s infinite;
  z-index: 5;
}

.scroll-indicator i {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-15px) translateX(-50%);
  }
  60% {
    transform: translateY(-7px) translateX(-50%);
  }
}

/* Modern animations and effects */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

/* Add subtle floating animation to video containers */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.video-demo-container:nth-child(odd) {
  animation: float 6s ease-in-out infinite;
  animation-delay: 0s;
}

.video-demo-container:nth-child(even) {
  animation: float 6s ease-in-out infinite;
  animation-delay: 3s;
}

/* Enhanced image styling */
.image.is-fullwidth img {
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.image.is-fullwidth img:hover {
  transform: translateY(-5px);
}

/* Responsive improvements */
@media (max-width: 768px) {
  .main-title {
    font-size: 2.5rem;
  }
  
  .subtitle {
    font-size: 2rem;
  }
  
  .sub-sub-title {
    font-size: 1.8rem;
  }
  
  .container.is-max-desktop,
  .container.is-width-screen {
    padding: 0 20px;
  }
  
  .gif-preview {
    max-width: 250px;
  }
}