/* Jiang Lab golden page. Editorial base, real imaging, no instrument chrome. */

@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-roman.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/plex-sans.woff2") format("woff2"); font-weight: 100 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/plex-sans-italic.woff2") format("woff2"); font-weight: 100 700; font-style: italic; font-display: swap; }

:root {
  --paper: #F7F6F2;
  --paper-2: #EEECE5;
  --ink: #12181F;
  --ink-2: #4A535D;
  --ink-3: #626B74;
  --rule: #D9D6CC;
  --accent: #0A64A8;
  --fig: #0B7A68;
  --plate: #05080C;
  --on-plate: #F3F5F7;
  --on-plate-2: rgba(243, 245, 247, 0.74);
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Plex Sans", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --maxw: 1320px;
  --gutter: clamp(20px, 4.2vw, 64px);
  --col-gap: clamp(16px, 2.2vw, 32px);
  --section: clamp(88px, 9vw, 144px);
  color-scheme: light;
}

[data-theme="dark"] {
  --paper: #0B0E12;
  --paper-2: #12161C;
  --ink: #ECEFF2;
  --ink-2: #A8B1BB;
  --ink-3: #89929C;
  --rule: #262D36;
  --accent: #74BCF5;
  --fig: #52D3B2;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-optical-sizing: auto; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
  text-decoration-color: color-mix(in srgb, currentColor 32%, transparent);
  transition: text-decoration-color 0.18s ease, color 0.18s ease;
}
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 1px; }

.skip { position: absolute; left: 12px; top: -48px; z-index: 50; padding: 10px 14px; background: var(--ink); color: var(--paper); font-size: 0.875rem; }
.skip:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* Header */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 10; color: var(--on-plate); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 104px; }
.brand { display: inline-flex; text-decoration: none; }
.brand img { height: 38px; width: auto; }
.nav ul { display: flex; gap: clamp(20px, 2.6vw, 44px); }
.nav a { font-size: clamp(1.0625rem, 0.95rem + 0.35vw, 1.25rem); font-weight: 450; letter-spacing: 0.002em; color: rgba(243, 245, 247, 0.9); text-decoration: none; text-shadow: 0 1px 12px rgba(5, 8, 12, 0.6); }
.nav a:hover { color: #FFFFFF; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.35em; text-decoration-color: rgba(243, 245, 247, 0.6); }
.menu-toggle { display: none; }

/* Hero */
.hero { position: relative; min-height: max(100svh, 680px); display: grid; grid-template-rows: 1fr auto; background: var(--plate); color: var(--on-plate); overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media picture { position: absolute; inset: 0; }
.hero-media video, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 78% 50%; transform: scale(1.06); transform-origin: 80% 50%; filter: saturate(1.25) brightness(1.18) contrast(1.06); }
.hero-media::after { content: ""; position: absolute; inset: 0; background:
  radial-gradient(ellipse 46% 40% at 24% 62%, rgba(5, 8, 12, 0.62) 0%, rgba(5, 8, 12, 0.3) 55%, rgba(5, 8, 12, 0) 100%),
  linear-gradient(90deg, rgba(5, 8, 12, 0.66) 0%, rgba(5, 8, 12, 0.36) 26%, rgba(5, 8, 12, 0) 46%),
  linear-gradient(180deg, rgba(5, 8, 12, 0.5) 0%, rgba(5, 8, 12, 0) 140px),
  linear-gradient(0deg, rgba(5, 8, 12, 0.78) 0%, rgba(5, 8, 12, 0.5) 7%, rgba(5, 8, 12, 0) 22%); }
.hero-inner { align-self: end; width: 100%; padding-top: 140px; padding-bottom: clamp(48px, 7vh, 88px); }
.hero > .wrap { width: 100%; }
.hero h1 { max-width: 11.2em; text-shadow: 0 2px 28px rgba(5, 8, 12, 0.55); font-size: clamp(2.375rem, 1.05rem + 3.3vw, 4.25rem); line-height: 1.02; letter-spacing: -0.022em; font-weight: 380; }
.hero-sub { margin-top: 24px; max-width: 27em; text-shadow: 0 1px 16px rgba(5, 8, 12, 0.7); font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.25rem); line-height: 1.5; color: var(--on-plate-2); }
.hero-links { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 28px; font-size: 1.0625rem; font-weight: 500; }
.hero-links a { text-decoration-color: rgba(243, 245, 247, 0.45); }
.hero-links a:hover { text-decoration-color: var(--on-plate); }
.hero-foot { width: 100%; display: flex; align-items: baseline; justify-content: flex-end; gap: 24px; padding-bottom: 28px; padding-top: 18px; border-top: 1px solid rgba(243, 245, 247, 0.16); }
.pause { appearance: none; border: 0; background: none; display: inline-block; padding: 4px 0; color: var(--on-plate); text-shadow: 0 0 4px rgba(5, 8, 12, 0.9), 0 1px 12px rgba(5, 8, 12, 0.8); font: 500 0.8125rem/1 var(--sans); letter-spacing: 0.01em; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(243, 245, 247, 0.35); text-underline-offset: 0.3em; }
.pause:hover { color: var(--on-plate); }

