/* =====================================================
   TRACK-ON-R  –  Redesigned Stylesheet
   ===================================================== */

:root {
  --accent:   #2563eb;
  --accent2:  #7c3aed;
  --dark:     #ffffff;
  --dark2:    #ffffff;
  --surface:  #f1f0ed;
  --border:   rgba(0,0,0,0.09);
  --text:     #1a1a2e;
  --muted:    #6b7280;
  --ep-bg:    rgba(37,99,235,0.05);
  --rt-bg:    rgba(5,150,105,0.05);
  --kt-bg:    rgba(217,119,6,0.05);
  --dv-bg:    rgba(124,58,237,0.05);
}

/* --- Reset & Base ---------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--dark);
  -webkit-font-smoothing: antialiased;
}

/* Subtle dot-grid texture overlay on entire page */
body::before {
  display: none;
}

.container, .hero-header { position: relative; z-index: 1; }

/* --- Images ---------------------------------------- */
img {
  max-width: 100%;
  border-radius: 10px;
}

/* Inline figures */
.fig-caption {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin-top: 10px;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
}

/* --- Layout ---------------------------------------- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px 80px;
  text-align: center;
}

/* --- Hero header ----------------------------------- */
.hero-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #ffffff 0%, #ffffff 100%);
  padding: 72px 28px 60px;
  margin-bottom: 0;
}

.hero-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(37,99,235,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 70%, rgba(124,58,237,0.05) 0%, transparent 55%);
  pointer-events: none;
}

.hero-header > * { position: relative; }

.title {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 auto 18px;
  max-width: 820px;
  color: #1a1a2e;
  -webkit-text-fill-color: unset;
  background: none;
}

/* --- Authors --------------------------------------- */
.author,
.affiliation {
  display: inline-block;
  vertical-align: top;
}

.author {
  font-size: 20px;
  margin: 0 12px 6px;
  color: #1a1a2e;
}

.author a { color: var(--accent) !important; }
.author a:hover { color: var(--accent2) !important; }

.author sup {
  font-size: 0.6em;
  vertical-align: super;
}

.affiliation {
  font-size: 17px;
  margin: 4px 14px 6px;
  color: #6b7280;
}

.equal-note {
  font-size: 14px;
  color: #6b7280;
  margin: 2px 0 8px;
}

.venue {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border-radius: 20px;
  padding: 4px 18px;
  margin: 8px 0 18px;
}

/* --- Hero link buttons ----------------------------- */
.hero-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
}

.hero-links .links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  background: #f3f4f6;
  padding: 9px 22px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
  text-decoration: none;
}

.hero-links .links a {
  color: var(--accent) !important;
  font-weight: 700;
}

.hero-links .links:hover {
  background: #eff6ff;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.15);
}

/* --- Typography ------------------------------------ */
p {
  width: 80%;
  margin: 0 auto 14px;
  text-align: left;
  color: #374151;
}

h1 {
  margin: 0 0 20px;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  letter-spacing: -.01em;
  color: #1a1a2e;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}

/* Wrapper so ::after centering works on block h1 */
.section-title-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  color: #1a1a2e;
}

h3 {
  margin: 0 0 10px;
  text-align: left;
  font-size: 19px;
  font-weight: 600;
  color: #1a1a2e;
}

a:link,
a:visited {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent2);
}

hr {
  width: 90%;
  border: 0;
  height: 1px;
  background-image: linear-gradient(
    to right,
    transparent,
    rgba(0,0,0,0.12),
    transparent
  );
  margin: 0 auto;
}

/* --- TL;DR box ------------------------------------- */
.box {
  width: min(820px, 90%);
  margin: 0 auto;
  padding: 22px 28px;
  border: 1px solid rgba(37,99,235,0.25);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(37,99,235,0.07);
  background: #eff6ff;
  text-align: left;
  color: #1e3a5f;
  line-height: 1.7;
}

/* --- Teaser video ---------------------------------- */
.video-container {
  position: relative;
  width: 82%;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14);
  border: 1px solid rgba(0,0,0,0.09);
}

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

/* --- Results table --------------------------------- */
.results-table {
  width: min(980px, 95%);
  margin: 0 auto 1.5rem;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 15px;
}

.results-table th,
.results-table td {
  padding: 11px 16px;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid #e5e7eb;
}

.results-table thead th {
  border-top: 2px solid #e5e7eb;
  border-bottom: 2px solid #e5e7eb;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: #fff;
  color: #6b7280;
}

.results-table thead tr:first-child th:first-child,
.results-table td:first-child {
  text-align: left;
  white-space: nowrap;
  padding-left: 18px;
  font-weight: 600;
  color: #1a1a2e;
}

.results-table tbody td:first-child {
  background: #fff;
}

