:root {
  --abyss: #010B14;
  --midwater: #041A2A;
  --surface-water: #06283D;
  --body-text: #DCEEF2;
  --caption-text: #8FB6C6;
  --heading-teal: #5EEAD4;
  --ice-link: #7DD3FC;
  --neon-sky: #38BDF8;
  --neon-cyan: #22D3EE;
  --neon-teal: #2DD4BF;
  --glass-bg: rgba(13, 42, 58, 0.55);
  --glass-border: rgba(94, 234, 212, 0.22);
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--body-text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  background:
    radial-gradient(120% 50% at 50% -10%, rgba(56, 189, 248, 0.14) 0%, rgba(56, 189, 248, 0) 55%),
    linear-gradient(180deg, var(--surface-water) 0%, var(--midwater) 42%, var(--abyss) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#main-content {
  max-width: 1200px;
  margin: 0 auto;
  background: transparent;
}

.hero {
  position: relative;
  overflow: hidden;
  background: transparent;
}

.hero-body {
  padding: 4rem 1.5rem;
}

.deep-hero .caustics {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  background:
    radial-gradient(38% 22% at 22% 8%, rgba(125, 211, 252, 0.10) 0%, transparent 70%),
    radial-gradient(30% 18% at 68% 4%, rgba(94, 234, 212, 0.09) 0%, transparent 70%),
    radial-gradient(24% 16% at 45% 14%, rgba(34, 211, 238, 0.07) 0%, transparent 70%);
  filter: blur(6px);
  animation: causticsDrift 11s ease-in-out infinite alternate;
}

@keyframes causticsDrift {
  from { transform: translate3d(-2.5%, -1%, 0) scale(1); }
  to   { transform: translate3d(2.5%, 1.5%, 0) scale(1.06); }
}

.bubble {
  position: absolute;
  bottom: -14px;
  border-radius: 50%;
  border: 1px solid rgba(125, 211, 252, 0.35);
  background: radial-gradient(circle at 32% 30%, rgba(220, 238, 242, 0.35), rgba(125, 211, 252, 0.06) 60%);
  animation: bubbleRise linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes bubbleRise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  8%   { opacity: 0.8; }
  92%  { opacity: 0.5; }
  100% { transform: translateY(-80vh) translateX(12px); opacity: 0; }
}

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

@keyframes titleGlowPulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}

.publication-title {
  position: relative;
  isolation: isolate;
  font-family: 'Space Grotesk', 'Inter', sans-serif !important;
  font-weight: 700 !important;
  font-size: 2.5rem !important;
  line-height: 1.25 !important;
  color: #FFFFFF !important;
  -webkit-text-stroke: 0.6px rgba(125, 211, 252, 0.5);
  text-shadow:
    0 0 2px rgba(190, 230, 252, 0.4),
    0 0 20px rgba(56, 189, 248, 0.55),
    0 0 46px rgba(56, 189, 248, 0.3);
  margin-bottom: 2rem !important;
}

.publication-title::before {
  content: "";
  position: absolute;
  inset: -12px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side,
    rgba(56, 189, 248, 0.5) 0%,
    rgba(56, 189, 248, 0) 70%);
  filter: blur(18px);
  animation: titleGlowPulse 3.2s ease-in-out infinite;
  will-change: opacity;
}

.publication-title .t1,
.publication-title .t2 {
  display: block;
  white-space: nowrap;
}

@media screen and (max-width: 900px) {
  .publication-title { font-size: 2rem !important; }
}

@media screen and (max-width: 720px) {
  .publication-title { font-size: 1.6rem !important; }
}

@media screen and (max-width: 590px) {
  .publication-title { font-size: 1.35rem !important; }
}

@media screen and (max-width: 500px) {
  .publication-title { font-size: 1.12rem !important; }
}

.publication-authors {
  font-family: 'Inter', sans-serif !important;
  font-weight: 500;
  margin-bottom: 1.5rem;
  color: var(--body-text);
}

.publication-authors a {
  color: var(--ice-link) !important;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
}

.publication-authors a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: linear-gradient(90deg, var(--neon-sky), var(--neon-teal));
  transition: var(--transition);
}

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

.publication-authors a:hover {
  color: var(--heading-teal) !important;
}

.publication-authors .and-word {
  color: #FFFFFF;
  font-weight: 500;
  margin: 0 0.15rem;
}

.publication-authors a.affil-link {
  color: #CBE7F7 !important;
  font-weight: 500;
}

.publication-authors a.affil-link:hover {
  color: #EAF6FD !important;
}

.author-block {
  display: inline-block;
  margin-right: 0.5rem;
}

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

