/* =========================================================
   ADEU project site — shared stylesheet
   Every page (index, research, future project pages) uses this file.
   Change the palette once here and the whole site follows.
   ========================================================= */

:root {
  --ink: #2a1f1a;
  --ink-soft: #5c4d44;
  --paper: #fbf8f3;
  --paper-2: #f3ece2;
  --line: #e4d9ca;
  --rust: #a2401d;        /* title colour from the AAMAS deck */
  --rust-deep: #7b2e13;
  --amber: #e8891c;       /* orange boxes in the deck */
  --sand: #f2b366;
  --olive: #8e8b55;       /* future-directions bars */
  --navy: #1d3a6e;        /* author colour in the deck */
  --code-bg: #2a211c;
  --code-ink: #f6e9d8;
  --radius: 14px;
  --maxw: 1080px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1e8dd;
    --ink-soft: #c2b3a5;
    --paper: #17120f;
    --paper-2: #211a16;
    --line: #3a2f28;
    --rust: #f08a5d;
    --rust-deep: #ffb08a;
    --amber: #f3a243;
    --sand: #6b4a24;
    --navy: #9db8ee;
    --code-bg: #0f0b09;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: var(--rust); text-underline-offset: 3px; }
a:hover { color: var(--rust-deep); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }

/* ---------- top navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.nav .brand { font: 600 19px var(--serif); color: var(--ink); text-decoration: none; letter-spacing: .2px; }
.nav .brand span { color: var(--rust); }
.nav ul { list-style: none; display: flex; gap: 20px; margin: 0 0 0 auto; padding: 0; overflow-x: auto; min-width: 0; scrollbar-width: none; }
.nav ul::-webkit-scrollbar { display: none; }
.nav ul a { color: var(--ink-soft); text-decoration: none; font-size: 15px; white-space: nowrap; }
.nav ul a:hover, .nav ul a.active { color: var(--rust); }
@media (max-width: 720px) { .nav ul li.hide-sm { display: none; } .nav ul { gap: 14px; } .nav ul a { font-size: 14px; } }

/* ---------- hero ---------- */
.hero { padding: 72px 0 40px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 520px; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--sand) 45%, transparent), transparent);
}
.venue-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 13px var(--sans); letter-spacing: .08em; text-transform: uppercase;
  color: var(--rust); background: var(--paper-2); border: 1px solid var(--line);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 {
  font: 600 clamp(32px, 5vw, 54px)/1.12 var(--serif);
  color: var(--rust); margin: 0 auto 10px; max-width: 900px; letter-spacing: -.5px;
}
.hero .acronym { font: 500 18px var(--sans); color: var(--ink-soft); margin: 0 0 26px; }
.hero .acronym b { color: var(--rust); }
.authors { font-size: 19px; margin: 0; }
.authors a { color: var(--navy); text-decoration: none; font-weight: 600; }
.authors a:hover { text-decoration: underline; }
.affil { color: var(--ink-soft); margin: 4px 0 30px; font-size: 15.5px; }

