/* =========================================================================
   VF-Bench — Enhanced "cinematic dark hero + warm/cool fusion" theme
   Loaded LAST so it augments / overrides Bulma + index.css.
   Palette: warm (orange/rose)  <->  cool (cyan/blue/violet) = "fusion".
   ========================================================================= */

:root {
  --warm-1: #ff7a3d;
  --warm-2: #ff4d6d;
  --cool-1: #22d3ee;
  --cool-2: #4f7cff;
  --violet: #a855f7;

  --fusion: linear-gradient(110deg, #ff7a3d 0%, #ff4d6d 28%, #a855f7 62%, #22d3ee 100%);
  --fusion-soft: linear-gradient(110deg, rgba(255,122,61,.16), rgba(168,85,247,.16) 55%, rgba(34,211,238,.16));

  --bg-dark: #070a14;
  --bg-dark-2: #0c1120;
  --ink: #11161f;
  --ink-soft: #475067;
  --line: rgba(17, 22, 31, 0.08);

  --shadow-card: 0 18px 50px -22px rgba(20, 28, 48, 0.45);
  --radius: 18px;
}

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: 'Inter', 'Noto Sans', sans-serif;
  color: var(--ink);
  background: #fbfcff;
  overflow-x: hidden;
}

/* Subtle texture on the light content background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60vw 40vw at 100% 0%, rgba(34, 211, 238, 0.06), transparent 60%),
    radial-gradient(50vw 40vw at 0% 18%, rgba(255, 122, 61, 0.05), transparent 60%);
  pointer-events: none;
}

::selection { background: rgba(168, 85, 247, 0.22); }

/* ===================== Scroll progress bar ===================== */
.vf-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 1000;
  background: transparent;
  pointer-events: none;
}
.vf-progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--fusion);
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.6);
  transition: width 0.1s linear;
}

