:root {
  color-scheme: dark;
  --bg: #101114;
  --panel: #141619;
  --text: #f0ece3;
  --muted: #b1afa9;
  --line: #37383b;
  --gold: #e0b993;
  --mint: #a1c5b9;
  --art-gold: #f6cda5;
  --art-cool: #b2cdc1;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --serif: "Baskerville", "Iowan Old Style", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f9f9f7;
  --panel: #eef0f2;
  --text: #232326;
  --muted: #595955;
  --line: #c7cbcf;
  --gold: #80502e;
  --mint: #315f55;
  --art-gold: #784221;
  --art-cool: #205f50;
}
* { box-sizing: border-box; }
.home-page { scroll-padding-top: var(--header-height, 76px); }
.home-header { position: sticky; top: 0; z-index: 4; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.55 var(--sans); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold); }
button { background: none; color: inherit; font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
.wrap { width: min(calc(100% - clamp(40px, 9vw, 150px)), 1480px); margin-inline: auto; }
.skip { position: fixed; top: -5rem; left: 1rem; z-index: 5; padding: 12px; color: var(--text); background: var(--bg); }
.skip:focus { top: 1rem; }
.masthead, footer, .section-head, .theme-switch, .wordmark, .eyebrow, .social, .resources { display: flex; align-items: center; }
.masthead { min-height: 76px; border-bottom: 1px solid var(--line); gap: clamp(22px, 4vw, 68px); position: relative; z-index: 2; }
.wordmark { gap: .8rem; margin-right: auto; font: 1.27rem var(--serif); }
.chinese-name { font-size: .82em; white-space: nowrap; }
.orbit-mark { width: 27px; height: 27px; position: relative; display: inline-block; flex: none; border: 1px dotted var(--gold); border-radius: 50%; transform: rotate(-28deg); }
.orbit-mark::before { content: ""; position: absolute; inset: 8px -4px; border: 1px solid var(--gold); border-radius: 50%; }
.orbit-mark::after { content: ""; position: absolute; left: 10px; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
nav { display: flex; align-items: center; gap: clamp(18px, 2.5vw, 40px); }
.home-header nav { position: relative; }
.home-header nav::after { content: ''; position: absolute; left: 0; bottom: 4px; width: 20px; height: 1px; background: var(--mint); opacity: 0; pointer-events: none; transform: translateX(var(--underline-x, 0px)); }
.home-header nav.has-current::after { opacity: 1; }
.home-header nav a[aria-current] { color: var(--text); }
@media (prefers-reduced-motion: no-preference) {
  .home-header nav::after { transition: transform .2s ease-out, opacity .12s ease-out; }
}
nav a, .theme-switch, .underlink, .social a, .resources a, footer { font: .85rem/1.4 var(--mono); }
nav a, footer { color: var(--muted); }
nav a, .social a, .resources a, .underlink { padding-block: 9px; }
.theme-switch { gap: 9px; min-height: 42px; border: 0; border-left: 1px solid var(--line); padding: 0 0 0 clamp(18px, 2.8vw, 42px); }
.theme-icon { display: inline-block; width: 15px; height: 15px; border-radius: 50%; border: 1px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.hero { position: relative; isolation: isolate; height: clamp(500px, 41vw, 635px); border-bottom: 1px solid var(--line); }
.stage { position: absolute; width: 68%; right: 0; top: 0; height: 94%; }
@media (min-width: 1000px) {
  .stage { transform: translateX(min(4vw, 72px, calc(20vw - 200px))); }
}
canvas { width: 100%; height: 100%; display: block; }
.stage { z-index: 2; pointer-events: none; }
.sky { pointer-events: auto; touch-action: pan-y; cursor: crosshair; }
.sky:active { cursor: grabbing; }

.stardust { position: absolute; inset: 0; pointer-events: none; }
.satellite { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; z-index: var(--depth-order, 1); }
.satellite.active { z-index: 60; }
.node { min-height: 44px; min-width: 44px; display: grid; justify-items: center; align-content: center; gap: 2px; padding: 0 3px; border: 0; color: var(--mint); background: transparent; white-space: nowrap; font: .8rem var(--mono); }
.star-glyph { display: block; white-space: pre; line-height: .74; font-size: calc(9px * var(--star-scale, 1)); font-weight: 700; color: var(--gold); text-shadow: 0 0 5px var(--gold); }
.star-name { position: relative; padding: 1px 4px; color: var(--text); text-shadow: 0 0 3px var(--bg), 0 0 5px var(--bg); }
.star-name::before, .star-name::after { position: absolute; top: 1px; color: var(--gold); opacity: 0; pointer-events: none; }
.star-name::before { content: '['; right: 100%; transform: translateX(-.45em); }
.star-name::after { content: ']'; left: 100%; transform: translateX(.45em); }
.satellite.active .star-name::before, .satellite.active .star-name::after { opacity: 1; transform: none; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .star-name::before, .star-name::after { transition: transform .15s ease-out, opacity .15s ease-out; }
}
.node:focus-visible, .satellite.active .node { clip-path: none !important; filter: none !important; opacity: 1 !important; }
.node:hover .star-name, .satellite.active .star-name { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.orbit-preview { position: absolute; top: 100%; width: min(272px, 78vw); padding-bottom: 5px; border: 1px solid var(--line); background: var(--panel); box-shadow: 0 6px 22px #0003; }
.orbit-preview a { display: block; }
.orbit-preview :is(img, video) { display: block; width: 100%; height: auto; }
.orbit-preview strong { display: inline-block; margin: 6px 6px 2px; font: 1.25rem var(--serif); }
.orbit-preview .meta { margin: 0 6px; font-size: .72rem; }
.orbit-preview p:last-child { margin: 6px; color: var(--muted); font: .85rem/1.4 var(--sans); }
.intro { position: absolute; bottom: 37px; left: 0; pointer-events: none; }
.intro a { pointer-events: auto; }
.eyebrow, .meta { text-transform: uppercase; font: .75rem/1.5 var(--mono); letter-spacing: .12em; }
.eyebrow { gap: 12px; color: var(--mint); margin: 0 0 15px; }
.rule { width: 26px; height: 1px; background: currentColor; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .email { font-family: var(--serif); font-weight: 400; }
h1 { font-size: clamp(5rem, 7.7vw, 8.5rem); line-height: .95; letter-spacing: -.065em; }
h1 em, h2 em { color: var(--gold); font-weight: 400; }
.lead { max-width: 395px; margin: 15px 0 20px; color: var(--muted); font: 1.2rem/1.45 var(--serif); }
.social, .resources { gap: 20px; flex-wrap: wrap; }
.social a, .resources a, .underlink, .bio a, .email { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; }
[hidden] { display: none !important; }
.research { padding-block: 42px 64px; }
.section-head { justify-content: space-between; gap: 10px; margin-bottom: 24px; }
h2 { font-size: clamp(2.4rem, 3.6vw, 4rem); line-height: 1.1; letter-spacing: -.045em; }
.underlink { color: var(--muted); }
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(22px, 3vw, 44px); }
article { scroll-margin-top: 16px; }
.film { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; border: 0; background: transparent; }
.project-info { padding-top: 17px; }
.meta { color: var(--muted); letter-spacing: .07em; }
.meta span { color: var(--gold); padding: 0 4px; }
.project h3 { margin: 3px 0 8px; font-size: 2.4rem; line-height: 1.2; letter-spacing: -.04em; }
.project-info > p:not(.meta), .bio { color: var(--muted); max-width: 62ch; }
.resources { margin-top: 7px; }
.press-link { display: inline-block; margin-top: 5px; color: var(--gold); font: .85rem/1.5 var(--mono); text-decoration: underline; text-underline-offset: 4px; }
.earlier { margin-top: 48px; }
.earlier h3 { font-size: 1.8rem; margin-bottom: 14px; }
.past-project { display: grid; grid-template-columns: minmax(165px, 32%) 1fr; gap: clamp(18px, 3vw, 44px); align-items: center; padding-block: 20px; border-top: 1px solid var(--line); }
.past-project img, .past-project video { display: block; width: 100%; height: auto; object-fit: contain; background: white; }
.method-cover { position: relative; display: block; cursor: zoom-in; padding: 6px; background: white; border: 1px solid var(--line); }
.figure-loupe { position: absolute; pointer-events: none; outline: 1px solid #455253; box-shadow: 0 1px 6px #0004; background-color: white; background-repeat: no-repeat; }
.video-cover { position: relative; }
.video-cover .zoom-toggle { position: absolute; top: 0; right: 0; z-index: 1; display: none; border: 0; padding: 0 10px; min-height: 44px; background: transparent; color: white; font: .75rem var(--mono); }
.zoom-toggle span { padding: 4px 7px; border-radius: 2px; background: #222c; }
@media (any-pointer: coarse) { .video-cover .zoom-toggle { display: block; } }
.video-cover .inspect-area { position: absolute; inset: 0; touch-action: none; cursor: crosshair; }
.clip-actions { position: absolute; right: 5px; bottom: 5px; z-index: 1; display: flex; gap: 2px; }
.clip-actions button { background: #222c; color: white; font: .72rem var(--mono); border: 0; border-radius: 2px; padding: 5px 7px; }
@media (hover: hover) and (pointer: fine) {
  .video-cover:not(:hover):not(:focus-within) .clip-actions { opacity: 0; pointer-events: none; }
}
@media (pointer: coarse) {
  .clip-actions button { min-height: 32px; }
}
.video-cover:is(:fullscreen, .expanded-video) { background: #101114; }
.video-cover.expanded-video { position: fixed; inset: 0; z-index: 20; }
.past-project .video-cover:is(:fullscreen, .expanded-video) video.reconstruction { width: 100%; height: 100%; max-height: none; object-fit: contain; background: transparent; }
.reconstruction { max-height: 215px; aspect-ratio: 4 / 3; }
.past-project h4 { margin: 3px 0; font: 1.8rem var(--serif); }
.past-project .summary { color: var(--muted); }
.past-project .resources { margin-top: 2px; }
.exploration { border-top: 1px solid var(--line); padding-block: clamp(32px, 4vw, 52px); }
.exploration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 3vw, 48px); margin-top: 22px; }
.exploration-grid article { border-top: 1px solid var(--line); padding-block: 20px; }
.exploration-grid h3 { margin: 4px 0 8px; font-size: 1.8rem; line-height: 1.15; letter-spacing: -.025em; }
.exploration-grid h3 + p { color: var(--muted); max-width: 51ch; }
.exploration-feature { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr minmax(0, .9fr); align-items: center; gap: 24px; }
.exploration-preview { position: relative; display: block; width: 100%; max-width: 440px; justify-self: end; }
.exploration-preview video { display: block; width: 100%; height: auto; }
.exploration-preview span { position: absolute; left: 4px; top: 4px; padding: 1px 5px; border-radius: 2px; color: white; background: rgb(18 19 22 / .7); font: .68rem/1.4 var(--mono); }
.paired-preview span:last-child { left: calc(50% + 4px); }
.mimic-preview span { left: calc(66.667% + 4px); }
.mimic-preview span:last-child { top: calc(50% + 4px); }
@media (max-width: 680px) {
  .exploration-grid { grid-template-columns: 1fr; margin-top: 16px; }
  .exploration-feature { grid-template-columns: 1fr; gap: 14px; }
  .exploration-preview { justify-self: start; }
  .exploration-grid article:last-child { padding-bottom: 0; }
}
.about, .contact { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1.6fr; align-items: start; gap: 28px; padding-block: 50px; }
.portrait { display: block; object-fit: cover; filter: saturate(.85); margin: 22px 0 0; border-radius: 50%; }
.bio a, .email { color: var(--text); }
.contact p { max-width: 54ch; margin: 0 0 12px; color: var(--muted); }
.email { font-size: clamp(1.15rem, 1.6vw, 1.5rem); overflow-wrap: anywhere; }
footer { border-top: 1px solid var(--line); justify-content: space-between; padding-block: 22px; }
footer > a { margin-left: auto; }
.cradle { display: flex; align-items: center; column-gap: 10px; }
.cradle-art { display: grid; justify-items: center; width: 21ch; flex: none; padding-bottom: 3px; font: 11px/8px var(--mono); }
.cradle-rail { color: var(--muted); }
.cradle-row { display: flex; }
.pendulum { display: grid; justify-items: center; color: var(--gold); transform-origin: top center; }
.pendulum::before { content: "|\a|\a|"; white-space: pre; color: var(--muted); }
.pendulum:first-child { --swing: 48deg; transform: rotate(var(--swing)); }
.pendulum:last-child { --swing: -48deg; }
@media (prefers-reduced-motion: no-preference) {
  .pendulum:first-child, .pendulum:last-child { animation: cradle-swing 2.4s linear infinite; animation-play-state: paused; }
  .pendulum:last-child { animation-delay: -1.2s; }
  .cradle.is-running .pendulum { animation-play-state: running; }
  @keyframes cradle-swing {
    0%, 100% { transform: rotate(var(--swing)); animation-timing-function: cubic-bezier(.42, 0, .76, .61); }
    25%, 75% { transform: rotate(0); animation-timing-function: cubic-bezier(.24, .39, .58, 1); }
  }
}
@media (max-width: 520px) {
  .cradle { flex-direction: column; gap: 5px; font-size: .75rem; }
}
@media (max-width: 750px) {
  .home-page { scroll-padding-top: var(--header-height, 64px); }
  .masthead { min-height: 64px; gap: 15px; }
  .wordmark { font-size: 1.05rem; gap: 7px; }
  nav { gap: 15px; }
  .theme-switch { padding-left: 14px; }
  .hero { height: auto; display: flex; flex-direction: column; padding-bottom: 24px; }
  .stage { position: relative; width: 100%; right: auto; height: auto; aspect-ratio: 1.95; margin-top: 13px; }
  .intro { position: static; }
  h1 { font-size: clamp(3.9rem, 12vw, 6.2rem); }
  .lead { margin: 12px 0; max-width: 35ch; }
  .node { font-size: .75rem; }
  .about, .contact { grid-template-columns: 1fr; gap: 22px; }
  .about > div:first-child { display: flex; align-items: center; justify-content: space-between; }
  .portrait { height: 58px; width: 58px; margin: 0; }
}
@media (max-width: 580px) {
  .home-page { scroll-padding-top: var(--header-height, 96px); }
  .wrap { width: calc(100% - 36px); }
  .masthead { flex-wrap: wrap; column-gap: 10px; row-gap: 0; padding-top: 7px; }
  nav { order: 2; width: 100%; gap: 5px; justify-content: space-between; border-top: 1px dotted var(--line); }
  nav a { padding-block: 12px; }
  .theme-switch { border: 0; }
  .stage { margin: 8px -2% 12px; width: 104%; aspect-ratio: 1.8; }
  .research { padding-block: 30px 40px; }
  .section-head { flex-wrap: wrap; align-items: baseline; gap: 3px 15px; margin-bottom: 17px; }
  .projects { grid-template-columns: 1fr; gap: 34px; }
  .earlier { margin-top: 36px; }
  .about, .contact { padding-block: 32px; }
}

.study-page { max-width: 860px; padding-block: 50px; }
.study-page h1 { margin: .15em 0; }
.study-page .study-title { font: clamp(1.7rem, 4vw, 2.7rem)/1.1 var(--serif); }
.study-page p { margin-block: 12px; }
.study-page .film { margin-block: 28px 36px; }
.study-page img { max-width: 100%; display: block; margin-block: 22px; }
.mimic-study { max-width: 1060px; }
.mimic-study > p, .mimic-study section > p { max-width: 68ch; }
.mimic-note { border-inline-start: 2px solid var(--line); padding-inline-start: .85em; color: var(--muted); }
.mimic-note small { display: block; font-size: .875rem; line-height: 1.55; }
.mimic-study section { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 24px; }
.mimic-study section h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.mimic-rollouts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin: 24px 0; }
.mimic-rollouts figure { margin: 0; }
.mimic-rollouts video { display: block; width: 100%; height: auto; }
.mimic-rollouts figcaption { margin-bottom: 8px; color: var(--muted); }
.mimic-pairs { max-width: 100%; gap: 28px; }
.mimic-mobile-key { display: none; }
@media (max-width: 640px) {
  /* Cover the embedded 48px video title band with type sized for a phone. */
  .mimic-mobile-key { position: relative; z-index: 1; display: grid; grid-template-columns: 3fr 2fr; margin-bottom: -3%; padding: 5px 0; background: #000; color: #9acde4; font: 12px/1.4 var(--mono); text-align: center; pointer-events: none; }
  .mimic-mobile-key span + span { color: #edba79; }
}
@media (max-width: 580px) {
  .past-project { grid-template-columns: 1fr; gap: 12px; }
  .past-project img { max-height: 190px; }
  .stage { aspect-ratio: 1.6; }
  .node { min-height: 44px; padding-inline: 5px; }
}
.bio p + p { margin-top: 14px; }

.film-frame { position: relative; }
.film-launch { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: flex-end; width: 100%; padding: 10px; border: 0; }
.film-launch span { padding: 5px 9px; background: #18191c; color: #fff; font: .78rem var(--mono); }
.past-project video.simulation { aspect-ratio: 902 / 326; }

.past-project video.raydf-montage { aspect-ratio: auto 960 / 510; max-height: none; }
#ddfism .method-cover { padding: 0; border: 0; }

.project-info strong { color: var(--text); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  article:target :is(h3, h4) { animation: mark-project 1.35s ease-out; }
  @keyframes mark-project { from, 35% { color: var(--mint); } }
}
