/* EvoWorld project page — layout: dark film-first hero, then a calm paper column of sections */
:root {
  --bg: #f7f5f0; --surface: #ffffff; --tint: #eef2f6; --line: #e4ded2; --line-strong: #cfd6df;
  --ink: #141c28; --muted: #586474; --navy: #15325a; --blue: #2456b0;
  --gold: #d2a24a; --gold-ink: #7e5a12; --base-bar: #b9c3cf;
  --hero: #0a111d; --hero-2: #111b2c; --hero-ink: #f4f1ea; --hero-muted: #a9b4c3;
  --display: "Lora", "Iowan Old Style", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --shadow: 0 1px 2px rgba(21,50,90,.05), 0 10px 30px rgba(21,50,90,.07);
  --radius: 14px; --wrap: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0b121d; --surface: #121c2b; --tint: #18263a; --line: #233349; --line-strong: #2f4561;
  --ink: #e8e5dd; --muted: #a3adba; --navy: #dce6f3; --blue: #8fb4ef;
  --gold: #e2bd6e; --gold-ink: #e2bd6e; --base-bar: #4a5a70;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.25); color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #0b121d; --surface: #121c2b; --tint: #18263a; --line: #233349; --line-strong: #2f4561;
  --ink: #e8e5dd; --muted: #a3adba; --navy: #dce6f3; --blue: #8fb4ef;
  --gold: #e2bd6e; --gold-ink: #e2bd6e; --base-bar: #4a5a70;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.25); color-scheme: dark;
}

