/* PhyWorld site styles. Layout mirrors the PhyGround template,
   with a teal/emerald accent for the world-model branding. */

/* ---------- Hero ---------- */
.hero-card {
  background:
    radial-gradient(120% 140% at 100% 100%,
      rgba(13, 148, 136, 0.06) 0%,
      rgba(254, 240, 199, 0.10) 35%,
      #F2F7F6 75%);
  border: 1px solid #CDE7E3;
  border-radius: 14px;
  padding: 2.4rem 2.4rem 2rem 2.4rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

@media (max-width: 768px) {
  .hero-card {
    padding: 1.6rem 1.2rem 1.4rem 1.2rem;
    border-radius: 10px;
  }
}

.hero-logo {
  height: 1.6em;
  vertical-align: -0.25em;
  margin-right: 0.35em;
}

.publication-title {
  font-size: 3.2rem;
  margin-bottom: 0.4rem;
}

.publication-subtitle {
  color: #4a5568;
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  margin-top: 0;
}

.publication-authors {
  margin-bottom: 0.6rem;
}

.publication-links {
  margin-top: 1.4rem;
}

.equal-contrib {
  color: #6b7280;
  font-size: 0.85rem;
  margin-top: 0.3rem;
}

.affiliation-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 2rem;
  margin: 1.2rem auto 0.2rem auto;
  line-height: 0;
}

.affiliation-logos a {
  display: inline-block;
  line-height: 0;
}

.affiliation-logos img {
  height: 64px !important;
  width: auto !important;
  max-width: 320px;
  display: block;
}

@media (max-width: 768px) {
  .affiliation-logos { gap: 1.2rem; }
  .affiliation-logos img { height: 48px !important; max-width: 220px; }
}

.is-disabled {
  opacity: 0.55;
  cursor: not-allowed !important;
  pointer-events: none;
}

/* ---------- Teaser ---------- */
.teaser img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

.teaser-caption {
  margin-top: 1.2rem;
  font-size: 0.95rem;
  color: #4a5568;
  text-align: justify;
  text-justify: inter-word;
}

/* ---------- Featured carousel ---------- */
.featured-section {
  background: #f6fbfa;
}

.featured-prompt {
  font-style: italic;
  font-size: 1.05rem;
  margin: 0.5rem auto 0.25rem auto;
  max-width: 720px;
}

.featured-laws {
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.featured-caption {
  margin-top: 1rem;
  color: #6b7280;
  font-size: 0.85rem;
}

.results-carousel .item .video-caption {
  margin: 0.4rem 0 0.2rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f766e;
}

.results-carousel .item .video-caption.ours-caption {
  color: #047857;
}

.results-carousel .item video {
  max-height: 360px;
  background: #000;
}

/* ---------- Motivation / failure-case section ---------- */
.motivation-section {
  background: #fef7f6;
  border-top: 1px solid #fde2dc;
  border-bottom: 1px solid #fde2dc;
}

.motivation-intro {
  color: #4a5568;
  max-width: 760px;
  margin: 0.6rem auto 2rem auto;
}

.limit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.4rem 0 2.4rem 0;
}

.limit-card {
  background: #ffffff;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  border-top: 3px solid #ef4444;
}

.limit-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #991b1b;
  margin: 0 0 0.4rem 0;
}

.limit-card p {
  color: #4b5563;
  font-size: 0.92rem;
  margin: 0;
}

.failure-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  align-items: stretch;
}

.failure-grid .failure-header {
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  color: #991b1b;
  padding: 0.45rem 0.2rem;
  background: #fee2e2;
  border-radius: 6px;
}