/* Figure captions */
.caption { font-size: 0.8125rem; line-height: 1.45; color: var(--ink-2); max-width: 44em; }
.fig-n { font-weight: 600; color: var(--fig); margin-right: 0.5em; font-variant-numeric: tabular-nums; }
.hero .fig-n { color: #7FE3C8; }

/* Sections */
.section { padding-top: var(--section); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 24px; padding-top: 18px; border-top: 1px solid var(--ink); margin-bottom: clamp(36px, 4vw, 56px); }
.section-head h2 { font-size: clamp(1.75rem, 1.3rem + 1.3vw, 2.5rem); line-height: 1.1; letter-spacing: -0.012em; }
.section-head a { font-size: 0.9375rem; font-weight: 500; white-space: nowrap; }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }

/* Lede */
.lede { padding-top: clamp(80px, 9vw, 136px); }
.lede p { grid-column: 3 / span 9; font-family: var(--serif); font-size: clamp(1.5rem, 1.1rem + 1.15vw, 2.25rem); line-height: 1.32; letter-spacing: -0.008em; font-weight: 380; }
.lede p + p { margin-top: 0.9em; color: var(--ink-2); }

/* Research areas */
.areas { row-gap: 56px; }
.areas { grid-template-rows: repeat(5, auto); }
.area { grid-column: span 4; grid-row: span 5; display: grid; grid-template-rows: subgrid; row-gap: 0; }
.area figure { display: contents; }
.area figure img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--plate); }
.area figcaption { margin-top: 12px; }
.area h3 { margin-top: 28px; font-size: clamp(1.5rem, 1.25rem + 0.6vw, 1.875rem); line-height: 1.15; letter-spacing: -0.01em; }
.area h3 a { text-decoration: none; }
.area h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.area p { margin-top: 12px; color: var(--ink-2); max-width: 30em; }
.area .methods { margin-top: 16px; font-size: 0.9375rem; color: var(--ink); }

/* Publications */
.pub-list { border-top: 0; }
.pub { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); padding: 26px 0 28px; border-bottom: 1px solid var(--rule); }
.pub:first-child { padding-top: 4px; }
.pub-meta { grid-column: 1 / span 3; display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
.pub-meta time { font-size: 0.875rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pub-meta .journal { font-family: var(--serif); font-style: italic; font-size: 1.0625rem; }
.pub-title { grid-column: 4 / span 8; font-size: clamp(1.25rem, 1.1rem + 0.45vw, 1.625rem); line-height: 1.28; letter-spacing: -0.006em; }
.pub-title a { text-decoration: none; }
.pub-title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--ink-3); }
.pub-links { grid-column: 4 / span 8; margin-top: 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 24px; font-size: 0.9375rem; color: var(--ink-2); }
.pub-links a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--ink-3); }
.pub-links a:hover { text-decoration-color: currentColor; }
.pub-links .size { margin-left: 6px; font-variant-numeric: tabular-nums; }

/* People */
.people-intro { grid-column: 1 / span 7; font-family: var(--serif); font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.625rem); line-height: 1.35; margin-bottom: 40px; }
.people-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 40px var(--col-gap); }
.person-card { display: block; position: relative; width: 100%; padding: 0; border: 0; margin: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.person-card.static { cursor: default; }
.ph { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-2); }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph .formal { filter: grayscale(1) contrast(1.04); transition: filter 0.4s ease, transform 0.6s ease; }
.ph .fun { opacity: 0; transform: scale(1.04); transition: opacity 0.4s ease, transform 0.6s ease; }
.fact { position: absolute; inset: auto 0 0 0; padding: 36px 14px 12px; font-size: 0.8125rem; line-height: 1.38; color: #FFFFFF; background: linear-gradient(0deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.55) 60%, rgba(0, 0, 0, 0) 100%); opacity: 0; transform: translateY(6px); transition: opacity 0.35s ease, transform 0.35s ease; display: block; max-height: 100%; overflow-y: auto; }
.person-card[aria-pressed="true"] .fun { opacity: 1; transform: none; }
.person-card[aria-pressed="true"] .fact { opacity: 1; transform: none; }
.person-card.static:focus-visible .formal { filter: none; }
@media (hover: hover) {
  .person-card:hover .fun { opacity: 1; transform: none; }
  .person-card:hover .fact { opacity: 1; transform: none; }
  .person-card.static:hover .formal { filter: none; }
}
.people-also { margin-top: 32px; font-size: 0.9375rem; color: var(--ink-2); }
.person .name { margin-top: 12px; font-size: 0.9375rem; line-height: 1.3; font-weight: 500; }
.person .role { font-size: 0.8125rem; line-height: 1.35; color: var(--ink-2); }
.person .comentor { margin-top: 2px; font-size: 0.8125rem; line-height: 1.35; color: var(--ink-2); }

/* News */
.news-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--col-gap); }
.news-item { padding-top: 18px; border-top: 1px solid var(--rule); }
.news-item time { font-size: 0.875rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.news-item h3 { margin-top: 10px; font-size: clamp(1.1875rem, 1.05rem + 0.35vw, 1.4375rem); line-height: 1.3; }
.news-item h3 a { text-decoration: none; }
.news-item h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }

