/* Jiaxi Wang — research site
   Clinical white, graphite ink, scrub teal. Tissue rose appears only in the hero figure.
   Archivo (variable width) for text and headings; Source Serif 4 for paper and project titles. */

:root {
  color-scheme: light dark;
  --bg: #f4f6f5;
  --surface: #ffffff;
  --sunken: #e9eeec;
  --ink: #101a1f;
  --ink-2: #34424a;
  --muted: #55636a;
  --line: #d8dfdc;
  --line-strong: #b6c2be;
  --accent: #0b6b63;
  --accent-strong: #08524c;
  --accent-soft: #dcece8;
  --on-accent: #ffffff;
  --tissue: #b4505c;
  --tissue-soft: #ecc3bf;
  --fig-bg: #fbf4f2;
  --lumen: #2a1418;
  --header-bg: rgba(244, 246, 245, .86);

  --font-sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --maxw: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 64px;
  --radius: 6px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1214;
    --surface: #121a1d;
    --sunken: #162024;
    --ink: #e6ecea;
    --ink-2: #c2ccc9;
    --muted: #93a19d;
    --line: #223034;
    --line-strong: #34454a;
    --accent: #5fc4b6;
    --accent-strong: #86d6ca;
    --accent-soft: #143430;
    --on-accent: #062421;
    --tissue: #e08a92;
    --tissue-soft: #5a3035;
    --fig-bg: #191315;
    --lumen: #050304;
    --header-bg: rgba(12, 18, 20, .84);
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, iframe, svg { max-width: 100%; }
img { display: block; height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; text-wrap: balance; }

::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

/* ---------- links and buttons ---------- */

.link {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  transition: text-decoration-color .15s ease, text-decoration-thickness .15s ease;
}
.link:hover {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 14px;
  font-size: .95rem;
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { border-color: var(--ink); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.btn--primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-2);
  transition: border-color .15s ease, color .15s ease;
}
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }

