:root {
  color-scheme: dark;
  --ink: #f4f7fb;
  --muted: #cad7e5;
  --blue: #b8d9fb;
  --line: #c0d7ed30;
  --width: 1080px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: #09131e;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { margin: 0; min-height: 100vh; isolation: isolate; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, #06101d70 0%, #06101d94 55%, #06101db8 100%), url("../images/background.png") center / cover no-repeat;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-underline-offset: 4px; }
button, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid #6b9ac8; outline-offset: 5px; }
[hidden] { display: none !important; }
figure, p { margin: 0; }

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 10;
  padding: 12px 18px;
  background: #fff;
  color: #202630;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
.project, .site-footer { width: min(var(--width), calc(100% - 64px)); margin-inline: auto; }
.project-header { padding: 80px 0 46px; text-align: center; text-shadow: 0 2px 20px #000b; }
.title-mark { width: 34px; height: 3px; margin: 0 auto 25px; border-radius: 3px; background: var(--blue); }
h1 { margin: 0; font-size: clamp(36px, 5.2vw, 62px); font-weight: 650; line-height: 1.14; letter-spacing: -2.6px; text-wrap: balance; }
h1 span { color: var(--blue); }
.authors { margin-top: 25px; display: flex; flex-direction: column; gap: 8px; font-size: 22px; font-weight: 600; line-height: 1.7; color: var(--blue); }
.author-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 8px 24px; }
.author { white-space: nowrap; }
.author sup { margin-left: 2px; font-size: .65em; line-height: 0; }
.affiliations { margin-top: 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; color: var(--muted); font-size: 19px; line-height: 1.6; }
.affiliations sup { font-size: .7em; line-height: 0; }
.project-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }
.resource-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-width: 116px; min-height: 44px; padding: 10px 18px; border: 1px solid #bfd9f06b; border-radius: 6px; background: #162b41e6; color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.4; text-decoration: none; text-shadow: none; box-shadow: 0 3px 16px #0002; }
.resource-button svg { flex: none; }
.resource-button:disabled { cursor: not-allowed; opacity: .85; }
.resource-button:not(:disabled):hover { background: #284663; border-color: var(--blue); }

.video-frame { position: relative; overflow: hidden; isolation: isolate; border-radius: 12px; background: #17212d; box-shadow: 0 18px 54px -20px #0009, 0 0 0 1px #c0d7ed40; }
video { display: block; width: 100%; height: auto; aspect-ratio: 20 / 11; }
.play-button { position: absolute; left: 50%; top: 50%; width: 78px; height: 78px; display: grid; place-items: center; padding: 0; border: 1px solid #ffffff80; border-radius: 50%; color: #253b52; background: #fffffff2; box-shadow: 0 4px 30px #0002; transform: translate(-50%, -50%); transition: background 160ms, box-shadow 160ms; }
.play-button svg { margin-left: 4px; }
.play-button:hover { background: #fff; box-shadow: 0 4px 36px #0004, 0 0 0 7px #ffffff24; }
.play-button:disabled { cursor: progress; opacity: .7; }
.method-caption, .section-heading, .site-footer { text-shadow: 0 2px 10px #000; }
.video-error { margin-top: 16px; font-size: 14px; color: var(--muted); line-height: 1.7; }

.method-section { margin-top: 79px; padding-top: 45px; border-top: 1px solid var(--line); }
.section-heading { margin-bottom: 34px; text-align: center; }
.section-eyebrow { color: var(--blue); font-size: 10px; font-weight: 650; letter-spacing: 2px; }
h2 { margin: 10px 0 0; font-size: 31px; line-height: 1.3; font-weight: 600; letter-spacing: -.8px; }
.method-figure { position: relative; display: block; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: zoom-in; transition: border-color 160ms; }
.method-figure:hover { border-color: #aabdd1; }
.method-figure img { display: block; width: 100%; height: auto; }
.expand-hint { position: absolute; right: 13px; bottom: 13px; display: flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid #e2e7ed; border-radius: 6px; background: #fffffff5; color: #465b72; font-size: 12px; box-shadow: 0 2px 8px #25344a08; }
.method-caption { display: flex; justify-content: space-between; gap: 12px 24px; margin-top: 18px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.text-link { color: var(--blue); text-decoration: none; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 83px; padding: 25px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.6; }
.site-footer a { padding-block: 10px; text-decoration: none; }
.site-footer a:hover { color: var(--blue); }
.site-footer a span { margin-left: 5px; }

body.modal-open { overflow: hidden; }
dialog { --ink: #202630; --muted: #6e7683; --blue: #42678e; --line: #e9ecf0; color-scheme: light; width: min(1560px, calc(100% - 48px)); max-width: none; max-height: calc(100dvh - 48px); margin: auto; padding: 0; overflow: hidden; border: 1px solid #dfe5ec; border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 30px 100px #0003; }
dialog::backdrop { background: #111b2db3; backdrop-filter: blur(5px); }
.dialog-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.dialog-toolbar h2 { margin: 0; font-size: 16px; letter-spacing: -.2px; }
.dialog-actions { display: flex; align-items: center; gap: 10px; }
.dialog-action { display: inline-flex; justify-content: center; align-items: center; min-height: 40px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--blue); background: #fff; font-size: 13px; text-decoration: none; white-space: nowrap; }
.dialog-action:hover, .close-button:hover { background: #f1f5f9; }
.close-button { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: #fff; color: var(--muted); }
.dialog-image-container { max-height: calc(100dvh - 132px); overflow: auto; padding: 20px; overscroll-behavior: contain; }
.dialog-image-container img { display: block; width: 100%; height: auto; margin-inline: auto; }
.dialog-image-container.is-zoomed img { width: 2560px; max-width: none; }

@media (min-width: 1600px) { .project-header { padding-top: 100px; } }
@media (max-width: 680px) {
  .project, .site-footer { width: calc(100% - 36px); }
  .project-header { padding: 49px 0 30px; }
  .title-mark { width: 28px; margin-bottom: 20px; }
  h1 { max-width: 460px; margin-inline: auto; font-size: clamp(34px, 7.4vw, 46px); letter-spacing: -1.4px; }
  .authors { font-size: 18px; margin-top: 20px; }
  .author-row { column-gap: 18px; }
  .affiliations { font-size: 16px; margin-top: 14px; }
  .video-frame { border-radius: 8px; }
  .play-button { width: 58px; height: 58px; }
  .play-button svg { width: 24px; height: 24px; }
  .method-section { margin-top: 48px; padding-top: 32px; }
  .section-heading { margin-bottom: 25px; }
  h2 { font-size: 27px; }
  .method-figure { padding: 6px 6px 38px; border-radius: 8px; }
  .expand-hint { bottom: 7px; right: 7px; font-size: 11px; padding: 6px 8px; }
  .method-caption { flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12px; margin-top: 14px; }
  .site-footer { margin-top: 46px; font-size: 11px; padding: 19px 0 25px; }
  dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); border-radius: 8px; }
  .dialog-toolbar { padding: 10px; flex-wrap: wrap; }
  .dialog-toolbar h2 { font-size: 14px; }
  .dialog-actions { gap: 5px; }
  .dialog-action { padding-inline: 9px; font-size: 12px; }
  .dialog-image-container { padding: 10px; max-height: calc(100dvh - 132px); }
}

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