/* ===== RAPIDS Project Page Styles ===== */

/* ===== Global ===== */
body {
  font-family: 'Inter', 'Google Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1a1a2e;
  line-height: 1.65;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(50, 115, 220, 0.2);
  color: #1a1a2e;
}

/* ===== Scroll Progress Bar ===== */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #3273dc, #00d1b2, #845ef7);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
}

/* ===== Sticky Navigation ===== */
.navbar.is-rapids {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar.is-rapids .navbar-item {
  font-family: 'Google Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: #363636;
  transition: color 0.2s;
}

.navbar.is-rapids .navbar-item:hover {
  color: #3273dc;
  background: transparent;
}

.navbar.is-rapids .navbar-brand .navbar-item {
  font-weight: 700;
  font-size: 1rem;
  color: #3273dc;
}

/* ===== Hero Gradient Animation ===== */
.hero {
  background: linear-gradient(-45deg, #e8f4fd, #f0e6ff, #e6f9f0, #fff5e6);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

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

/* Typography */
.publication-title {
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

.publication-authors {
  font-family: 'Google Sans', sans-serif;
  margin-bottom: 0.5rem;
}

.publication-authors a {
  color: hsl(204, 86%, 53%);
}

.publication-authors a:hover {
  text-decoration: underline;
}

.author-block {
  display: inline-block;
}

.publication-links .button {
  margin: 0.25rem 0.15rem;
}

/* Section */
.section {
  padding: 3rem 1.5rem;
}

.content p, .content li {
  font-size: 0.95rem;
  color: #2c3e50;
}

h2.title.is-3 {
  font-family: 'Google Sans', sans-serif;
  letter-spacing: -0.02em;
  color: #1a1a2e;
}

html {
  scroll-behavior: smooth;
}

/* ===== Stat Counters ===== */
.stat-box {
  text-align: center;
  padding: 1.25rem 0.75rem;
  transition: transform 0.25s ease;
}

.stat-box .stat-number {
  font-family: 'Google Sans', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: #3273dc;
  display: block;
  line-height: 1;
}

.stat-box .stat-label {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.5rem;
  display: block;
}

.stat-box:hover {
  transform: scale(1.05);
}

.stat-box:hover .stat-number {
  color: #1a56c4;
  transition: color 0.25s ease;
}

/* ===== Differentiator Cards ===== */
.diff-card {
  background: white;
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.07);
  height: 100%;
  border-top: 4px solid;
  transition: transform 0.2s, box-shadow 0.2s;
}

.diff-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 12px 35px rgba(50, 115, 220, 0.15);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.diff-card h4 {
  font-family: 'Google Sans', sans-serif;
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
}

.diff-card p {
  font-size: 0.93rem;
  color: #444;
  line-height: 1.6;
}

.diff-1 { border-top-color: #3273dc; }
.diff-2 { border-top-color: #00d1b2; }
.diff-3 { border-top-color: #ff3860; }

/* ===== Agent Detail Cards ===== */
.agent-detail {
  background: white;
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.07);
  overflow: hidden;
  height: 100%;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.agent-detail:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.agent-detail .agent-header {
  padding: 1.25rem 1.5rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.agent-detail .agent-header i {
  font-size: 1.4rem;
}

.agent-detail .agent-header h4 {
  font-family: 'Google Sans', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0;
  color: white;
}

.agent-detail .agent-header .agent-id {
  font-size: 0.8rem;
  opacity: 0.85;
  font-weight: 400;
}

.agent-detail .agent-body {
  padding: 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.agent-detail .agent-purpose {
  font-size: 0.93rem;
  color: #333;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.agent-detail .agent-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.agent-detail .meta-tag {
  background: #f0f4f8;
  border-radius: 5px;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: #555;
}

.agent-detail .agent-io {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #fafbfc;
  border-radius: 8px;
  border-left: 3px solid #ddd;
}

.agent-detail .agent-io strong {
  color: #333;
}

.agent-detail .agent-techs {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}

.agent-detail .agent-techs li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.3rem;
  font-size: 0.88rem;
  color: #444;
}

.agent-detail .agent-techs li::before {
  content: ">";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: #3273dc;
}

.agent-detail .agent-results {
  margin-top: auto;
  padding: 0.75rem;
  background: linear-gradient(135deg, #e8f4fd 0%, #f0e6ff 100%);
  border-radius: 8px;
  font-size: 0.85rem;
  color: #333;
}

.agent-detail .agent-results strong {
  color: #2c3e50;
}

/* Agent header colors */
.agent-header-a1 { background: linear-gradient(135deg, #ff6b6b, #ee5a24); }
.agent-header-a2 { background: linear-gradient(135deg, #ffa94d, #f39c12); }
.agent-header-a3 { background: linear-gradient(135deg, #51cf66, #2ecc71); }
.agent-header-a4 { background: linear-gradient(135deg, #339af0, #3498db); }
.agent-header-b1 { background: linear-gradient(135deg, #845ef7, #8e44ad); }
.agent-header-b2 { background: linear-gradient(135deg, #f06595, #e84393); }

/* ===== Results Section ===== */
.result-metric {
  text-align: center;
  padding: 1.5rem 1rem;
  background: linear-gradient(135deg, #fafbff 0%, #f5f7ff 100%);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(50, 115, 220, 0.06);
  border: 1px solid #eef1f8;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.result-metric:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 28px rgba(50, 115, 220, 0.12);
  border-color: #d0dcf0;
}

.result-metric .metric-value {
  font-family: 'Inter', 'Google Sans', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  display: block;
  line-height: 1;
  letter-spacing: -0.02em;
}

.result-metric .metric-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #555;
  margin-top: 0.5rem;
  display: block;
  padding-top: 0.4rem;
  border-top: 1px solid #eef1f5;
}

.result-metric .metric-detail {
  font-size: 0.72rem;
  color: #999;
  margin-top: 0.2rem;
  display: block;
}

/* ===== Tables ===== */
.styled-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(50, 115, 220, 0.08);
}

.styled-table thead th {
  background: linear-gradient(135deg, #3273dc 0%, #1a56c4 100%);
  color: white;
  padding: 1rem 1.25rem;
  font-family: 'Inter', 'Google Sans', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
}

.styled-table tbody td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid #eef1f5;
  font-size: 0.88rem;
  color: #2c3e50;
}

.styled-table tbody td:first-child {
  font-weight: 600;
  color: #1a1a2e;
}

.styled-table tbody td b {
  color: #3273dc;
}

.styled-table tbody tr:last-child td {
  border-bottom: none;
}

.styled-table tbody tr:nth-child(even) {
  background: #f8fafd;
}

.styled-table tbody tr {
  transition: all 0.2s ease;
}

.styled-table tbody tr:hover {
  background: #eef3ff;
  box-shadow: inset 3px 0 0 #3273dc;
}

/* ===== Pipeline Steps Bar ===== */
.pipeline-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.4rem;
  margin: 1.5rem 0;
  padding: 0.5rem 0.5rem;
  overflow: visible;
}

.pipe-step {
  background: white;
  border: 1px solid #d4e4f7;
  border-radius: 12px;
  padding: 0.7rem 0.4rem;
  width: 115px;
  flex-shrink: 0;
  text-align: center;
  color: #333;
  box-shadow: 0 2px 8px rgba(50, 115, 220, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Colored main pipeline steps override */
.pipe-step[class*="pipe-a"],
.pipe-step[class*="pipe-b"] {
  border: none;
  color: white;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.pipe-step:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

/* Agent colors matching headers */
.pipe-a1 { background: linear-gradient(135deg, #ff6b6b, #ee5a24); }
.pipe-a2 { background: linear-gradient(135deg, #ffa94d, #f39c12); }
.pipe-a3 { background: linear-gradient(135deg, #51cf66, #2ecc71); }
.pipe-a4 { background: linear-gradient(135deg, #339af0, #3498db); }
.pipe-b1 { background: linear-gradient(135deg, #845ef7, #8e44ad); }
.pipe-b2 { background: linear-gradient(135deg, #f06595, #e84393); }

.pipe-id {
  display: block;
  font-family: 'Google Sans', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  color: #3273dc;
}

.pipe-name {
  display: block;
  font-size: 0.72rem;
  color: #666;
  margin-top: 0.15rem;
  font-weight: 500;
}

/* White text for colored steps */
.pipe-step[class*="pipe-a"] .pipe-id,
.pipe-step[class*="pipe-b"] .pipe-id { color: white; }
.pipe-step[class*="pipe-a"] .pipe-name,
.pipe-step[class*="pipe-b"] .pipe-name { color: rgba(255, 255, 255, 0.9); }

.pipe-arrow {
  color: #3273dc;
  opacity: 0.6;
  font-size: 0.85rem;
  flex-shrink: 0;
}

@media screen and (max-width: 768px) {
  .pipeline-steps {
    gap: 0.35rem;
  }

  .pipe-step {
    padding: 0.4rem 0.7rem;
  }

  .pipe-id {
    font-size: 0.8rem;
  }

  .pipe-name {
    font-size: 0.68rem;
  }

  .pipe-arrow {
    font-size: 0.7rem;
  }
}

/* ===== Teaser ===== */
.teaser-figure {
  max-width: 100%;
  margin: 0 auto;
}

.teaser-figure img {
  border-radius: 12px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

/* ===== Open Source Cards ===== */
.repo-card {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  transition: box-shadow 0.2s, transform 0.2s;
  height: 100%;
}

.repo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.repo-card i {
  font-size: 2rem;
  color: #333;
}

.repo-card .repo-info h5 {
  font-family: 'Google Sans', sans-serif;
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 1rem;
  text-align: center;
}

.repo-card .repo-info p {
  font-size: 0.85rem;
  color: #666;
  margin: 0;
  text-align: center;
}

/* ===== Team Cards ===== */
.team-card {
  background: white;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.team-card-lead {
  border-top: 2px solid #3273dc;
}

.team-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.team-name {
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #1a1a2e;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #3273dc;
}

.team-tag {
  display: inline-block;
  background: #eef3ff;
  color: #3273dc;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 0.3rem;
}

.team-badge {
  display: inline-block;
  background: linear-gradient(135deg, #3273dc, #1a56c4);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
}

.team-card .io-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.team-role {
  font-size: 0.75rem;
  font-weight: 600;
  color: #3273dc;
  margin-bottom: 0.3rem;
}

.team-expertise {
  font-size: 0.72rem;
  color: #666;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== BibTeX ===== */
#BibTeX pre {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 1.25rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ===== Pipeline Stage Backgrounds ===== */
.bg-purple { background: #f5f0ff; }
.bg-pink { background: #fff0f6; }
.bg-sky { background: #f0f9ff; }
.bg-gray { background: #f9fafb; }

/* ===== Footer ===== */
.footer {
  padding: 2rem 1.5rem;
  background-color: #f5f5f5;
}

/* ===== VLM Pipeline (horizontal) ===== */
.vlm-pipeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 1rem 0 1.5rem;
  flex-wrap: nowrap;
  overflow: visible;
}

.vlm-step {
  text-align: center;
  flex: 0 0 auto;
  max-width: 170px;
}

.vlm-step img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.vlm-step img:hover {
  transform: scale(1.08);
}

.vlm-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #555;
  margin-top: 0.3rem;
}

.vlm-arrow {
  color: #3273dc;
  font-size: 0.8rem;
  opacity: 0.6;
  flex-shrink: 0;
}

@media screen and (max-width: 768px) {
  .vlm-step { max-width: 110px; }
  .vlm-arrow { font-size: 0.6rem; }
}

/* ===== Track Cards (Data Collection split) ===== */
.track-card {
  background: white;
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 3px 15px rgba(0,0,0,0.07);
  height: 100%;
}

.track-label {
  font-family: 'Google Sans', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: #1a1a2e;
  margin-bottom: 0.5rem;
}

.track-label i {
  color: #3273dc;
  margin-right: 0.3rem;
}

/* ===== Agent I/O Grid ===== */
.agent-io-grid {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  align-items: stretch;
  flex: 1;
}

.io-block {
  flex: 1;
  border-radius: 8px;
  padding: 0.5rem 0.5rem 0.6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.io-block .io-label {
  flex-shrink: 0;
  padding-bottom: 0.3rem;
  margin-bottom: 0.3rem;
}

.io-in .io-label { border-bottom: 1.5px solid rgba(50, 115, 220, 0.25); }
.io-proc .io-label { border-bottom: 1.5px solid rgba(132, 94, 247, 0.25); }
.io-out .io-label { border-bottom: 1.5px solid rgba(46, 204, 113, 0.25); }

.io-block .io-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.io-in { background: #e8f4fd; }
.io-proc { background: #f0e6ff; }
.io-out { background: #e6f9f0; }

.io-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.io-in .io-label { color: #3273dc; }
.io-proc .io-label { color: #845ef7; }
.io-out .io-label { color: #2ecc71; }

.io-text {
  display: block;
  font-size: 0.78rem;
  color: #333;
  line-height: 1.3;
}

.io-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.76rem;
  color: #333;
  line-height: 1.5;
  text-align: left;
}

.io-list li::before {
  content: "•";
  color: #999;
  margin-right: 0.3rem;
}

@media screen and (max-width: 768px) {
  .agent-io-grid { flex-direction: column; gap: 0.3rem; min-height: auto; }
}

/* ===== Agent card images ===== */
.agent-demo-img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ===== Responsive ===== */
@media screen and (max-width: 768px) {
  .agent-detail .agent-body {
    padding: 1rem;
  }

  .stat-box .stat-number {
    font-size: 1.8rem;
  }

  .navbar.is-rapids .navbar-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
}
