/* Layout, palette, nav and buttons mirror gyeow.github.io. Fonts follow the common ML project-page look:
   Google Sans for titles/authors, Noto Sans for body text (--serif is the heading font variable). */
:root {
  --bg: #fafafa; --fg: #09090b; --primary: #18181b; --primary-fg: #fafafa;
  --secondary: #f4f4f5; --muted: #71717a; --text: #3f3f46; --border: #e4e4e7; --link: #2563eb;
  --serif: "Google Sans", "Noto Sans", system-ui, sans-serif; --sans: "Noto Sans", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #09090b; --fg: #fafafa; --primary: #fafafa; --primary-fg: #18181b;
    --secondary: #27272a; --muted: #a1a1aa; --text: #d4d4d8; --border: #27272a; --link: #60a5fa; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* nav — same as personal site header */
.site-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; border-bottom: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
  background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(12px); }
.nav-inner { max-width: 1152px; margin: 0 auto; padding: 0 24px; height: 80px; display: flex; align-items: center; justify-content: space-between; }
.nav-brand { display: flex; align-items: center; gap: 20px; font: 600 20px var(--serif); letter-spacing: 0; transition: opacity .2s; }
.nav-brand:hover { opacity: .7; }
.nav-brand img { width: 32px; height: 32px; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { padding: 8px 12px; border-radius: 6px; font-size: 18px; font-weight: 500; color: var(--muted); transition: color .2s, background-color .2s; }
.nav-links a:hover { color: var(--primary); }
.nav-links a.active { color: var(--primary); background: var(--secondary); }
@media (max-width: 767px) { .nav-links { display: none; } }

/* hero */
.hero { max-width: 960px; margin: 0 auto; padding: 152px 24px 40px; text-align: center; }
h1 { font: 600 clamp(28px, 4.4vw, 44px)/1.2 var(--serif); letter-spacing: -0.01em; color: var(--primary); margin: 0 auto 24px; max-width: 880px; }
h1 .name { display: block; font-size: 0.62em; color: var(--muted); margin-bottom: 8px; }
.authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; margin: 0 0 8px; font: 400 19px var(--serif); }
.authors span { white-space: nowrap; }
.authors a { transition: color .2s; }
.authors a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }
sup { color: var(--muted); font-size: 0.68em; margin-left: 1px; }
.affils { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; color: var(--muted); font: 400 16px var(--serif); margin: 0 0 22px; }
.venue { margin: 6px 0 20px; font: 700 21px var(--serif); color: #3273dc; }
@media (prefers-color-scheme: dark) { .venue { color: #6ea8ff; } }
.venue a:hover { text-decoration: underline; text-underline-offset: 5px; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 400;
  background: var(--secondary); border: 1px solid var(--border); transition: background-color .2s, transform .2s; }
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { background: color-mix(in srgb, var(--secondary) 80%, var(--border)); }
.btn-primary { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 85%, transparent); transform: translateY(-1px); }

/* sections — headings like "News" / "Selected Publications" on the personal site */
main { max-width: 1152px; margin: 0 auto; padding: 0 24px; }
.section { max-width: 1000px; margin: 0 auto; padding: 0 0 72px; }
.section.narrow { max-width: 1000px; }
.teaser { padding-bottom: 64px; }
h2 { font: 600 30px/1.2 var(--serif); letter-spacing: -0.005em; color: var(--primary); margin: 0 0 32px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
h3 { font: 600 22px/1.3 var(--serif); color: var(--primary); margin: 40px 0 16px; }
.lead { margin: 0; color: var(--text); font-size: 17px; font-weight: 400; line-height: 1.7; }
@media (min-width: 720px) { .lead { text-align: justify; } }
.dots { list-style: none; padding: 0; margin: 0; }
.dots li { position: relative; padding-left: 24px; margin-bottom: 10px; color: var(--text); font-size: 17px; font-weight: 400; line-height: 1.65; }
.dots li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }

.figure { margin: 0; }
.figure > img { width: 100%; }
/* Paper figures have transparent backgrounds so they sit directly on the page.
   Their text is dark, so in dark mode they get a light plate to stay legible. */
@media (prefers-color-scheme: dark) { .figure > img.diagram { background: #fafafa; border-radius: 12px; padding: 12px; } }
figcaption { color: var(--muted); font-size: 15px; font-weight: 400; line-height: 1.65; margin-top: 16px; }
.qual { display: grid; grid-template-columns: auto 1fr 1fr; gap: 8px 10px; align-items: center; }
.qual img { width: 100%; border-radius: 6px; }
.qual .q { text-align: center; font-style: italic; color: var(--muted); font-size: 15px; }
.lbl { writing-mode: vertical-rl; transform: rotate(180deg); font: 500 12.5px var(--mono); color: var(--muted); text-align: center; }
.lbl.ours { color: #16a34a; font-weight: 700; }
@media (max-width: 600px) { .qual { grid-template-columns: auto 1fr; } .qual > :nth-child(3n) { display: none; } }

/* authors */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px 16px; }
.person { display: flex; flex-direction: column; align-items: center; text-align: center; }
.avatar { position: relative; width: 112px; height: 112px; border-radius: 50%; overflow: hidden; margin-bottom: 14px;
  background: var(--secondary); border: 1px solid var(--border); display: grid; place-items: center; transition: transform .2s; }
.person:hover .avatar { transform: translateY(-3px); }
.person:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.avatar::before { content: attr(data-initials); color: var(--muted); font: 700 28px var(--serif); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.person strong { font-weight: 600; font-size: 16px; line-height: 1.3; }
.person span:last-child { color: var(--muted); font-size: 14px; font-weight: 400; margin-top: 3px; }

/* bibtex */
.bib { position: relative; border: 1px solid var(--border); border-radius: 8px; background: var(--secondary); }
pre { margin: 0; padding: 20px 24px; overflow-x: auto; font: 13.5px/1.65 var(--mono); }
.copy { position: absolute; top: 10px; right: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--muted);
  border-radius: 6px; padding: 3px 10px; font: 500 13px var(--sans); cursor: pointer; }
.copy:hover { color: var(--primary); }

/* footer — same as personal site */
footer { border-top: 1px solid color-mix(in srgb, var(--border) 40%, transparent); padding: 32px 0; margin-top: 16px; }
.footer-inner { max-width: 1152px; margin: 0 auto; padding: 0 24px; color: var(--muted); font-size: 14px; }
.footer-inner p { margin: 0; }
.footer-inner a:hover { color: var(--primary); }

/* results table */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tab { font: 500 15px var(--sans); padding: 8px 16px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; transition: color .2s, background-color .2s; }
.tab:hover { color: var(--primary); }
.tab.on { color: var(--primary); background: var(--secondary); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 14px; text-align: center; white-space: nowrap; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--primary); background: var(--secondary); }
td { color: var(--text); font-weight: 400; }
td.type { text-align: left; font-style: italic; }
td.m { text-align: left; color: var(--fg); font-weight: 400; }
th:nth-child(-n+2) { text-align: left; }
tbody tr:last-child td { border-bottom: 0; }
td.best { color: var(--primary); font-weight: 700; }
td.second { text-decoration: underline; text-underline-offset: 3px; }
tr.ours td { background: color-mix(in srgb, var(--primary) 4%, transparent); }
tr.ours td.m { font-weight: 600; }
.note { color: var(--muted); font-size: 14px; font-weight: 400; margin: 12px 0 0; }
#results h3:first-of-type { margin-top: 0; }
@media (max-width: 640px) { td.type, th:first-child { display: none; } th, td { padding: 9px 10px; font-size: 14px; } }