/* Join */
.join { margin-top: var(--section); padding-block: clamp(64px, 7vw, 112px); background: var(--paper-2); }
.join h2 { grid-column: 1 / span 5; font-size: clamp(2.25rem, 1.5rem + 2.4vw, 4rem); line-height: 1.02; letter-spacing: -0.02em; font-weight: 380; }
.join-body { grid-column: 7 / span 6; align-self: end; }
.join-body p { font-size: 1.1875rem; line-height: 1.55; color: var(--ink-2); max-width: 30em; }
.join-body .more { margin-top: 20px; font-weight: 500; color: var(--ink); }

/* Footer */
.site-footer { background: var(--plate); color: var(--on-plate-2); padding-block: 72px 40px; font-size: 0.9375rem; }
.site-footer a { color: var(--on-plate); text-decoration-color: rgba(243, 245, 247, 0.3); }
.foot-grid { row-gap: 40px; }
.foot-brand { grid-column: 1 / span 3; }
.foot-brand img { height: 30px; width: auto; }
.foot-col { grid-column: span 3; }
.foot-col h2 { font-family: var(--sans); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.01em; color: var(--on-plate); margin-bottom: 12px; }
.foot-col li + li { margin-top: 4px; }
.foot-base { margin-top: 64px; padding-top: 20px; border-top: 1px solid rgba(243, 245, 247, 0.14); display: flex; justify-content: space-between; gap: 24px; font-size: 0.8125rem; }
.theme-toggle { appearance: none; border: 0; background: none; display: inline-block; padding: 3px 0; color: var(--on-plate); font: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(243, 245, 247, 0.3); text-underline-offset: 0.24em; }

/* Tablet */
@media (max-width: 1080px) {
  .nav ul { gap: 18px; }
  .people-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nav a { font-size: 1rem; }
  .lede p { grid-column: 1 / -1; }
}

