/* LDMR project page — Nerfies-style single column layout */

:root {
  --text:      #1f2326;
  --muted:     #5b6469;
  --rule:      #e2e6e9;
  --pill-bg:   #24272b;
  --pill-hover:#3b4046;
  --ours-bg:   #eef3fb;
  --link:      #1f5fa8;
}

html { scroll-behavior: smooth; }

body {
  color: var(--text);
  font-family: "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); }
a:hover { color: #143f73; }

/* ---------- layout ---------- */

.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section { padding: 2.75rem 0; }
.section-tight { padding: 0.5rem 0 1.5rem; }

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 1.4rem;
  letter-spacing: -0.01em;
}

.sub-title {
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  margin: 2.5rem 0 1.1rem;
}

/* ---------- header ---------- */

.hero-head { padding-top: 3.25rem; padding-bottom: 1rem; }

.paper-title {
  font-size: 2.15rem;
  line-height: 1.25;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.02em;
  margin: 0 0 1.4rem;
}

.authors, .affiliations, .corresponding, .venue {
  text-align: center;
  margin: 0 0 0.4rem;
}

.authors { font-size: 1.1rem; }
.authors sup { font-size: 0.7em; }

.affiliations { color: var(--muted); font-size: 0.98rem; }
.corresponding { color: var(--muted); font-size: 0.88rem; }

.venue {
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-top: 0.9rem;
  margin-bottom: 1.6rem;
}

.link-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--pill-bg);
  color: #fff;
  border-radius: 999px;
  padding: 0.5rem 1.15rem;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s ease;
}
.pill:hover { background: var(--pill-hover); color: #fff; }
.pill .icon { font-size: 0.95em; }

/* ---------- figures ---------- */

.fig {
  margin: 1.75rem 0 0;
  text-align: center;
}

.fig img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.fig figcaption,
.table-caption,
.note {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
  text-align: left;
  max-width: 820px;
  margin: 0.85rem auto 0;
}

.table-caption { margin-bottom: 0.7rem; text-align: center; }
.note { margin-top: 0.8rem; }

/* ---------- abstract / prose ---------- */

.abstract, .prose {
  max-width: 800px;
  margin: 0 auto;
}

.abstract p { text-align: justify; }
.prose p { margin-bottom: 1rem; }

/* ---------- tables ---------- */

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

.results-table {
  border-collapse: collapse;
  margin: 0 auto;
  font-size: 0.88rem;
  min-width: 100%;
}

.results-table th,
.results-table td {
  padding: 0.4rem 0.7rem;
  text-align: center;
  white-space: nowrap;
  border: none;
}

.results-table th.left,
.results-table td.left { text-align: left; }

.results-table thead th {
  font-weight: 700;
  border-bottom: 1px solid var(--text);
}
.results-table thead tr:first-child th { border-top: 1.5px solid var(--text); }
.results-table thead tr:first-child th[colspan] { border-bottom: 1px solid var(--rule); }

.results-table tbody tr:last-child td { border-bottom: 1.5px solid var(--text); }

.results-table tr.group-sep td { border-top: 1px solid var(--text); }

.results-table tr.ours {
  background: var(--ours-bg);
  font-weight: 700;
}

.results-table tr.upper td { color: var(--muted); font-style: italic; }

/* two tables side by side */
.two-col {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}
.two-col .col { flex: 1 1 340px; min-width: 0; }

/* ---------- bibtex ---------- */

.bibtex-box {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
}

.bibtex-box pre {
  background: #f5f6f7;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.1rem 1.2rem;
  font-size: 0.85rem;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre;
  color: var(--text);
}

.copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--pill-bg);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.32rem 0.85rem;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
}
.copy-btn:hover { background: var(--pill-hover); }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0 2.75rem;
  margin-top: 1.5rem;
}
.footer p {
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

/* ---------- responsive ---------- */

@media screen and (max-width: 768px) {
  body { font-size: 16px; }
  .paper-title { font-size: 1.6rem; }
  .authors { font-size: 1rem; }
  .section { padding: 2rem 0; }
  .hero-head { padding-top: 2rem; }
  .pill { padding: 0.45rem 0.9rem; font-size: 0.88rem; }
  .results-table { font-size: 0.78rem; }
  .results-table th, .results-table td { padding: 0.32rem 0.45rem; }
  .abstract p { text-align: left; }
  .two-col { gap: 1.5rem; }
}
