/*
  ALIGNMENT LAB PROJECT-PAGE STYLESHEET
  Overrides the Bulma-based "nerfies"-style template so individual research
  project pages share the same dark navy + cyan/yellow look as the rest of
  the lab website.
*/

:root {
  --bg: #0a0e1c;
  --panel-bg: rgba(15, 20, 38, 0.6);
  --text: #d1d5db;          /* gray-300 */
  --text-strong: #ffffff;
  --text-muted: #9ca3af;    /* gray-400 */
  --text-faint: #6b7280;    /* gray-500 */
  --accent: #22d3ee;        /* cyan-400 */
  --accent-hover: #67e8f9;  /* cyan-300 */
  --highlight: #fde047;     /* yellow-300 */
  --border: rgba(75, 85, 99, 0.4);          /* gray-600/40 */
  --border-strong: rgba(75, 85, 99, 0.6);
}

/* ── BODY & GLOBAL ─────────────────────────────────── */
html, body {
  background-color: var(--bg) !important;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.7;
}

a {
  color: var(--accent);
  transition: color 0.15s ease;
}
a:hover {
  color: var(--accent-hover);
}

strong { color: var(--text-strong); }

/* ── BULMA STRUCTURAL OVERRIDES ─────────────────────── */
.hero,
.hero-body,
.section,
.footer,
.container {
  background: transparent !important;
}

.section { padding: 3rem 1.5rem; }

/* Soft panel background for the page so the bg.png pattern frames it */
body > section:first-of-type .container,
body > section.section .container {
  background: rgba(10, 14, 28, 0.78);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  border: 1px solid var(--border);
  backdrop-filter: blur(4px);
}

/* ── TITLES ────────────────────────────────────────── */
.title,
.subtitle {
  color: var(--text-strong) !important;
  font-family: "Raleway", sans-serif !important;
  letter-spacing: 0.2px;
}

.publication-title,
.title.is-1 {
  color: var(--text-strong) !important;
  font-family: "Raleway", sans-serif !important;
  font-weight: 600 !important;
  font-size: 2.4rem !important;
  line-height: 1.25 !important;
  margin-bottom: 1.25rem !important;
}

/* Section heading (e.g. Abstract, Video, Related Links) — matches the
   white-underline divider used on the React pages. */
.title.is-3 {
  font-size: 1.6rem !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 1.75rem !important;
  padding-bottom: 0.6rem;
  position: relative;
  display: inline-block;
}
.title.is-3::after {
  content: "";
  display: block;
  width: 80px;
  height: 2px;
  background: var(--text-strong);
  margin-top: 0.55rem;
}
.has-text-centered .title.is-3 {
  display: block;
}
.has-text-centered .title.is-3::after {
  margin-left: auto;
  margin-right: auto;
}

.title.is-4 {
  font-size: 1.15rem !important;
  font-weight: 600 !important;
  color: var(--text-strong) !important;
  margin-top: 1.5rem !important;
  margin-bottom: 0.75rem !important;
}

/* ── AUTHORS ───────────────────────────────────────── */
.publication-authors {
  color: var(--text-muted) !important;
  font-family: "Raleway", sans-serif !important;
  font-size: 1rem !important;
  margin-bottom: 0.4rem !important;
}

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

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

/* ── ACTION BUTTONS (PDF / arXiv / Video / Code) ────── */
.publication-links {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.button.is-dark {
  background-color: rgba(15, 20, 38, 0.85) !important;
  border: 1px solid var(--border-strong) !important;
  color: var(--text) !important;
  font-family: "Raleway", sans-serif !important;
  font-weight: 500 !important;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.15s ease;
}
.button.is-dark:hover {
  background-color: rgba(34, 211, 238, 0.12) !important;
  border-color: var(--accent) !important;
  color: var(--text-strong) !important;
  transform: translateY(-1px);
}
.button.is-dark .icon {
  color: var(--accent) !important;
}

.link-block a {
  margin-top: 5px;
  margin-bottom: 5px;
}

/* ── ABSTRACT / CONTENT BODY ───────────────────────── */
.content {
  color: var(--text);
}
.content p {
  color: var(--text);
  line-height: 1.8;
  font-size: 1rem;
  margin-bottom: 1rem;
}
.content a {
  color: var(--accent);
  border-bottom: 1px solid var(--border-strong);
}
.content a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent);
}
.content strong { color: var(--text-strong); }
.content em { color: var(--text); }

