/* ===== Academic Paper Project Page Styles ===== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Noto+Sans:wght@400;600;700&family=Castoro:ital@0;1&display=swap');

/* ── Root Variables ─────────────────────────────── */
:root {
  --primary:   #2c3e6b;   /* deep navy */
  --accent:    #4a6cf7;   /* bright blue */
  --accent2:   #7c3aed;   /* purple accent */
  --light-bg:  #f8faff;
  --card-bg:   #ffffff;
  --text-main: #1a1a2e;
  --text-muted:#6c757d;
  --border:    #e2e8f0;
  --hero-grad: linear-gradient(135deg, #1a1a3e 0%, #2c3e6b 50%, #1e3a5f 100%);
  --section-alt: #f0f4ff;
}

/* ── Typography ──────────────────────────────────── */
body {
  font-family: 'Noto Sans', sans-serif;
  color: var(--text-main);
  background: #fff;
  overflow-x: hidden;
}

.title, .subtitle {
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
}

/* ── Navbar ──────────────────────────────────────── */
.navbar {
  background: rgba(26, 26, 62, 0.95) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand .navbar-item {
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #ffffff !important;
  letter-spacing: 0.02em;
}

.navbar-item:hover {
  background: transparent !important;
  color: var(--accent) !important;
}

.navbar-menu {
  background: transparent !important;
}

.navbar-end .navbar-item {
  color: rgba(255,255,255,0.75) !important;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.navbar-end .navbar-item:hover {
  color: #fff !important;
}

/* ── Hero ────────────────────────────────────────── */
.hero.is-dark-custom {
  background: var(--hero-grad);
  padding: 4rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero.is-dark-custom::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 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='%23ffffff' fill-opacity='0.025'%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;
}

.publication-title {
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
  margin-bottom: 1.2rem;
}

@media (max-width: 768px) {
  .publication-title { font-size: 1.6rem; }
}

.publication-venue {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #fff;
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.35rem 1.1rem;
  border-radius: 2rem;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px rgba(74,108,247,0.4);
}

/* ── Authors ────────────────────────────────────── */
.author-block {
  display: inline-block;
  margin: 0 0.35rem 0.5rem;
}

.author-block a {
  color: #5AABF0;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: color 0.2s;
  border-bottom: 1px dotted rgba(90,171,240,0.5);
}

.author-block a:hover {
  color: #fff;
  border-bottom-color: #fff;
}

.affiliation {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.equal-contrib-note {
  color: rgba(255,255,255,0.5);
  font-size: 0.82rem;
  font-style: italic;
  margin-top: 0.4rem;
}

/* ── Link Buttons ───────────────────────────────── */
.link-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 1.6rem;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.3rem;
  border-radius: 2rem;
  font-family: 'Google Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.link-btn.primary-btn {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.35);
  backdrop-filter: blur(6px);
}

.link-btn.primary-btn:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.link-btn.disabled-btn {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.45);
  border: 1.5px solid rgba(255,255,255,0.15);
  cursor: not-allowed;
}

/* ── Teaser Image ───────────────────────────────── */
.teaser-container {
  margin-top: 2.5rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.teaser-container img {
  width: 100%;
  display: block;
}

.teaser-caption {
  color: rgba(255,255,255,0.65);
  font-size: 0.88rem;
  text-align: center;
  margin-top: 0.8rem;
  font-style: italic;
  line-height: 1.5;
}

/* ── Sections ───────────────────────────────────── */
.section-custom {
  padding: 4rem 0;
}

.section-custom.alt-bg {
  background: var(--section-alt);
}

.section-title {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  margin-top: 0.4rem;
}

/* ── Abstract ───────────────────────────────────── */
.abstract-text {
  font-size: 1rem;
  line-height: 1.85;
  color: #2d2d2d;
  text-align: justify;
}

/* ── Video ──────────────────────────────────────── */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-caption {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  font-style: italic;
}

/* ── Result Gallery ─────────────────────────────── */
.result-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border);
}

.result-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.result-card img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.result-card .card-label {
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: #fafafa;
  border-top: 1px solid var(--border);
  text-align: center;
}

/* ── Comparison Slider ──────────────────────────── */
.comparison-container {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: col-resize;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  user-select: none;
}

.comparison-container .before,
.comparison-container .after {
  width: 100%;
  display: block;
}

.comparison-container .after {
  position: absolute;
  top: 0;
  left: 0;
  clip-path: inset(0 50% 0 0);
  transition: clip-path 0s;
}

.slider-handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 100%;
  background: #fff;
  transform: translateX(-50%);
  box-shadow: 0 0 8px rgba(0,0,0,0.5);
  pointer-events: none;
}

