/* =====================================================================
   DUGO project page — stylesheet
   Layout modelled on the OnPoint project page (single 960px column).
   Colours live in :root — change the theme there, nowhere else.
   See documentation/modules/styles/README.md
   ===================================================================== */

:root {
  --bg: #fcfbf9;
  --surface: #ffffff;
  --text: #2b2b2b;
  --muted: #666;
  --accent: #b85400;          /* deep orange, readable on white (taken from the IEEE BigData logo) */
  --accent-bright: #f39200;   /* logo orange, decorative only */
  --border: #e8e4df;
  --highlight-bg: #fff6ec;
  --highlight-border: #f6dcc0;
  --ours-bg: #fff1e0;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Source Sans 3", "Source Sans Pro", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--accent); }

img { max-width: 100%; height: auto; }

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

/* ---------- Header: venue logo, title, authors ---------- */

.venue-logo {
  display: block;
  height: 9rem;
  width: auto;
  max-width: 100%;
  margin: 0 auto 1.25rem;
}

.venue-badge {
  display: block;
  width: fit-content;
  margin: 0 auto 1rem;
  padding: 0.2rem 0.75rem;
  border: 1px solid var(--highlight-border);
  border-radius: 999px;
  background: var(--highlight-bg);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.2;
  margin: 0 0 1.25rem;
  font-weight: 700;
  text-align: center;
}

h1 .acronym { color: var(--accent); }

h1 u {
  text-decoration-thickness: 2px;
  text-underline-offset: 0.12em;
  text-decoration-color: var(--accent-bright);
}

.authors {
  margin-bottom: 1.5rem;
  color: var(--muted);
  text-align: center;
}

.authors p { margin: 0.25rem 0; }

.authors strong { color: var(--text); }

.authors a {
  color: var(--text);
  text-decoration: none;
}

.authors a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.affiliations {
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.affiliations a {
  color: var(--muted);
  text-decoration: none;
}

.affiliations a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ---------- Link buttons ---------- */

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--accent);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.links a:hover {
  border-color: var(--accent);
  background: var(--highlight-bg);
}

.links i { font-size: 1rem; line-height: 1; }

/* ---------- Generic sections ---------- */

section { margin-bottom: 2.75rem; }

h2 {
  font-size: 1.3rem;
  margin: 0 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
  font-weight: 600;
}

h4 {
  font-size: 0.95rem;
  margin: 0 0 0.4rem;
  font-weight: 600;
  color: var(--muted);
}

/* ---------- Highlights ---------- */

.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.85rem;
  margin: 1.25rem 0 0.5rem;
}

.highlight-card {
  background: var(--highlight-bg);
  border: 1px solid var(--highlight-border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.highlight-card .value {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.highlight-card .value.text { font-size: 1.15rem; }

.highlight-card .label {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 0.35rem;
  line-height: 1.4;
}

/* ---------- Abstract ---------- */

#abstract {
  background: var(--highlight-bg);
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 1.25rem 1.5rem 1.35rem 1.35rem;
  box-shadow: 0 1px 3px rgba(184, 84, 0, 0.06);
}

#abstract h2 {
  border-bottom: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
  padding-bottom: 0;
}

#abstract p {
  font-size: 1.02rem;
  line-height: 1.75;
  margin: 0;
}

/* ---------- Video ---------- */

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #1d1d1f;
  border: 1px solid var(--border);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-poster {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: #fff;
  text-decoration: none;
  background:
    radial-gradient(circle at 50% 45%, rgba(243, 146, 0, 0.35), transparent 60%),
    linear-gradient(135deg, #2a1a0c, #121214);
}

.video-poster .play {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: var(--accent-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  padding-left: 0.3rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s;
}

.video-poster:hover .play { transform: scale(1.08); }

.video-poster .caption { font-weight: 600; font-size: 1.05rem; }

.video-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* ---------- Figures ---------- */

figure { margin: 1.25rem 0; }

figure img {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

figure.figure-padded img { padding: 0.75rem; }

figure.figure-half { max-width: 560px; margin-left: auto; margin-right: auto; }

figcaption {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.6rem;
  line-height: 1.5;
}

/* ---------- Method: module cards & contributions ---------- */

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
  margin: 1rem 0;
}

.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent-bright);
  border-radius: 8px;
  padding: 1rem 1.1rem;
}

.module-card h4 {
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.module-card p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.55;
}

.contrib-list { padding-left: 1.25rem; }
.contrib-list li { margin-bottom: 0.5rem; }

/* ---------- Results ---------- */

.result-callout {
  background: var(--highlight-bg);
  border: 1px solid var(--highlight-border);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin: 0.75rem 0 1.25rem;
}

.results-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

table.results {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

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

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

table.results thead th {
  background: #faf7f3;
  font-weight: 600;
}

table.results thead tr.group th { border-bottom: 1px solid var(--border); }

table.results th.split,
table.results td.split { border-left: 1px solid var(--border); }

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

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

table.results td.best { font-weight: 700; color: var(--accent); }

.table-caption {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
}

.results-table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.results-table-grid > div { min-width: 0; }  /* let tables scroll instead of widening the grid */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.85rem;
  margin: 1rem 0;
}

.stat-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 0.9rem 1rem;
}

.stat-item strong {
  display: block;
  font-size: 1.35rem;
  color: var(--accent);
}

.stat-item span {
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- BibTeX ---------- */

.bibtex-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.bibtex-header h2 { border-bottom: none; margin: 0; }

.copy-bibtex {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
}

.copy-bibtex:hover { border-color: var(--accent); }
.copy-bibtex.copied { background: var(--highlight-bg); border-color: var(--accent); }

pre.bibtex {
  background: #f6f4f1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  overflow-x: auto;
  margin: 0;
}

/* ---------- Acknowledgement & footer ---------- */

#acknowledgement p {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
}

footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- Small screens ---------- */

@media (max-width: 600px) {
  .page { padding: 2rem 1rem 3rem; }
  .venue-logo { height: 7rem; }
  .links a { padding: 0.45rem 0.75rem; font-size: 0.85rem; }
  .results-table-grid,
  .module-grid { grid-template-columns: 1fr; }
}