/* link buttons */
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--paper); text-decoration: none;
  font: 600 15px var(--sans); transition: transform .15s, background .15s;
}
.btn:hover { background: var(--rust); color: #fff; transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.doi-line { font: 14px var(--mono); color: var(--ink-soft); }

.logos { display: flex; justify-content: center; align-items: center; gap: 36px; margin-top: 34px; flex-wrap: wrap; }
.logos img { height: 44px; width: auto; opacity: .9; }
@media (prefers-color-scheme: dark) { .logos img { background: #fff; padding: 6px 10px; border-radius: 8px; } }

/* ---------- sections ---------- */
section { padding: 56px 0; }
section + section { border-top: 1px solid var(--line); }
h2 {
  font: 600 30px/1.2 var(--serif); margin: 0 0 22px; color: var(--ink);
  display: flex; align-items: baseline; gap: 12px;
}
h2 .num { font: 600 14px var(--mono); color: var(--rust); }
h3 { font: 600 20px var(--serif); margin: 28px 0 10px; color: var(--rust-deep); }
p { margin: 0 0 16px; }
.lead { font-size: 19px; color: var(--ink-soft); }

.tldr {
  background: var(--paper-2); border-left: 4px solid var(--amber);
  padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 28px;
}
.tldr b { color: var(--rust); }

/* flow of three steps (motivation) */
.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0 8px; }
.flow div {
  background: var(--rust); color: #fff; padding: 16px 18px; border-radius: var(--radius);
  font-weight: 500; position: relative;
}
.flow div:nth-child(2) { background: #c4561f; }
.flow div:nth-child(3) { background: var(--amber); color: #2a1f1a; }
.flow small { display: block; opacity: .8; font: 600 12px var(--mono); margin-bottom: 4px; }
@media (max-width: 720px) { .flow { grid-template-columns: 1fr; } }

/* two-column media + text */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center; }
.split.rev { grid-template-columns: .9fr 1.1fr; }
@media (max-width: 820px) { .split, .split.rev { grid-template-columns: 1fr; } }

figure { margin: 0; }
figure img, figure video {
  border-radius: var(--radius); border: 1px solid var(--line); background: #fff; margin: 0 auto;
}
figcaption { font-size: 14px; color: var(--ink-soft); margin-top: 10px; text-align: center; }

/* key equation */
.equation {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 20px; text-align: center; font-size: 26px; margin: 10px 0 20px; overflow-x: auto;
}
.legend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.legend-grid div { background: var(--paper-2); border-radius: 10px; padding: 12px 14px; font-size: 15px; }
.legend-grid b { color: var(--rust); font-family: var(--serif); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; position: relative;
}
.card h4 { margin: 0 0 8px; font: 600 17px var(--serif); color: var(--rust-deep); }
.card p { margin: 0; font-size: 15.5px; color: var(--ink-soft); }
.card .tag {
  display: inline-block; font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .08em;
  padding: 3px 8px; border-radius: 6px; background: var(--amber); color: #2a1f1a; margin-bottom: 10px;
}
.card .tag.wip { background: var(--olive); color: #fff; }
.card .tag.idea { background: transparent; border: 1px dashed var(--ink-soft); color: var(--ink-soft); }
.card a.more { display: inline-block; margin-top: 12px; font-weight: 600; font-size: 15px; }

/* theorem boxes */
.theorem {
  border: 1.5px solid var(--rust); border-radius: var(--radius); padding: 16px 20px 16px 64px;
  position: relative; margin: 0 0 14px; background: var(--paper);
}
.theorem::before {
  content: attr(data-n); position: absolute; left: 0; top: 0; bottom: 0; width: 46px;
  background: var(--amber); color: #fff; font: 700 22px var(--serif);
  display: grid; place-items: center; border-radius: 12px 0 0 12px;
}

/* results table */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 640px; }
th, td { padding: 10px 12px; text-align: center; white-space: nowrap; }
thead th { background: var(--rust); color: #fff; font-weight: 600; }
thead th.ours { background: var(--rust-deep); }
tbody tr:nth-child(even) { background: var(--paper-2); }
tbody th { text-align: left; font-weight: 600; }
td.ours { background: color-mix(in srgb, var(--amber) 16%, transparent); font-weight: 600; }
.note { font-size: 14px; color: var(--ink-soft); margin-top: 10px; }

/* conclusions / future directions */
.directions { list-style: none; padding: 0; margin: 0; counter-reset: d; }
.directions li {
  counter-increment: d; padding: 14px 18px 14px 58px; margin-bottom: 10px; border-radius: 10px;
  background: var(--paper-2); position: relative; border: 1px solid var(--line);
}
.directions li::before {
  content: counter(d, decimal-leading-zero); position: absolute; left: 16px; top: 14px;
  font: 600 14px var(--mono); color: var(--rust);
}
.directions li.highlight { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 14%, var(--paper)); }

/* news list */
.news { list-style: none; padding: 0; margin: 0; }
.news li { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.news time { font: 600 14px var(--mono); color: var(--rust); }

/* bibtex */
.bib { position: relative; }
pre {
  background: var(--code-bg); color: var(--code-ink); border-radius: var(--radius);
  padding: 20px 22px; overflow-x: auto; font: 13.5px/1.6 var(--mono); margin: 0 0 16px;
}
.copy {
  position: absolute; top: 12px; right: 12px; border: 0; cursor: pointer;
  background: var(--amber); color: #2a1f1a; font: 600 13px var(--sans); padding: 6px 12px; border-radius: 8px;
}
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tabs button {
  border: 1px solid var(--line); background: var(--paper-2); color: var(--ink-soft);
  font: 600 14px var(--sans); padding: 7px 14px; border-radius: 8px; cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* footer */
footer { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 14px; color: var(--ink-soft); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: space-between; }
footer p { margin: 0; max-width: 620px; }

/* research-line page */
.timeline { border-left: 2px solid var(--line); margin-left: 8px; padding-left: 28px; }
.timeline .card { margin-bottom: 18px; }
.timeline .card::before {
  content: ""; position: absolute; left: -38px; top: 24px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--amber); border: 3px solid var(--paper);
}
.timeline .card.wip::before { background: var(--olive); }
.timeline .card.idea::before { background: var(--paper); border-color: var(--ink-soft); }
.meta { font: 13px var(--mono); color: var(--ink-soft); margin-bottom: 6px; }
.small-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 14.5px; font-weight: 600; }
