/* ===== Custom Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ===== CSS Variables ===== */
:root {
  --nvidia-green: #76b900;
  --nvidia-green-dark: #5a8f00;
  --nvidia-green-light: #8ed900;
  --accent-color: #00d4aa;
  --gradient-primary: linear-gradient(135deg, #76b900 0%, #00d4aa 100%);
  --gradient-hero: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
  --gradient-section: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --bg-card: rgba(255, 255, 255, 0.95);
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.15);
  --border-radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Base Styles ===== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', 'Noto Sans', sans-serif;
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===== Wider Content Container ===== */
.container.is-max-desktop {
  max-width: 1200px !important;
}

.column.is-four-fifths {
  width: 100% !important;
  flex: none !important;
}

/* ===== Hero Section ===== */
.hero {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(118, 185, 0, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 212, 170, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(118, 185, 0, 0.08) 0%, transparent 40%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2376b900' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.5;
}

.hero .hero-body {
  position: relative;
  z-index: 1;
  padding-top: 4rem;
  padding-bottom: 3rem;
}

/* ===== Publication Title ===== */
.publication-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 40px rgba(118, 185, 0, 0.3);
  letter-spacing: -0.02em;
  line-height: 1.2;
  animation: fadeInUp 0.8s ease-out;
}

/* ===== Authors Section ===== */
.publication-authors {
  font-family: 'Outfit', sans-serif;
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

.publication-authors a {
  color: var(--nvidia-green-light) !important;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.publication-authors a:hover {
  color: var(--accent-color) !important;
  text-decoration: none;
}

.publication-authors a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

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

.is-size-5.publication-authors {
  color: rgba(255, 255, 255, 0.85);
}

.is-size-6.publication-authors {
  color: rgba(255, 255, 255, 0.6);
}

.author-block {
  display: inline-block;
  margin: 0.15rem 0;
}

/* ===== Links/Buttons ===== */
.publication-links {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.link-block a {
  margin: 8px 6px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: var(--transition);
  border: none;
  position: relative;
  overflow: hidden;
}

.link-block a.is-dark {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.link-block a.is-dark:hover {
  background: var(--gradient-primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(118, 185, 0, 0.4);
}

.link-block a .icon {
  transition: var(--transition);
}

.link-block a:hover .icon {
  transform: scale(1.15);
}

/* ===== GIF Row ===== */
.gif-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin: 30px auto;
  padding: 0 20px;
  max-width: 1200px;
}

.gif-row img {
  display: block;
  height: auto;
  max-width: 100%;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-strong);
  transition: var(--transition);
}

.gif-row img:hover {
  transform: scale(1.02);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
}

/* ===== Main Results Figure (Top) ===== */
.container.is-max-desktop > img[alt="Final Results"] {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  transition: var(--transition);
}

/* ===== Sections ===== */
.section {
  padding: 4rem 1.5rem;
  position: relative;
}

.section:nth-of-type(odd) {
  background: var(--gradient-section);
}

.section:nth-of-type(even) {
  background: #ffffff;
}

/* ===== Section Titles ===== */
.title.is-3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

.title.is-3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.title.is-5 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--nvidia-green-dark);
  margin-top: 2rem;
}

/* ===== Content Cards ===== */
.content.has-text-justified {
  background: var(--bg-card);
  padding: 2.5rem 3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  max-width: 1100px;
  margin: 0 auto;
}

.content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

/* ===== Images in Content ===== */
figure.center {
  margin: 2rem 0;
}

figure.center img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  transition: var(--transition);
  max-width: 100%;
  height: auto;
}

figure.center img:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-strong);
}

figcaption {
  margin-top: 1rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  border-left: 4px solid var(--nvidia-green);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Lists ===== */
.content ul {
  list-style: none;
  padding-left: 0;
}

.content ul li {
  position: relative;
  padding-left: 1.8rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 8px;
  height: 8px;
  background: var(--gradient-primary);
  border-radius: 50%;
}

/* ===== BibTeX Section ===== */
#BibTeX {
  background: var(--gradient-hero);
}