/* Phone */
@media (max-width: 760px) {
  .header-inner { height: 76px; }
  .brand img { height: 26px; }
  .nav { display: none; position: absolute; inset: 76px 0 auto 0; background: var(--plate); padding: 8px var(--gutter) 24px; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { display: block; padding: 14px 0; font-size: 1.25rem; text-shadow: none; border-bottom: 1px solid rgba(243, 245, 247, 0.12); }
  .menu-toggle { display: inline-block; appearance: none; background: none; border: 0; color: var(--on-plate); font: 500 0.9375rem/1 var(--sans); padding: 10px 0; cursor: pointer; }
  .hero { min-height: 92svh; }
  .hero-media video, .hero-media img { object-position: 60% 50%; }
  .hero-media::after { background: linear-gradient(0deg, rgba(5, 8, 12, 0.85) 0%, rgba(5, 8, 12, 0.45) 40%, rgba(5, 8, 12, 0) 66%), linear-gradient(180deg, rgba(5, 8, 12, 0.5) 0%, rgba(5, 8, 12, 0) 120px); }
  .hero-media video, .hero-media img { transform: none; }
  .areas { grid-template-rows: none; row-gap: 56px; }
  .area { grid-column: 1 / -1; grid-row: auto; display: flex; flex-direction: column; }
  .area figure { display: block; }
  .pub-meta, .pub-title, .pub-links { grid-column: 1 / -1; }
  .pub-meta { flex-direction: row; gap: 10px; align-items: baseline; padding-top: 0; margin-bottom: 6px; }
  .people-intro { grid-column: 1 / -1; }
  .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
  .fact { font-size: 0.75rem; padding: 28px 10px 10px; }
  .person .name { font-size: 0.8125rem; }
  .person .role, .person .comentor { font-size: 0.75rem; }
  .news-list { grid-template-columns: 1fr; row-gap: 28px; }
  .join h2, .join-body { grid-column: 1 / -1; }
  .join-body { margin-top: 24px; }
  .foot-brand, .foot-col { grid-column: 1 / -1; }
  .foot-grid { row-gap: 28px; }
  .foot-base { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .hero:not(.motion-ok) .hero-media video { display: none; }
  * { transition: none !important; }
}

/* ===== Inner pages (Round 6) ===== */
[hidden] { display: none !important; }

/* Solid header: sits on the page, not over a hero */
.site-header.solid { position: relative; color: var(--ink); border-bottom: 1px solid var(--rule); }
.site-header.solid .nav a { color: var(--ink-2); text-shadow: none; }
.site-header.solid .nav a:hover { color: var(--ink); text-decoration-color: var(--ink-3); }
.site-header.solid .nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.35em; text-decoration-color: currentColor; }
.logo-on-light { display: none; }
:root:not([data-theme="dark"]) .brand .logo-on-dark { display: none; }
:root:not([data-theme="dark"]) .brand .logo-on-light { display: block; }

/* Page title and lede */
.page-head { padding-top: clamp(56px, 7vw, 112px); }
.page-head h1 { font-size: clamp(2.75rem, 1.6rem + 3.6vw, 5rem); line-height: 1; letter-spacing: -0.024em; font-weight: 380; }
.page-lede { margin-top: clamp(28px, 3vw, 44px); }
.page-lede p { max-width: 34em; font-family: var(--serif); font-size: clamp(1.375rem, 1.05rem + 0.95vw, 2rem); line-height: 1.34; letter-spacing: -0.006em; font-weight: 380; }
.page-lede p + p { margin-top: 0.9em; max-width: 42em; color: var(--ink-2); font-size: clamp(1.1875rem, 1rem + 0.5vw, 1.5rem); line-height: 1.42; }

.venue { color: var(--ink-3); font-size: 0.875rem; }

/* Research */
.area-row { row-gap: 40px; align-items: start; }
.area-fig { grid-column: 1 / span 5; position: sticky; top: 32px; }
.area-fig img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--plate); }
.area-fig figcaption { margin-top: 12px; }
.area-body { grid-column: 7 / span 6; }
.area-intro { font-family: var(--serif); font-size: clamp(1.375rem, 1.15rem + 0.6vw, 1.75rem); line-height: 1.32; letter-spacing: -0.004em; }
.method-list { margin: 32px 0 0; }
.method { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); column-gap: 24px; padding: 16px 0 18px; border-top: 1px solid var(--rule); }
.method dt { font-weight: 500; line-height: 1.5; }
.method dt a { text-decoration: none; }
.method dt a:hover { text-decoration: underline; }
.method dd { margin: 0; color: var(--ink-2); }
.method .meta-line { display: flex; flex-wrap: wrap; gap: 2px 20px; margin-top: 4px; }
.xref { font-size: 0.875rem; color: var(--ink-2); }
.topic { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--rule); scroll-margin-top: 24px; }
.topic h3 { font-size: clamp(1.375rem, 1.2rem + 0.5vw, 1.75rem); line-height: 1.2; }
.topic > p { margin-top: 10px; color: var(--ink-2); }
.list-label { margin-top: 18px; font-size: 0.9375rem; color: var(--ink-2); }
.paper-list { margin-top: 6px; }
.paper-list li { padding: 10px 0; border-top: 1px solid var(--rule); font-size: 0.9375rem; line-height: 1.45; }
.paper-list li > a { text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--ink-3); }
.paper-list li > a:hover { text-decoration-color: currentColor; }
.paper-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 18px; margin-top: 3px; }
.paper-links { display: inline-flex; flex-wrap: wrap; gap: 2px 18px; font-size: 0.875rem; }
.paper-links a { text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--ink-3); }

/* Platform */
.instrument-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px var(--col-gap); }
.instrument img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--paper-2); }
.instrument figcaption { margin-top: 14px; }
.instrument h3 { font-size: clamp(1.1875rem, 1.05rem + 0.35vw, 1.4375rem); line-height: 1.25; }
.instrument p { margin-top: 6px; max-width: 30em; font-size: 0.9375rem; color: var(--ink-2); }
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px var(--col-gap); }
.more-item h3 { font-size: clamp(1.1875rem, 1.05rem + 0.35vw, 1.4375rem); line-height: 1.25; }
.more-item p { margin-top: 8px; color: var(--ink-2); }

/* Models & Data */
.resource { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); padding: 26px 0 28px; border-bottom: 1px solid var(--rule); }
.resource:first-child { padding-top: 4px; }
.res-name { grid-column: 1 / span 3; font-size: clamp(1.375rem, 1.2rem + 0.5vw, 1.75rem); line-height: 1.15; }
.res-body { grid-column: 4 / span 8; }
.res-paper { margin-top: 8px; font-size: 0.9375rem; color: var(--ink-2); }
.res-paper a { color: var(--ink); text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--ink-3); }
.res-paper a:hover { text-decoration-color: currentColor; }
.res-paper .venue { display: block; margin-top: 2px; }
.res-links { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 0.9375rem; font-weight: 500; }
.res-links a { text-decoration-color: var(--ink-3); }

