:root {
  --academic-ink: #182136;
  --academic-muted: #657089;
  --academic-blue: #315ea8;
  --academic-deep: #101b36;
  --academic-pale: #eef3ff;
  --academic-surface: rgba(255, 255, 255, 0.78);
  --personal-ink: #2c2929;
  --personal-muted: #746b67;
  --personal-accent: #795f68;
  --personal-deep: #28222a;
  --personal-paper: #f4efe7;
  --personal-surface: rgba(255, 253, 248, 0.72);
  --line: rgba(24, 33, 54, 0.13);
  --shadow: 0 1.25rem 3.75rem rgba(25, 34, 54, 0.09);
  --page-width: 72rem;
  --header-height: 5.5rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--academic-ink);
  background:
    radial-gradient(circle at 88% 3%, rgba(81, 119, 187, 0.13), transparent 26rem),
    #f7f9fd;
  transition: background-color 220ms ease, color 220ms ease;
}

body.personal-mode {
  color: var(--personal-ink);
  background:
    radial-gradient(circle at 82% 8%, rgba(133, 104, 116, 0.16), transparent 28rem),
    linear-gradient(rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.18)),
    var(--personal-paper);
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 0.9rem;
  color: #fff;
  background: #111;
  border-radius: 0.4rem;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 20;
  width: min(calc(100% - 2rem), var(--page-width));
  min-height: var(--header-height);
  margin: 0 auto;
  padding: 1.2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.site-identity {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}

.identity-mark {
  width: 2.65rem;
  height: 2.65rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--academic-deep);
  border-radius: 0.75rem;
  font-size: 0.77rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.personal-mode .identity-mark {
  color: #f8f1e8;
  background: var(--personal-deep);
}

.identity-name {
  font-weight: 650;
  letter-spacing: -0.02em;
}

.site-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.segmented-control {
  display: inline-flex;
  padding: 0.22rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
}

.personal-mode .segmented-control {
  background: rgba(255, 253, 248, 0.48);
}

.segmented-control a {
  padding: 0.48rem 0.78rem;
  border-radius: 999px;
  color: var(--academic-muted);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
}

.personal-mode .segmented-control a {
  color: var(--personal-muted);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
}

.segmented-control a:hover,
.segmented-control a:focus-visible {
  color: var(--academic-ink);
}

.segmented-control a.is-active {
  color: #fff;
  background: var(--academic-deep);
  box-shadow: 0 0.25rem 0.9rem rgba(16, 27, 54, 0.16);
}

.personal-mode .segmented-control a.is-active {
  color: #fffaf3;
  background: var(--personal-deep);
}

#quarto-content {
  overflow: hidden;
}

main.content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.quarto-title-block,
#title-block-header {
  display: none;
}

.hero,
.section-shell,
.collection-intro,
.empty-gallery {
  width: min(calc(100% - 2rem), var(--page-width));
  margin-inline: auto;
}

