/* =========================================================
   TTA-VLA Project Page
   Clean stylesheet for static/css/index.css
   ========================================================= */

:root {
  --primary-color: #3273b7;
  --primary-hover: #255f9e;

  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-light: #6b7280;

  --background-primary: #ffffff;
  --background-secondary: #f8fafc;
  --background-accent: #f1f5f9;

  --border-color: #e2e8f0;

  --purple: #8b5cf6;
  --pink: #ec4899;
  --red: #e74c3c;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 8px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 10px 20px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 18px 30px rgba(15, 23, 42, 0.14);

  --radius: 12px;
  --radius-lg: 16px;
  --transition: all 0.25s ease;
}

/* =========================================================
   Base
   ========================================================= */

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  color: var(--text-primary);
  background: var(--background-primary);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

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

.hero.is-light,
.section-light {
  background: var(--background-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

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

.section {
  padding: 4rem 1.5rem;
}

#overview,
#motivation,
#framework,
#method,
#experiments,
#bibtex {
  scroll-margin-top: 90px;
}

/* =========================================================
   Navigation
   ========================================================= */

.page-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
}

.page-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: center;
  gap: 2.2rem;
  overflow-x: auto;
  white-space: nowrap;
}

.page-nav-link {
  position: relative;
  display: inline-block;
  padding: 1rem 0;
  color: #555555;
  font-size: 1.05rem;
  font-weight: 700;
}

.page-nav-link:hover,
.page-nav-link.active {
  color: var(--primary-color);
}

.page-nav-link.active::after,
.page-nav-link:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--primary-color);
}

/* =========================================================
   Header
   ========================================================= */

.publication-header .hero-body {
  padding: 5.5rem 1.5rem 3.6rem;
}

.title-wide {
  width: 96vw;
  max-width: 1500px;
  margin-left: 50%;
  transform: translateX(-50%);
}

.publication-title {
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif !important;
  color: #111827 !important;
  font-weight: 800 !important;
  line-height: 1.12 !important;
  letter-spacing: 0.018em;
  margin-bottom: 0.7rem !important;
}

.publication-venue {
  color: #374151;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1.8rem;
}

.publication-authors,
.publication-affiliations {
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif !important;
  line-height: 1.55;
  letter-spacing: 0.03em;
}

.publication-authors {
  margin-bottom: 0.7rem;
  font-weight: 500;
}

.publication-affiliations {
  margin-bottom: 1.65rem;
  font-weight: 500;
}

.publication-authors a {
  color: #2563eb !important;
  font-weight: 700;
}

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

.publication-links {
  margin-top: 0.6rem;
  margin-bottom: 1.2rem;
}

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

.button {
  border: none !important;
  border-radius: var(--radius) !important;
  font-weight: 700 !important;
  transition: var(--transition) !important;
}

.button.is-dark {
  color: #ffffff !important;
  background: #111827 !important;
  box-shadow: var(--shadow-md);
}

.button.is-dark:hover {
  background: var(--primary-color) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.publication-keywords {
  margin-top: 1.3rem;
  text-align: center;
  font-size: 1.05rem;
}

.keyword-label {
  margin-right: 0.5rem;
  color: var(--text-primary);
  font-weight: 800;
}

.keyword-tag {
  display: inline-block;
  margin: 0.2rem 0.25rem;
  padding: 0.36rem 0.82rem;
  border-radius: 999px;
  background: var(--background-accent);
  color: #334155;
  font-weight: 600;
}

.summary-box {
  max-width: min(1000px, 92vw);
  margin: 1.35rem auto 0;
  padding: 1.15rem 1.65rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--background-secondary);
  text-align: center;
}

.summary-label {
  display: inline-block;
  margin-bottom: 0.48rem;
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.summary-box p {
  margin: 0;
  color: #374151;
  font-size: 1.12rem;
  line-height: 1.5;
}

.summary-box b {
  color: var(--text-primary);
}


.summary-image {
  display: block;
  width: 70%;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
}

.summary-figure-card {
  max-width: 500px;
  margin: 1.4rem auto 0;
  padding: 0.9rem 1rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}


/* =========================================================
   Section titles and text
   ========================================================= */

.title.is-3 {
  position: relative;
  margin-bottom: 2rem !important;
  padding-bottom: 1rem;
  color: var(--text-primary);
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif !important;
  font-weight: 800 !important;
  text-align: center;
}

.title.is-3::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 60px;
  height: 3px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--purple), var(--pink));
}

.readable-content {
  max-width: 820px;
  margin: 0 auto;
}

.content.has-text-justified {
  color: var(--text-secondary);
  font-size: 1.08rem;
  line-height: 1.72;
  letter-spacing: 0;
  text-align: justify !important;
  text-justify: inter-word;
  word-break: normal;
  overflow-wrap: normal;
}

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

.content.has-text-justified b {
  color: var(--text-primary);
  font-weight: 700;
}

/* =========================================================
   Figures and videos
   ========================================================= */

.figure-container {
  max-width: 820px;
  margin: 0 auto 1.4rem;
}

.center-img {
  display: block;
  height: auto;
  margin: 0 auto;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.publication-video {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-xl);
}

.publication-video video,
.publication-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--radius-lg);
}