/* Publications */
.pubs-tools { padding-top: clamp(32px, 4vw, 56px); }
.pub-filter { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: end; }
.pub-filter .field { display: flex; flex-direction: column; gap: 6px; }
.pub-filter label { font-size: 0.875rem; color: var(--ink-2); }
.pub-filter input, .pub-filter select { min-width: 20em; padding: 10px 12px; font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper); border: 1px solid var(--ink-3); border-radius: 2px; }
.pub-filter select { min-width: 9em; }
.pub-count { margin-top: 20px; font-size: 0.9375rem; color: var(--ink-2); }
.pub-key { margin-top: 4px; font-size: 0.8125rem; color: var(--ink-2); }
.year-group { padding-top: clamp(40px, 5vw, 72px); }
.year-head { margin-bottom: 20px; padding-top: 18px; border-top: 1px solid var(--ink); font-size: clamp(1.75rem, 1.3rem + 1.3vw, 2.5rem); line-height: 1.1; }
.pub-authors { grid-column: 4 / span 8; margin-top: 8px; font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); }
.pub-authors strong { color: var(--ink); font-weight: 600; }
.pub-access { grid-column: 4 / span 8; margin-top: 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 24px; font-size: 0.9375rem; color: var(--ink-2); }
.pub-access .access a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--ink-3); }
.pub-access .size { margin-left: 6px; font-variant-numeric: tabular-nums; }
.pub-access .abstract { color: var(--ink); }
.pub-access .abstract[open] { flex-basis: 100%; }
.abstract summary, .bio summary { display: inline-block; padding-block: 2px; list-style: none; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--ink-3); }
.abstract summary::-webkit-details-marker, .bio summary::-webkit-details-marker { display: none; }
.abstract summary:hover, .bio summary:hover { text-decoration-color: currentColor; }
.abstract-body { margin-top: 10px; max-width: 42em; color: var(--ink-2); line-height: 1.55; }
.abstract-body p + p { margin-top: 0.8em; }
.pub-empty { padding-top: 40px; color: var(--ink-2); }

/* Lab */
.people-note { margin: -16px 0 28px; font-size: 0.9375rem; color: var(--ink-2); }
.people-full { row-gap: 48px; align-items: start; }
/* Bios: "About" opens a dialog over the page, so the grid never moves (Round 8). Without JavaScript, or without
   dialog support, the list below the grid shows instead and the links jump to it. */
.bio-link { display: inline-block; margin-top: 8px; padding-block: 2px; font-size: 0.875rem; color: var(--ink-2); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--ink-3); }
.bio-link:hover { color: var(--ink); text-decoration-color: currentColor; }
.js .bios { display: none; }
.js.no-dialog .bios { display: block; }
.bio-list { display: grid; gap: 56px; }
.bio-entry { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 56px); align-items: start; scroll-margin-top: 24px; }
.bio-list .bio-entry { padding-top: 24px; border-top: 1px solid var(--rule); }
.bio-photo { width: 100%; max-width: 320px; aspect-ratio: 4 / 5; object-fit: cover; background: var(--paper-2); }
.bio-text h2, .bio-text h3 { font-family: var(--serif); font-size: clamp(1.75rem, 1.35rem + 1.2vw, 2.5rem); line-height: 1.08; letter-spacing: -0.012em; font-weight: 380; padding-right: 64px; }
.bio-text .role { margin-top: 10px; font-size: 1rem; color: var(--ink-2); }
.bio-text .comentor { margin-top: 2px; font-size: 0.9375rem; color: var(--ink-2); }
.bio-body { margin-top: 22px; max-width: 38em; line-height: 1.6; }
.bio-body p + p { margin-top: 0.8em; }
.bio-dialog { width: min(960px, calc(100vw - 32px)); max-width: none; max-height: min(88vh, 820px); margin: auto; padding: 0; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); overflow: auto; overscroll-behavior: contain; }
.bio-dialog::backdrop { background: rgba(5, 8, 12, 0.74); }
.bio-sheet { position: relative; padding: clamp(24px, 4vw, 48px); }
.bio-close { position: absolute; top: clamp(18px, 3vw, 30px); right: clamp(20px, 3vw, 36px); z-index: 1; appearance: none; border: 0; background: none; padding: 4px 0; font: inherit; font-size: 0.9375rem; font-weight: 500; color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--ink-3); }
.bio-close:hover { text-decoration-color: currentColor; }
html.dialog-open { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .bio-dialog[open] { animation: bio-in 0.18s ease-out; }
  .bio-dialog[open]::backdrop { animation: bio-fade 0.18s ease-out; }
}
@keyframes bio-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes bio-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 760px) {
  .bio-dialog { width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; margin: 0; }
  .bio-entry { grid-template-columns: minmax(0, 1fr); }
  .bio-photo { width: 52%; }
}
.culture { row-gap: 32px; }
.values { grid-column: 1 / span 5; }
.values li { padding: 12px 0; border-top: 1px solid var(--rule); font-family: var(--serif); font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.625rem); line-height: 1.3; }
.values li:first-child { padding-top: 0; border-top: 0; }
.culture-text { grid-column: 7 / span 6; }
.culture-text p { color: var(--ink-2); }
.culture-text p + p { margin-top: 1em; }
.alumni-list { columns: 3; column-gap: var(--col-gap); }
.alumni-list li { break-inside: avoid; padding: 10px 0 12px; border-top: 1px solid var(--rule); }
.alumni-list .name { display: block; font-size: 0.9375rem; font-weight: 500; }
.alumni-list .role { display: block; font-size: 0.8125rem; line-height: 1.4; color: var(--ink-2); }
.funding { grid-column: 1 / span 8; color: var(--ink-2); }