.under-review-badge {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.35rem 1.1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: linear-gradient(90deg, #2DD4BF, #FFFFFF, #2DD4BF);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: badgeColorFlow 3s ease infinite;
  border: 2px solid rgba(45, 212, 191, 0.6);
  box-shadow: 0 0 14px rgba(45, 212, 191, 0.22);
}

.button {
  border-radius: 999px !important;
  font-weight: 600 !important;
  transition: var(--transition) !important;
  position: relative;
}

.button.is-dark {
  background: var(--glass-bg) !important;
  border: 1px solid rgba(94, 234, 212, 0.35) !important;
  color: #DCF7F0 !important;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(1, 11, 20, 0.5);
}

.button.is-dark:hover {
  transform: translateY(-2px);
  border-color: var(--neon-cyan) !important;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.35), 0 6px 18px rgba(1, 11, 20, 0.5);
  color: #FFFFFF !important;
}

.button.is-dark:active {
  transform: translateY(0);
}

.disabled-btn {
  opacity: 0.55;
  cursor: not-allowed;
}

.disabled-btn:hover {
  transform: none !important;
  border-color: rgba(94, 234, 212, 0.35) !important;
  box-shadow: 0 4px 14px rgba(1, 11, 20, 0.5) !important;
}

.link-block .button {
  margin: 8px 4px;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.section {
  background: transparent;
}

.title.is-3 {
  font-family: 'Space Grotesk', 'Inter', sans-serif !important;
  font-weight: 700 !important;
  color: var(--heading-teal) !important;
  text-shadow: 0 0 22px rgba(94, 234, 212, 0.35);
  margin-bottom: 2rem !important;
  position: relative;
  padding-bottom: 1rem;
}

.title.is-3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-sky), var(--neon-teal));
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
}

.content.has-text-justified {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--body-text);
}

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

.fig-caption {
  margin-top: 1rem;
  text-align: left;
  color: var(--caption-text);
  font-size: 0.95rem;
  line-height: 1.6;
}

.fig-caption strong {
  color: var(--heading-teal);
}

.teaser-video-section {
  padding-top: 1rem;
}

.teaser-video-frame {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  backdrop-filter: blur(10px);
  padding: 0.75rem;
  box-shadow: 0 12px 32px rgba(1, 11, 20, 0.5), 0 0 28px rgba(34, 211, 238, 0.08);
}

.teaser-video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  background: #041A2A;
}

.content figure img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: var(--border-radius);
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(1, 11, 20, 0.55), 0 0 0 1px rgba(94, 234, 212, 0.12);
  transition: var(--transition);
}

.content figure {
  margin: 0;
}

.content figure + figure {
  margin-top: 3.5rem;
}

.content figure img:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(1, 11, 20, 0.6), 0 0 24px rgba(34, 211, 238, 0.18);
}

.viewer-lead {
  text-align: center;
  color: var(--caption-text);
  font-size: 1rem;
  margin-bottom: 1.75rem;
}

#viewer3d-root {
  width: 100%;
}

.v3d-frame {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  backdrop-filter: blur(10px);
  padding: 1.1rem 1.1rem 1.25rem;
  box-shadow: 0 12px 32px rgba(1, 11, 20, 0.5), 0 0 28px rgba(34, 211, 238, 0.08);
}

.v3d-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 2rem;
  margin-bottom: 1rem;
}

.v3d-group {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.v3d-group-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--heading-teal);
  text-transform: uppercase;
}

.v3d-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.v3d-pill {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--body-text);
  background: rgba(4, 26, 42, 0.6);
  border: 1px solid rgba(94, 234, 212, 0.25);
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}

.v3d-pill:hover {
  border-color: var(--neon-cyan);
  color: #FFFFFF;
}

.v3d-pill.active {
  background: rgba(34, 211, 238, 0.16);
  border-color: var(--neon-cyan);
  color: #F0FDFF;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.35);
}

.v3d-canvas-wrap {
  position: relative;
  width: 100%;
  height: 480px;
  background: #ffffff;
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.45);
  box-shadow: inset 0 0 0 1px rgba(4, 26, 42, 0.06), 0 0 22px rgba(56, 189, 248, 0.15);
}

.v3d-canvas-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.v3d-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-align: center;
  padding: 1rem;
  background:
    radial-gradient(60% 45% at 50% 42%, rgba(56, 189, 248, 0.08) 0%, rgba(56, 189, 248, 0) 70%),
    #ffffff;
  z-index: 2;
}

.v3d-empty-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #16405B;
}

.v3d-empty-sub {
  font-size: 0.9rem;
  color: #5B7A8C;
}

.v3d-status {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #3D637A;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(22, 64, 91, 0.12);
  border-radius: 999px;
  padding: 0.2rem 0.8rem;
  z-index: 3;
}

.v3d-status:empty {
  display: none;
}

.v3d-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f4fbfe 100%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.v3d-loading.active {
  opacity: 1;
  visibility: visible;
}