*, *::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: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { text-wrap: balance; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 12px; top: 12px; z-index: 50; background: #fff; color: #000; padding: 6px 12px; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--hero); color: var(--hero-ink); overflow: hidden; padding-bottom: 72px; }
.hero__chart { position: absolute; inset: 0; pointer-events: none; color: #8fb4ef; opacity: .5; }
.hero__chart svg { width: 100%; height: 100%; }
.hero__chart .g { stroke: currentColor; stroke-width: .6; opacity: .08; }
.hero__chart .r1 { stroke: #f0927a; stroke-width: .8; opacity: .16; }
.hero__chart .r2 { stroke: currentColor; stroke-width: .7; opacity: .11; }
.hero__chart .ring { fill: none; stroke: currentColor; stroke-width: .9; opacity: .2; }
.hero > .wrap { position: relative; }
.nav { display: flex; align-items: center; gap: 28px; height: 64px; border-bottom: 1px solid rgba(244,241,234,.1); }
.nav__brand { font-family: var(--display); font-weight: 600; font-size: 20px; color: var(--hero-ink); }
.nav__links { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--hero-muted); font-size: 15px; }
.nav a:hover { color: var(--hero-ink); text-decoration: none; }
.nav__home { border: 1px solid rgba(244,241,234,.2); padding: 4px 12px; border-radius: 999px; }
.hero__head { text-align: center; padding: 64px 0 36px; }
.venue { display: inline-flex; gap: 10px; align-items: center; color: var(--gold); border: 1px solid rgba(226,189,110,.45); border-radius: 999px; padding: 6px 14px; }
.venue i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.hero h1 { font-family: var(--display); font-weight: 600; font-size: clamp(56px, 10vw, 128px); line-height: .95; margin: 22px 0 6px; letter-spacing: -.01em; }
.hero__motto { font-family: var(--display); font-style: italic; font-size: clamp(20px, 2.6vw, 28px); color: #e2bd6e; margin: 0; }
.hero__title { font-family: var(--display); font-size: clamp(19px, 2.2vw, 24px); line-height: 1.4; max-width: 820px; margin: 22px auto 0; color: #e6e9ee; }
.authors { max-width: 900px; margin: 22px auto 0; font-size: 17px; line-height: 1.8; color: #e6e9ee; }
.authors span { white-space: nowrap; }
.authors sup { color: var(--hero-muted); font-size: 11px; margin-left: 1px; }
.authors a { color: #e6e9ee; border-bottom: 1px solid rgba(226,189,110,.6); }
.affils { margin: 8px auto 0; max-width: 900px; font-size: 14.5px; color: var(--hero-muted); }
.affils sup { font-size: 10px; }
.notes { margin-top: 4px; font-size: 13.5px; color: var(--hero-muted); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; border: 1px solid rgba(244,241,234,.25); color: var(--hero-ink); background: rgba(244,241,234,.04); transition: background .2s, border-color .2s; }
.btn:hover { text-decoration: none; background: rgba(244,241,234,.1); border-color: rgba(244,241,234,.45); }
.btn--gold { background: #e2bd6e; border-color: #e2bd6e; color: #0a111d; }
.btn--gold:hover { background: #ecc982; border-color: #ecc982; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.film { max-width: 1040px; margin: 8px auto 0; }
.film__frame { border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: 0 30px 80px rgba(0,0,0,.5); border: 1px solid rgba(244,241,234,.08); aspect-ratio: 16 / 9; }
.film__frame video { width: 100%; height: 100%; }
.film__cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--hero-muted); }
.film__cap a { color: var(--hero-muted); }

/* ---------- Stats ---------- */
.stats { margin-top: -40px; position: relative; z-index: 2; }
.stats__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; }
.stat__v { font-family: var(--display); font-weight: 600; font-size: 44px; line-height: 1; color: var(--navy); font-variant-numeric: tabular-nums; }
.stat__v .from { color: var(--muted); font-size: 28px; font-weight: 500; }
.stat__v .arrow { color: var(--gold-ink); font-size: 26px; margin: 0 6px; }
.stat__l { margin-top: 10px; font-weight: 600; }
.stat__s { font-size: 14px; color: var(--muted); }

/* ---------- Sections ---------- */
section.block { padding-top: 88px; scroll-margin-top: 20px; }
.kicker { color: var(--gold-ink); margin: 0 0 12px; }
.block h2 { font-family: var(--display); font-weight: 600; font-size: clamp(32px, 4.4vw, 46px); line-height: 1.1; color: var(--navy); margin: 0; }
.block h2 em { color: var(--gold-ink); }
.lede { font-size: 19px; color: var(--muted); max-width: 680px; margin: 14px 0 0; }
.abstract { max-width: 780px; }
.abstract p { font-family: var(--display); font-size: 20px; line-height: 1.7; margin: 20px 0 0; }
.keywords { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.keywords span { background: var(--tint); color: var(--navy); border-radius: 999px; padding: 3px 12px; font-size: 14px; font-weight: 600; }

/* Method loop */
.loop { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 48px; align-items: center; margin-top: 36px; }
.loop svg { width: 100%; height: auto; overflow: visible; }
.loop .ring { fill: none; stroke: var(--line-strong); stroke-width: 2; }
.loop .arc { fill: none; stroke: var(--gold); stroke-width: 4; stroke-linecap: round; transition: stroke-dasharray .6s cubic-bezier(.3,.7,.2,1); }
.loop .core { fill: var(--tint); stroke: var(--line-strong); }
.loop .core-t { font-family: var(--display); font-weight: 600; font-size: 22px; fill: var(--navy); }
.loop .node { cursor: pointer; }
.loop .node circle { fill: var(--surface); stroke: var(--line-strong); stroke-width: 2; transition: fill .2s, stroke .2s; }
.loop .node text { font-family: var(--mono); font-size: 15px; fill: var(--ink); }
.loop .node.on circle { fill: var(--gold); stroke: var(--gold); }
.loop .node.on text { fill: #0a111d; }
.loop .node:focus { outline: none; }
.loop .node:focus-visible circle { stroke: var(--blue); stroke-width: 3; }
.loop .lab { font-family: var(--mono); font-size: 13px; letter-spacing: .14em; fill: var(--muted); }
.step-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 32px; min-height: 260px; }
.step-card .num { color: var(--gold-ink); }
.step-card h3 { font-family: var(--display); font-size: 30px; margin: 8px 0 10px; color: var(--navy); }
.step-card p { margin: 0; color: var(--ink); }
.step-card .upd { margin-top: 16px; font-size: 15px; color: var(--muted); }
.step-nav { display: flex; gap: 8px; margin-top: 20px; }
.step-nav button { border: 1px solid var(--line-strong); background: transparent; color: var(--ink); border-radius: 999px; padding: 6px 14px; font: 600 14px var(--sans); cursor: pointer; }
.step-nav button:hover { background: var(--tint); }
.figure { margin: 40px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.figure img { width: 100%; height: auto; border-radius: 8px; background: #fff; }
.figure figcaption { margin-top: 12px; font-size: 14.5px; color: var(--muted); }

/* Demos */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--tint); border-radius: 999px; margin-top: 28px; }
.tabs button { border: 0; background: transparent; color: var(--muted); padding: 8px 18px; border-radius: 999px; font: 600 15px var(--sans); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.panel { margin-top: 24px; }
.rollouts { display: grid; gap: 22px; }
.roll { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.roll video { width: 100%; border-radius: 8px; background: #000; aspect-ratio: 2.5 / 1; }
.roll .views { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 8px; color: var(--muted); font-size: 11px; }
.roll h3 { font-family: var(--display); font-size: 26px; margin: 6px 0 8px; color: var(--navy); }
.roll .ins { font-size: 16px; margin: 0; }
.roll .meta { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.tag { display: inline-block; color: var(--gold-ink); border: 1px solid var(--gold); border-radius: 999px; padding: 1px 10px; }
.real { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.real__video { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.real__video video { width: 100%; border-radius: 8px; background: #000; aspect-ratio: 16 / 9; }
.real__video p { margin: 12px 4px 2px; font-size: 14.5px; color: var(--muted); }
.real__video h3 { font-family: var(--display); font-size: 24px; margin: 10px 4px 0; color: var(--navy); }
.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.task { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.task__top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.task__name { font-weight: 700; color: var(--navy); }
.task__nums { font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.task__nums b { color: var(--gold-ink); }
.task img { margin-top: 8px; width: 100%; height: 38px; object-fit: cover; object-position: left center; border-radius: 4px; }
.track { position: relative; height: 8px; background: var(--tint); border-radius: 4px; margin-top: 8px; }
.track i, .track b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.track b { background: var(--gold); }
.track i { background: var(--base-bar); z-index: 1; }
.note-s { font-size: 13.5px; color: var(--muted); margin-top: 12px; }

/* Results */
.results { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; margin-top: 36px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; min-width: 0; }
.card h3 { font-family: var(--display); font-size: 24px; margin: 0; color: var(--navy); }
.card .sub { font-size: 14px; color: var(--muted); margin: 4px 0 0; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 6px; }
.pills button { border: 1px solid var(--line-strong); background: transparent; color: var(--muted); border-radius: 999px; padding: 4px 12px; font: 600 14px var(--sans); cursor: pointer; }
.pills button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--surface); }
.legend { display: flex; gap: 18px; font-size: 13.5px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.chart { margin-top: 10px; }
.crow { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: center; padding: 7px 0; }
.crow .lbl { font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.crow .lbl small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.cbars { display: grid; gap: 4px; }
.cbar { position: relative; height: 14px; border-radius: 3px; transition: width .6s cubic-bezier(.3,.7,.2,1); min-width: 2px; }
.cbar.base { background: var(--base-bar); }
.cbar.evo { background: var(--gold); }
.cbar span { position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.cbar.evo span { color: var(--ink); font-weight: 600; }
.chart-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14.5px; }
.chart-foot b { color: var(--gold-ink); }
.avg .crow { grid-template-columns: 110px minmax(0, 1fr); }
.headline { font-family: var(--display); font-size: 46px; font-weight: 600; color: var(--navy); line-height: 1; margin-top: 18px; font-variant-numeric: tabular-nums; }
.headline span { color: var(--muted); font-size: 30px; font-weight: 500; }
details.more { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
details.more summary { cursor: pointer; padding: 16px 22px; font-weight: 700; color: var(--navy); list-style: none; display: flex; justify-content: space-between; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "+"; font-weight: 400; color: var(--muted); }
details.more[open] summary::after { content: "−"; }
.more__body { padding: 0 22px 22px; }
.table-wrap { overflow-x: auto; margin-top: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
caption { text-align: left; color: var(--muted); font-size: 14px; padding: 6px 0 10px; }
th, td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { color: var(--muted); font-weight: 600; }
tr.ours-row td { background: var(--tint); font-weight: 600; }
td.best-cell { color: var(--gold-ink); font-weight: 700; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.gallery figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.gallery img { width: 100%; height: auto; background: #fff; border-radius: 6px; }
.gallery figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* Citation */
.cite { position: relative; margin-top: 24px; background: var(--hero); color: #e6e9ee; border-radius: var(--radius); padding: 22px 24px; overflow-x: auto; }
.cite pre { margin: 0; font: 13.5px/1.7 var(--mono); white-space: pre; }
.cite button { position: absolute; top: 12px; right: 12px; border: 1px solid rgba(244,241,234,.25); background: transparent; color: #e6e9ee; border-radius: 999px; padding: 4px 12px; font: 600 13px var(--sans); cursor: pointer; }
.foot { margin-top: 88px; padding: 28px 0 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* Responsive */
@media (max-width: 900px) {
  .loop, .results, .real { grid-template-columns: minmax(0, 1fr); }
  .loop svg { max-width: 380px; margin: 0 auto; }
  .roll { grid-template-columns: minmax(0, 1fr); }
  .nav__links { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .stats__grid, .gallery { grid-template-columns: minmax(0, 1fr); }
  .stats { margin-top: -28px; }
  .hero__head { padding-top: 40px; }
  section.block { padding-top: 64px; }
  .abstract p { font-size: 18px; }
  .crow { grid-template-columns: 96px minmax(0, 1fr); }
  .cbar span { font-size: 11px; }
  .step-card { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .cbar, .loop .arc { transition: none; } }