#BibTeX .title {
  color: #ffffff;
}

#BibTeX .title::after {
  background: linear-gradient(90deg, var(--nvidia-green-light), var(--accent-color));
}

#BibTeX pre {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(118, 185, 0, 0.3);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  overflow-x: auto;
  backdrop-filter: blur(10px);
}

#BibTeX code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--nvidia-green-light);
  line-height: 1.8;
}

/* ===== Footer ===== */
.footer {
  background: linear-gradient(180deg, #1a1a2e 0%, #0a0a0a 100%);
  padding: 3rem 1.5rem 2rem;
}

.footer .content {
  color: rgba(255, 255, 255, 0.7);
}

.footer .content a {
  color: var(--nvidia-green-light);
  transition: var(--transition);
}

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

.footer .icon-link {
  font-size: 25px;
  color: rgba(255, 255, 255, 0.8);
}

.policy-links {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.policy-link {
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 0.85rem;
  transition: var(--transition);
}

.policy-link:hover {
  color: var(--nvidia-green-light) !important;
}

.separator {
  color: rgba(255, 255, 255, 0.3);
  margin: 0 0.8rem;
}

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

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Scroll animations */
.section {
  animation: fadeInUp 0.6s ease-out;
}

/* ===== Responsive Adjustments ===== */
@media screen and (max-width: 768px) {
  .publication-title {
    font-size: 1.8rem !important;
  }
  
  .gif-row {
    flex-direction: column;
    gap: 20px;
  }
  
  .content.has-text-justified {
    padding: 1.5rem;
  }
  
  figure.center img {
    transform: scale(1) !important;
    margin: 20px 0 !important;
  }
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
  background: var(--nvidia-green);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--nvidia-green-light);
}

/* ===== Selection Styling ===== */
::selection {
  background: var(--nvidia-green);
  color: white;
}

/* ===== Strong Text in Content ===== */
.content strong {
  color: var(--nvidia-green-dark);
  font-weight: 600;
}

/* ===== Superscript in Hero ===== */
.hero sup {
  color: var(--nvidia-green-light);
  font-weight: 600;
}

/* ===== Additional Enhancements ===== */
.teaser .hero-body {
  padding-top: 0;
  padding-bottom: 3rem;
}

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

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

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

.publication-venue {
  color: rgba(255, 255, 255, 0.7);
  width: fit-content;
  font-weight: bold;
}

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

.publication-video {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
  border-radius: var(--border-radius) !important;
  box-shadow: var(--shadow-strong);
}

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

.results-carousel {
  overflow: hidden;
}

.results-carousel .item {
  margin: 5px;
  overflow: hidden;
  border: none;
  border-radius: var(--border-radius);
  padding: 0;
  font-size: 0;
  box-shadow: var(--shadow-medium);
}

.results-carousel video {
  margin: 0;
}

.interpolation-panel {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
}

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

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

#interpolation-image-wrapper {
  width: 100%;
}

#interpolation-image-wrapper img {
  border-radius: 12px;
}

/* ===== Highlight Box for Key Results ===== */
.highlight-box {
  background: linear-gradient(135deg, rgba(118, 185, 0, 0.1) 0%, rgba(0, 212, 170, 0.1) 100%);
  border: 2px solid var(--nvidia-green);
  border-radius: var(--border-radius);
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
}

/* ===== Stats Container ===== */
.stats-container {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 1.5rem;
  margin-bottom: 3rem;
  padding: 0 1rem;
  flex-wrap: nowrap;
}

/* ===== Stat Cards ===== */
.stat-card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 2rem 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-medium);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  flex: 1;
  max-width: 280px;
  min-width: 200px;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-strong);
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* ===== Mobile Stat Cards ===== */
@media screen and (max-width: 768px) {
  .stats-container {
    flex-direction: column;
    align-items: center;
  }
  
  .stat-card {
    max-width: 100%;
    width: 100%;
  }
  
  .stat-number {
    font-size: 2.2rem;
  }
  
  .stat-card {
    padding: 1.5rem;
  }
}