.slider-handle::before,
.slider-handle::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.slider-handle::before { top: calc(50% - 18px); }

.comparison-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Results Table ──────────────────────────────── */
.results-table {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
  border: 1px solid var(--border);
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}

.results-table thead tr {
  background: var(--primary);
  color: #fff;
}

.results-table thead th {
  padding: 0.75rem 1rem;
  font-family: 'Google Sans', sans-serif;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.03em;
}

.results-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.results-table tbody tr:hover {
  background: #f0f4ff;
}

.results-table tbody tr.highlight {
  background: #eef3ff;
  font-weight: 700;
}

.results-table tbody td {
  padding: 0.65rem 1rem;
  text-align: center;
  vertical-align: middle;
}

.results-table tbody td:first-child {
  text-align: left;
  font-weight: 600;
}

.best-value {
  color: var(--accent);
  font-weight: 700;
}

/* ── BibTeX ─────────────────────────────────────── */
.bibtex-container {
  position: relative;
  background: #1a1a2e;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
}

.bibtex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1.2rem;
  background: rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.bibtex-header span {
  font-family: 'Google Sans', monospace;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
}

.copy-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
  border-radius: 6px;
  padding: 0.3rem 0.8rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

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

.copy-btn.copied {
  background: rgba(72,199,142,0.2);
  border-color: rgba(72,199,142,0.5);
  color: #48c78e;
}

.bibtex-code {
  padding: 1.2rem 1.5rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #b3c8ff;
  white-space: pre;
  overflow-x: auto;
  margin: 0;
}

.bibtex-code .key   { color: #f7c873; }
.bibtex-code .value { color: #7ec8a0; }
.bibtex-code .brace { color: #d4a5ff; }

/* ── More Works ─────────────────────────────────── */
.more-works-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: var(--text-main);
  display: block;
}

.more-works-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(-3px);
  color: var(--primary);
}

.more-works-card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  object-fit: cover;
  height: 140px;
}

.more-works-card .card-title {
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.more-works-card .card-venue {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Footer ─────────────────────────────────────── */
.footer-custom {
  background: #1a1a2e;
  color: rgba(255,255,255,0.55);
  text-align: center;
  padding: 2.5rem 1rem;
  font-size: 0.88rem;
  line-height: 1.8;
}

.footer-custom a {
  color: #b3c8ff;
  text-decoration: none;
}

.footer-custom a:hover {
  color: #fff;
}

.footer-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 1rem auto;
  max-width: 200px;
}

/* ── Scroll animations ──────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ── Utilities ──────────────────────────────────── */
.has-text-gradient {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tag-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: #eef3ff;
  color: var(--accent);
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  margin: 0.15rem;
}

.separator {
  height: 1px;
  background: var(--border);
  margin: 0 1rem;
  display: inline-block;
  width: 20px;
  vertical-align: middle;
}

.superscript-star {
  color: #f7c873;
  font-size: 0.75em;
  vertical-align: super;
}

/* ── Responsive tweaks ───────────────────────────── */
@media (max-width: 768px) {
  .section-custom { padding: 2.5rem 0; }
  .link-buttons { flex-direction: column; align-items: center; }
  .link-btn { width: 200px; justify-content: center; }
}
