/* ==========================================================================
   Tokens — change the look from here
   ========================================================================== */
:root {
  --font-display: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body:    "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:    "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap:    1100px;                  /* page container */
  --measure: 68ch;                    /* max line length for running text */
  --pad:     clamp(20px, 4vw, 40px);  /* fluid side padding */
  --rail:    180px;                   /* section label column */
}

/* Light (default) */
:root, :root[data-theme="light"] {
  --bg:      #ffffff;
  --panel:   #fafafa;   /* faint fill for boxes */
  --ink:     #101114;
  --ink-2:   #4b5261;
  --muted:   #6c7280;   /* 4.9:1 on white — small mono text must stay legible */
  --line:    #ebebe8;
  --accent:  #2b4bd8;
  --openreview: #8c1b13;   /* OpenReview's signature dark red */
  color-scheme: light;
}

/* Dark */
:root[data-theme="dark"] {
  --bg:      #0a0a0b;
  --panel:   #111113;
  --ink:     #ededef;
  --ink-2:   #adb2be;
  --muted:   #8b909b;   /* 5.6:1 on the dark background */
  --line:    #232327;
  --accent:  #8ea0ff;
  --openreview: #ef6f66;   /* lifted for contrast on the dark background */
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(15.5px, 0.35vw + 14.5px, 17px);
  line-height: 1.7;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; }
p { margin: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.measure { max-width: var(--measure); }

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 56px;
}
.header__brand {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.header__brand:hover { text-decoration: none; }

.header__nav {
  display: flex;
  gap: clamp(14px, 1.6vw, 26px);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  /* fades the right edge so the overflowing links read as scrollable */
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
}
@media (min-width: 780px) {
  .header__nav { -webkit-mask-image: none; mask-image: none; }
}
.header__nav::-webkit-scrollbar { display: none; }
.header__nav a {
  color: var(--ink-2);
  font-size: 14px;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.header__nav a:hover { color: var(--ink); text-decoration: none; }
/* the one link that leaves the page — set apart from the section anchors */
.header__nav a.ext {
  padding-left: clamp(14px, 1.6vw, 26px);
  border-left: 1px solid var(--line);
  color: var(--muted);
}
.header__nav a.ext:hover { color: var(--ink); }

.header__right { display: flex; align-items: center; gap: clamp(14px, 1.6vw, 26px); }

.theme-toggle {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-2); }
.theme-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }

/* ==========================================================================
   Title block
   ========================================================================== */
.title {
  padding: clamp(56px, 10vw, 116px) 0 clamp(48px, 7vw, 80px);
  border-bottom: 1px solid var(--line);
}
.title__eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
}
.title h1 {
  margin: 22px 0 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.038em;
}
/* Each line is its own block, so the headline holds at two lines on any width
   wide enough to fit the longer one; below that they wrap naturally. */
.title h1 span { display: block; }
.title h1 .line-2 { color: var(--ink-2); }
.title__lede {
  margin-top: clamp(20px, 2.5vw, 28px);
  max-width: 58ch;
  font-size: clamp(17px, 0.5vw + 15.5px, 20px);
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}
.title__meta {
  margin-top: clamp(26px, 3vw, 36px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
/* hairline separators instead of relying on spacing alone */
.title__meta span + span::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 11px;
  margin-right: 14px;
  vertical-align: -1px;
  background: var(--line);
}
.title__meta span { white-space: nowrap; }
.title__actions {
  margin-top: clamp(28px, 3.5vw, 40px);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14.5px;
  font-weight: 500;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}
.btn:hover { opacity: 0.85; text-decoration: none; }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--ink); opacity: 1; }

/* ==========================================================================
   Sections — sticky label rail + content column
   ========================================================================== */
.section {
  padding: clamp(52px, 7vw, 92px) 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 72px;
}
.section:last-of-type { border-bottom: none; }

.section__grid {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  /* the rail label sits on the same baseline as the section heading, so the two
     stay aligned at every step of the fluid type scale */
  align-items: baseline;
}
.section__aside { position: sticky; top: 84px; }
.section__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.032em;
  text-wrap: balance;
}
.section__intro {
  margin-top: 16px;
  max-width: var(--measure);
  color: var(--ink-2);
  text-wrap: pretty;
}
.section__body { margin-top: clamp(26px, 3vw, 36px); }

/* ==========================================================================
   Prose
   ========================================================================== */
.prose p {
  max-width: var(--measure);
  color: var(--ink-2);
}
.prose p + p { margin-top: 18px; }
.prose .lead {
  font-size: clamp(17px, 0.4vw + 16px, 19px);
  line-height: 1.6;
  color: var(--ink);
}
.prose strong { color: var(--ink); font-weight: 600; }

/* ==========================================================================
   Topics list
   ========================================================================== */
.topics { margin-top: clamp(36px, 4.5vw, 52px); }
.topics__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 10px;
}
.topics ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 3vw, 48px);
}
.topics li {
  display: flex;
  gap: 14px;
  padding: 15px 2px;
  border-top: 1px solid var(--line);
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--ink);
}
.topics li b {
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  padding-top: 2px;
}