.hero {
  position: relative;
  min-height: min(42rem, calc(100vh - var(--header-height)));
  padding: clamp(5rem, 11vw, 9rem) 0 5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.academic-hero::after {
  content: "";
  position: absolute;
  right: -5rem;
  top: 12%;
  width: min(42vw, 30rem);
  aspect-ratio: 1;
  border: 1px solid rgba(49, 94, 168, 0.17);
  border-radius: 50%;
  box-shadow:
    0 0 0 3.5rem rgba(49, 94, 168, 0.035),
    0 0 0 8rem rgba(49, 94, 168, 0.025);
  pointer-events: none;
}

.personal-hero::after {
  content: "";
  position: absolute;
  right: 2%;
  top: 12%;
  width: min(34vw, 23rem);
  aspect-ratio: 0.72;
  border: 1px solid rgba(121, 95, 104, 0.18);
  background:
    linear-gradient(145deg, transparent 48%, rgba(121, 95, 104, 0.09) 49%, transparent 51%),
    radial-gradient(circle at 68% 28%, rgba(121, 95, 104, 0.16), transparent 18%),
    rgba(255, 253, 248, 0.22);
  transform: rotate(2deg);
  pointer-events: none;
}

.hero-kicker,
.eyebrow {
  margin-bottom: 1.15rem;
  color: var(--academic-blue);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.personal-mode .hero-kicker,
.personal-mode .eyebrow {
  color: var(--personal-accent);
}

.hero h1 {
  position: relative;
  z-index: 1;
  max-width: 52rem;
  margin: 0;
  color: inherit;
  font-size: clamp(3.3rem, 8.5vw, 7.25rem);
  font-weight: 620;
  letter-spacing: -0.06em;
  line-height: 0.96;
}

.personal-hero h1 {
  max-width: 45rem;
  font-weight: 520;
  letter-spacing: -0.045em;
}

.hero h2 {
  position: relative;
  z-index: 1;
  max-width: 45rem;
  margin: 1.6rem 0 0;
  color: var(--academic-muted);
  font-size: clamp(1.35rem, 2.7vw, 2.25rem);
  font-weight: 430;
  line-height: 1.25;
}

.personal-mode .hero h2 {
  color: var(--personal-muted);
}

.hero > p {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  margin: 1.5rem 0 0;
  color: var(--academic-muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.personal-mode .hero > p {
  color: var(--personal-muted);
}

.hero-actions {
  position: relative;
  z-index: 1;
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-actions > p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.button {
  display: inline-flex;
  min-height: 2.8rem;
  padding: 0.68rem 1rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
}

.button-primary {
  color: #fff;
  background: var(--academic-deep);
}

.button-primary:hover,
.button-primary:focus-visible {
  color: #fff;
  background: var(--academic-blue);
  transform: translateY(-1px);
}

.personal-mode .button-primary {
  color: #fffaf3;
  background: var(--personal-deep);
}

.button-quiet {
  color: inherit;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.35);
}

.button-quiet:hover,
.button-quiet:focus-visible {
  border-color: rgba(49, 94, 168, 0.35);
  background: rgba(255, 255, 255, 0.72);
  transform: translateY(-1px);
}

.section-shell {
  padding: 2rem 0 clamp(6rem, 10vw, 9rem);
}

.section-heading {
  max-width: 42rem;
  margin-bottom: 2.2rem;
}

.section-heading h2,
.collection-intro h1,
.empty-gallery h1,
.empty-gallery h2 {
  margin-bottom: 0.8rem;
  color: inherit;
  letter-spacing: -0.035em;
}

.section-heading p,
.collection-intro p,
.empty-gallery p {
  color: var(--academic-muted);
  line-height: 1.75;
}

.personal-mode .section-heading p,
.personal-mode .collection-intro p,
.personal-mode .empty-gallery p {
  color: var(--personal-muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.site-card {
  min-height: 15rem;
  padding: 1.55rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: var(--academic-surface);
  box-shadow: var(--shadow);
}

.personal-mode .site-card {
  background: var(--personal-surface);
}

.site-card h3 {
  margin: 0 0 0.8rem;
  color: inherit;
  font-size: 1.3rem;
}

.site-card p {
  color: var(--academic-muted);
  line-height: 1.7;
}

.personal-mode .site-card p {
  color: var(--personal-muted);
}

.text-link {
  display: inline-block;
  margin-top: 1.2rem;
  color: var(--personal-accent);
  font-weight: 650;
  text-underline-offset: 0.25em;
}

.collection-intro {
  padding: clamp(5rem, 10vw, 8rem) 0 3rem;
}

.collection-intro h1 {
  font-size: clamp(3rem, 7vw, 5.8rem);
  font-weight: 520;
}

.empty-gallery {
  min-height: 26rem;
  margin-bottom: 6rem;
  padding: clamp(3rem, 7vw, 5rem);
  display: grid;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: var(--personal-surface);
}

.legal-page main.content > section:not(.empty-gallery),
.legal-page main.content > h2,
.legal-page main.content > p {
  width: min(calc(100% - 2rem), 52rem);
  margin-inline: auto;
}

.site-footer {
  width: min(calc(100% - 2rem), var(--page-width));
  margin: 0 auto;
  padding: 1.5rem 0 2.3rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  color: var(--academic-muted);
  font-size: 0.78rem;
}

.personal-mode .site-footer {
  color: var(--personal-muted);
}

.site-footer p {
  margin: 0;
}

.personal-only {
  display: none;
}

.personal-mode .academic-only {
  display: none;
}

.personal-mode .personal-only {
  display: block;
}

/* Personal archive ------------------------------------------------------- */

.personal-mode {
  --personal-line: rgba(65, 51, 55, 0.16);
  --personal-plum: #624b56;
  --personal-wine: #8a5c64;
  --personal-cream: #fffaf1;
  --personal-shadow: 0 1.8rem 5rem rgba(71, 53, 59, 0.1);
}

.personal-overline,
.foyer-index,
.poem-meta,
.artwork-number,
.legal-index {
  color: var(--personal-accent);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.copy-en {
  display: none;
}

.lang-en .copy-zh {
  display: none;
}

.lang-en .copy-en {
  display: inline;
}

.personal-foyer,
.fixture-notice,
.poetry-scroll,
.artwork-scroll,
.legal-summary-grid,
.legal-body,
.collection-top-navigation,
.collection-navigation {
  width: min(calc(100% - 2rem), var(--page-width));
  margin-inline: auto;
}

.personal-foyer {
  min-height: calc(100vh - var(--header-height));
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
}

.foyer-intro {
  max-width: 54rem;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.foyer-intro h1 {
  margin: 0.75rem 0 0;
  color: var(--personal-ink);
  font-size: clamp(3.8rem, 7vw, 6.4rem);
  font-weight: 520;
  letter-spacing: -0.065em;
  line-height: 1;
}

.foyer-intro > p {
  margin: 1rem 0 0;
  color: var(--personal-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.foyer-portals {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.foyer-portal {
  position: relative;
  min-height: clamp(21rem, 31vw, 29rem);
  padding: clamp(1.8rem, 4vw, 3.5rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border: 1px solid var(--personal-line);
  border-radius: 0.85rem;
  color: var(--personal-cream);
  background: var(--personal-deep);
  box-shadow: var(--personal-shadow);
  isolation: isolate;
}

.foyer-index {
  color: #d5b9c1;
}

.foyer-portal h2 {
  margin: 0.7rem 0 0.55rem;
  color: #fffaf4;
  font-size: clamp(2.8rem, 4.8vw, 4.5rem);
  font-weight: 520;
  letter-spacing: -0.055em;
  line-height: 1;
}

.foyer-portal > p {
  margin: 0;
  color: rgba(255, 248, 241, 0.74);
  font-size: 0.94rem;
  line-height: 1.65;
}

.foyer-link {
  display: inline-flex;
  margin-top: 1.15rem;
  color: #fffaf4;
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  text-underline-offset: 0.35em;
}

.foyer-footer {
  padding-top: clamp(1.1rem, 2vw, 1.6rem);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--personal-line);
  color: var(--personal-muted);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  font-size: 0.76rem;
  line-height: 1.5;
}

.foyer-footer > p {
  margin: 0;
}

.foyer-copyright-link {
  color: var(--personal-plum);
  font-weight: 700;
  text-underline-offset: 0.28em;
}

.personal-home .site-footer {
  display: none;
}

.personal-arrow-link {
  display: inline-flex;
  margin-top: 1.1rem;
  color: var(--personal-plum);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration-color: rgba(98, 75, 86, 0.35);
  text-underline-offset: 0.32em;
}

.personal-arrow-link:hover,
.personal-arrow-link:focus-visible {
  color: var(--personal-wine);
}

.personal-collection-intro {
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.personal-collection-intro > p {
  max-width: 48rem;
}

.poetry-page .personal-collection-intro {
  padding-top: clamp(1rem, 1.8vw, 1.5rem);
  padding-bottom: clamp(0.8rem, 1.4vw, 1.15rem);
}

.poetry-page .personal-collection-intro .eyebrow {
  margin-bottom: 0.55rem;
}

.poetry-page .personal-collection-intro h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(3.25rem, 5.4vw, 4.7rem);
  line-height: 1;
}

.poetry-page .personal-collection-intro > p {
  margin: 0;
  line-height: 1.58;
}

.poetry-page .collection-top-navigation {
  padding-top: clamp(0.75rem, 1.4vw, 1.1rem);
}

.poetry-page .collection-top-navigation .personal-arrow-link {
  margin-top: 0.45rem;
}

.artwork-page .collection-top-navigation {
  padding-top: clamp(0.75rem, 1.4vw, 1.1rem);
}

.artwork-page .collection-top-navigation .personal-arrow-link {
  margin-top: 0.45rem;
}

.artwork-page .personal-collection-intro {
  padding-top: clamp(1rem, 1.8vw, 1.5rem);
  padding-bottom: clamp(0.8rem, 1.4vw, 1.15rem);
}

.artwork-page .personal-collection-intro .eyebrow {
  margin-bottom: 0.55rem;
}

.artwork-page .personal-collection-intro h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(3.25rem, 5.4vw, 4.7rem);
  line-height: 1;
}

.artwork-page .personal-collection-intro > p {
  margin: 0;
  line-height: 1.58;
}

.legal-page .personal-collection-intro {
  padding-top: clamp(1rem, 1.8vw, 1.5rem);
  padding-bottom: clamp(0.8rem, 1.4vw, 1.15rem);
}

.legal-page .personal-collection-intro .eyebrow {
  margin-bottom: 0.55rem;
}

.legal-page .personal-collection-intro h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(3.25rem, 5.4vw, 4.7rem);
  line-height: 1;
}

.legal-page .personal-collection-intro > p {
  margin: 0;
  line-height: 1.58;
}

.fixture-notice {
  margin-bottom: clamp(2rem, 5vw, 4rem);
  padding: 1.2rem 1.4rem;
  border-left: 2px solid var(--personal-wine);
  color: var(--personal-muted);
  background: rgba(255, 253, 248, 0.48);
  font-size: 0.84rem;
  line-height: 1.75;
}

.fixture-notice > p {
  margin: 0;
}

.poetry-scroll {
  max-width: none;
  margin-bottom: clamp(5rem, 9vw, 8rem);
  column-count: 2;
  column-gap: clamp(3rem, 6vw, 6rem);
  column-fill: balance;
}

.poem-year-heading {
  padding: clamp(0.9rem, 1.6vw, 1.3rem) 0 0.35rem;
  column-span: all;
  border-top: 1px solid var(--personal-line);
  color: var(--personal-plum);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  font-size: clamp(0.94rem, 1.25vw, 1.08rem);
  font-weight: 780;
  letter-spacing: 0.16em;
  line-height: 1.4;
}

.poem-entry {
  width: 100%;
  padding: clamp(1.1rem, 1.8vw, 1.6rem) 0 clamp(1.5rem, 2.5vw, 2.1rem);
  display: inline-block;
  break-inside: avoid;
  page-break-inside: avoid;
  vertical-align: top;
}

.poem-pair {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(3rem, 6vw, 6rem);
  column-span: all;
  align-items: start;
}

.poem-meta {
  display: none;
  padding-top: 0.55rem;
  color: var(--personal-plum);
  font-size: clamp(0.82rem, 1.15vw, 0.94rem);
  font-weight: 780;
  letter-spacing: 0.14em;
  line-height: 1.8;
}

.poem-copy {
  width: 100%;
}

.poem-copy h2 {
  max-width: 20em;
  margin: 0 0 1.55rem;
  color: var(--personal-ink);
  font-size: clamp(1.65rem, 2.7vw, 2.35rem);
  font-weight: 520;
  letter-spacing: -0.035em;
  line-height: 1.3;
  text-wrap: balance;
}

.poem-copy > .poem-author {
  margin: -0.75rem 0 0;
  color: var(--personal-muted);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  line-height: 1.5;
}

.poem-copy > p {
  margin: 0;
  color: #3d3638;
  font-size: clamp(1rem, 1.45vw, 1.16rem);
  line-height: 1.82;
}

.poem-copy > p + p {
  margin-top: 1rem;
}

.poem-copy > .poem-author + p {
  margin-top: 0.75rem;
}

.poem-dedication {
  margin: -1.25rem 0 2.2rem;
  color: var(--personal-muted);
  font-size: 0.82rem;
  font-style: italic;
  line-height: 1.75;
}

.poem-entry-en .poem-copy,
.poem-entry-en .poem-copy h2,
.poem-entry-en .poem-copy > p {
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
}

.poem-entry-en .poem-copy > p {
  line-height: 1.9;
}

.poem-end-mark {
  margin-top: 2.7rem;
  color: var(--personal-wine);
  font-size: 0.9rem;
}

.black-history-section {
  width: min(calc(100% - 2rem), var(--page-width));
  max-width: none;
  margin: clamp(1rem, 3vw, 2.5rem) auto clamp(5rem, 9vw, 8rem);
  border-top: 1px solid var(--personal-line);
  border-bottom: 1px solid var(--personal-line);
}

.black-history-section > summary {
  padding: 1.35rem 0;
  color: var(--personal-plum);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 720;
  letter-spacing: 0.08em;
  list-style-position: inside;
  transition: color 160ms ease, padding-left 160ms ease;
}

.black-history-section > summary:hover,
.black-history-section > summary:focus-visible {
  padding-left: 0.35rem;
  color: var(--personal-wine);
}

.black-history-section > summary::marker {
  color: var(--personal-wine);
}

.black-history-section[open] > summary {
  border-bottom: 1px solid var(--personal-line);
}

.black-history-note {
  margin: 2rem 0 0;
  color: var(--personal-muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.black-history-scroll {
  width: 100%;
  margin-top: 1.5rem;
  margin-bottom: 0;
  border-top: 0;
}

.artwork-scroll {
  margin-bottom: clamp(4.5rem, 8vw, 7rem);
  display: grid;
  grid-template-columns: repeat(60, minmax(0, 1fr));
  column-gap: clamp(0.7rem, 1.5vw, 1.4rem);
  row-gap: clamp(2.4rem, 4.2vw, 4.2rem);
  align-items: start;
}

.artwork-entry {
  grid-column: 1 / -1;
  min-width: 0;
}

.artwork-entry.span-full {
  grid-column: 1 / -1;
}

.artwork-entry.span-half {
  grid-column: span 30;
}

.artwork-entry.span-half.centered {
  grid-column: 16 / span 30;
}

.artwork-entry.span-third {
  grid-column: span 20;
}

.artwork-entry.span-quarter {
  grid-column: span 15;
}

.artwork-entry.span-fifth {
  grid-column: span 12;
}

.artwork-entry.section-start {
  margin-top: clamp(0.8rem, 2vw, 1.8rem);
}

.artwork-series-heading {
  grid-column: 1 / -1;
  padding-top: clamp(1rem, 2.4vw, 2rem);
  border-top: 1px solid var(--personal-line);
}

.artwork-series-heading h2 {
  margin: 0;
  color: var(--personal-ink);
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  font-weight: 560;
  letter-spacing: -0.035em;
}

.artwork-series-heading > p {
  margin: 0.8rem 0 0;
  color: var(--personal-muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.artwork-frame {
  width: 100%;
}

.artwork-frame > p {
  margin: 0;
}

.artwork-frame img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow: var(--personal-shadow);
}

.artwork-entry.span-full .artwork-frame img {
  max-height: 84vh;
  margin-inline: auto;
}

.artwork-caption {
  max-width: 38rem;
  padding-top: 0.72rem;
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1rem;
}

.artwork-caption.simple {
  display: block;
}

.artwork-number {
  padding-top: 0.2rem;
}

.artwork-caption h3 {
  margin: 0;
  color: var(--personal-ink);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.55;
}

.artwork-caption > p {
  grid-column: 2;
  margin: 0.35rem 0 0;
  color: var(--personal-muted);
  font-size: 0.8rem;
  line-height: 1.65;
}

.artwork-caption.simple > p {
  grid-column: auto;
}

.collection-top-navigation {
  padding-top: clamp(1.6rem, 3vw, 2.4rem);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.collection-top-navigation > p,
.collection-navigation > p {
  width: 100%;
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.collection-navigation {
  margin-bottom: clamp(5rem, 9vw, 8rem);
  padding-top: 1.4rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--personal-line);
}

.legal-summary-grid {
  margin-bottom: clamp(2rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--personal-line);
  border-bottom: 1px solid var(--personal-line);
}

.legal-summary-item {
  padding: clamp(1.1rem, 2vw, 1.65rem);
}

.legal-summary-item + .legal-summary-item {
  border-left: 1px solid var(--personal-line);
}

.legal-summary-item h3 {
  margin: 0.7rem 0 0.4rem;
  color: var(--personal-ink);
  font-size: 1.15rem;
  font-weight: 600;
}

.legal-summary-item > p {
  margin: 0;
  color: var(--personal-muted);
  font-size: 0.87rem;
  line-height: 1.65;
}

.legal-body {
  max-width: 52rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.legal-body h2 {
  margin: 1.75rem 0 0.55rem;
  color: var(--personal-ink);
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  font-weight: 560;
  letter-spacing: -0.035em;
}

.legal-body > h2:first-child {
  margin-top: 0;
}

.legal-body > p {
  margin: 0.45rem 0 0;
  color: var(--personal-muted);
  line-height: 1.72;
}

.legal-footnote {
  margin-top: 1.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--personal-line);
  color: var(--personal-muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.legal-page .collection-navigation {
  margin-bottom: clamp(3rem, 5vw, 4.5rem);
}
/* Academic home ---------------------------------------------------------- */

.academic-home .academic-hero {
  min-height: min(43rem, calc(100vh - var(--header-height)));
  padding: clamp(4.5rem, 8vw, 6.5rem) clamp(2rem, 6vw, 4.5rem) clamp(3.8rem, 6vw, 5.2rem);
  display: grid;
  align-items: center;
  isolation: isolate;
}

.academic-home .academic-hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 1.6rem 0;
  border: 1px solid rgba(49, 94, 168, 0.16);
  border-radius: 2rem;
  background:
    linear-gradient(90deg, rgba(4, 13, 29, 0.96) 0%, rgba(6, 18, 38, 0.9) 43%, rgba(5, 16, 34, 0.58) 66%, rgba(3, 11, 25, 0.18) 100%),
    url("../images/academic/qso.png") center / cover no-repeat;
  box-shadow: 0 2rem 6rem rgba(16, 27, 54, 0.18);
}

.academic-home .academic-hero::after {
  content: none;
}

.academic-home .hero-copy {
  width: 100%;
}

.academic-home .hero h1 {
  max-width: 72%;
  color: #f7f9ff;
  font-size: clamp(4.15rem, 9vw, 7.7rem);
  text-shadow: 0 0.08em 0.65em rgba(2, 9, 22, 0.34);
}

.academic-home .hero h2 {
  max-width: 58%;
  color: #c8d4e8;
  font-size: clamp(1.45rem, 3vw, 2.45rem);
  font-weight: 460;
  line-height: 1.2;
}

.academic-home .hero-kicker {
  color: #91baff;
}

.academic-home .hero-copy > p {
  position: relative;
  z-index: 1;
  max-width: 58%;
  margin: 1.15rem 0 0;
  color: #b9c6dc;
  font-size: 1.04rem;
  line-height: 1.65;
}

.academic-home .hero-actions,
.academic-home .hero-facts {
  width: 58%;
}

.academic-home .button-primary {
  color: #101b36;
  background: #f7f9ff;
}

.academic-home .button-primary:hover,
.academic-home .button-primary:focus-visible {
  color: #101b36;
  background: #dce8ff;
}

.academic-home .button-quiet {
  color: #f7f9ff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(7, 16, 32, 0.28);
}

.academic-home .button-quiet:hover,
.academic-home .button-quiet:focus-visible {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.14);
}

.hero-facts {
  position: relative;
  z-index: 1;
  width: min(100%, 45rem);
  margin-top: clamp(2.1rem, 4vw, 3.1rem);
  padding-top: 0.95rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-fact {
  min-width: 0;
  padding-right: 1rem;
  color: #aebdd4;
  font-size: 0.75rem;
  line-height: 1.45;
}

.hero-fact + .hero-fact {
  padding-left: 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-fact p {
  margin: 0;
}

.hero-fact strong {
  display: block;
  margin-bottom: 0.22rem;
  color: #f7f9ff;
  font-size: 0.82rem;
  font-weight: 700;
}

.academic-section {
  width: min(calc(100% - 2rem), var(--page-width));
  margin-inline: auto;
  padding: clamp(4.25rem, 7.5vw, 6.5rem) 0;
  scroll-margin-top: 2rem;
}

.section-header {
  max-width: 50rem;
  margin-bottom: clamp(2rem, 3.5vw, 3.2rem);
}

.section-index,
.research-status,
.card-number,
.publication-year {
  color: var(--academic-blue);
  font-size: 0.73rem;
  font-weight: 760;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.section-header h2,
.contact-copy h2 {
  margin: 0.65rem 0 0.9rem;
  color: inherit;
  font-size: clamp(2.35rem, 5.6vw, 4.55rem);
  font-weight: 580;
  letter-spacing: -0.052em;
  line-height: 1.04;
}

.section-header > p,
.section-side-note,
.contact-copy > p {
  color: var(--academic-muted);
  font-size: 1.04rem;
  line-height: 1.65;
}

.featured-research {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 4vw, 3.2rem);
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(13rem, 0.72fr);
  gap: clamp(2.25rem, 4.5vw, 4.5rem);
  color: #eef4ff;
  border-radius: 1.8rem;
  background:
    linear-gradient(90deg, rgba(7, 16, 32, 0.99) 0%, rgba(10, 23, 44, 0.94) 50%, rgba(10, 23, 44, 0.42) 100%),
    url("../images/academic/observatory.png") 62% center / cover no-repeat;
  box-shadow: 0 2rem 5rem rgba(16, 27, 54, 0.17);
}

.featured-research::after {
  content: none;
}

.featured-copy,
.featured-metrics {
  position: relative;
  z-index: 1;
}

.featured-copy h3 {
  max-width: 46rem;
  margin: 0.75rem 0 1rem;
  color: #fff;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 560;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.featured-copy p {
  max-width: 45rem;
  color: #becae0;
  line-height: 1.65;
}

.featured-copy a {
  display: inline-block;
  margin-top: 0.65rem;
  color: #fff;
  font-weight: 700;
  text-decoration-color: rgba(255, 255, 255, 0.38);
  text-underline-offset: 0.3em;
}

.featured-metrics {
  padding: 0.45rem 1.1rem;
  display: grid;
  align-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  background: rgba(7, 16, 32, 0.32);
  backdrop-filter: blur(3px);
}

.metric {
  padding: 0.82rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  color: #aebbd2;
  font-size: 0.78rem;
}

.metric:last-child {
  border-bottom: 0;
}

.metric p {
  margin: 0;
}

.metric strong {
  display: block;
  margin-bottom: 0.2rem;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: -0.035em;
}

.research-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.research-card {
  min-height: 16rem;
  padding: 1.55rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.65);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.research-card:hover {
  border-color: rgba(49, 94, 168, 0.27);
  box-shadow: 0 1.2rem 3rem rgba(25, 34, 54, 0.08);
  transform: translateY(-3px);
}

.research-card h3 {
  margin: 1.35rem 0 0.65rem;
  color: inherit;
  font-size: 1.35rem;
  letter-spacing: -0.025em;
}

.research-card p {
  color: var(--academic-muted);
  line-height: 1.65;
}

.research-card p:last-child {
  margin-top: 1.2rem;
  color: #46526a;
  font-size: 0.82rem;
}

.section-tinted {
  position: relative;
  overflow: hidden;
  color: #eef4ff;
  padding-inline: clamp(1.5rem, 5vw, 4rem);
  border: 1px solid rgba(133, 173, 235, 0.16);
  border-radius: 1.8rem;
  background:
    linear-gradient(90deg, rgba(7, 16, 32, 0.96), rgba(7, 16, 32, 0.82)),
    url("../images/academic/particles.png") center / cover no-repeat;
  box-shadow: 0 2rem 5rem rgba(16, 27, 54, 0.14);
}

.section-tinted .section-header,
.section-tinted .publication-list,
.section-tinted .publication-more {
  position: relative;
  z-index: 1;
}

.section-tinted .section-index,
.section-tinted .publication-year {
  color: #8fb4f4;
}

.section-tinted .section-side-note,
.section-tinted .publication-body p {
  color: #becae0;
}

.section-tinted .publication-list {
  border-top-color: rgba(255, 255, 255, 0.18);
}

.section-tinted .publication-item {
  border-bottom-color: rgba(255, 255, 255, 0.16);
}

.section-tinted .publication-body h3 {
  color: #f6f9ff;
}

.section-tinted .publication-body a,
.section-tinted .publication-more a {
  color: #a8c8ff;
}

#publications {
  padding-block: clamp(3rem, 5vw, 4.4rem);
}

#publications .section-header {
  margin-bottom: clamp(1.4rem, 2.4vw, 2rem);
}

#publications .publication-item {
  padding-block: 1.15rem;
}

#publications .publication-featured {
  padding-block: 1.35rem;
}

#publications .publication-more {
  margin-top: 0.9rem;
}

.section-header-split {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.45fr);
  align-items: end;
  gap: 3rem;
}

.section-side-note {
  margin: 0 0 0.7rem;
}

.publication-list {
  border-top: 1px solid rgba(24, 33, 54, 0.16);
}

.publication-item {
  padding: 1.5rem 0;
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: clamp(1.2rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(24, 33, 54, 0.13);
}

.publication-featured {
  padding-block: 1.8rem;
}

.publication-year {
  padding-top: 0.35rem;
}

.publication-body h3 {
  max-width: 58rem;
  margin: 0 0 0.65rem;
  color: inherit;
  font-size: clamp(1.2rem, 2.25vw, 1.65rem);
  font-weight: 610;
  letter-spacing: -0.022em;
  line-height: 1.35;
}

.publication-body p {
  margin: 0.35rem 0;
  color: var(--academic-muted);
  line-height: 1.65;
}

.publication-body a,
.publication-more a {
  margin-right: 1rem;
  color: var(--academic-blue);
  font-size: 0.84rem;
  font-weight: 700;
  text-underline-offset: 0.24em;
}

.publication-more {
  margin-top: 1.55rem;
  text-align: right;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
  gap: clamp(2.5rem, 6vw, 6rem);
}

#profile {
  padding-bottom: clamp(2.25rem, 4vw, 3.25rem);
}

.profile-statement > p {
  margin-top: 0;
  color: #44516a;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.7;
}

.profile-note {
  margin-top: 1.9rem;
  padding: 1.1rem 1.25rem;
  border-left: 3px solid var(--academic-blue);
  background: var(--academic-pale);
}

.profile-note p {
  margin: 0;
  color: #44516a;
  font-size: 0.88rem;
  line-height: 1.6;
}

.journey-list {
  border-top: 1px solid var(--line);
}

.journey-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--academic-muted);
  font-size: 0.88rem;
  line-height: 1.62;
}

.journey-item p {
  margin: 0;
}

.journey-item strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--academic-blue);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.profile-extras {
  margin-top: clamp(2.2rem, 4.5vw, 3.8rem);
  padding-top: clamp(1.7rem, 3vw, 2.4rem);
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(17rem, 0.55fr);
  gap: clamp(2.25rem, 4.5vw, 4rem);
  border-top: 1px solid var(--line);
}

.profile-extras h3 {
  margin: 0 0 1rem;
  color: var(--academic-ink);
  font-size: 1rem;
  font-weight: 720;
  letter-spacing: 0.02em;
}

.honours-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.honour-item {
  min-width: 0;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.54);
}

.honour-item p {
  margin: 0;
  color: var(--academic-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.honour-item strong {
  display: block;
  margin-bottom: 0.42rem;
  color: var(--academic-ink);
  font-size: 0.86rem;
  line-height: 1.35;
}

.cv-downloads {
  align-self: start;
}

.cv-actions,
.cv-actions > p {
  display: grid;
  gap: 0.72rem;
  margin: 0;
}

.cv-actions .button {
  width: 100%;
  justify-content: space-between;
  text-align: left;
}

.contact-section {
  padding-top: clamp(2rem, 3.5vw, 3rem);
  padding-bottom: clamp(3.25rem, 5.5vw, 4.75rem);
}

.contact-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(2rem, 4.5vw, 3.75rem);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(16rem, 0.55fr);
  gap: clamp(2.5rem, 5.5vw, 5rem);
  color: #eef4ff;
  border-radius: 1.8rem;
  background:
    linear-gradient(90deg, rgba(7, 16, 32, 0.99) 0%, rgba(7, 16, 32, 0.91) 48%, rgba(7, 16, 32, 0.56) 100%),
    url("../images/academic/quantum-waves.png") center / cover no-repeat;
}

.contact-panel > * {
  position: relative;
  z-index: 1;
}

.contact-copy h2 {
  color: #fff;
  font-size: clamp(2.25rem, 4.7vw, 3.85rem);
}

.contact-copy > p {
  color: #becae0;
}

.contact-panel .section-index {
  color: #8caee9;
}

.contact-links {
  display: grid;
  align-content: center;
}

.contact-links > p {
  margin: 0;
  display: contents;
}

.contact-link {
  padding: 0.9rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.17);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.contact-link::after {
  content: "↗";
  color: #8caee9;
}

.contact-link:first-child::after {
  content: "→";
}

.contact-link:hover,
.contact-link:focus-visible {
  color: #a9c4f4;
}

.lang-zh .academic-hero h1,
.lang-zh .section-header h2,
.lang-zh .contact-copy h2 {
  letter-spacing: -0.035em;
}

.lang-zh .academic-hero h2,
.lang-zh .featured-copy h3,
.lang-zh .publication-body h3 {
  line-height: 1.32;
}

@media (max-width: 900px) {
  .poetry-scroll {
    column-count: 1;
    column-gap: 0;
  }

  .poem-pair {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .artwork-entry.span-quarter {
    grid-column: span 30;
  }

  .artwork-entry.span-fifth {
    grid-column: span 30;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: auto;
  }

  .site-header {
    align-items: flex-start;
  }

  .identity-parenthetical,
  .identity-name {
    display: none;
  }

  .site-controls {
    align-items: flex-end;
    flex-direction: column;
    gap: 0.45rem;
  }

  .segmented-control a {
    padding: 0.44rem 0.68rem;
    font-size: 0.73rem;
  }

  .hero {
    min-height: 38rem;
    padding-top: 4rem;
  }

  .academic-hero::after,
  .personal-hero::after {
    opacity: 0.55;
    right: -7rem;
  }

  .hero h1 {
    font-size: clamp(3.1rem, 16vw, 5.2rem);
  }

  .academic-home .academic-hero {
    min-height: 40rem;
    padding: 4.1rem 1rem 3.25rem;
  }

  .academic-home .academic-hero::before {
    inset: 1.2rem -1rem;
    opacity: 1;
    background:
      linear-gradient(90deg, rgba(4, 13, 29, 0.97), rgba(6, 18, 38, 0.88) 68%, rgba(3, 11, 25, 0.42)),
      url("../images/academic/qso.png") 68% center / cover no-repeat;
  }

  .academic-home .academic-hero::after {
    right: -7rem;
  }

  .academic-home .hero h1 {
    font-size: clamp(3.4rem, 17vw, 5.35rem);
  }

  .academic-home .hero h2 {
    font-size: clamp(1.3rem, 6vw, 1.75rem);
  }

  .academic-home .hero-copy > p {
    max-width: 100%;
    font-size: 0.96rem;
  }

  .academic-home .hero-copy {
    width: 100%;
  }

  .academic-home .hero h1,
  .academic-home .hero h2,
  .academic-home .hero-actions,
  .academic-home .hero-facts {
    width: 100%;
    max-width: 100%;
  }

  .academic-section {
    padding-block: 3.6rem;
  }

  .hero-facts {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-fact,
  .hero-fact + .hero-fact {
    padding: 0.68rem 0;
    border-left: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .hero-fact:last-child {
    border-bottom: 0;
  }

  .featured-research,
  .section-header-split,
  .profile-layout,
  .profile-extras,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .featured-research,
  .contact-panel {
    gap: 1.9rem;
  }

  .honours-list {
    grid-template-columns: 1fr;
  }

  .featured-research,
  .section-tinted,
  .contact-panel {
    border-radius: 1.25rem;
  }

  .featured-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric {
    padding: 0 0.7rem;
    border-right: 1px solid rgba(255, 255, 255, 0.16);
    border-bottom: 0;
  }

  .metric:first-child {
    padding-left: 0;
  }

  .metric:last-child {
    padding-right: 0;
    border-right: 0;
  }

  .metric strong {
    font-size: 1.15rem;
  }

  .research-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .research-card {
    min-height: auto;
  }

  .section-side-note {
    margin-top: -1.25rem;
  }

  .publication-item {
    padding-block: 1.3rem;
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .publication-featured {
    padding-block: 1.55rem;
  }

  .publication-year {
    padding-top: 0;
  }

  .publication-more {
    text-align: left;
  }

  .personal-foyer {
    min-height: auto;
    padding: 2.6rem 0 1.4rem;
  }

  .foyer-intro {
    margin-bottom: 1.8rem;
  }

  .foyer-intro h1 {
    font-size: clamp(3.25rem, 15vw, 4.7rem);
  }

  .foyer-portals {
    grid-template-columns: 1fr;
  }

  .foyer-portal {
    min-height: 20rem;
    padding: 1.7rem;
  }

  .foyer-portal h2 {
    font-size: clamp(2.6rem, 12vw, 3.8rem);
  }

  .foyer-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .poem-entry {
    padding: 1.35rem 0 1.8rem;
  }

  .poem-copy {
    width: 100%;
  }

  .poem-copy h2 {
    margin-bottom: 1.35rem;
  }

  .poem-copy > p {
    font-size: 1rem;
    line-height: 1.82;
  }

  .artwork-scroll {
    grid-template-columns: 1fr;
    gap: 3.25rem;
  }

  .artwork-entry,
  .artwork-entry.span-full,
  .artwork-entry.span-half,
  .artwork-entry.span-half.centered,
  .artwork-entry.span-third,
  .artwork-entry.span-quarter,
  .artwork-entry.span-fifth {
    grid-column: 1;
    width: 100%;
  }

  .artwork-frame img {
    max-height: 74vh;
    margin-inline: auto;
  }

  .artwork-caption {
    margin-left: 0;
    grid-template-columns: 4rem 1fr;
  }

  .legal-summary-grid {
    grid-template-columns: 1fr;
  }

  .legal-summary-item + .legal-summary-item {
    border-top: 1px solid var(--personal-line);
    border-left: 0;
  }

  .collection-navigation {
    align-items: flex-start;
    flex-direction: column;
  }

  .collection-top-navigation > p,
  .collection-navigation > p {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .site-card {
    min-height: 11rem;
  }

  .site-footer {
    flex-direction: column;
  }
}

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

/* Shared research approach below the two scientific themes. */
.academic-home .research-approach {
  margin-top: 1.5rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--line);
  max-width: 65rem;
}
.academic-home .research-approach p {
  color: var(--academic-muted);
  line-height: 1.65;
}
