:root {
  color-scheme: dark;
  --background: #080f20;
  --surface: #0d182c;
  --ink: #edf1f5;
  --muted: #a8b4cb;
  --accent: #9ab9eb;
  --line: #263651;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Helvetica Neue', Arial, sans-serif;
  --nav-height: 67px;
  --footer-height: calc(48px + env(safe-area-inset-bottom, 0px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) + 16px); scroll-padding-bottom: calc(var(--footer-height) + 16px); }
body { margin: 0; padding-bottom: var(--footer-height); background: var(--background); color: var(--ink); font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
body:has(.image-viewer[open]) { overflow: hidden; }
a { color: inherit; text-underline-offset: 4px; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
::selection { background: #2c4676; color: white; }
img, video { display: block; max-width: 100%; height: auto; }
figure, p { margin: 0; }
sup { color: var(--accent); font-size: .68em; margin-left: 2px; }
.container { width: min(100% - 48px, 1040px); margin-inline: auto; }
.narrow { max-width: 820px; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 5; padding: 10px 18px; background: var(--accent); color: var(--background); }
.skip-link:focus { top: 12px; }
.site-nav { position: sticky; top: 0; z-index: 3; border-bottom: 1px solid var(--line); background: var(--background); }
.nav-inner { display: flex; justify-content: space-between; gap: 28px; align-items: center; min-height: 66px; }
.wordmark { display: flex; flex-shrink: 0; gap: 10px; align-items: center; font-size: 15px; font-weight: 650; letter-spacing: .02em; text-decoration: none; }
.nav-links { display: flex; min-width: 0; gap: 18px; overflow-x: auto; padding: 10px 5px; color: var(--muted); font-size: 12px; }
.nav-links a { flex-shrink: 0; white-space: nowrap; text-decoration: none; }
.nav-links a:hover, footer a:hover { color: var(--accent); }
.publication-header { padding: 56px 0 32px; text-align: center; }
.eyebrow { color: var(--accent); font-size: 10px; font-weight: 600; letter-spacing: .17em; text-transform: uppercase; }
h1 { margin: 17px auto 24px; font: 700 clamp(30px, 3.6vw, 44px)/1.16 var(--serif); letter-spacing: -.025em; text-wrap: balance; }
h1 em { color: var(--accent); font-style: normal; }
.authors, .affiliations { display: flex; flex-wrap: wrap; justify-content: center; }
.authors { gap: 2px 6px; font-size: 14px; font-weight: 500; }
.affiliations { max-width: 820px; margin: 10px auto 0; gap: 2px 15px; color: var(--muted); font-size: 12px; }
.author-note { margin-top: 7px; color: var(--muted); font-size: 11px; }
.institution-logos img { width: 100%; height: auto; max-height: 72px; object-fit: contain; }
.header-logos { width: min(100%, 420px); margin: 28px auto 0; }
.header-logos > .logo-hkclr { width: 340px; margin-inline: auto; }
.institution-row { display: grid; grid-template-columns: 1.8fr 1fr .8fr; align-items: center; gap: 36px; margin-top: 24px; }
.bottom-logos { display: grid; grid-template-columns: 2.8fr 1.8fr 1fr .8fr; align-items: center; gap: clamp(14px, 3vw, 32px); max-width: 780px; padding-block: 32px 48px; border-top: 1px solid var(--line); }
.publication-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.pill { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 8px; padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 600; text-decoration: none; }
.pill small { font-size: 10px; font-weight: 400; color: var(--muted); }
.pill.disabled { background: #15223a; color: #c6ced8; cursor: default; }
.paper-link { border-color: var(--accent); color: var(--accent); }
.paper-link:hover { background: var(--surface); }
.video-link { background: var(--accent); color: #101e38; border-color: var(--accent); }
.video-link:hover { background: #bed3f5; border-color: #bed3f5; }
.video-link svg { width: 13px; height: 13px; fill: currentColor; }
.teaser { max-width: 960px; padding-bottom: 24px; text-align: center; }
.figure-link { position: relative; display: block; overflow: hidden; padding: clamp(14px, 2.5vw, 28px); border: 1px solid var(--line); border-radius: 7px; background: #000; cursor: zoom-in; }
.figure-link img { width: 100%; }
.paper-matte { background: #fff; }
.enlarge { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid #526273; border-radius: 5px; background: #111b26e8; color: white; font-size: 17px; transition: background .2s; }
.figure-link:hover .enlarge { background: #2c4676; }
.teaser figcaption { margin-top: 19px; font-family: var(--serif); font-size: 21px; text-wrap: balance; }
.teaser figcaption strong { color: var(--accent); font-weight: 400; }
.species-caption { display: block; margin-bottom: 12px; color: var(--muted); font: 12px/1.5 var(--sans); }
.teaser-summary { max-width: 710px; margin: 9px auto 26px; color: var(--muted); font-size: 14px; text-wrap: pretty; }
.highlights { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 22px 0; border-block: 1px solid var(--line); }
.highlights div { text-align: center; padding: 0 16px; border-right: 1px solid var(--line); }
.highlights div:last-child { border: 0; }
.highlights dt { color: var(--accent); font-family: var(--serif); font-size: 25px; line-height: 1.4; }
.highlights dd { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.highlights small { font-size: .65em; }
.section { padding-block: 62px; }
.section-intro { max-width: 760px; margin: 0 auto 29px; text-align: center; }
h2 { margin: 8px 0 13px; font: 700 32px/1.2 var(--serif); letter-spacing: -.025em; text-align: center; text-wrap: balance; }
.section-intro > p:last-child:not(.eyebrow) { color: var(--muted); font-size: 14px; text-wrap: pretty; }
.muted-band { background: var(--surface); border-block: 1px solid var(--line); }
video { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 7px; background: #000; }
.media-note { margin-top: 12px; color: var(--muted); font-size: 12px; text-align: center; }
.video-caption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
.video-caption .media-note { margin: 0; }
.video-quality { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 11px; }
.video-quality select { border: 1px solid var(--line); border-radius: 5px; padding: 5px 8px; background: var(--surface); color: var(--ink); font: inherit; }
[hidden] { display: none !important; }
.prose { color: #c8d1dc; font-size: 15px; line-height: 1.9; }
.prose p + p { margin-top: 17px; }
.figure-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; align-items: start; }
.figure figcaption { max-width: 880px; margin: 14px auto 0; color: var(--muted); font-size: 12px; line-height: 1.7; text-align: center; text-wrap: pretty; }
.figure figcaption strong { color: #d6dfe8; font-weight: 500; }
.figure-grid .figure-link img { aspect-ratio: 1020 / 584; object-fit: contain; }
.supporting-figure { margin-top: 30px; border-block: 1px solid var(--line); }
summary { padding: 16px 4px; color: #d1dbe5; cursor: pointer; font-size: 13px; }
summary span { margin-left: 12px; color: var(--muted); font-size: 11px; }
.supporting-figure .figure { max-width: 820px; padding-bottom: 24px; margin: 5px auto 0; }
.gait-figure { max-width: 850px; margin: 0 auto 36px; }
.method-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 34px; }
.method-notes > div { border-top: 1px solid var(--line); padding-top: 16px; }
.step { color: var(--accent); font-size: 10px; letter-spacing: .1em; }
h3 { margin: 5px 0 6px; font: 20px var(--serif); }
.method-notes p { color: var(--muted); font-size: 12px; }
.results-highlights { margin: 0 0 34px; }
.result-figure { max-width: 850px; margin-inline: auto; }
.result-note { max-width: 740px; margin: 22px auto 0; padding-left: 16px; border-left: 2px solid #3c5887; color: var(--muted); font-size: 12px; }
.acknowledgements h2 { font-size: 25px; margin: 0 0 20px; }
.acknowledgements p { color: var(--muted); font-size: 12px; line-height: 1.8; text-align: center; }
.site-footer { position: fixed; bottom: 0; inset-inline: 0; z-index: 3; height: var(--footer-height); padding-bottom: env(safe-area-inset-bottom, 0px); border-top: 1px solid var(--line); background: var(--background); color: var(--muted); font-size: 11px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 47px; }
.image-viewer { width: min(96vw, 1600px); max-width: none; max-height: 92dvh; padding: 58px 18px 14px; border: 1px solid #4c6072; border-radius: 10px; background: var(--background); color: var(--muted); }
.image-viewer::backdrop { background: #03070deb; }
.image-viewer img { width: 100%; height: auto; padding: clamp(14px, 2.5vw, 28px); border-radius: 5px; background: #000; }
.image-viewer img.paper-matte { background: #fff; }
.image-viewer p { margin-top: 12px; text-align: center; font-size: 11px; }
.close-viewer { position: absolute; top: 12px; right: 18px; display: flex; gap: 15px; align-items: center; padding: 5px 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); font: 12px var(--sans); cursor: pointer; }
.close-viewer span { font-size: 22px; }

.gallery-section { padding-top: 12px; background: radial-gradient(ellipse at 50% 65%, #142746 0, transparent 70%); }
.gallery-credit { margin-top: 10px; color: var(--muted); font-size: 11px; text-align: right; }
.gallery-track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; overflow-anchor: none; scrollbar-width: none; border-radius: 9px; }
.gallery-track.is-reordering { scroll-snap-type: none; scroll-behavior: auto; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide { position: relative; flex: 0 0 100%; min-width: 0; overflow: hidden; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 9px; background: #000; }
.gallery-slide video { border: 0; border-radius: 0; object-fit: contain; }
.gallery-slide figcaption { position: absolute; bottom: 0; left: 0; right: 0; padding: 36px 28px 52px; background: linear-gradient(transparent, #030917d9); pointer-events: none; text-shadow: 0 2px 8px #000; }
.gallery-slide figcaption i { display: block; margin: 1px 0 0; font: italic 16px/1.15 var(--serif); color: #c3d2e9; }
.gallery-slide figcaption span { display: block; font: 500 21px/1.15 var(--serif); color: #f1f5fc; }
.gallery-controls { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 16px; }
.gallery-controls button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--muted); font: 12px var(--sans); cursor: pointer; }
.gallery-controls button:hover { border-color: var(--accent); color: var(--ink); }
.gallery-toggle { padding-inline: 13px; }
.gallery-dots { display: flex; gap: 4px; }
.gallery-dots button { width: 28px; border: 0; background: none; }
.gallery-dots button::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #455779; transition: background .2s, transform .2s; }
.gallery-dots button[aria-current="true"]::before { background: var(--accent); transform: scale(1.4); }
.gallery-arrows { display: flex; gap: 8px; }
.gallery-arrows button { width: 40px; font-size: 19px; }

@media (min-width: 1450px) { .publication-header { padding-top: 65px; } }
@media (max-width: 900px) {
  :root { --nav-height: 100px; }
  .nav-inner { flex-direction: column; align-items: stretch; gap: 0; padding-top: 12px; }
  .nav-links { padding-block: 12px; }
  .desktop-break { display: none; }
  .authors { max-width: 680px; margin-inline: auto; }
  .highlights dt { font-size: 22px; }
}
@media (max-width: 600px) {
  .container { width: calc(100% - 32px); }
  .nav-inner { min-height: 58px; }
  .wordmark { font-size: 13px; gap: 6px; }
  .nav-links { gap: 13px; font-size: 11px; }
  .publication-header { padding: 36px 0 26px; }
  h1 { font-size: 31px; margin: 16px 0 22px; }
  .authors { font-size: 12px; gap: 3px 5px; }
  .affiliations { flex-direction: column; font-size: 11px; gap: 4px; }
  .publication-links { gap: 7px; }
  .pill { padding: 8px 12px; gap: 6px; font-size: 11px; }
  .pill small { font-size: 9px; }
  .teaser figcaption { font-size: 18px; }
  .teaser-summary { font-size: 13px; }
  .highlights { padding-block: 17px; }
  .highlights div { padding-inline: 8px; }
  .highlights dt { font-size: 19px; }
  .highlights dd { font-size: 10px; }
  .section { padding-block: 42px; }
  h2 { font-size: 28px; }
  .section-intro > p:last-child:not(.eyebrow) { font-size: 13px; }
  .prose { font-size: 14px; }
  .figure-grid { grid-template-columns: 1fr; gap: 28px; }
  summary span { display: block; margin-left: 17px; }
  .method-notes { gap: 17px; }
  .results-highlights { grid-template-columns: 1fr; padding: 0; }
  .results-highlights div { padding: 18px 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .results-highlights dt { font-size: 28px; }
  .results-highlights dd { font-size: 12px; }
  .image-viewer { padding-inline: 8px; }
  .gallery-slide figcaption { padding: 25px 17px 44px; }
  .gallery-slide figcaption i { font-size: 12px; }
  .gallery-slide figcaption span { font-size: 16px; }
  .gallery-controls { gap: 8px; }
  .gallery-toggle { padding-inline: 9px; font-size: 10px !important; }
  .gallery-dots { gap: 0; }
  .gallery-dots button { width: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