/* News */
.news-archive li { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); padding: 24px 0 28px; border-bottom: 1px solid var(--rule); scroll-margin-top: 24px; }
.news-archive time { grid-column: 1 / span 3; padding-top: 6px; font-size: 0.875rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.news-archive h3 { grid-column: 4 / span 8; font-size: clamp(1.25rem, 1.1rem + 0.45vw, 1.625rem); line-height: 1.28; }
.news-body { grid-column: 4 / span 8; margin-top: 10px; max-width: 40em; color: var(--ink-2); }
.news-body p + p { margin-top: 0.8em; }

/* Join page */
.join-page { padding-top: clamp(48px, 6vw, 96px); }
.join-layout { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(36px, 5vw, 88px); align-items: start; }
.join-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; max-width: 42em; }
.join-photo img { width: 100%; height: auto; background: var(--paper-2); }
@media (max-width: 900px) { .join-layout { grid-template-columns: minmax(0, 1fr); } .join-photo { max-width: 720px; } }
.join-block { padding-top: 18px; border-top: 1px solid var(--ink); }
.join-block h2 { font-size: clamp(1.375rem, 1.2rem + 0.5vw, 1.75rem); line-height: 1.2; }
.join-block p { margin-top: 12px; color: var(--ink-2); }
.join-close { margin-top: clamp(48px, 5vw, 72px); max-width: 30em; font-family: var(--serif); font-size: clamp(1.375rem, 1.1rem + 0.8vw, 1.875rem); line-height: 1.3; }
.join-address { margin-top: 28px; font-style: normal; color: var(--ink-2); }

@media (max-width: 1080px) {
  .instrument-grid, .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .alumni-list { columns: 2; }
  .area-fig { grid-column: 1 / span 6; }
  .area-body { grid-column: 7 / span 6; }
}