.results-table .ep { color: #1d4ed8; background: rgba(37,99,235,0.07); }
.results-table .rt { color: #047857; background: rgba(5,150,105,0.07); }
.results-table .kt { color: #b45309; background: rgba(217,119,6,0.07); }
.results-table .dv { color: #6d28d9; background: rgba(124,58,237,0.07); }

/* Column shading */
.results-table tbody td:nth-child(2),
.results-table tbody td:nth-child(3) { background: rgba(37,99,235,0.04); }
.results-table tbody td:nth-child(4),
.results-table tbody td:nth-child(5) { background: rgba(5,150,105,0.04); }
.results-table tbody td:nth-child(6),
.results-table tbody td:nth-child(7) { background: rgba(217,119,6,0.04); }
.results-table tbody td:nth-child(8),
.results-table tbody td:nth-child(9) { background: rgba(124,58,237,0.04); }

.results-table tbody tr { background: #fff; }

/* Ours row highlight */
.results-table tbody tr:last-child td {
  background: rgba(37,99,235,0.07) !important;
  border-top: 2px solid #bfdbfe;
  border-bottom: 2px solid #bfdbfe;
  font-weight: 600;
  color: #1a1a2e;
}
.results-table tbody tr:last-child td:first-child {
  color: var(--accent);
}

.results-table tbody tr:hover td {
  background-image: linear-gradient(rgba(0,0,0,0.02), rgba(0,0,0,0.02));
}

/* --- Paper entry ----------------------------------- */
.paper-info {
  flex: 1;
  text-align: left;
  color: #374151;
}

pre {
  overflow-x: auto;
  text-align: left;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  background: #f5f4f1;
  color: #374151;
  padding: 12px 14px;
  line-height: 1.4;
  white-space: pre-wrap;
}

pre code {
  font-size: 13px;
  white-space: pre-wrap;
}

/* --- Qualitative video grid ------------------------ */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: start;
}

.video-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: #f3f4f6;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  transition: transform .2s, box-shadow .2s;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.13);
}

.video-card video {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: contain;
  background: #000;
}

.video-card figcaption {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-align: center;
  padding: 10px 0 12px;
  color: #6b7280;
  background: #f3f4f6;
}

@media (max-width: 1024px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .title { font-size: 34px; }
  .author sup { font-size: 0.65em; vertical-align: super; }
  .author, .affiliation { display: block; margin-left: auto; margin-right: auto; }
  p, .video-container, .paper-info { width: 90%; }
}

@media (max-width: 640px) {
  .video-grid { grid-template-columns: 1fr; }
  .title { font-size: 26px; }
  .author { font-size: 18px; }
  .affiliation { font-size: 16px; }
  .hero-links { flex-direction: column; align-items: center; }
  .results-table { font-size: 13px; }
  .results-table th, .results-table td { padding: 7px 6px; }
}
/* --- Domain gap cards ------------------------------ */
.domain-cards {
  width: 80%;
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.domain-card {
  text-align: left;
  border: 1px solid rgba(0,0,0,0.09);
  border-radius: 12px;
  padding: 20px 22px;
  background: #f3f4f6;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}

.domain-card:hover {
  border-color: rgba(37,99,235,0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(37,99,235,0.1);
}

.domain-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
  text-align: left;
  color: var(--accent);
}

.domain-card p {
  width: 100%;
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #4b5563;
}

@media (max-width: 900px) {
  .domain-cards { grid-template-columns: 1fr; width: 90%; }
}


/* --- List / misc ----------------------------------- */
ul li {
  margin-bottom: 10px;
  color: #374151;
}

ul li b { color: #1a1a2e; }

/* --- Previous work cards --------------------------- */
.paper-entry {
  width: min(820px, 90%);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  gap: 22px;
  margin-bottom: 28px;
  align-items: flex-start;
  text-align: left;
  border: 1px solid rgba(0,0,0,0.09);
  border-radius: 12px;
  padding: 20px 22px;
  background: #f3f4f6;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  transition: border-color .2s, box-shadow .2s;
}

.paper-entry:hover {
  border-color: rgba(37,99,235,0.3);
  box-shadow: 0 4px 16px rgba(37,99,235,0.09);
}

.paper-thumb img {
  width: 110px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.09);
  box-shadow: none;
}

.bibtex {
  display: none;
  background: #f5f4f1;
  padding: 12px 14px;
  margin-top: 12px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.1);
  font-family: monospace;
  font-size: 12px;
  line-height: 1.4;
  color: #374151;
  overflow-x: auto;
  white-space: pre;
}

/* --- Footer ---------------------------------------- */
.footer {
  margin-top: 60px;
  padding: 24px 0 20px;
  border-top: 1px solid rgba(0,0,0,0.08);
  font-size: 14px;
  color: #9ca3af;
  text-align: center;
}

/* --- Section spacing ------------------------------- */
.section {
  padding: 56px 0 0;
}