/* MASC project page — modern academic template */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --ink: #1a1c23;
  --muted: #5b6172;
  --line: #e6e8ef;
  --accent: #4f46e5;
  --accent-2: #06b6d4;
  --accent-soft: #eef0fe;
  --ours: #eef6ff;
  --ours-line: #bcdcff;
  --max: 1040px;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(20, 22, 40, 0.08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section:nth-child(even) { background: var(--bg-soft); }
h2.section-title {
  font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em;
  text-align: center; margin: 0 0 8px;
}
.section-sub { text-align: center; color: var(--muted); margin: 0 auto 40px; max-width: 720px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; text-align: center;
  padding: 84px 24px 72px;
  background:
    radial-gradient(1200px 500px at 20% -10%, rgba(6,182,212,0.35), transparent 60%),
    radial-gradient(1000px 600px at 90% 0%, rgba(99,102,241,0.45), transparent 55%),
    linear-gradient(160deg, #0b1020 0%, #161a35 55%, #1d2347 100%);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 22px 22px; opacity: 0.6; pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.venue-badge {
  display: inline-block; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: #c7d2fe;
  border: 1px solid rgba(199,210,254,0.4); border-radius: 999px;
  padding: 6px 16px; margin-bottom: 22px; background: rgba(255,255,255,0.04);
}
.hero h1 {
  font-size: 2.6rem; line-height: 1.18; font-weight: 800; letter-spacing: -0.02em;
  margin: 0 auto 10px; max-width: 900px;
}
.hero .subtitle { color: #aeb6e0; font-size: 1.05rem; max-width: 760px; margin: 0 auto 26px; }
.authors { font-size: 1.12rem; margin: 18px 0 2px; }
.authors a { color: #fff; }
.authors sup { color: var(--accent-2); }
.affil { color: #9aa3cc; font-size: 0.95rem; margin-bottom: 28px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,0.10); color: #fff; border: 1px solid rgba(255,255,255,0.18);
  padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: 0.97rem;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.4); text-decoration: none; transform: translateY(-2px); }
.btn.primary { background: var(--accent); border-color: var(--accent); }
.btn.primary:hover { background: #5b54f0; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Stat cards ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 8px; }
.stat {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 16px; text-align: center; box-shadow: var(--shadow);
}
.stat .num {
  font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .lbl { color: var(--muted); font-size: 0.9rem; margin-top: 4px; }

/* ---------- Figures ---------- */
figure.fig { margin: 0 auto; text-align: center; }
figure.fig img {
  max-width: 100%; height: auto; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow);
}
figure.fig figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 14px; max-width: 860px; margin-inline: auto; }
figure.fig figcaption b { color: var(--ink); }
.fig-narrow img { max-width: 720px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }

/* ---------- Abstract ---------- */
.abstract { max-width: 820px; margin: 0 auto; font-size: 1.06rem; }
.abstract p { margin: 0 0 16px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
table.results { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.results th, table.results td { padding: 11px 14px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.results thead th { background: #11152b; color: #fff; font-weight: 600; position: sticky; top: 0; }
table.results tbody tr:hover { background: #fafbff; }
table.results td.model, table.results td.method { text-align: left; }
table.results tr.ours { background: var(--ours); }
table.results tr.ours:hover { background: #e3f0ff; }
table.results tr.ours td { font-weight: 700; }
table.results .best { color: var(--accent); }
.delta-pos { color: #0a8f4d; font-weight: 600; }
.delta-neg { color: #c2410c; font-weight: 600; }
.group-row td { background: #f0f1f7; font-weight: 700; text-align: left; color: var(--muted); font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; }
.tbl-caption { text-align: center; color: var(--muted); font-size: 0.9rem; margin: 14px auto 0; max-width: 820px; }

/* ---------- Code ---------- */
.code-card {
  background: #0d1224; border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; max-width: 860px; margin: 0 auto;
}
.code-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.code-head .dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.code-head .fname { color: #8b93b8; font-size: 0.85rem; margin-left: 8px; }
pre.code { margin: 0; padding: 20px 22px; overflow-x: auto; color: #e6e9f5; font-size: 0.9rem; line-height: 1.7;
  font-family: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace; }
pre.code .c { color: #6b7393; }     /* comment */
pre.code .k { color: #c792ea; }     /* keyword */
pre.code .f { color: #82aaff; }     /* function */
pre.code .s { color: #c3e88d; }     /* string/number */

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.step .n { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; margin-bottom: 12px; }
.step h3 { margin: 0 0 6px; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.94rem; }

/* ---------- BibTeX ---------- */
pre.bibtex { background: #0d1224; color: #d8def0; border-radius: var(--radius); padding: 22px; overflow-x: auto;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.88rem; line-height: 1.6; max-width: 860px; margin: 0 auto; box-shadow: var(--shadow); }

/* ---------- Patent banner ---------- */
.banner {
  max-width: 860px; margin: 28px auto 0; background: #fff7ed; border: 1px solid #fed7aa;
  color: #9a3412; border-radius: 12px; padding: 14px 18px; font-size: 0.92rem; text-align: center;
}

/* ---------- Footer ---------- */
.footer { background: #0b1020; color: #9aa3cc; text-align: center; padding: 40px 24px; font-size: 0.9rem; }
.footer a { color: #c7d2fe; }

@media (max-width: 820px) {
  .hero h1 { font-size: 2rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}