/* ==========================================================================
   People
   ========================================================================== */
.people {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(28px, 3.4vw, 38px) clamp(16px, 2vw, 24px);
}
.person { display: block; color: inherit; }
.person:hover { text-decoration: none; }
.person img {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.person:hover img { border-color: var(--accent); transform: translateY(-2px); }
.person__name {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 15px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: color 0.15s ease;
}
.person:hover .person__name { color: var(--accent); }
.person__name svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.person:hover .person__name svg { opacity: 1; }
.person__aff {
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.person__status {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ==========================================================================
   Sub-heading inside a section
   ========================================================================== */
.subhead {
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink);
}
.block { margin-top: clamp(36px, 4.5vw, 52px); }

/* ==========================================================================
   Timeline
   ========================================================================== */
.htimeline {
  position: relative;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 4px 0 18px;
}
/* the rail stops at the last dot rather than running off the edge */
.htimeline::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  width: 80%;
  height: 1px;
  background: var(--line);
}
.htl {
  position: relative;
  padding: 24px 14px 0 0;
}
.htl::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--muted);
}
.htl .d {
  display: block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
}
.htl .l {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}
.htl.is-deadline::before { background: var(--accent); border-color: var(--accent); }
.htl.is-deadline .d { color: var(--accent); font-weight: 600; }
.htl.is-deadline .l { color: var(--ink-2); }

.tl-note {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

/* ==========================================================================
   Guidelines
   ========================================================================== */
.guidelines { list-style: none; margin: 0; padding: 0; }
.guidelines li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 15px 2px;
  border-top: 1px solid var(--line);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink);
}
.guidelines .key {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
}

.guidelines__more {
  margin-top: 18px;
  font-size: 15px;
  color: var(--ink-2);
}

/* ==========================================================================
   Sub-page: back link + track list
   ========================================================================== */
.backlink {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}
.backlink:hover { color: var(--ink); text-decoration: none; }
.backlink::before { content: "←"; }

.title--page { padding-top: clamp(36px, 5vw, 56px); }
.title--page .backlink { margin-bottom: clamp(24px, 3vw, 34px); }
/* page titles are short enough to hold one line — only the homepage headline breaks */
.title--page h1 span { display: inline; }

/* Demo tracks */
.tracks { display: grid; gap: 0; }
.track {
  padding: 22px 2px;
  border-top: 1px solid var(--line);
}
.track h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.track p {
  margin-top: 6px;
  max-width: var(--measure);
  color: var(--ink-2);
  font-size: 15.5px;
}
.track ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.track li {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 13px;
  color: var(--ink-2);
}

/* ==========================================================================
   Submission links
   ========================================================================== */
.sub-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.sub-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: inherit;
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.sub-link:hover {
  text-decoration: none;
  border-color: var(--ink-2);
  transform: translateY(-2px);
}
.sub-link__name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.sub-link__host {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--openreview);
}
.sub-link svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  transition: stroke 0.16s ease, transform 0.16s ease;
}
.sub-link:hover svg { stroke: var(--ink); transform: translate(2px, -2px); }

/* ==========================================================================
   Program committee
   ========================================================================== */
.pc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 3vw, 48px);
}
.pc li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 13px 2px;
  border-top: 1px solid var(--line);
  font-size: 15.5px;
  color: var(--ink);
}
.pc .aff {
  flex: none;
  font-size: 13.5px;
  color: var(--muted);
  text-align: right;
}

/* ==========================================================================
   Status note
   ========================================================================== */
.note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.note::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Placeholder — delete each block as its section is filled in */
.todo {
  padding: clamp(20px, 2.5vw, 30px);
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
}
.todo b { color: var(--ink-2); font-weight: 500; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  padding: 48px 0 60px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .section__grid { grid-template-columns: 1fr; gap: 14px; }
  .section__aside { position: static; }
  .people { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  /* five columns can't hold their labels here, so the rail becomes a stacked list */
  .htimeline { grid-template-columns: 1fr; margin-bottom: 14px; }
  .htimeline::before { display: none; }
  .htl {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    align-items: baseline;
    gap: 14px;
    padding: 13px 2px;
    border-top: 1px solid var(--line);
  }
  .htl::before { display: none; }
  .htl .d { font-size: 13px; }
  .htl .l { margin-top: 0; font-size: 14.5px; color: var(--ink); }
  /* labels are full-ink here, so the deadline needs weight to stay the emphasized row */
  .htl.is-deadline .l { color: var(--ink); font-weight: 600; }
}

@media (max-width: 640px) {
  .topics ol, .pc { grid-template-columns: 1fr; }
  .people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sub-links { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr auto; }
  .timeline .date { grid-column: 1 / -1; }
  .guidelines li { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 560px) {
  .header__inner { height: 52px; }
  .header__brand { font-size: 13px; }
  .title__actions .btn { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 380px) {
  .people { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
