/* MOOZY Project Page — Custom Styles */

:root {
  --accent: #222;
  --accent-light: rgba(0, 0, 0, 0.04);
  --text-primary: #000;
  --text-secondary: #111;
  --bg-alt: #f8f9fa;
  --border: #d1d5db;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text-primary);
}

/* Hero */
.hero-title {
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #000;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

.author-list {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.author-list a {
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px dashed var(--border);
}

.author-list a:hover {
  color: #000;
  border-bottom-color: #000;
}

.affiliation-list {
  font-size: 1rem;
  color: var(--text-secondary);
}

.link-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.link-row a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1.05rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.link-row a:hover {
  border-color: #000;
  background: var(--accent-light);
}

/* Stat row (inline, no cards) */
.stat-row {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-item .stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: #000;
  display: block;
}

.stat-item .stat-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

/* Dark stat cards */
.stat-cards-dark {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.stat-card-dark {
  text-align: center;
  padding: 1.2rem 1.5rem;
  border-radius: 10px;
  min-width: 140px;
  background: white;
  border: 2px solid #1a1a2e;
}

.stat-card-dark .stat-number-dark {
  font-size: 2rem;
  font-weight: 700;
  color: #000;
  display: block;
}

.stat-card-dark .stat-label-dark {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

@media (max-width: 768px) {
  .stat-cards-dark {
    gap: 0.5rem;
  }

  .stat-card-dark {
    min-width: 100px;
    padding: 0.8rem 1rem;
  }

  .stat-card-dark .stat-number-dark {
    font-size: 1.4rem;
  }
}

/* Section alternating backgrounds */
.section-alt {
  background: var(--bg-alt);
}

/* Figure captions */
.fig-caption {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  text-align: center;
}

/* Clickable figures */
.fig-clickable {
  cursor: zoom-in;
  transition: opacity 0.2s;
}

.fig-clickable:hover {
  opacity: 0.9;
}

/* Tables */
.results-table {
  font-size: 0.85rem;
  width: 100%;
  border-collapse: collapse;
  color: var(--text-primary);
}

.results-table th,
.results-table td {
  padding: 0.4rem 0.6rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.results-table th {
  background: var(--bg-alt);
  font-weight: 600;
  font-size: 0.82rem;
}

.results-table .task-label {
  text-align: left;
  font-weight: 500;
}

.results-table .col-moozy {
  background: var(--accent-light);
}

.results-table .best {
  font-weight: 700;
}

.results-table .second {
  text-decoration: underline;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Tabs */
.tabs li.is-active a {
  color: #000 !important;
  border-bottom-color: #000 !important;
}

.tab-content {
  display: none;
}

.tab-content.is-active {
  display: block;
}

/* Carousel */
.carousel-container {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}

.carousel-track img {
  width: 100%;
  flex-shrink: 0;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  z-index: 2;
  transition: background 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

.carousel-btn.prev {
  left: 12px;
}

.carousel-btn.next {
  right: 12px;
}

.carousel-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 0.75rem;
}

.carousel-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.carousel-dots .dot.active {
  background: #333;
}

/* Embedding grid */
.embedding-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.embedding-grid .emb-cell {
  text-align: center;
}

.embedding-grid .emb-cell img {
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.embedding-grid .emb-cell .emb-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

.toggle-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.toggle-btn {
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: white;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: all 0.2s;
}

.toggle-btn.active {
  background: #222;
  color: white;
  border-color: #222;
}

/* Code block */
.code-block {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 1.2rem 1.5rem;
  border-radius: 8px;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  font-size: 0.9rem;
  overflow-x: auto;
  line-height: 1.8;
  white-space: pre;
}

.code-block .comment {
  color: #6c7086;
}

/* BibTeX */
.bibtex-block code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

.bibtex-block {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.82rem;
  white-space: pre;
  overflow-x: auto;
  line-height: 1.6;
  color: var(--text-primary);
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 0.3rem 0.7rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.copy-btn:hover {
  border-color: #000;
}

.copy-btn.copied {
  background: #222;
  color: white;
  border-color: #222;
}

/* Lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 100;
  cursor: zoom-out;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.lightbox-overlay.is-active {
  display: flex;
}

.lightbox-overlay img {
  max-width: 95%;
  max-height: 95vh;
  object-fit: contain;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.8rem;
  }

  .stat-row {
    gap: 1rem;
  }

  .stat-item .stat-number {
    font-size: 1.3rem;
  }

  .embedding-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.section-heading {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #000;
}
