/* Bowerbird project page. Colors follow the paper: seedblue (template), the chart blues, and the table shading. */
:root {
  --navy: #081230;
  --navy-2: #0F1E4D;
  --blue: #2E5AA8;            /* seedblue of the paper template */
  --blue-soft: #8CA4CF;
  --blue-tint: #EEF2F9;
  --ours: #3976F8;            /* Bowerbird in the paper's charts */
  --ours-light: #A8D7FC;      /* Bowerbird-SFT in the paper's charts */
  --indigo: #4249AD;          /* the mascot */
  --ink: #1F2328;
  --muted: #5B6270;
  --line: #DDE3EC;
  --row-ours: #D3F3FB;        /* row shading for our models in the paper */
  --row-group: #F3F4F6;
  --gain: #1F7A3D;
  --card: #FFFFFF;
  --page: #F7F9FC;
  --shadow: 0 1px 2px rgba(16, 30, 70, .06), 0 8px 28px rgba(16, 30, 70, .08);
  --serif: "Palatino Linotype", Palatino, "TeX Gyre Pagella", "Book Antiqua", Georgia, serif;
  --sans: "TeX Gyre Heros", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--page); color: var(--ink); font: 17px/1.65 var(--serif); overflow-x: hidden; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
p { margin: 0 0 12px; text-align: justify; hyphens: auto; }

/* ---------------------------------------------------------------- navigation */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .86);
       backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
       border-bottom: 1px solid rgba(46, 90, 168, .18); }
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 58px; }
.nav .logo { height: 28px; width: auto; margin: 0; flex: none; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0 0 0 auto; padding: 0; overflow-x: auto; scrollbar-width: none; }
.nav ul::-webkit-scrollbar { display: none; }
.nav li a { display: block; padding: 6px 11px; border-radius: 999px; font: 600 14px var(--sans); color: var(--muted); white-space: nowrap; }
.nav li a:hover { text-decoration: none; color: var(--blue); background: var(--blue-tint); }
.nav li a.active { color: #fff; background: var(--blue); }
.progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(0);
            background: linear-gradient(90deg, var(--indigo), var(--ours)); }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; color: #fff; text-align: center; padding: 64px 0 120px;
        background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); }
.hero .glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; }
.hero .g1 { width: 620px; height: 620px; left: -160px; top: -260px; background: var(--indigo); animation: drift1 18s ease-in-out infinite alternate; }
.hero .g2 { width: 560px; height: 560px; right: -180px; top: -120px; background: var(--ours); opacity: .38; animation: drift2 22s ease-in-out infinite alternate; }
.hero .g3 { width: 520px; height: 300px; left: 30%; bottom: -220px; background: #22A6C9; opacity: .22; animation: drift1 26s ease-in-out infinite alternate-reverse; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
                background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1.2px); background-size: 24px 24px;
                -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
                mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%); }
@keyframes drift1 { to { transform: translate(90px, 60px) scale(1.08); } }
@keyframes drift2 { to { transform: translate(-80px, 70px) scale(.94); } }
.hero .wrap { position: relative; }
.mascot { width: 92px; height: auto; margin: 0 auto 14px; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .35));
          animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-9px) rotate(-2deg); } }