.v3d-water {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  background:
    linear-gradient(180deg,
      rgba(94, 234, 212, 0.34) 0%,
      rgba(56, 189, 248, 0.42) 45%,
      rgba(14, 116, 144, 0.52) 100%);
  transition: height 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.v3d-wave-layer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 46px;
  overflow: hidden;
}

.v3d-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 200%;
  height: 100%;
}

.v3d-wave path {
  fill: rgba(56, 189, 248, 0.58);
}

.v3d-wave-back {
  animation: v3dWaveDrift 7s linear infinite;
}

.v3d-wave-front {
  animation: v3dWaveDrift 4.5s linear infinite reverse;
}

.v3d-wave-front path {
  fill: rgba(45, 212, 191, 0.72);
}

@keyframes v3dWaveDrift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.v3d-drop {
  position: absolute;
  bottom: 4%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.8), rgba(125, 211, 252, 0.1) 65%);
  animation-name: v3dDropRise;
  animation-timing-function: ease-in;
  animation-iteration-count: infinite;
  opacity: 0;
}

@keyframes v3dDropRise {
  0%   { transform: translateY(0) scale(0.7); opacity: 0; }
  15%  { opacity: 0.85; }
  85%  { opacity: 0.5; }
  100% { transform: translateY(-260px) scale(1.15); opacity: 0; }
}

.v3d-loading-caption {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-align: center;
  padding: 1rem;
  pointer-events: none;
}

.v3d-loading-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f3B52;
  text-shadow: 0 1px 6px rgba(255, 255, 255, 0.85);
}

.v3d-loading-pct {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #2C6B85;
  text-shadow: 0 1px 6px rgba(255, 255, 255, 0.85);
}

.v3d-loading.decoding .v3d-loading-pct {
  animation: v3dDecodePulse 1.1s ease-in-out infinite;
}

@keyframes v3dDecodePulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.42; }
}

@media (prefers-reduced-motion: reduce) {
  .v3d-wave-back,
  .v3d-wave-front,
  .v3d-drop,
  .v3d-loading.decoding .v3d-loading-pct {
    animation: none;
  }

  .v3d-drop {
    opacity: 0.5;
  }
}

@media screen and (max-width: 768px) {
  .v3d-canvas-wrap {
    height: 360px;
  }
}

.bibtex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.bibtex-header .title {
  color: var(--heading-teal) !important;
  font-family: 'Space Grotesk', 'Inter', sans-serif !important;
  text-shadow: 0 0 22px rgba(94, 234, 212, 0.35);
  margin-bottom: 0 !important;
}

.copy-bibtex-btn {
  background: var(--glass-bg);
  color: var(--heading-teal);
  border: 1px solid rgba(94, 234, 212, 0.4);
  border-radius: var(--border-radius);
  padding: 0.7rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.copy-bibtex-btn:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.35);
  transform: translateY(-2px);
  color: #FFFFFF;
}

.copy-bibtex-btn.copied {
  background: rgba(45, 212, 191, 0.25);
  border-color: var(--neon-teal);
  color: #FFFFFF;
}

pre {
  background: rgba(4, 26, 42, 0.8) !important;
  border: 1px solid var(--glass-border) !important;
  border-left: 3px solid var(--neon-cyan) !important;
  border-radius: var(--border-radius) !important;
  padding: 1.5rem !important;
  font-size: 0.9rem !important;
  overflow-x: auto;
  box-shadow: 0 8px 24px rgba(1, 11, 20, 0.45);
}

code {
  background: transparent !important;
  color: var(--ice-link) !important;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace !important;
}

.footer {
  background: rgba(1, 11, 20, 0.7) !important;
  border-top: 1px solid rgba(94, 234, 212, 0.15);
  padding: 3rem 1.5rem;
}

.footer .content {
  color: var(--caption-text);
  line-height: 1.7;
}

.footer a {
  color: var(--ice-link);
  text-decoration: none;
  transition: var(--transition);
}

.footer a:hover {
  color: var(--heading-teal);
  text-decoration: underline;
}

.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--glass-bg);
  color: var(--heading-teal);
  border: 1px solid rgba(94, 234, 212, 0.4);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(1, 11, 20, 0.5);
}

.scroll-to-top:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.4);
  transform: translateY(-3px);
  color: #FFFFFF;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

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

.hero, .section {
  animation: fadeInUp 0.6s ease-out;
}

.button:focus,
a:focus {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}

@media screen and (max-width: 768px) {
  .hero-body {
    padding: 2.5rem 1rem;
  }

  .publication-authors {
    font-size: 1rem !important;
  }

  .button {
    margin: 0.25rem !important;
    font-size: 0.875rem !important;
    padding: 0.7rem 1rem !important;
  }

  .content.has-text-justified {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .deep-hero .caustics,
  .bubble,
  .publication-title::before,
  .under-review-badge {
    animation: none;
  }
}
