:root {
  color-scheme: dark;
  --bg: #101114;
  --text: #f7f8fa;
  --muted: #e0e4eb;
  --subtle: #c6cfda;
  --accent: #d0deec;
  --link: #c0e1ff;
  --line: rgb(221 226 236 / 22%);
  --surface: #1b1e24;
  --header: rgb(13 15 19 / 86%);
  --scene-wash: rgb(6 8 11 / 24%);
  --paper: #f6f7f9;
  --paper-text: #4c5663;
  --paper-line: #dce0e5;
  --background-image: url("../img/space-preview/terra-hong-kong-v1.png");
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fafafa;
  --text: #29292d;
  --muted: #494c54;
  --subtle: #565b65;
  --accent: #486977;
  --link: #265c83;
  --line: rgb(50 54 65 / 23%);
  --surface: #ffffff;
  --header: rgb(250 250 250 / 96%);
  --scene-wash: rgb(250 250 250 / 76%);
  --background-image: url("../img/space-preview/mars-day.png");
}

:root[data-scene="lunar"] {
  --background-image: url("../img/space-preview/lunar-orbit.png");
}

:root[data-scene="mars"] { --background-image: url("../img/space-preview/mars-night.png"); }
:root[data-theme="light"][data-scene="mars"] { --background-image: url("../img/space-preview/mars-day.png"); }
:root[data-scene="earth-orbit"] { --background-image: url("../img/space-preview/terra-hong-kong-v1.png"); }
:root[data-scene="lunar-orbit"] { --background-image: url("../img/space-preview/luna-orbit-aligned-v1.png"); }
:root[data-scene="mars-orbit"] { --background-image: url("../img/space-preview/mars-orbit-aligned-v1.png"); }
/* Limit the exposed planet to roughly the lower quarter, including ultrawide views. */
:root:is([data-scene="earth-orbit"], [data-scene="lunar-orbit"], [data-scene="mars-orbit"]) { --scene-backdrop: #000000; --scene-focus: center calc(100% + max(7lvh, calc(16.875vw - 23lvh))); }
:root[data-scene="deep-space"] { --background-image: url("../img/space-preview/deep-space.png"); }
:root[data-theme="dark"][data-scene="deep-space"] { --scene-wash: linear-gradient(180deg, rgb(6 8 11 / 14%) 0%, rgb(6 8 11 / 18%) 60%, rgb(6 8 11 / 44%) 100%); }
:root[data-theme="dark"]:is([data-scene="earth-orbit"], [data-scene="lunar-orbit"], [data-scene="mars-orbit"]) { --scene-wash: linear-gradient(180deg, rgb(6 8 11 / 14%) 0%, rgb(6 8 11 / 20%) 70%, rgb(6 8 11 / 54%) 100%); }

* { box-sizing: border-box; letter-spacing: 0; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; background: var(--bg); }
body { position: relative; isolation: isolate; margin: 0; background: var(--bg); color: var(--text); font-family: "Avenir Next", Avenir, "Helvetica Neue", system-ui, sans-serif; font-size: 14px; line-height: 1.75; }
.scene-panel { position: fixed; z-index: -2; inset: 0; height: 100vh; height: 100lvh; pointer-events: none; background: var(--scene-backdrop, var(--bg)) var(--background-image) var(--scene-focus, center bottom) / cover no-repeat; transform: translateZ(0); backface-visibility: hidden; }
.scene-panel::after { content: ""; position: absolute; inset: 0; background: var(--scene-wash); }
.scene-panel--outgoing { z-index: -1; will-change: opacity; }
a { color: var(--link); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
button, summary { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
p, h1, h2, h3, figure { margin: 0; }
strong { font-weight: 600; }
img, video { display: block; max-width: 100%; }
.icon { display: block; width: 17px; height: 17px; flex: 0 0 17px; stroke-width: 1.6; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 20; padding: 8px 14px; background: var(--surface); color: var(--text); }
.skip-link:focus { top: 8px; }
.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: var(--header); }
.header-inner { display: flex; align-items: center; width: min(1120px, calc(100% - 72px)); height: 52px; margin: 0 auto; gap: 28px; }
.wordmark { color: var(--text); font-size: 15px; font-weight: 600; line-height: 1; white-space: nowrap; }
.wordmark:hover { text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: 24px; margin-left: auto; font-size: 12px; }
.site-nav a { color: var(--muted); padding: 14px 0; }
.site-nav a:hover, .site-nav a[aria-current="location"], .site-nav a[aria-current="page"] { color: var(--text); text-decoration: none; }
.site-nav a[aria-current="location"], .site-nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--accent); }
.header-tools { display: flex; align-items: center; gap: 18px; }
.cv-link { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.cv-link .icon { width: 14px; height: 14px; flex-basis: 14px; }
.icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-button:hover { color: var(--text); border-color: var(--line); text-decoration: none; }
.scene-switch { position: relative; color: var(--accent); border-radius: 50%; transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease; }
.scene-switch:hover { background: rgb(158 178 205 / 8%); }
.scene-switch[aria-busy="true"] { cursor: progress; }
.scene-switch::after { content: attr(data-tooltip); position: absolute; z-index: 1; top: calc(100% + 9px); right: 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--muted); font-size: 10px; line-height: 1.6; white-space: nowrap; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 160ms ease, visibility 160ms ease; }
.scene-switch:focus-visible::after { opacity: 1; visibility: visible; }
@media (hover: hover) {
  .scene-switch:hover::after { opacity: 1; visibility: visible; }
}
.menu-toggle { display: none; }
.scene-control { display: inline-flex; align-items: center; gap: 6px; }
.scene-label { display: inline-block; width: 34px; color: var(--subtle); font-size: 10px; line-height: 1; text-align: right; }
.layout { display: grid; grid-template-columns: 216px minmax(0, 744px); gap: 80px; width: min(1040px, calc(100% - 96px)); margin: 0 auto; padding: 52px 0 0; }
.profile { position: sticky; top: 105px; align-self: start; min-width: 0; }
.avatar { width: 108px; height: 108px; object-fit: cover; border-radius: 50%; background: #ffffff; border: 1px solid #8d99aa; margin-bottom: 22px; }
.avatar-frame { display: grid; place-items: center; width: 128px; height: 128px; padding: 7px; margin-bottom: 24px; border: 1px solid rgb(199 214 233 / 48%); border-radius: 50%; background: rgb(17 22 30 / 55%); box-shadow: 0 8px 24px rgb(0 0 0 / 18%); }
.avatar-frame .avatar { grid-area: auto; width: 100%; height: 100%; margin: 0; border-color: #c0cad7; }
:root[data-theme="light"] .avatar-frame { border-color: #a8b4c4; background: rgb(245 248 252 / 78%); box-shadow: 0 6px 20px rgb(34 47 66 / 10%); }
.profile-name { font-size: 26px; line-height: 1.25; font-weight: 500; margin-bottom: 10px; }
.profile-affiliation { margin-bottom: 13px; }
.profile-role { font-size: 12px; line-height: 1.7; font-weight: 500; color: var(--text); }
.profile-school { margin-top: 3px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.profile-alumni { padding-top: 13px; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.85; color: var(--subtle); }
.profile-alumni span { display: block; color: var(--muted); font-size: 12px; }
.profile--academic .profile-focus { margin-bottom: 16px; font-size: 11px; }
.profile--academic .profile-links { padding-top: 0; border-top: 0; }
.profile-focus { max-width: 200px; font-size: 12px; line-height: 1.7; color: var(--accent); margin-bottom: 18px; }
.profile-focus span { display: block; }
.profile-degree { font-size: 12px; color: var(--muted); line-height: 1.8; }
.profile-degree strong { font-weight: 500; color: var(--text); }
.profile-location { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 11px; color: var(--subtle); }
.profile-location .icon { width: 13px; height: 13px; flex-basis: 13px; }
.profile-email { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; margin-top: 10px; min-height: 28px; font-size: 12px; color: var(--muted); }
.profile-email .icon { width: 14px; height: 14px; flex-basis: 14px; }
.profile-email span { min-width: 0; overflow-wrap: anywhere; }
.profile-email + .profile-links { margin-top: 10px; }
.profile-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.profile-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; min-height: 28px; }
.profile-links .icon { width: 14px; height: 14px; flex-basis: 14px; }
.profile-links a:hover { color: var(--text); }
.profile-cv { display: inline-flex; align-items: center; gap: 7px; color: var(--subtle); font-size: 11px; margin-top: 10px; min-height: 28px; }
.profile-cv .icon { width: 13px; height: 13px; flex-basis: 13px; }
.content { min-width: 0; }
.section { margin-bottom: 34px; padding-bottom: 34px; border-bottom: 1px solid var(--line); scroll-margin-top: 82px; }
.content > .section:last-of-type { margin-bottom: 0; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section h2 { font-size: 19px; line-height: 1.35; font-weight: 500; }
.section-label { color: var(--subtle); font-size: 11px; font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 11px; font-weight: 500; color: var(--accent); text-transform: uppercase; margin-bottom: 12px; }
.intro h2 { margin-bottom: 19px; }
.intro > p:not(.eyebrow) { font-size: 14px; line-height: 1.85; margin-bottom: 15px; color: var(--muted); }
.intro strong { color: var(--text); font-weight: 500; }
.topic-list { display: flex; flex-wrap: wrap; gap: 6px 17px; list-style: none; padding: 0; margin: 23px 0 0; color: var(--subtle); font-size: 11px; }
.topic-list li { position: relative; padding-left: 10px; }
.topic-list li::before { content: ""; position: absolute; width: 3px; height: 3px; border-radius: 50%; left: 0; top: 8px; background: var(--accent); }
.news-list { padding: 0; margin: 0; list-style: none; }
.news-list li { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 16px; margin-bottom: 14px; font-size: 13px; line-height: 1.85; }
.news-list li:last-child { margin-bottom: 0; }
.news-list time { color: var(--accent); font-size: 11px; padding-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.paper-title { color: var(--link); }
.news-list strong { color: var(--text); font-weight: 600; }
.news-archive { margin-top: 17px; }
.news-archive summary { display: inline-flex; align-items: center; gap: 7px; color: var(--subtle); font-size: 11px; list-style: none; cursor: pointer; min-height: 28px; }
.news-archive summary::-webkit-details-marker { display: none; }
.news-archive summary .icon { width: 13px; height: 13px; flex-basis: 13px; transition: transform 120ms ease; }
.news-archive[open] summary .icon { transform: rotate(180deg); }
.news-archive > ul { padding-top: 15px; }
.research-entry { padding: 25px 0; border-bottom: 1px solid var(--line); }
.research-entry:first-child { padding-top: 0; }
.research-entry:last-child { border-bottom: 0; padding-bottom: 0; }
.research-entry--media { display: grid; grid-template-columns: minmax(0, 1fr) 208px; align-items: center; gap: 28px; }
.entry-kicker { font-size: 11px; color: var(--subtle); margin-bottom: 8px; }
.entry-kicker span { margin: 0 5px; color: var(--subtle); }
h3 { font-size: 15px; line-height: 1.55; font-weight: 500; }
.research-entry h3 { margin-bottom: 10px; }
.research-entry h3 a { color: var(--text); }
.research-entry p:not(.entry-kicker) { font-size: 13px; color: var(--muted); line-height: 1.85; }
.text-link, .publication-links a { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; margin-top: 12px; }
.text-link .icon, .publication-links .icon { width: 13px; height: 13px; flex-basis: 13px; }
.research-image { display: block; margin-top: 4px; padding: 6px; border: 1px solid #aab5c3; border-radius: 5px; overflow: hidden; background: var(--paper); }
.research-image img { width: 100%; height: auto; }
.research-entry--wide figure { margin: 22px auto 0; max-width: 660px; padding: 12px 12px 9px; background: var(--paper); border: 1px solid #aab5c3; border-radius: 5px; }
.research-entry--wide figure img { width: 100%; height: auto; border-radius: 3px; background: #ffffff; }
figcaption { font-size: 10px; color: var(--subtle); line-height: 1.6; margin-top: 8px; }
.research-entry--wide figcaption { text-align: center; color: var(--paper-text); }
.research-entry--wide figcaption a { color: #2c5f87; }
.publication-list { list-style: none; counter-reset: publications; margin: 0; padding: 0; }
.publication-list > li { display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 16px; counter-increment: publications; border-bottom: 1px solid var(--line); padding: 23px 0; }
.publication-list > li:first-child { padding-top: 0; }
.publication-list > li:last-child { border-bottom: 0; padding-bottom: 0; }
.publication-list > li::before { content: counter(publications, decimal-leading-zero); color: var(--accent); font-size: 11px; padding-top: 3px; font-variant-numeric: tabular-nums; }
.publication-body h3 { margin-bottom: 9px; }
.publication-body p { font-size: 13px; color: var(--muted); line-height: 1.9; }
.publication-body strong { color: var(--text); font-weight: 600; }
.publication-body .publication-venue { margin-top: 4px; color: var(--subtle); }
.publication-body .publication-note { margin-top: 4px; font-size: 11px; color: var(--subtle); }
sup { font-size: 0.72em; line-height: 0; }
.publication-links { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.timeline { display: grid; gap: 30px; }
.timeline article { display: grid; grid-template-columns: 80px minmax(0, 1fr); align-items: start; gap: 20px; min-width: 0; }
.timeline img { width: 56px; height: 56px; object-fit: contain; object-position: center; }
.institution-mark { display: flex; align-items: center; justify-content: center; width: 100%; height: 72px; overflow: visible; }
/* The shared rail centers wide wordmarks without max-width shrinking or offsets. */
.institution-mark img { flex: 0 0 auto; max-width: none; margin: 0; border-radius: 0; background: transparent; }
.institution-mark--cuhk img { width: 88px; height: 88px; }
.institution-mark--wordmark img { width: 64px; height: 36px; }
.institution-mark--ucl img { width: 48px; height: 14px; }
:root[data-theme="light"] .institution-mark--ucl img { filter: brightness(0); }
.timeline h3 { font-size: 13px; margin-bottom: 5px; }
.timeline p { font-size: 12px; line-height: 1.85; color: var(--muted); }
.timeline time { display: block; margin-top: 7px; color: var(--accent); font-size: 10px; font-variant-numeric: tabular-nums; }
.capabilities { margin: 0; }
.capabilities > div { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.capabilities > div:first-child { padding-top: 0; }
.capabilities > div:last-child { border-bottom: 0; padding-bottom: 0; }
.capabilities dt { font-size: 11px; font-weight: 500; color: var(--text); }
.capabilities dd { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.85; }
.contact { padding-bottom: 38px; margin-bottom: 0; }
.contact-email { display: inline-flex; align-items: center; gap: 9px; font-size: 20px; line-height: 1.5; font-weight: 400; }
.contact-email .icon { width: 18px; height: 18px; flex-basis: 18px; }
.contact-secondary { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 15px; }
.contact-secondary a { display: inline-flex; align-items: center; gap: 4px; color: var(--subtle); font-size: 11px; }
.contact-secondary .icon { width: 12px; height: 12px; flex-basis: 12px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 0 30px; color: var(--subtle); font-size: 10px; }
.detail-layout { width: min(920px, calc(100% - 96px)); margin: 0 auto; padding: 42px 0 0; }
.back-link { display: inline-flex; align-items: center; gap: 7px; color: var(--subtle); font-size: 11px; margin-bottom: 28px; }
.back-link .icon { width: 14px; height: 14px; flex-basis: 14px; }
.detail-header { margin-bottom: 32px; }
.detail-header h1 { max-width: 820px; font-size: 27px; font-weight: 500; line-height: 1.4; margin-bottom: 17px; }
.detail-meta { font-size: 12px; color: var(--muted); line-height: 1.9; }
.detail-meta .publication-note { display: block; margin-top: 5px; font-size: 10px; color: var(--subtle); }
.insights-layout { max-width: 760px; }
.insights-header { max-width: 650px; margin-bottom: 30px; }
.insights-header > p:last-child { font-size: 14px; line-height: 1.85; color: var(--muted); }
.insight-entry { padding: 28px 0; border-top: 1px solid var(--line); scroll-margin-top: 82px; }
.insight-entry h2 { font-size: 19px; line-height: 1.45; font-weight: 500; margin-bottom: 11px; }
.insight-question { color: var(--accent); font-size: 14px; line-height: 1.75; margin-bottom: 11px; }
.insight-entry > p:last-child { max-width: 650px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.abstract-panel { padding: 26px 0 32px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 35px; }
.abstract-panel h2 { font-size: 19px; font-weight: 500; margin-bottom: 16px; }
.abstract-panel > p { font-size: 13px; color: var(--muted); line-height: 1.9; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px 17px; margin-top: 21px; color: var(--accent); font-size: 10px; }
.research-showcase { display: grid; gap: 35px; }
.showcase-card { padding: 0 0 35px; border-bottom: 1px solid var(--line); }
.showcase-copy { margin-bottom: 20px; max-width: 720px; }
.showcase-copy h2 { font-size: 19px; line-height: 1.4; font-weight: 500; margin-bottom: 10px; }
.showcase-copy > p:not(.eyebrow) { font-size: 12px; color: var(--muted); }
.showcase-card img, .showcase-card video { width: 100%; height: auto; border-radius: 2px; background: #ffffff; }
.showcase-card > figure { padding: 12px 12px 5px; background: var(--paper); border: 1px solid #aab5c3; border-radius: 6px; }
.compact-figure figure { max-width: 740px; margin: 0 auto; }
.showcase-wide figure { max-width: 800px; margin: 0 auto; }
.showcase-wide img { max-height: 340px; object-fit: contain; }
.paired-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 14px; background: var(--paper); border: 1px solid #aab5c3; border-radius: 6px; }
.paired-figures figure { min-width: 0; }
.paired-figures img { aspect-ratio: 1.38; object-fit: contain; cursor: zoom-in; }
.showcase-card figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; margin-top: 4px; text-align: left; color: var(--paper-text); font-size: 11px; }
.figure-zoom { display: inline-grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 0; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #536072; cursor: zoom-in; }
.figure-zoom:hover { border-color: #c5ccd5; background: #e7ebf0; color: #1d405f; }
.figure-zoom:focus-visible { outline-color: #315f85; }
.figure-zoom .icon { width: 15px; height: 15px; }
.showcase-card figure img { cursor: zoom-in; }
.showcase-video video { max-width: 780px; margin: 0 auto; }

.is-viewing-figure { overflow: hidden; }
.figure-viewer { width: min(1280px, calc(100vw - 40px)); max-width: none; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); padding: 0; overflow: auto; color: #edf0f5; background: #171b21; border: 1px solid #576170; border-radius: 6px; }
.figure-viewer::backdrop { background: rgb(0 0 0 / 82%); }
.viewer-toolbar { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 10px 4px 17px; }
.viewer-count { margin-right: auto; font-size: 12px; color: #bcc6d4; font-variant-numeric: tabular-nums; }
.viewer-toolbar button { color: #d8e1ef; }
.viewer-toolbar button:focus-visible { outline-color: #b5d9f5; }
.viewer-toolbar button:disabled { opacity: 0.3; cursor: default; }
.viewer-image { display: block; width: 100%; max-height: calc(100vh - 160px); max-height: calc(100dvh - 160px); object-fit: contain; background: #fff; }
.viewer-caption { padding: 11px 17px 13px; color: #cdd4df; font-size: 12px; line-height: 1.6; }

@media (max-width: 1100px) {
  .layout { grid-template-columns: 190px minmax(0, 1fr); gap: 52px; width: calc(100% - 80px); }
  .header-inner { width: calc(100% - 64px); }
  .site-nav { gap: 19px; }
  .research-entry--media { grid-template-columns: minmax(0, 1fr) 180px; gap: 23px; }
}

@media (max-width: 820px) {
  .layout { display: block; width: calc(100% - 48px); padding-top: 30px; }
  .profile { position: static; display: grid; grid-template-columns: 84px minmax(0, 1fr); column-gap: 22px; margin-bottom: 30px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
  .avatar { grid-column: 1; grid-row: 1 / 5; width: 84px; height: 84px; margin: 3px 0 0; }
  .profile-name { grid-column: 2; grid-row: 1; font-size: 23px; margin-bottom: 6px; }
  .profile-focus { grid-column: 2; grid-row: 2; font-size: 11px; margin-bottom: 8px; }
  .profile-degree { grid-column: 2; grid-row: 3; font-size: 11px; }
  .profile-location { grid-column: 2; grid-row: 4; margin-top: 5px; }
  .profile--academic { grid-template-columns: 96px minmax(0, 1fr); }
  .profile--academic .avatar-frame { grid-column: 1; grid-row: 1 / 4; width: 96px; height: 96px; padding: 5px; margin: 3px 0 0; }
  .profile--academic .profile-affiliation { grid-column: 2; grid-row: 2; margin-bottom: 9px; }
  .profile--academic .profile-focus { grid-column: 2; grid-row: 3; margin-bottom: 0; }
  .profile--academic .profile-alumni { grid-column: 2; grid-row: 4; padding-top: 11px; margin-top: 12px; }
  .profile--academic .profile-location { grid-column: 2; grid-row: 5; margin-top: 6px; }
  .profile--academic .profile-email { grid-column: 2; grid-row: 6; margin-top: 6px; font-size: 11px; }
  .profile-links { grid-column: 1 / -1; margin-top: 16px; padding-top: 0; border-top: 0; gap: 20px; }
  .profile-cv { grid-column: 1 / -1; margin-top: 0; }
  .section { margin-bottom: 30px; padding-bottom: 30px; }
  .detail-layout { width: calc(100% - 48px); padding-top: 30px; }
}

@media (max-width: 600px) {
  .header-inner { width: calc(100% - 36px); min-height: 52px; gap: 14px; }
  .header-tools { margin-left: auto; gap: 11px; }
  .header-tools .icon-button { width: 44px; height: 44px; }
  .cv-link { font-size: 11px; }
  .menu-toggle { display: inline-grid; }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; margin: 0; padding: 12px 18px 18px; flex-direction: column; align-items: stretch; gap: 0; border-bottom: 1px solid var(--line); background: var(--header); }
  .js .site-nav:not(.is-open) { display: none; }
  .site-nav a { padding: 10px 0; min-height: 40px; font-size: 13px; }
  .site-nav a[aria-current="location"], .site-nav a[aria-current="page"] { box-shadow: none; color: var(--accent); }
  .layout { width: calc(100% - 40px); padding-top: 26px; }
  .profile { column-gap: 20px; margin-bottom: 28px; }
  .profile-links { gap: 22px; }
  .section h2 { font-size: 19px; }
  .section-heading { margin-bottom: 18px; }
  .intro > p:not(.eyebrow) { font-size: 13px; line-height: 1.9; }
  .news-list li { grid-template-columns: 59px minmax(0, 1fr); gap: 13px; font-size: 13px; }
  .news-list time { font-size: 10px; }
  .research-entry--media { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .research-image { width: min(100%, 300px); }
  .research-entry h3 { font-size: 14px; }
  .research-entry p:not(.entry-kicker) { font-size: 13px; }
  .publication-list > li { grid-template-columns: 19px minmax(0, 1fr); gap: 10px; }
  .publication-body h3 { font-size: 13px; }
  .publication-body p { font-size: 13px; }
  .publication-body .publication-note { font-size: 10px; }
  .timeline { gap: 26px; }
  .timeline article { grid-template-columns: 68px minmax(0, 1fr); gap: 16px; }
  .timeline img { width: 48px; height: 48px; }
  .institution-mark { height: 64px; }
  .institution-mark--cuhk img { width: 76px; height: 76px; }
  .institution-mark--wordmark img { width: 56px; height: 32px; }
  .institution-mark--ucl img { width: 42px; height: 12px; }
  .timeline h3 { font-size: 13px; }
  .timeline p { font-size: 12px; }
  .capabilities > div { display: block; padding: 13px 0; }
  .capabilities dt { margin-bottom: 6px; }
  .capabilities dd { font-size: 12px; }
  .contact-email { font-size: 18px; }
  .contact-secondary { gap: 12px 20px; }
  .site-footer { font-size: 9px; }
  .detail-layout { width: calc(100% - 40px); padding-top: 25px; }
  .detail-header h1 { font-size: 23px; }
  .detail-meta { font-size: 11px; }
  .abstract-panel > p { font-size: 12px; }
  .paired-figures { grid-template-columns: minmax(0, 1fr); }
  .showcase-copy h2 { font-size: 18px; }
  .paired-figures { padding: 8px; gap: 15px; }
  .showcase-card > figure { padding: 8px 8px 3px; }
  .figure-zoom { flex-basis: 44px; width: 44px; height: 44px; }
  .figure-viewer { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .viewer-toolbar .icon-button { width: 44px; height: 44px; }
  .viewer-image { max-height: calc(100dvh - 166px); }
}

@media (max-aspect-ratio: 3/4) {
  :root:is([data-scene="earth-orbit"], [data-scene="lunar-orbit"], [data-scene="mars-orbit"]) { --scene-focus: center calc(100% + max(2lvh, calc(44vw - 20lvh))); }
  :root { --background-image: url("../img/space-preview/mars-night-mobile.png"); }
  :root[data-theme="light"] { --background-image: url("../img/space-preview/mars-day-mobile.png"); }
  :root[data-scene="lunar"] { --background-image: url("../img/space-preview/lunar-mobile.png"); }
  :root[data-scene="mars"] { --background-image: url("../img/space-preview/mars-night-mobile.png"); }
  :root[data-theme="light"][data-scene="mars"] { --background-image: url("../img/space-preview/mars-day-mobile.png"); }
  :root[data-scene="earth-orbit"] { --background-image: url("../img/space-preview/terra-hong-kong-mobile-v1.png"); }
  :root[data-scene="lunar-orbit"] { --background-image: url("../img/space-preview/luna-orbit-aligned-mobile-v1.png"); }
  :root[data-scene="mars-orbit"] { --background-image: url("../img/space-preview/mars-orbit-aligned-mobile-v1.png"); }
  :root[data-scene="deep-space"] { --background-image: url("../img/space-preview/deep-space.png"); --scene-focus: 100% bottom; }
}

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