.venue { display: inline-block; font: 600 12.5px var(--sans); letter-spacing: .12em; text-transform: uppercase;
         color: #BFD3FF; border: 1px solid rgba(191, 211, 255, .35); border-radius: 999px; padding: 4px 12px; margin-bottom: 18px; }
h1.title { font: 700 clamp(28px, 4.4vw, 48px)/1.18 var(--serif); margin: 0 auto; max-width: 940px; text-wrap: balance; letter-spacing: -.005em; }
h1.title .name { background: linear-gradient(92deg, #9FB8FF 0%, #6E9BFF 45%, #7FD6F0 100%);
                 -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { text-align: center; }
.authors { font: 700 19px var(--serif); margin: 30px 0 0; }
.authors span { white-space: nowrap; margin: 0 10px; }
.authors sup, .affil sup, .notes sup { font-weight: 400; }
.affil { margin: 8px 0 2px; color: #DCE5FA; }
.emails { font: 14px var(--mono); color: #A9B6D6; margin: 2px 0 6px; overflow-wrap: anywhere; }
.notes { font-size: 14px; color: #A9B6D6; margin: 0; }
.buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 28px 0 0; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px; font: 600 15px var(--sans);
       color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .28); transition: background .2s, transform .2s; }
.btn:hover { text-decoration: none; background: rgba(255, 255, 255, .2); transform: translateY(-1px); }
.btn.soon { color: #AFBBD8; cursor: default; }
.btn.soon:hover { background: rgba(255, 255, 255, .1); transform: none; }
.btn svg { width: 17px; height: 17px; fill: currentColor; }

/* ---------------------------------------------------------------- key numbers */
.stats { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: -78px auto 0; }
.stat { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 20px 14px 16px; text-align: center;
        border-top: 3px solid var(--ours); }
.stat .num { font: 700 36px/1.05 var(--sans); color: var(--blue); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat .lab { font-size: 14.5px; color: var(--ink); margin-top: 8px; line-height: 1.35; }
.stat .sub { font: 13px var(--sans); color: var(--muted); margin-top: 4px; }

/* ---------------------------------------------------------------- sections */
section { padding: 64px 0 8px; }
.kicker { font: 700 12.5px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ours); margin: 0 0 6px; }
h2 { font: 700 clamp(25px, 3vw, 32px)/1.25 var(--sans); color: var(--ink); margin: 0 0 18px; letter-spacing: -.01em; }
h3 { font: 700 18px/1.35 var(--sans); color: var(--blue); margin: 0 0 8px; }
.lead { font-size: 18px; color: #333A45; max-width: 860px; }
figure { margin: 22px 0 26px; }
.frame { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 22px; }
.frame img { cursor: zoom-in; }
figcaption { font-size: 15px; line-height: 1.55; color: #3A404A; margin-top: 14px; text-align: justify; }
figcaption b.lab { font-family: var(--sans); color: var(--blue); margin-right: 8px; }
figcaption b.ttl { font-family: var(--sans); }

.abstract { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 28px 36px 20px; }
.tldr { position: relative; background: linear-gradient(90deg, var(--blue-tint), #F4F8FF); border-left: 4px solid var(--ours);
        padding: 12px 16px; border-radius: 6px; margin-bottom: 18px; }
.tldr b:first-child { font-family: var(--sans); color: var(--blue); }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card { position: relative; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 22px 24px 12px;
        transition: transform .25s, box-shadow .25s; overflow: hidden; }
.card::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--indigo), var(--ours)); }
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(16, 30, 70, .06), 0 16px 40px rgba(16, 30, 70, .12); }
.card h3 { display: flex; align-items: center; gap: 12px; }
.card .no { flex: none; width: 30px; height: 30px; border-radius: 9px; color: #fff; font: 700 15px/30px var(--sans); text-align: center;
            background: linear-gradient(135deg, var(--indigo), var(--ours)); }
.card p { font-size: 16px; }

/* findings */
.findings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 8px; }
.finding { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 20px 22px 12px; display: flex; flex-direction: column; }
.finding .tag { font: 700 12.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.finding .claim { font: italic 600 17px/1.4 var(--serif); margin: 6px 0 12px; color: var(--ink); }
.finding .metric { font: 700 28px/1.1 var(--sans); color: var(--blue); font-variant-numeric: tabular-nums; }
.finding .metric small { display: block; font: 500 13px/1.4 var(--sans); color: var(--muted); margin-top: 4px; }
.finding p { font-size: 15.5px; margin-top: 12px; text-align: left; }

/* method pipeline */
.pipeline { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 0; margin-top: 8px; }
.stage { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 20px 20px 10px; }
.stage .idx { font: 700 12.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ours); }
.stage h3 { margin-top: 4px; }
.stage p { font-size: 15.5px; text-align: left; }
.arrow { display: flex; align-items: center; justify-content: center; width: 38px; color: var(--blue-soft); }
.arrow svg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- leaderboard */
.board { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 22px 24px 16px; margin: 22px 0 10px; }
.board-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.board-head h3 { margin: 0; color: var(--ink); }
.tabs { display: inline-flex; background: var(--row-group); border-radius: 999px; padding: 3px; }
.tabs button { border: 0; background: none; font: 600 14px var(--sans); color: var(--muted); padding: 6px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--blue); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 13px var(--sans); color: var(--muted); margin: 0 0 10px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.bars { position: relative; margin-left: 168px; }
.bars .grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.bars .tick { position: absolute; bottom: -22px; transform: translateX(-50%); font: 12px var(--sans); color: var(--muted); }
.bar-row { position: absolute; left: -168px; right: 0; height: 26px; display: flex; align-items: center;
           transition: top .6s cubic-bezier(.2, .7, .2, 1); }
.bar-row .name { flex: none; width: 160px; margin-right: 8px; text-align: right; font: 13.5px/1.2 var(--sans); color: var(--ink);
                 white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .track { position: relative; flex: 1; height: 16px; }
.bar-row .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0;
                 transition: width .6s cubic-bezier(.2, .7, .2, 1); }
.bar-row .val { position: absolute; top: -1px; margin-left: 6px; font: 600 12.5px/18px var(--sans); color: var(--ink);
                transition: left .6s cubic-bezier(.2, .7, .2, 1); font-variant-numeric: tabular-nums; }
.bar-row.c-open .fill { background: #8E9BB5; }
.bar-row.c-closed .fill { background: #CDD3DD; }
.bar-row.c-ours .fill { background: var(--ours-light); }
.bar-row.c-bird .fill { background: linear-gradient(90deg, var(--indigo), var(--ours)); }
.bar-row.c-bird .name, .bar-row.c-bird .val { font-weight: 700; color: var(--blue); }
.board-note { font: 13px/1.5 var(--sans); color: var(--muted); margin: 34px 0 0; text-align: left; }

.table-toggle { margin: 18px 0 0; }
.table-toggle summary { cursor: pointer; font: 600 15px var(--sans); color: var(--blue); list-style: none; display: inline-flex; align-items: center; gap: 8px; }
.table-toggle summary::-webkit-details-marker { display: none; }
.table-toggle summary::before { content: "▸"; transition: transform .2s; }
.table-toggle[open] summary::before { transform: rotate(90deg); }
.table-wrap { overflow-x: auto; margin-top: 12px; background: var(--card); border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
table.res { border-collapse: collapse; width: 100%; font: 13.5px/1.35 var(--serif); white-space: nowrap; }
table.res th, table.res td { padding: 4px 7px; text-align: center; }
table.res td:first-child, table.res th:first-child { text-align: left; }
table.res thead th { font-family: var(--sans); font-size: 12.5px; }
table.res thead tr:first-child th { border-bottom: 1px solid var(--line); }
table.res thead tr:last-child th { border-bottom: 1px solid var(--ink); font-weight: 600; }
table.res tbody tr:hover td { background: #F5F8FE; }
table.res tr.grp td { background: var(--row-group); font-style: italic; text-align: center; color: var(--muted); }
table.res tr.ours td { background: var(--row-ours); }
table.res .sub { padding-left: 14px; }
table.res .gain { display: block; font: 600 11px var(--sans); color: var(--gain); }

.transfer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.deltas { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.delta { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #FBFCFE; }
.delta .bm { font: 600 13.5px var(--sans); color: var(--muted); }
.delta .v { font: 700 24px/1.2 var(--sans); color: var(--blue); margin-top: 4px; font-variant-numeric: tabular-nums; }
.delta .v span { display: block; font-size: 13.5px; color: var(--muted); font-weight: 500; }

/* ---------------------------------------------------------------- citation, footer */
pre.bib { position: relative; background: #0D1733; color: #DCE5FA; border-radius: 14px; padding: 20px 22px; font: 13.5px/1.6 var(--mono);
          overflow-x: auto; margin: 0; box-shadow: var(--shadow); }
.copy { position: absolute; top: 12px; right: 12px; font: 600 13px var(--sans); color: #fff; background: rgba(255, 255, 255, .12);
        border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; padding: 5px 12px; cursor: pointer; }
.copy:hover { background: rgba(255, 255, 255, .22); }
footer { margin-top: 72px; padding: 26px 0 36px; text-align: center; font: 14px var(--sans); color: var(--muted); border-top: 1px solid var(--line); }
footer img { display: inline-block; width: 22px; vertical-align: -5px; margin-right: 6px; }

/* ---------------------------------------------------------------- lightbox, reveal */
.lightbox { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 24px;
            background: rgba(6, 12, 32, .86); cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; border-radius: 8px; background: #fff; }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .glow, .mascot { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .bar-row, .bar-row .fill, .bar-row .val { transition: none; }
}

@media (max-width: 900px) {
  .findings { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr; }
  .arrow { width: auto; height: 30px; transform: rotate(90deg); }
  .transfer { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav .wrap { gap: 10px; }
  .nav .logo { height: 22px; }
  .hero { padding: 44px 0 104px; }
  .mascot { width: 72px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat .num { font-size: 28px; }
  .cards { grid-template-columns: 1fr; }
  .abstract { padding: 20px 18px 12px; }
  .frame { padding: 12px; border-radius: 12px; }
  .board { padding: 16px 14px 12px; }
  .bars { margin-left: 112px; }
  .bar-row { left: -112px; }
  .bar-row .name { width: 104px; font-size: 12px; }
  .tabs button { padding: 6px 9px; font-size: 13px; }
  .authors span { margin: 0 6px; }
  .deltas { grid-template-columns: 1fr 1fr; }
  p, figcaption { text-align: left; }
}