.failure-grid .failure-cell {
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.failure-grid .failure-cell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.failure-caption {
  color: #6b7280;
  font-size: 0.85rem;
  margin-top: 1rem;
  text-align: center;
}

@media (max-width: 768px) {
  .failure-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Method / framework ---------- */
.method-section {
  background: #fafbfc;
}

.method-section .title.is-4 {
  margin-top: 1.6rem;
}

.framework-figure {
  margin: 1.5rem auto 0.6rem auto;
  text-align: center;
}

.framework-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.framework-caption {
  color: #6b7280;
  font-size: 0.9rem;
  margin-top: 0.6rem;
  text-align: center;
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1.4rem 0 0.6rem 0;
}

.stage-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1rem 1.1rem;
  position: relative;
}

.stage-card.stage-1 { border-top: 3px solid #0ea5e9; }
.stage-card.stage-2 { border-top: 3px solid #10b981; }

.stage-card h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  color: #1f2937;
  margin: 0 0 0.4rem 0;
}

.stage-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.stage-card.stage-2 .stage-tag {
  background: #d1fae5;
  color: #047857;
}

.stage-card p {
  color: #4b5563;
  font-size: 0.92rem;
  margin: 0;
}

/* ---------- Leaderboards ---------- */
.leaderboard-intro {
  color: #4a5568;
  margin-bottom: 1.6rem;
}

.leaderboard-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.leaderboard {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.92rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.leaderboard thead th {
  font-weight: 600;
  padding: 0.55rem 0.7rem;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
}

.leaderboard tbody td {
  padding: 0.55rem 0.7rem;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
}

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

.leaderboard tbody tr:nth-child(even) td {
  background: #fbfcfd;
}

.leaderboard .rank-col {
  width: 2.5rem;
  font-variant-numeric: tabular-nums;
  color: #6b7280;
}

.leaderboard .model-col {
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.leaderboard .group-row th {
  background: #f3f4f6;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #374151;
}

.leaderboard .group-general  { background: #eef2ff !important; color: #3730a3 !important; }
.leaderboard .group-domain   { background: #ecfeff !important; color: #155e75 !important; }
.leaderboard .group-overall  { background: #fefce8 !important; color: #854d0e !important; }
.leaderboard .group-vbench   { background: #ecfdf5 !important; color: #065f46 !important; }

.leaderboard .sub-row th {
  background: #f9fafb;
  font-size: 0.78rem;
  color: #4b5563;
}

.leaderboard tbody td.cell-best {
  background: #fef3c7 !important;
  color: #854d0e;
  font-weight: 700;
}

.leaderboard tbody td.cell-second {
  background: #f1f5f9 !important;
  color: #1e293b;
  font-weight: 600;
}

.leaderboard tbody tr.ours-row td {
  background: #ecfdf5 !important;
  font-weight: 600;
}

.leaderboard tbody tr.ours-row td.cell-best {
  background: #fef3c7 !important;
}

.leaderboard tbody tr.ours-row td.cell-second {
  background: #d1fae5 !important;
}

.ours-tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  background: #10b981;
  color: #ffffff;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.leaderboard-legend {
  margin-top: 0.8rem;
  color: #6b7280;
  font-size: 0.85rem;
  text-align: center;
}

.legend-swatch {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  vertical-align: -0.05em;
  border-radius: 3px;
  margin-right: 0.15em;
  text-indent: -9999em;
  overflow: hidden;
}

.legend-swatch.cell-best   { background: #fef3c7; }
.legend-swatch.cell-second { background: #f1f5f9; }

/* ---------- Highlights strip ---------- */
.highlights-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.6rem;
}

.highlight-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1rem 1.1rem;
  text-align: center;
}

.highlight-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: #047857;
  line-height: 1.1;
}

.highlight-label {
  font-size: 0.85rem;
  color: #4b5563;
  margin-top: 0.3rem;
}

.highlight-delta {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #047857;
  background: #d1fae5;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
}

/* ---------- Side-by-side comparison ---------- */
.comparison-section {
  padding-top: 3rem;
}

.comparison-intro {
  color: #4a5568;
  margin-bottom: 2rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem 0.6rem;
  align-items: stretch;
}

.comparison-grid .comp-header {
  position: sticky;
  top: 0;
  z-index: 2;
}

.comparison-grid .comp-header {
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  color: #1f2937;
  padding: 0.4rem 0.2rem;
  background: #f3f4f6;
  border-radius: 6px;
}

.comparison-grid .comp-header.ours-header {
  background: #d1fae5;
  color: #047857;
}

.comparison-grid .comp-cell {
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comparison-grid .comp-cell video,
.comparison-grid .comp-cell img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.comparison-caption {
  color: #6b7280;
  font-size: 0.85rem;
  margin-top: 1rem;
  text-align: center;
}

@media (max-width: 768px) {
  .comparison-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Related project callout ---------- */
.related-section {
  background: #f8fafc;
}

.related-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.related-card .related-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
}

.related-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.3rem 0;
  color: #0f766e;
}

.related-card p {
  margin: 0;
  font-size: 0.92rem;
  color: #4b5563;
}

.related-card a.related-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 600;
  color: #047857;
}

/* ---------- BibTeX ---------- */
.bibtex {
  background: #f5f5f7;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  overflow-x: auto;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #f8fafc;
  padding: 2rem 1.5rem;
}

.footer-credit {
  color: #6b7280;
  font-size: 0.85rem;
  margin-top: 0.4rem;
}

/* ---------- Small screens ---------- */
@media (max-width: 768px) {
  .publication-title { font-size: 2.4rem; }
  .publication-subtitle { font-size: 1.1rem; }
  .leaderboard { font-size: 0.82rem; }
}