.content ul,
.content ol {
  color: var(--text);
  padding-left: 1.4rem;
}
.content li {
  margin-bottom: 0.4rem;
}

/* ── VIDEO ─────────────────────────────────────────── */
.publication-video {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
  border-radius: 10px !important;
  border: 1px solid var(--border);
  background: var(--panel-bg);
}
.publication-video iframe,
.publication-video video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  border: none;
  background: #000;
}

video {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #000;
}

/* ── INTERPOLATION PANEL ───────────────────────────── */
.interpolation-panel {
  background: var(--panel-bg) !important;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  backdrop-filter: blur(4px);
}
.interpolation-panel .interpolation-image {
  width: 100%;
  border-radius: 6px;
}
.interpolation-panel .slider {
  margin: 0 !important;
}
.interpolation-panel p {
  color: var(--text-muted);
  margin-top: 0.5rem;
}
#interpolation-image-wrapper {
  width: 100%;
  color: var(--text-muted);
}
#interpolation-image-wrapper img {
  border-radius: 6px;
}

/* ── CAROUSEL ──────────────────────────────────────── */
.results-carousel {
  overflow: hidden;
}
.results-carousel .item {
  margin: 5px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0;
  font-size: 0;
  background: var(--panel-bg);
}
.results-carousel video {
  margin: 0;
}

/* ── CODE / BIBTEX ─────────────────────────────────── */
pre {
  background-color: rgba(15, 20, 38, 0.85) !important;
  color: var(--text) !important;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.25rem !important;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.6;
}
pre code {
  background: transparent !important;
  color: var(--text);
  font-family: "SF Mono", Menlo, Monaco, Consolas, "Courier New", monospace;
}
:not(pre) > code {
  background-color: rgba(34, 211, 238, 0.1);
  color: var(--accent);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-family: "SF Mono", Menlo, Monaco, Consolas, "Courier New", monospace;
}

#BibTeX .title {
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 1.4rem !important;
}

/* ── FOOTER ────────────────────────────────────────── */
.footer {
  padding: 2.5rem 1.5rem 4rem;
  margin-top: 2rem;
}
.footer .icon-link {
  font-size: 1.55rem;
  color: var(--text-muted);
  margin: 0 0.6rem;
  transition: color 0.15s ease;
}
.footer .icon-link:hover {
  color: var(--accent);
}
.footer .content {
  color: var(--text-faint);
}
.footer .content p {
  color: var(--text-faint);
  font-size: 0.82rem;
  line-height: 1.6;
}
.footer .content a {
  color: var(--accent);
}
.footer .content a:hover {
  color: var(--accent-hover);
}

/* ── SCROLL TO TOP ────────────────────────────────── */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  background: rgba(34, 211, 238, 0.15);
  color: var(--accent);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.15s ease,
    transform 0.15s ease;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  backdrop-filter: blur(6px);
}
.scroll-to-top:hover {
  background: rgba(34, 211, 238, 0.25);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* ── COPY BIBTEX BUTTON ──────────────────────────── */
.bibtex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.copy-bibtex-btn {
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: "Raleway", sans-serif;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.copy-bibtex-btn:hover {
  background: rgba(34, 211, 238, 0.22);
  border-color: var(--accent);
  color: var(--text-strong);
  transform: translateY(-1px);
}
.copy-bibtex-btn.copied {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #10b981;
}

/* ── VIDEO / CAROUSEL CAPTIONS ───────────────────── */
.video-caption,
.carousel-caption {
  margin-top: 1rem;
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ── MISC LEGACY HOOKS FROM ORIGINAL TEMPLATE ──────── */
.dnerf {
  font-variant: small-caps;
  color: var(--highlight);
}

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

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

.publication-venue {
  color: var(--text-muted);
  width: fit-content;
  font-weight: bold;
}

.publication-awards {
  color: var(--highlight);
  width: fit-content;
  font-weight: bolder;
}