.figure-card {
  max-width: 760px;
  margin: 0 auto 1.7rem;
  padding: 1.2rem 1.4rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.figure-card .figure-container {
  margin-bottom: 0;
}

/* =========================================================
   Motivation
   ========================================================= */

.motivation-section {
  padding-top: 4rem;
}

.motivation-takeaway {
  max-width: 500px;
  margin: 0 auto 2rem;
  padding: 1rem 1.4rem;
  border-left: 4px solid var(--red);
  background: #fff6f4;
  color: #333333;
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
}

.motivation-figure {
  text-align: center;
  margin: 0 auto 1.5rem;
}

.motivation-img {
  width: 100%;
  max-width: 760px;
}

.motivation-text {
  max-width: 820px;
  margin: 0 auto;
}

/* =========================================================
   Framework
   ========================================================= */

.takeaway-box {
  max-width: 750px;
  margin: 1.4rem auto 1.8rem;
  padding: 1rem 1.15rem;
  background: linear-gradient(90deg, #faf5ff, #fff1f2);
  border-left: 4px solid #a855f7;
  border-radius: 14px;
}

.takeaway-label {
  display: block;
  margin-bottom: 0.25rem;
  color: #7c3aed;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.takeaway-box p {
  margin: 0;
  color: #374151;
  font-size: 0.92rem;
  line-height: 1.6;
}

.overview-figure {
  margin: 0 auto 2.2rem;
  text-align: center;
}

.overview-img {
  width: 50%;
  max-width: 520px;
}

.framework-cards {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.framework-card {
  padding: 1.15rem 1.2rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.card-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 22px;
  margin-bottom: 0.7rem;
  border-radius: 999px;
  background: #f3e8ff;
  color: var(--purple);
  font-size: 0.72rem;
  font-weight: 800;
}

.framework-card h4 {
  margin: 0 0 0.45rem;
  color: #111827;
  font-size: 0.98rem;
  font-weight: 700;
}

.framework-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.55;
}

/* =========================================================
   Method
   ========================================================= */

.method-takeaway {
  max-width: 900px;
  margin: 1.4rem auto 2rem;
  padding: 1.15rem 1.4rem;
  background: linear-gradient(90deg, #faf5ff, #fff1f2);
  border-left: 4px solid #a855f7;
  border-radius: 16px;
  text-align: left;
}

.method-takeaway p {
  margin: 0;
  color: #374151;
  font-size: 1rem;
  line-height: 1.65;
}

.method-card {
  max-width: 820px;
}

.method-figure {
  margin-top: 0;
  margin-bottom: 0;
}

.method-img {
  width: 100%;
  max-width: 720px;
}

.method-bullets {
  max-width: 820px;
  margin: 1.6rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.method-bullet {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 0.9rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.method-bullet:last-child {
  border-bottom: none;
}

.bullet-index {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #111827;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
}

.method-bullet h4 {
  margin: 0 0 0.25rem;
  color: #111827;
  font-size: 0.98rem;
  font-weight: 700;
}

.method-bullet p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}

.method-title {
  margin-bottom: 0.4rem;
}

.method-subtitle {
  text-align: center;
  font-size: 1.15rem;
  color: #6b7280;
  font-weight: 500;
  letter-spacing: 0.06em;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.method-subtitle b {
  color: #111827;
  font-weight: 800;
}


/* =========================================================
   Experiments
   ========================================================= */

#experiments .container {
  max-width: 1200px;
}

.experiment-row {
  margin-bottom: 3rem;
}

.experiment-row:last-child {
  margin-bottom: 0;
}

.experiment-title {
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 800;
  text-align: center;
}

.experiment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.benchmark-grid .experiment-video:nth-child(3) {
  grid-column: 1 / -1;
  width: calc((100% - 2rem) / 2);
  justify-self: center;
}

.experiment-video video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/* =========================================================
   BibTeX and footer
   ========================================================= */

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

.bibtex-header .title {
  margin-bottom: 0 !important;
}

.copy-bibtex-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: var(--radius);
  background: var(--primary-color);
  color: #ffffff;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  transition: var(--transition);
}

.copy-bibtex-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.copy-bibtex-btn.copied {
  background: #10b981;
}

pre {
  padding: 1.4rem !important;
  overflow-x: auto;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius) !important;
  background: var(--background-accent) !important;
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem !important;
}

code {
  background: transparent !important;
  color: var(--text-primary) !important;
  font-family: "SF Mono", Monaco, Consolas, monospace !important;
}

.footer {
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--background-secondary);
}

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

/* =========================================================
   Scroll to top
   ========================================================= */

.scroll-to-top {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  z-index: 999;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--primary-color);
  color: #ffffff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  font-size: 1.2rem;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.scroll-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

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

/* =========================================================
   Responsive
   ========================================================= */

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

  .publication-header .hero-body {
    padding: 3rem 1rem 2rem;
  }

  .section {
    padding: 3rem 1rem;
  }

  .title-wide {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    transform: none;
  }

  .publication-title {
    font-size: 2.4rem !important;
    line-height: 1.18 !important;
    margin-bottom: 0.6rem !important;
  }

  .publication-venue {
    font-size: 1.15rem !important;
    margin-bottom: 1.4rem;
  }

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

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

  .summary-box {
    padding: 1rem 1.1rem;
  }

  .summary-box p {
    font-size: 1.02rem;
  }

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

  .overview-img {
    width: 100%;
    max-width: 420px;
  }

  .framework-cards {
    grid-template-columns: 1fr;
    max-width: 520px;
  }

  .experiment-grid {
    grid-template-columns: 1fr;
  }

  .benchmark-grid .experiment-video:nth-child(3) {
    grid-column: auto;
    width: 100%;
  }

  .bibtex-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .link-block {
    display: block;
    margin-bottom: 0.5rem;
  }

  .button {
    width: 100%;
    justify-content: center;
  }

  .page-nav-inner {
    justify-content: flex-start;
    gap: 1.4rem;
  }
}
