/* ═══════════════════════════════════════════════════════
   PRISM Project Page — Custom Styles
   ═══════════════════════════════════════════════════════ */

/* ── Base ── */
:root {
  --prism-accent: #6C63FF;
  --prism-accent-light: #8B83FF;
  --prism-accent-dark: #4F46E5;
  --prism-gradient: linear-gradient(135deg, #6C63FF 0%, #3B82F6 50%, #06B6D4 100%);
  --prism-bg: #FAFBFF;
  --prism-card-bg: #FFFFFF;
  --prism-text: #1E293B;
  --prism-text-muted: #64748B;
  --prism-border: #E2E8F0;
  --prism-shadow: 0 4px 24px rgba(108, 99, 255, 0.08);
  --prism-shadow-hover: 0 8px 40px rgba(108, 99, 255, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--prism-text);
  background: var(--prism-bg);
  -webkit-font-smoothing: antialiased;
}

/* ── Hero Section ── */
.hero {
  background: linear-gradient(160deg, #0F172A 0%, #1E293B 40%, #334155 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(108, 99, 255, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
  animation: aurora 15s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes aurora {
  0%   { transform: translate(0, 0) rotate(0deg); }
  50%  { transform: translate(-2%, 1%) rotate(1deg); }
  100% { transform: translate(1%, -1%) rotate(-1deg); }
}

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

/* Title */
.publication-title {
  font-family: 'Google Sans', sans-serif;
  color: #FFFFFF !important;
  font-size: 2.5rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem !important;
}

/* Author & Affiliation */
.publication-authors {
  font-family: 'Google Sans', sans-serif;
  margin-bottom: 0.3rem;
}

.publication-authors a {
  color: #93C5FD !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

.publication-authors a:hover {
  color: #BFDBFE !important;
  text-decoration: underline;
}

.author-block {
  display: inline-block;
  color: #CBD5E1;
  font-size: 1.15rem;
}

/* Conference badge */
.publication-authors span.author-block span[style*="font-weight:600"] {
  color: #FDE68A;
}

/* ── Buttons ── */
.publication-links {
  margin-top: 1rem;
}

.link-block a {
  margin: 5px 4px;
  border: none;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.95rem;
}

.link-block a.is-dark {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #FFFFFF !important;
}

.link-block a.is-dark:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.3);
}

.link-block a .icon {
  margin-right: 2px;
}

/* ── Main Content Area ── */
section.section {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.content h2 {
  font-family: 'Google Sans', sans-serif;
  color: var(--prism-text);
  font-weight: 700;
  font-size: 1.85rem;
  margin-top: 2rem;
  margin-bottom: 1.2rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--prism-gradient);
  border-radius: 2px;
}

.content h3 {
  font-family: 'Google Sans', sans-serif;
  color: var(--prism-text);
  font-weight: 600;
  font-size: 1.3rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

/* Centered h2 (Abstract etc.) */
.has-text-centered h2::after {
  left: 50%;
  transform: translateX(-50%);
}

/* ── Abstract ── */
.has-text-justified {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #475569;
}

/* ── Horizontal rules ── */
.content hr {
  background: var(--prism-border);
  height: 1px;
  margin: 2.5rem 0;
}

/* ── Teaser Image ── */
.teaser-wrapper {
  text-align: center;
  margin: 2rem 0 1rem;
}

.teaser-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--prism-shadow);
  transition: box-shadow 0.3s ease;
}

.teaser-wrapper img:hover {
  box-shadow: var(--prism-shadow-hover);
}

/* ── Figure Wrapper ── */
.figure-wrapper {
  text-align: center;
  margin: 1.5rem 0;
}

.figure-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.figure-wrapper img:hover {
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* ── Key Insight Box ── */
.key-insight {
  background: linear-gradient(135deg, #EEF2FF 0%, #E0F2FE 100%);
  border-left: 4px solid var(--prism-accent);
  border-radius: 0 12px 12px 0;
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  position: relative;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #334155;
}

.key-insight-label {
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--prism-accent);
  margin-bottom: 0.5rem;
}

/* ── Method Cards ── */
.method-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.method-card {
  background: var(--prism-card-bg);
  border: 1px solid var(--prism-border);
  border-radius: 14px;
  padding: 1.8rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.method-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--prism-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.method-card:hover {
  border-color: transparent;
  box-shadow: var(--prism-shadow-hover);
  transform: translateY(-3px);
}

.method-card:hover::before {
  opacity: 1;
}

.method-card-title {
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--prism-accent-dark);
  margin-bottom: 0.75rem;
}

.method-card-desc {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #475569;
}

/* ── Citation Block ── */
.citation-block {
  position: relative;
  background: #1E293B;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  margin: 1rem 0;
}

.citation-block pre {
  background: transparent !important;
  margin: 0 !important;
  padding: 1.5rem 1.8rem !important;
  padding-top: 0.8rem !important;
}

.citation-block code {
  color: #E2E8F0 !important;
  font-size: 0.88rem !important;
  line-height: 1.6;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  background: transparent !important;
}

.copy-btn {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94A3B8;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: 'Google Sans', sans-serif;
  transition: all 0.2s ease;
  z-index: 2;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #E2E8F0;
}

.copy-btn i {
  margin-right: 4px;
}

/* ── Scroll Fade-in Animation ── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Footer ── */
.footer {
  background: #F8FAFC;
  border-top: 1px solid var(--prism-border);
  padding: 2rem 1.5rem;
}

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

.footer a {
  color: var(--prism-accent);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ── Responsive ── */
@media screen and (max-width: 768px) {
  .publication-title {
    font-size: 1.7rem !important;
  }

  .method-cards {
    grid-template-columns: 1fr;
  }

  .key-insight {
    padding: 1.2rem 1.4rem;
  }

  .hero .hero-body {
    padding-top: 2.5rem;
    padding-bottom: 2rem;
  }
}

/* ── Comparison Section (JuxtaposeJS hero) ── */
.comparison-section {
  margin: 0 auto 2rem;
  max-width: 820px;
}

/* Thumbnail row */
.thumb-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.thumb {
  width: 90px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 3px solid transparent;
  opacity: 0.55;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.thumb:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.thumb.active {
  opacity: 1;
  border-color: var(--prism-accent);
  box-shadow: 0 4px 16px rgba(108, 99, 255, 0.25);
}

/* JuxtaposeJS container */
#jx-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--prism-shadow);
}

/* Override JuxtaposeJS default styling */
.jx-slider {
  border-radius: 12px;
  overflow: hidden;
}

.jx-control {
  background: rgba(108, 99, 255, 0.85) !important;
  width: 40px !important;
  height: 40px !important;
  margin-left: -20px !important;
  margin-top: -20px !important;
  border-radius: 50% !important;
  border: 3px solid #fff !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3) !important;
}

.jx-controller {
  background: rgba(255,255,255,0.9) !important;
  width: 3px !important;
}

.jx-slider .jx-handle .jx-arrow.jx-left {
  border-color: transparent #fff transparent transparent !important;
}

.jx-slider .jx-handle .jx-arrow.jx-right {
  border-color: transparent transparent transparent #fff !important;
}

.comparison-caption {
  text-align: center;
  color: var(--prism-text-muted);
  font-size: 0.92rem;
  margin-top: 14px;
  line-height: 1.5;
}

@media screen and (max-width: 768px) {
  .thumb {
    width: 56px;
    height: 38px;
  }

  .thumb-row {
    gap: 6px;
  }
}

/* ── Before / After Slider ── */
.ba-slider {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto 2rem;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--prism-shadow);
  cursor: col-resize;
  user-select: none;
  -webkit-user-select: none;
}

.ba-slider img {
  display: block;
  width: 100%;
  height: auto;
}

.ba-before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inset(0 50% 0 0);
  z-index: 2;
}

.ba-after {
  display: block;
  width: 100%;
  height: auto;
}

.ba-handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 100%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ba-handle-line {
  flex: 1;
  width: 2.5px;
  background: #FFFFFF;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}

.ba-handle-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ba-handle-circle span {
  font-size: 16px;
  font-weight: 700;
  color: #475569;
  letter-spacing: 4px;
  line-height: 1;
}

/* Labels on slider */
.ba-slider::before,
.ba-slider::after {
  position: absolute;
  bottom: 12px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Google Sans', sans-serif;
  color: #FFFFFF;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  border-radius: 6px;
  z-index: 4;
  pointer-events: none;
}

.ba-slider::before {
  content: attr(data-label-left);
  left: 12px;
}

.ba-slider::after {
  content: attr(data-label-right);
  right: 12px;
}

/* ── Result Gallery (triplets) ── */
.result-gallery {
  margin: 2rem 0;
}

.result-triplet {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 1.2rem;
}

.result-img {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.result-img:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.result-img img {
  display: block;
  width: 100%;
  height: auto;
}

.result-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: 'Google Sans', sans-serif;
  color: #FFFFFF;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  border-radius: 5px;
}

@media screen and (max-width: 768px) {
  .result-triplet {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ba-handle-circle {
    width: 32px;
    height: 32px;
  }

  .ba-handle-circle span {
    font-size: 13px;
  }
}

/* ── Legacy support (from original) ── */
.footer .icon-link {
  font-size: 25px;
  color: #000;
}

.dnerf {
  font-variant: small-caps;
}

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

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

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

.publication-venue {
  color: #555;
  width: fit-content;
  font-weight: bold;
}

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

.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%;
}

.results-carousel {
  overflow: hidden;
}

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

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

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

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

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

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