.status {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: .8rem;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
  vertical-align: 2px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.nav {
  position: relative;
  max-width: var(--maxw);
  height: var(--nav-h);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
}

.nav__mark { width: 22px; height: 22px; color: var(--accent); }

.nav__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__links a {
  display: block;
  padding: 8px 12px;
  color: var(--muted);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: 8px;
  transition: color .15s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.nav__toggle svg { width: 20px; height: 20px; }
.nav__toggle .icon-close { display: none; }
.nav--open .nav__toggle .icon-open { display: none; }
.nav--open .nav__toggle .icon-close { display: block; }

/* ---------- home hero ---------- */

.hero {
  padding: clamp(36px, 6vw, 88px) 0 clamp(48px, 7vw, 96px);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}

.hero__name {
  font-size: clamp(3rem, 7.6vw, 5.9rem);
  font-weight: 600;
  font-stretch: 118%;
  letter-spacing: -.04em;
  line-height: .94;
}

.hero__role {
  margin-top: 22px;
  max-width: 30ch;
  font-size: clamp(1.25rem, 2.1vw, 1.55rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--ink);
}

.hero__bio {
  margin-top: 18px;
  max-width: 58ch;
  color: var(--ink-2);
}
.hero__bio + .hero__bio { margin-top: 12px; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
}

.hero__figure { margin: 0; }
.hero__figure svg { display: block; width: 100%; height: auto; }
.hero__figure figcaption {
  margin-top: 14px;
  max-width: 46ch;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.5;
}

/* figure drawing */

.fig-aperture { fill: url(#fig-depth); stroke: var(--line-strong); stroke-width: 1; }
.fig-ring { fill: none; stroke: var(--tissue); stroke-width: 1.1; opacity: var(--o); }
.fig-tick { fill: none; stroke: var(--line-strong); stroke-width: 1.2; }
.fig-cross { fill: none; stroke: var(--muted); stroke-width: 1; }
.fig-path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.fig-pt { fill: var(--accent); stroke: var(--fig-bg); stroke-width: 2; }
.fig-box { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: square; }
.fig-label { fill: var(--ink); font-family: var(--font-sans); font-size: 15px; font-weight: 500; }
.fig-label--muted { fill: var(--muted); font-weight: 400; }
.fig-leader { fill: none; stroke: var(--muted); stroke-width: 1; }

.js .fig-ring {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: fig-draw 1.3s var(--ease) forwards;
  animation-delay: calc(var(--i) * 55ms);
}
.js .fig-path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: fig-draw .9s var(--ease) 1s forwards;
}
.js .fig-pt,
.js .fig-box,
.js .fig-note {
  opacity: 0;
  animation: fig-in .45s var(--ease) forwards;
}
.js .fig-pt { animation-delay: calc(1.05s + var(--i) * 140ms); }
.js .fig-box { animation-delay: 1.8s; }
.js .fig-note { animation-delay: 2s; }

@keyframes fig-draw { to { stroke-dashoffset: 0; } }
@keyframes fig-in { to { opacity: 1; } }

/* ---------- page header (inner pages) ---------- */

.page-head {
  padding: clamp(40px, 6vw, 80px) 0 clamp(32px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}

.page-head__title {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 600;
  font-stretch: 115%;
  letter-spacing: -.035em;
  line-height: 1;
}

.page-head__lead {
  margin-top: 18px;
  max-width: 60ch;
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  color: var(--ink-2);
}

.page-head .hero__actions { margin-top: 24px; }

/* ---------- sections ---------- */

.section { padding: clamp(48px, 7vw, 96px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section--sunken { background: var(--sunken); }

.section__grid {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 64px);
  align-items: start;
}

.section__head {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.section__title {
  font-size: 1.35rem;
  font-stretch: 110%;
  letter-spacing: -.015em;
  line-height: 1.2;
}

.section__note {
  margin-top: 8px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
}

.section__more { margin-top: 28px; font-weight: 500; }

.prose { max-width: 68ch; color: var(--ink-2); }
.prose p + p { margin-top: 14px; }

.subhead {
  margin: 44px 0 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-strong);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-2);
}
.subhead:first-child { margin-top: 0; }

/* ---------- dated entries (news, experience, education) ---------- */

.entries { list-style: none; margin: 0; padding: 0; }

.entry {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 4px 28px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.entry:first-child { border-top: 0; padding-top: 0; }
.subhead + .entries .entry:first-child { padding-top: 16px; }

.entry__when {
  padding-top: 2px;
  color: var(--muted);
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
}

.entry__title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
}

.entry__org { margin-top: 2px; color: var(--ink-2); }

.entry__text {
  margin-top: 8px;
  max-width: 70ch;
  color: var(--muted);
  font-size: .98rem;
}

.entry__list {
  margin: 10px 0 0;
  padding-left: 1.1em;
  max-width: 70ch;
  color: var(--muted);
  font-size: .98rem;
}
.entry__list li + li { margin-top: 6px; }
.entry__list li::marker { color: var(--line-strong); }

.entry .links { margin-top: 10px; }

/* ---------- publication ---------- */

.pub {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(20px, 3.5vw, 44px);
  align-items: start;
}

.pub__venue { margin-bottom: 12px; color: var(--muted); font-size: .92rem; }

.pub__title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.3vw, 1.8rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.005em;
}
.pub__title a { text-decoration: none; }
.pub__title a:hover { color: var(--accent-strong); }

.pub__authors {
  margin-top: 12px;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.6;
}
.pub__authors .me {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.pub__abstract { margin-top: 14px; max-width: 70ch; color: var(--ink-2); font-size: .98rem; }

/* ---------- project index (home) ---------- */

.work {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(24px, 4vw, 48px);
}

.work__item {
  padding: 22px 0 26px;
  border-top: 2px solid var(--ink);
}

.work__meta { color: var(--muted); font-size: .88rem; }

.work__title {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
}
.work__title a { text-decoration: none; }
.work__title a:hover { color: var(--accent-strong); }

.work__desc { margin-top: 8px; color: var(--ink-2); font-size: .98rem; }

/* ---------- research case studies ---------- */

.study {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(20px, 3.5vw, 48px);
  align-items: start;
  padding: 36px 0;
  border-top: 1px solid var(--line);
}
.study:first-of-type { border-top: 0; padding-top: 0; }
.subhead + .study { border-top: 0; padding-top: 24px; }

.study--text { grid-template-columns: minmax(0, 1fr); }
.study--text .study__body { max-width: 74ch; }

.study__meta { color: var(--muted); font-size: .9rem; }

.study__title {
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.1vw, 1.65rem);
  font-weight: 600;
  line-height: 1.22;
}

.study__people { margin-top: 6px; color: var(--ink-2); font-size: .95rem; }

.study__desc { margin-top: 14px; color: var(--ink-2); }

.study__list {
  margin: 14px 0 0;
  padding-left: 1.1em;
  color: var(--ink-2);
}
.study__list li + li { margin-top: 8px; }
.study__list li::marker { color: var(--accent); }

.study__keys { margin-top: 16px; color: var(--muted); font-size: .9rem; }
.study__keys b { color: var(--ink-2); font-weight: 600; }

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 16px;
  margin: 20px 0 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.metrics div { display: flex; flex-direction: column-reverse; min-width: 0; }
.metrics dt { color: var(--muted); font-size: .85rem; line-height: 1.35; }
.metrics dd {
  margin: 0 0 4px;
  font-size: 1.65rem;
  font-weight: 600;
  font-stretch: 105%;
  letter-spacing: -.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.callout {
  margin-top: 18px;
  padding: 16px 18px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-2);
  font-size: .98rem;
}
.callout b { color: var(--ink); }

/* ---------- media ---------- */

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0b0f11;
}

.video__preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #0b0f11;
  cursor: pointer;
}

.video__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.video__preview:hover .video__thumb { transform: scale(1.025); }

.video__play {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: rgba(10, 14, 16, .78);
  color: #fff;
  font-family: var(--font-sans);
  font-size: .85rem;
  font-weight: 500;
  transition: background-color .15s ease;
}
.video__play svg { width: 18px; height: 18px; fill: currentColor; }
.video__preview:hover .video__play,
.video__preview:focus-visible .video__play { background: var(--accent); color: var(--on-accent); }

.video__frame { position: absolute; inset: 0; }
.video__frame iframe { display: block; width: 100%; height: 100%; border: 0; }

.doc-thumb {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.doc-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ---------- cards (certificates, evidence) ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  transition: border-color .15s ease;
}
a.card:hover { border-color: var(--ink); }
.card__source { color: var(--muted); font-size: .88rem; }
.card__title { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600; line-height: 1.25; }
.card__desc { color: var(--ink-2); font-size: .95rem; flex: 1; }
.card__cta { color: var(--accent-strong); font-weight: 500; font-size: .95rem; }

.cert {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.cert:first-child { border-top: 0; padding-top: 0; }
.cert .doc-thumb { aspect-ratio: 3 / 4; }
.cert--landscape .doc-thumb { aspect-ratio: 4 / 3; align-self: start; }

/* ---------- contact ---------- */

.contact-email {
  display: inline-block;
  margin-top: 20px;
  font-size: clamp(1.4rem, 3.4vw, 2.2rem);
  font-weight: 500;
  font-stretch: 105%;
  letter-spacing: -.02em;
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  word-break: break-all;
}
.contact-email:hover { text-decoration-color: var(--accent); }

.copy-status { min-height: 1.6em; margin-top: 10px; color: var(--muted); font-size: .92rem; }

.pdf-frame {
  display: block;
  width: 100%;
  height: clamp(560px, 80vh, 1000px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

/* ---------- CV page ---------- */

.skills { margin: 0; }
.skills div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 4px 28px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.skills div:first-child { border-top: 0; padding-top: 0; }
.skills dt { color: var(--muted); font-size: .9rem; padding-top: 2px; }
.skills dd { margin: 0; color: var(--ink-2); }

/* ---------- footer ---------- */

.site-footer {
  margin-top: 0;
  padding: 56px 0 36px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer__name { font-size: 1.25rem; font-weight: 600; font-stretch: 112%; letter-spacing: -.01em; }
.footer__text { margin-top: 6px; color: var(--muted); font-size: .92rem; max-width: 34ch; }

.footer__heading { color: var(--muted); font-size: .88rem; font-weight: 500; }

.footer__list { list-style: none; margin: 10px 0 0; padding: 0; }
.footer__list li + li { margin-top: 6px; }
.footer__list a { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.footer__list a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .85rem;
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__figure { max-width: 460px; }
  .section__grid { grid-template-columns: 1fr; gap: 20px; }
  .section__head { position: static; }
  .pub,
  .study { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav__toggle { display: inline-flex; }

  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px var(--gutter) 14px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav--open .nav__links { display: flex; }
  .nav__links a {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }
  .nav__links li:last-child a { border-bottom: 0; }
  .site-header:has(.nav--open) { border-bottom-color: var(--line); }

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

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .entry,
  .skills div { grid-template-columns: 1fr; gap: 2px; }
  .cert { grid-template-columns: 1fr; }
  .cert .doc-thumb { max-width: 220px; }
  .footer__grid { grid-template-columns: 1fr; }
  .metrics dd { font-size: 1.4rem; }
  .hero__actions { gap: 8px; }
}

@media (max-width: 420px) {
  .hero__actions .btn { padding: 10px 14px; }
  .hero__actions .btn svg { display: none; }
}

/* ---------- motion and print ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .fig-ring,
  .js .fig-path { animation: none; stroke-dasharray: none; stroke-dashoffset: 0; }
  .js .fig-pt,
  .js .fig-box,
  .js .fig-note { animation: none; opacity: 1; }
  .video__thumb { transition: none; }
}

@media print {
  .site-header,
  .skip-link,
  .hero__actions,
  .site-footer,
  .video { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section { padding: 18px 0; }
  .section__head { position: static; }
  a { color: #000; }
}

/* ---------- Durham University affiliation ---------- */

.affil {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  text-decoration: none;
}

.affil__logo {
  height: 52px;
  width: auto;
}

.affil__text {
  padding-left: 16px;
  border-left: 1px solid var(--line-strong);
  color: var(--ink-2);
  font-size: .95rem;
  line-height: 1.3;
}
.affil:hover .affil__text { color: var(--ink); }

.footer__logo {
  display: inline-block;
  margin-top: 18px;
}
.footer__logo img { height: 40px; width: auto; }

@media (prefers-color-scheme: dark) {
  .affil__logo,
  .footer__logo img {
    box-sizing: content-box;
    padding: 8px 12px;
    background: #fff;
    border-radius: var(--radius);
  }
}

/* ---------- switch to the immersive version ---------- */

.version-switch {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 18px 10px 14px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(16, 26, 31, .18);
  transition: transform .2s ease;
}
.version-switch:hover { transform: translateY(-2px); }
.version-switch__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: conic-gradient(#1F3DFF, #00C6DE, #14E0A0, #FFC21A, #FF7A12, #FF5545, #FF2E8B, #1F3DFF);
}
@media print { .version-switch { display: none; } }

/* ---------- language switch (English / 中文), grouped with the version switch ---------- */

.site-switches {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-switches .version-switch { position: static; }
.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: .85rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(16, 26, 31, .18);
  transition: transform .2s ease;
}
.lang-switch:hover { transform: translateY(-2px); }
.lang-switch:lang(zh) { font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", var(--font-sans); }
/* keep the last footer line clear of the fixed switches when scrolled to the bottom */
.site-footer { padding-bottom: 92px; }
@media print { .site-switches { display: none; } }
