@font-face {
  font-family: "Intel One Mono";
  src: url("./assets/fonts/IntelOneMono-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Intel One Mono";
  src: url("./assets/fonts/IntelOneMono-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Intel One Mono";
  src: url("./assets/fonts/IntelOneMono-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #080808;
  --accent: #006963;
  --chrome-size: clamp(15px, 1.25vw, 28px);
  --edge: clamp(14px, 1.041667vw, 24px);
  font-family: "Intel One Mono", monospace;
  font-weight: 400;
  font-synthesis: none;
  background: #fff;
  color: var(--ink);
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body { min-height: 240px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; border: 0; }
a { color: inherit; text-decoration: none; }
img, picture, video, canvas, svg { -webkit-touch-callout:none;-webkit-user-drag:none;user-select:none;-webkit-user-select:none; }
video::-webkit-media-controls-download-button { display:none; }
.media-viewer { max-width:96vw;max-height:94vh;padding:40px 20px 20px;border:0;background:#fff;overflow:auto; }
.media-viewer::backdrop { background:rgb(255 255 255 / .94); }
.media-viewer-content { display:flex;justify-content:center;align-items:center; }
.media-viewer-content img,.media-viewer-content video { display:block;max-width:90vw;max-height:82vh;width:auto;height:auto;object-fit:contain; }
.media-viewer-close { display:block;margin:0 0 22px auto;padding:0 0 3px;background:transparent;border-bottom:1px solid #111;cursor:pointer;font:12px/1.6 "Intel One Mono","PingFang SC",sans-serif; }
.media-viewer-close:focus-visible { outline:1px solid #111;outline-offset:5px; }

.project-backdrop { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.project-preview { position: absolute; inset: 0; opacity: 0; transition: opacity 240ms ease; }
.project-preview.is-active { opacity: 1; }
.project-preview img { display: block; width: 100%; height: 100%; object-fit: var(--image-fit, cover); object-position: var(--image-position, 50% 50%); opacity: var(--image-opacity, .37); }
.project-preview[data-project="0"] { background: #e7e7e7; --image-position: 50% 48.3%; --image-opacity: .14; }
.project-preview[data-project="0"] img { mix-blend-mode: multiply; }
.project-preview[data-project="2"] { --image-position: 50% 16%; --image-opacity: .43; }
.project-preview[data-project="3"] { --image-opacity: .374; }
.project-preview[data-project="4"] { --image-position: 50% 100%; --image-opacity: .45; }
.project-preview[data-project="5"] { --image-position: 50% 66%; --image-opacity: .42; }
.project-preview[data-project="6"] { --image-opacity: .33; }
.project-preview[data-project="7"] { --image-opacity: .45; }
.project-preview[data-project="8"] { --image-opacity: .47; }
.project-preview[data-project="9"] { --image-position: 50% 76%; --image-opacity: .455; }
.project-preview[data-project="10"] { --image-opacity: .34; }
.project-preview[data-project="11"] { --image-opacity: .58; }
.project-preview[data-project="12"] { --image-opacity: .485; }
.project-preview[data-project="13"] { --image-position: 50% 56%; --image-opacity: .43; }

.fixed-header, .fixed-footer {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  font-size: var(--chrome-size);
  line-height: 1;
  white-space: nowrap;
}

.wordmark, .elapsed, .about { position: absolute; top: max(calc(var(--edge) - 4px), env(safe-area-inset-top)); }
.wordmark { left: max(var(--edge), env(safe-area-inset-left)); font-weight: 700; pointer-events: auto; }
.elapsed { left: 28.75%; font-variant-numeric: tabular-nums; }
.about { right: max(var(--edge), env(safe-area-inset-right)); color: var(--accent); }
.beijing { position: absolute; left: 60.416667%; bottom: max(calc(var(--edge) + 2px), env(safe-area-inset-bottom)); font-variant-numeric: tabular-nums; }
.registration { position: absolute; bottom: max(calc(var(--edge) + 2px), env(safe-area-inset-bottom)); width: calc(var(--chrome-size) * .916667); height: calc(var(--chrome-size) * .916667); }
.registration-left { left: max(var(--edge), env(safe-area-inset-left)); }
.registration-right { right: max(var(--edge), env(safe-area-inset-right)); }
.registration svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; }

.river { position: fixed; inset: 58px 0; z-index: 1; overflow: hidden; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; outline: none; }
.river.is-dragging { cursor: grabbing; }
.river:focus-visible { outline: 1px dotted var(--accent); outline-offset: -8px; }
.river-track { position: absolute; inset: 0; will-change: transform; }
.works, .river-navigation { position: absolute; inset: 0; }
.river-navigation { pointer-events: none; }
.work { position: absolute; left: 0; top: 0; width: max-content; text-align: center; transform: translate(-50%, -50%); font-size: var(--work-size, 20px); line-height: 1; font-weight: 400; transition: color 160ms ease; }
.work.is-previewing { color: #7d7d7d; }
.work.has-preview { cursor: default; }
.work:focus-visible { outline: 1px dotted currentColor; outline-offset: 10px; }
.work-number, .work-title, .work-arrow { display: block; margin: 0 auto; font: inherit; }
.work-number { position: absolute; top: calc(50% - var(--row-gap)); left: 50%; transform: translate(-50%, -50%); }
.work-title { line-height: 1; white-space: nowrap; font-weight: 500; }
.work-arrow { position: absolute; top: calc(50% + var(--row-gap)); left: 50%; width: var(--arrow-width); height: var(--arrow-height); transform: translate(-50%, -50%); }
.work-arrow svg { width: 100%; height: 100%; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; stroke-linejoin: miter; }
.edge-arrow { position: absolute; transform: translateY(-50%); width: var(--arrow-width); height: var(--arrow-height); padding: 0; background: transparent; cursor: pointer; pointer-events: auto; }
.edge-arrow svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: square; stroke-linejoin: miter; }
.edge-arrow:focus-visible, .wordmark:focus-visible { outline: 1px solid var(--accent); outline-offset: 5px; }
.edge-arrow:hover { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 600px) {
  :root { --chrome-size: 13px; --edge: 14px; }
  .elapsed { left: 38%; }
  .beijing { left: 50%; transform: translateX(-50%); }
  .registration { width: 16px; height: 16px; }
  .river { inset-block: 60px; }
  .project-preview[data-project="5"] { --image-position: 67% 66%; }
}

@media (max-height: 400px) {
  :root { --chrome-size: 13px; --edge: 12px; }
  .river { inset-block: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .project-preview, .work { transition: none; }
}