/* ===================== Sticky nav ===================== */
.vf-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1.4rem;
  background: rgba(9, 13, 24, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateY(-110%);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.vf-nav.is-visible { transform: translateY(0); }

.vf-nav__brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
  color: #fff !important;
  white-space: nowrap;
}
.vf-nav__brand span {
  background: var(--fusion);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.vf-nav__links {
  display: flex;
  gap: 0.35rem;
  margin-left: auto;
  flex-wrap: wrap;
}
.vf-nav__links a {
  color: #c8d2e6 !important;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.vf-nav__links a:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08);
}
.vf-nav__actions { display: flex; gap: 0.45rem; }
.vf-nav__btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: #e7ecf7 !important;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}
.vf-nav__btn:hover {
  transform: translateY(-2px);
  background: var(--fusion);
  box-shadow: 0 8px 22px -8px rgba(168, 85, 247, 0.8);
}

/* ===================== Hero (cinematic dark) ===================== */
.vf-hero {
  position: relative;
  overflow: hidden;
  background: var(--bg-dark);
  color: #e9eefb;
  padding: 2rem 0 1rem;
  isolation: isolate;
}
.vf-hero .hero-body { position: relative; z-index: 2; padding: 3.5rem 1.5rem 3rem; }

/* aurora background layers */
.vf-aurora { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.vf-aurora span {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  will-change: transform;
}
.vf-aurora .b1 { width: 560px; height: 560px; top: -200px; left: -140px;
  background: radial-gradient(circle, #ff5e3a, transparent 70%);
  animation: vf-drift-a 19s ease-in-out infinite alternate; }
.vf-aurora .b2 { width: 520px; height: 520px; top: -160px; right: -120px;
  background: radial-gradient(circle, #4f7cff, transparent 70%);
  animation: vf-drift-b 23s ease-in-out infinite alternate; }
.vf-aurora .b3 { width: 620px; height: 620px; bottom: -260px; left: 20%;
  background: radial-gradient(circle, #a855f7, transparent 70%);
  animation: vf-drift-c 27s ease-in-out infinite alternate; }
.vf-aurora .b4 { width: 460px; height: 460px; bottom: -200px; right: 8%;
  background: radial-gradient(circle, #22d3ee, transparent 70%);
  animation: vf-drift-a 21s ease-in-out infinite alternate; }

@keyframes vf-drift-a { from { transform: translate(0,0) scale(1); } to { transform: translate(60px, 50px) scale(1.12); } }
@keyframes vf-drift-b { from { transform: translate(0,0) scale(1); } to { transform: translate(-70px, 40px) scale(1.08); } }
@keyframes vf-drift-c { from { transform: translate(0,0) scale(1); } to { transform: translate(40px,-50px) scale(1.15); } }

/* faint grid + vignette + grain */
.vf-grid {
  position: absolute; inset: 0; z-index: 1;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 30%, transparent 78%);
}
.vf-noise {
  position: absolute; inset: 0; z-index: 1; opacity: 0.05; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* fade hero into the light content below */
.vf-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 130px; z-index: 1;
  background: linear-gradient(to bottom, transparent, #fbfcff);
}

/* Spotlight badge — animated rotating gradient ring */
@property --vf-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

.vf-badge {
  position: relative;
  isolation: isolate;
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.84rem; font-weight: 600; letter-spacing: 0.4px;
  color: #fff;
  /* inner dark fill (padding-box) + rotating conic gradient (border-box) */
  background:
    linear-gradient(rgba(10, 13, 24, 0.94), rgba(10, 13, 24, 0.94)) padding-box,
    conic-gradient(from var(--vf-angle), #ff7a3d, #ff4d6d, #a855f7, #22d3ee, #ff7a3d) border-box;
  animation: vf-rotate 4s linear infinite;
  margin-bottom: 1.6rem;
}
/* blurred halo that rotates with the ring */
.vf-badge::after {
  content: ""; position: absolute; inset: -3px; z-index: -1;
  border-radius: 999px;
  background: conic-gradient(from var(--vf-angle), #ff7a3d, #ff4d6d, #a855f7, #22d3ee, #ff7a3d);
  filter: blur(13px); opacity: 0.5;
  animation: vf-rotate 4s linear infinite;
}
@keyframes vf-rotate { to { --vf-angle: 360deg; } }

.vf-badge i {
  font-size: 0.78rem;
  background: linear-gradient(120deg, #ffd24d, #ff8a3d);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: vf-twinkle 2.2s ease-in-out infinite;
}
@keyframes vf-twinkle {
  0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
  50% { opacity: 0.55; transform: scale(0.8) rotate(10deg); }
}
.vf-badge .sep { width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, 0.55); }
.vf-badge .vf-badge-hl {
  font-weight: 700;
  background: linear-gradient(120deg, #ff8a3d, #ff4d6d, #a855f7, #22d3ee);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Big gradient title */
.vf-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 6rem);
  line-height: 0.98;
  letter-spacing: -1.5px;
  margin: 0.2rem 0 0.6rem;
  background: linear-gradient(110deg, #ff8a4d, #ff4d6d, #a855f7, #22d3ee, #ff8a4d);
  background-size: 260% auto;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 34px rgba(168, 85, 247, 0.35));
  animation: vf-shine 9s linear infinite;
}
@keyframes vf-shine { to { background-position: 260% center; } }

.vf-subtitle {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.15rem, 2.4vw, 1.7rem);
  font-weight: 500;
  line-height: 1.35;
  color: #eaf0ff;
  max-width: 820px;
  margin: 0 auto 1.6rem;
  text-wrap: balance;
}

/* Authors on dark */
.vf-hero .publication-authors { color: #cfd8ec; }
.vf-hero .publication-authors .author-block { margin: 0 0.15rem; }
.vf-hero .publication-authors a { color: #5fdcff !important; font-weight: 600; }
.vf-hero .publication-authors a:hover { color: #b6f0ff !important; }
.vf-affil { color: #9fb0cd; margin-top: 0.3rem; }
.vf-affil sup { color: var(--cool-1); }

/* Buttons */
.vf-buttons {
  display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center;
  margin: 1.8rem 0 0.4rem;
}
.vf-btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.72rem 1.4rem;
  border-radius: 999px;
  font-weight: 600; font-size: 1rem;
  color: #f3f6ff !important;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  position: relative;
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s, background 0.22s;
}
.vf-btn .icon, .vf-btn i { font-size: 1.05rem; }
.vf-btn:hover {
  transform: translateY(-3px);
  background: var(--fusion);
  border-color: transparent;
  box-shadow: 0 16px 38px -14px rgba(168, 85, 247, 0.85);
  color: #fff !important;
}

/* Highlight chips */
.vf-chips {
  display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center;
  margin-top: 2rem;
}
.vf-chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.86rem; font-weight: 500;
  color: #d8e0f2;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.vf-chip i {
  background: var(--fusion);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.vf-chip b { color: #fff; font-weight: 700; }
/* headline contributions get a brighter, tinted pill */
.vf-chip--key {
  color: #eef3ff;
  background: linear-gradient(120deg, rgba(255, 122, 61, 0.18), rgba(168, 85, 247, 0.16) 55%, rgba(34, 211, 238, 0.18));
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 8px 26px -16px rgba(168, 85, 247, 0.9);
}

/* scroll cue */
.vf-scrollcue {
  position: relative; z-index: 2;
  text-align: center; margin-top: 2.2rem;
  color: #8ea0c0; font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase;
}
.vf-scrollcue i { display: block; margin-top: 0.4rem; animation: vf-bob 1.8s ease-in-out infinite; }
@keyframes vf-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ===================== Section headers ===================== */
.section .title.is-3,
.section .title.is-2,
.hero-body .title.is-3,
.container .title.is-3 { color: var(--ink); }

.vf-section-title {
  font-family: 'Space Grotesk', sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: -0.4px;
  position: relative;
  display: inline-block;
  padding-bottom: 0.55rem;
  margin-bottom: 1.4rem !important;
}
.vf-section-title::after {
  content: "";
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 74px; height: 4px; border-radius: 4px;
  background: var(--fusion);
}
.vf-section-title[data-kicker]::before {
  content: attr(data-kicker);
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  background: var(--fusion);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ===================== Light section backgrounds ===================== */
.hero.is-light, .section.hero.is-light {
  background: linear-gradient(180deg, #f4f7ff 0%, #eef2fb 100%) !important;
}

/* ===================== Figures / images ===================== */
.vf-figure {
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  transition: transform 0.35s cubic-bezier(0.2,0.7,0.2,1), box-shadow 0.35s;
}
.vf-figure:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px -24px rgba(20, 28, 48, 0.5);
}
.vf-figure img { display: block; width: 100%; }

.section img:not(.vf-media):not(.vf-figure img),
.teaser img {
  border-radius: 14px;
}

/* teaser caption */
.subtitle.has-text-centered { color: var(--ink-soft); }

/* Abstract card */
.vf-abstract {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 2.2rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.vf-abstract::before {
  content: ""; position: absolute; top: 0; left: 0; width: 5px; height: 100%;
  background: var(--fusion);
}
.vf-abstract .content { font-size: 1.06rem; line-height: 1.75; color: #2a3142; }

/* ===================== Galleries (tabbed) ===================== */
.vf-gallery { margin: 0 auto; max-width: 100%; }
.vf-stage {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0c1120;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.vf-media { display: block; width: 100%; height: auto; }

.vf-caption {
  margin-top: 0.9rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
}

.vf-tabs {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 0.5rem;
  margin-top: 1.1rem;
}
.vf-tab {
  padding: 0.45rem 1.05rem;
  border-radius: 999px;
  font-size: 0.9rem; font-weight: 600;
  color: var(--ink-soft);
  background: #eef1f8;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.22s ease;
  white-space: nowrap;
}
.vf-tab:hover { color: var(--ink); background: #e3e8f4; transform: translateY(-1px); }
.vf-tab.is-active {
  color: #fff;
  background: var(--fusion);
  box-shadow: 0 10px 24px -10px rgba(168, 85, 247, 0.75);
  border-color: transparent;
}
.vf-arrow {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff; color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
}
.vf-arrow:hover { background: var(--ink); color: #fff; transform: translateY(-1px); }

/* ===================== BibTeX ===================== */
.vf-cite {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-card);
  background: #0c1120;
}
.vf-cite__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 1.1rem;
  background: linear-gradient(90deg, rgba(255,122,61,0.14), rgba(34,211,238,0.14));
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.vf-cite__head .label {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  color: #e8eefc; letter-spacing: 0.4px;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.vf-cite__head .label .dots { display: inline-flex; gap: 5px; }
.vf-cite__head .label .dots i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.vf-cite__head .label .dots i:nth-child(1) { background: #ff5f57; }
.vf-cite__head .label .dots i:nth-child(2) { background: #febc2e; }
.vf-cite__head .label .dots i:nth-child(3) { background: #28c840; }
.vf-copy {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem; font-weight: 600;
  color: #e8eefc;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  cursor: pointer;
  transition: all 0.2s ease;
}
.vf-copy:hover { background: var(--fusion); border-color: transparent; transform: translateY(-1px); }
.vf-cite pre {
  margin: 0; background: #0c1120 !important; color: #cfe3ff;
  padding: 1.2rem 1.3rem; border-radius: 0; overflow-x: auto;
}
.vf-cite pre code { color: #cfe3ff; font-size: 0.9rem; line-height: 1.6; }

/* ===================== Back to top ===================== */
.vf-top {
  position: fixed; bottom: 26px; right: 26px;
  width: 48px; height: 48px;
  border-radius: 50%; border: none; cursor: pointer;
  color: #fff;
  background: var(--fusion);
  box-shadow: 0 14px 34px -10px rgba(168, 85, 247, 0.8);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  opacity: 0; transform: translateY(20px) scale(0.8);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 998;
}
.vf-top.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.vf-top:hover { transform: translateY(-3px) scale(1.05); }

/* ===================== Footer ===================== */
.footer { background: #0c1120; color: #aebbd4; }
.footer .content p { color: #aebbd4; }
.footer a { color: #6fe0ff !important; }
.footer a:hover { color: #b6f0ff !important; }

/* ===================== Scroll reveal ===================== */
/* Only hide-before-reveal when JS is present (.vf-js on <html>), so the page
   still shows all content if the script fails to load. */
.vf-js .vf-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.2,0.7,0.2,1), transform 0.7s cubic-bezier(0.2,0.7,0.2,1);
  will-change: opacity, transform;
}
.vf-js .vf-reveal.in-view { opacity: 1; transform: none; }

/* ===================== Responsive ===================== */
@media (max-width: 768px) {
  .vf-nav__links { display: none; }
  .vf-hero .hero-body { padding: 2.4rem 1rem 2rem; }
  .vf-abstract { padding: 1.4rem 1.2rem; }
  .vf-top { bottom: 16px; right: 16px; }
}

/* ===================== Reduced motion ===================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .vf-aurora span,
  .vf-title,
  .vf-badge,
  .vf-badge::after,
  .vf-badge i,
  .vf-scrollcue i { animation: none !important; }
  .vf-js .vf-reveal { opacity: 1; transform: none; transition: none; }
}
