/* Custom academic styling for MoGe-4D Project Page */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --primary-color: #9a3412;
  --accent-color: #c2410c;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --card-shadow-hover: 0 10px 25px -3px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  background-color: #f8fafc;
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

code, pre, .font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Smooth scrolling with offset for sticky top navbar */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 3.5rem;
}

/* Soft shadow card - borderless design */
.soft-card {
  background-color: #ffffff;
  border-radius: 1rem;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

/* Custom Scrollbar for thumbnail carousel */
.scrollbar-thin {
  scrollbar-width: auto;
  scrollbar-color: #cbd5e1 #f1f5f9;
}
.scrollbar-thin::-webkit-scrollbar {
  height: 12px;
}
.scrollbar-thin::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 9999px;
}
.scrollbar-thin::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
  border: 2px solid #f1f5f9;
}
.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Gallery thumbnails */
.gallery-thumb {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
}
.gallery-thumb:hover {
  transform: translateY(-2px);
}
.gallery-thumb.active {
  box-shadow: 0 0 0 2.5px #c2410c;
}
.gallery-thumb.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #c2410c;
}

/* Booktabs Table Styling (LaTeX Academic Standard) */
.academic-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  border-top: 2.2px solid #0f172a;
  border-bottom: 2.2px solid #0f172a;
}
.academic-table th {
  padding: 8px 10px;
  text-align: center;
  font-weight: 600;
  color: #1e293b;
  border-bottom: 1.2px solid #334155;
  background-color: #f8fafc;
}
.academic-table td {
  padding: 7px 10px;
  text-align: center;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}
.academic-table tr.midrule-top th,
.academic-table tr.midrule-top td {
  border-top: 1.2px solid #334155;
}
.academic-table tr.separator-row td {
  border-top: 1.2px solid #94a3b8;
}
.academic-table tr.highlight-row td {
  font-weight: 600;
  background-color: #fff7ed !important;
  color: #9a3412;
}
.academic-table td.text-left,
.academic-table th.text-left {
  text-align: left;
}

/* Keep the full evaluation table inside its card, including on narrow screens. */
.evaluation-chart-scroll,
.evaluation-table-scroll {
  max-width: 100%;
  overflow-x: auto;
}
.evaluation-chart {
  position: relative;
  height: 360px;
  min-width: 640px;
}
.evaluation-table {
  font-size: 0.75rem;
  white-space: nowrap;
}
.evaluation-table button {
  display: block;
  width: 100%;
  padding: 7px 5px;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.evaluation-table thead th[data-column] {
  padding: 0;
}
.evaluation-table button:focus-visible,
.evaluation-table-scroll:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: -2px;
}
.evaluation-table .evaluation-method {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  background: #fff;
}
.evaluation-table tbody th {
  font-weight: 400;
  border-bottom: 1px solid #f1f5f9;
}
.evaluation-table .evaluation-ours > * {
  color: #9a3412;
  background: #fff7ed;
}
.evaluation-table th.is-selected,
.evaluation-table td.is-selected {
  background: #ffedd5;
  color: #9a3412;
  box-shadow: inset 1px 0 #fed7aa, inset -1px 0 #fed7aa;
}
.evaluation-table strong {
  font-weight: 800;
}
.evaluation-error {
  padding: 12px;
  margin-bottom: 16px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  background: #fef2f2;
}

/* Image comparison container */
.comparison-container {
  position: relative;
  overflow: hidden;
  user-select: none;
}

/* Subtle badge */
.academic-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* Hero Title styling */
.paper-title {
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

/* Top Navigation Bar */
.top-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 0.5rem;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.35;
  color: #475569;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.top-nav-link:hover {
  color: #0f172a;
  background: #f1f5f9;
}
.top-nav-link.is-active {
  color: var(--primary-color);
  font-weight: 600;
  background: #fff7ed;
}
.top-nav-mobile-link {
  display: block;
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.top-nav-mobile-link:hover {
  color: #0f172a;
  background: #f8fafc;
}
.top-nav-mobile-link.is-active {
  color: var(--primary-color);
  font-weight: 600;
  background: #fff7ed;
}

/* Video wrapper */
.video-responsive {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000000;
  border-radius: 0.75rem;
  overflow: hidden;
}
.video-responsive video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