@media (max-width: 760px) {
  .site-header.solid .nav { background: var(--paper); border-bottom: 1px solid var(--rule); }
  .site-header.solid .nav a { color: var(--ink); border-bottom-color: var(--rule); }
  .site-header.solid .menu-toggle { color: var(--ink); }
  .area-fig, .area-body { grid-column: 1 / -1; position: static; }
  .method { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  .instrument-grid, .more-grid, .join-grid { grid-template-columns: minmax(0, 1fr); }
  .res-name, .res-body { grid-column: 1 / -1; }
  .res-body { margin-top: 10px; }
  .pub-filter .field { flex: 1 1 100%; }
  .pub-filter input, .pub-filter select { min-width: 0; width: 100%; }
  .pub-authors, .abstract { grid-column: 1 / -1; }
  .values, .culture-text, .funding { grid-column: 1 / -1; }
  .alumni-list { columns: 1; }
  .news-archive time, .news-archive h3, .news-body { grid-column: 1 / -1; }
  .news-archive time { padding-top: 0; margin-bottom: 6px; }
}

/* Round 6 fixes */
.also { margin-top: 40px; max-width: 46em; color: var(--ink-2); }
.more-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
.more-item:nth-child(1) { grid-column: 1 / span 5; }
.more-item:nth-child(2) { grid-column: 7 / span 6; }
.res-paper .venue { white-space: nowrap; }
.pub-filter input, .pub-filter select { height: 46px; }
.join-page { padding-bottom: var(--section); }
@media (max-width: 760px) {
  .more-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .foot-base { align-items: flex-start; }
}

/* ===== Round 6 review fixes ===== */
.pub-meta { grid-row: 1 / span 4; }
.pub-list .pub:last-child, .news-archive li:last-child, .resource-list .resource:last-child { border-bottom: 0; }
.pub-authors .member { text-decoration-line: underline; text-decoration-style: dotted; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pub-authors sup { position: relative; top: -0.5em; font-size: 0.72em; line-height: 0; vertical-align: baseline; }
.authors-toggle { grid-column: 4 / span 8; justify-self: start; appearance: none; border: 0; background: none; padding: 4px 0; margin-top: 4px; font: inherit; font-size: 0.875rem; color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--ink-3); }
.year-jump { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.9375rem; color: var(--ink-2); }
.year-jump a { color: var(--ink); text-decoration-color: var(--ink-3); }
.year-head { scroll-margin-top: 16px; }
.instrument img { filter: grayscale(1) contrast(1.06) brightness(0.92); transition: filter 0.4s ease; }
[data-theme="light"] .instrument img { filter: grayscale(1) contrast(1.04); }
@media (hover: hover) { .instrument:hover img { filter: none; } }
.nav-home { display: none; }

/* Focus ring that holds on the dark plate and over the video (two tones) */
.hero :focus-visible, .site-header:not(.solid) :focus-visible, .site-footer :focus-visible { outline: 2px solid #F3F5F7; outline-offset: 1px; box-shadow: 0 0 0 4px #05080C; }

/* Phone and small tablet: menu below 900 px */
@media (max-width: 900px) {
  .nav { display: none; position: absolute; inset: 100% 0 auto 0; background: var(--plate); padding: 8px var(--gutter) 24px; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { display: block; padding: 14px 0; font-size: 1.25rem; text-shadow: none; border-bottom: 1px solid rgba(243, 245, 247, 0.12); }
  .nav-home { display: list-item; }
  .menu-toggle { display: inline-block; appearance: none; background: none; border: 0; color: var(--on-plate); font: 500 0.9375rem/1 var(--sans); padding: 10px 0; cursor: pointer; }
  .site-header.solid .nav { background: var(--paper); border-bottom: 1px solid var(--rule); }
  .site-header.solid .nav a { color: var(--ink); border-bottom-color: var(--rule); }
  .site-header.solid .menu-toggle { color: var(--ink); }
}

@media (max-width: 760px) {
  .pub-meta { grid-row: auto; }
  .pub-access, .authors-toggle { grid-column: 1 / -1; }
  .pub-authors { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .pub.authors-open .pub-authors { display: block; overflow: visible; }
  .more-item:nth-child(1), .more-item:nth-child(2) { grid-column: 1 / -1; }
  .more-grid { row-gap: 32px; }
}

/* Without JavaScript: no filter or theme switch, and the phone menu is a plain list */
html:not(.js) .pub-filter, html:not(.js) .theme-toggle { display: none; }
@media (max-width: 900px) {
  html:not(.js) .menu-toggle { display: none; }
  html:not(.js) .header-inner { height: auto; flex-wrap: wrap; padding-block: 16px; }
  html:not(.js) .nav { display: block; position: static; flex-basis: 100%; background: none; border: 0; padding: 8px 0 0; }
  html:not(.js) .nav ul { flex-direction: row; flex-wrap: wrap; gap: 4px 18px; }
  html:not(.js) .nav a { border: 0; padding: 4px 0; font-size: 1rem; }
}

/* Windows high contrast: keep the logos visible */
@media (forced-colors: active) and (prefers-color-scheme: light) {
  .brand .logo-on-dark { display: none !important; }
  .brand .logo-on-light { display: block !important; }
  .foot-brand img { content: url("logo/jiang-lab-horizontal-one-ink-navy.svg"); }
}

/* ===== Round 12 ===== */
/* Lab: the lab as a tissue section (tissue.js). Each person is a segmented cell on the dark plate; membranes are
   coloured by role. Hidden until the script has built it, so without JavaScript only the grid shows. */
.tissue { margin: 0 0 clamp(44px, 5vw, 72px); }
.tissue-controls { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 0.9375rem; }
.tissue-controls button { appearance: none; background: none; border: 0; margin: 0; padding: 4px 0; font: inherit; color: var(--ink-2); cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em; text-decoration-color: transparent; }
.tissue-controls button:hover { color: var(--ink); }
.tissue-controls button[aria-pressed="true"] { color: var(--ink); text-decoration-color: currentColor; }
.tissue-controls .tissue-pause { margin-left: auto; }
.tissue[data-view="grid"] { margin-bottom: 28px; }
.tissue[data-view="grid"] .tissue-stage, .tissue[data-view="grid"] .tissue-caption, .tissue[data-view="grid"] .tissue-legend, .tissue[data-view="grid"] .tissue-pause { display: none; }
.tissue-stage { position: relative; margin-top: 14px; width: 100%; aspect-ratio: 16 / 9; max-height: 78vh; background: var(--plate); overflow: hidden; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.tissue-stage .cell { position: absolute; left: 0; top: 0; z-index: 1; display: block; padding: 0; margin: 0; border: 0; background: #0D1319; cursor: pointer; overflow: hidden; -webkit-tap-highlight-color: transparent; }
.tissue-stage .cell:focus-visible { outline: none; }
.tissue-stage .cell.on { z-index: 2; }
.tissue-stage .cell img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; transition: opacity 0.35s ease; }
.tissue-stage .cell img.f { filter: grayscale(1) contrast(1.06) brightness(0.9); }
.tissue-stage .cell img.u { opacity: 0; }
.tissue-stage .cell.on img.u, .tissue-stage[data-ch="fun"] .cell img.u { opacity: 1; }
.tissue-stage[data-ch="outlines"] .cell img { opacity: 0; }
.tissue-stage[data-ch="outlines"] .cell { background: rgba(13, 19, 25, 0.55); }
.tissue-stage .cell.t-alum { background: #0E151C; }
.tissue-lines { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.tissue-lines .mem { fill: none; stroke-width: 1.4; stroke-opacity: 0.92; stroke-linejoin: round; }
.tissue-lines .glow { fill: none; stroke-width: 7; stroke-opacity: 0.14; stroke-linejoin: round; }
.tissue-lines .mem.on { stroke: #FFFFFF; stroke-width: 3; stroke-opacity: 1; }
.tissue-lines .nuc { opacity: 0; transition: opacity 0.3s ease; }
.tissue-lines .nuc.t-alum, .tissue-stage[data-ch="outlines"] .nuc { opacity: 0.9; }
.tissue .t-core { --c: #F2B45A; }
.tissue .t-postdoc { --c: #52D3B2; }
.tissue .t-trainee { --c: #74BCF5; }
.tissue .t-friend { --c: #E58BD8; }
.tissue .t-alum { --c: #6B7682; }
.tissue-lines .mem, .tissue-lines .glow { stroke: var(--c); }
.tissue-lines .nuc { fill: var(--c); }
.tissue-caption { margin-top: 12px; min-height: 3.4em; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; font-size: 0.9375rem; color: var(--ink-2); }
.tissue-caption .n { font-family: var(--serif); font-size: clamp(1.25rem, 1.1rem + 0.4vw, 1.5rem); line-height: 1.2; color: var(--ink); }
.tissue-caption .fact { flex-basis: 100%; margin-top: 2px; font-style: italic; color: var(--ink-3); }
.tissue-legend { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.8125rem; color: var(--ink-2); }
.tissue-legend span::before { content: ""; display: inline-block; width: 20px; height: 2px; margin-right: 8px; vertical-align: 0.3em; background: var(--c); }
@media (max-width: 760px) {
  .tissue-stage { aspect-ratio: 4 / 5; max-height: none; }
  .tissue-controls .tissue-pause { margin-left: 0; }
}
/* Publications: the year links follow the filter. With a year chosen they switch to another year; years with no
   matching papers drop out of the list. */
.year-jump a[aria-current="true"] { font-weight: 600; text-decoration: none; }
.year-jump .year-all { appearance: none; background: none; border: 0; margin: 0; padding: 0; font: inherit; color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.24em; text-decoration-color: var(--ink-3); }
.year-jump .year-all:hover { text-decoration-color: currentColor; }
.year-head:focus { outline: none; }

/* Round 13: the contact form on the Join page */
.contact { margin-top: clamp(56px, 6vw, 96px); padding-top: 18px; border-top: 1px solid var(--ink); max-width: 860px; scroll-margin-top: 24px; }
.contact h2 { font-size: clamp(1.375rem, 1.2rem + 0.5vw, 1.75rem); line-height: 1.2; }
.contact-lede { margin-top: 12px; max-width: 40em; color: var(--ink-2); }
.contact-form { margin-top: 28px; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 24px; }
.contact-form .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.contact-form .field-wide { grid-column: 1 / -1; }
.contact-form label { font-size: 0.875rem; color: var(--ink-2); }
.contact-form .hint { font-size: 0.8125rem; color: var(--ink-2); }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form select, .contact-form textarea { width: 100%; padding: 10px 12px; font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper); border: 1px solid var(--ink-3); border-radius: 2px; }
.contact-form textarea { min-height: 10em; line-height: 1.5; resize: vertical; }
.contact-form [aria-invalid="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.contact-form input[type="file"] { max-width: 100%; font: inherit; font-size: 0.9375rem; color: var(--ink-2); }
.contact-form input[type="file"]::file-selector-button { margin-right: 12px; padding: 8px 12px; font: inherit; color: var(--ink); background: var(--paper-2); border: 1px solid var(--ink-3); border-radius: 2px; cursor: pointer; }
.contact-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-note { margin-top: 20px; font-size: 0.875rem; color: var(--ink-2); }
.contact-actions { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.contact-actions button { padding: 11px 28px; font: inherit; font-weight: 500; color: var(--paper); background: var(--ink); border: 1px solid var(--ink); border-radius: 2px; cursor: pointer; }
.contact-actions button:hover { background: var(--ink-2); border-color: var(--ink-2); }
.contact-actions button:disabled { opacity: 0.6; cursor: progress; }
.contact-status { font-size: 0.9375rem; color: var(--ink); }
.contact-status.bad { font-weight: 600; }
@media (max-width: 640px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
