/*
 * Tianlong Wang — Academic homepage
 * Unified typography, centered layout, restrained research graphics.
 * Adapted for this repository; retain the repository's MIT LICENSE.
 */

/* ==========================================================
   1. Design tokens
   ========================================================== */

:root {
  --font: "Inter", Arial, sans-serif;

  --paper: #ffffff;
  --canvas: #f7faf8;
  --surface: #f1f6f3;

  --ink: #203039;
  --muted: #53636c;
  --subtle: #62736d;

  --blue: #295575;
  --teal: #276b60;
  --clay: #9b6146;

  --teal-soft: #edf5f0;
  --line: #dce4df;
  --line-strong: #c5d1ca;

  --container: 1240px;
  --header-height: 72px;
  --radius: 12px;
}

/* ==========================================================
   2. Base
   ========================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

svg text {
  font-family: var(--font);
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font);
  font-weight: 600;
  color: var(--ink);
}

h1,
h2 {
  text-wrap: balance;
}

h1 {
  line-height: 1.08;
  letter-spacing: -0.05em;
}

h2 {
  font-size: clamp(1.8rem, 2.8vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

h3 {
  font-size: 1.15rem;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

h4 {
  font-size: 1rem;
  line-height: 1.55;
}

strong {
  font-weight: 600;
}

sup {
  font-size: 0.75em;
  line-height: 0;
  vertical-align: super;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover {
  color: var(--teal);
}

button,
summary {
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

[tabindex="-1"]:focus {
  outline: none;
}

/* Apply hidden-state rules only to this page's own controls/content. */
#menu-toggle[hidden],
#print-page[hidden],
#portrait[hidden],
#publication-controls[hidden],
#publication-status[hidden],
#publication-empty[hidden],
#publication-list > .publication[hidden] {
  display: none !important;
}

.container {
  width: min(var(--container), calc(100% - 64px));
  margin-inline: auto;
}

#tw-home {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.hero-copy,
.section-content,
.paper-body,
.funding-main {
  min-width: 0;
}

.small {
  font-size: 0.83rem;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  color: var(--subtle);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  color: #ffffff;
  background: var(--blue);
  border-radius: 6px;
  transform: translateY(-180%);
}

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

/* ==========================================================
   3. Navigation
   ========================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  background: var(--blue);
  color: #ffffff;
  border-radius: 4px;
  font-size: 0.76rem;
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--blue);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 150ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="location"] {
  color: var(--blue);
}

.site-nav a:hover::after,
.site-nav a[aria-current="location"]::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  font-size: 0.82rem;
}

.menu-toggle span {
  font-size: 1.15rem;
  line-height: 1;
}

/* ==========================================================
   4. Hero
   ========================================================== */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 4vw, 56px);
  padding-block: 54px 58px;
}

.identity {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-block: 22px;
}

.identity > div {
  min-width: 0;
}

.portrait {
  display: block;
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  object-fit: cover;
  object-position: center 25%;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
}

.identity h1 {
  font-size: clamp(2.4rem, 4vw, 3.35rem);
}

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

.hero-statement {
  max-width: 28ch;
  margin-bottom: 20px;
  font-size: clamp(1.5rem, 2.25vw, 1.95rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.035em;
}

.hero-statement > span {
  display: block;
  margin-top: 3px;
  color: var(--teal);
}

.hero-intro {
  max-width: 59ch;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.75;
}

.hero-intro strong {
  color: var(--ink);
}

.hero-training {
  max-width: 66ch;
  margin-top: 13px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.hero-training a {
  text-decoration-color: var(--line-strong);
}

.opportunity {
  margin-top: 22px;
  padding: 15px 18px;
  background: var(--teal-soft);
  border-left: 3px solid var(--teal);
  border-radius: 0 6px 6px 0;
}

.opportunity-label {
  display: flex;
  align-items: center;
  gap: 9px;
}

.status-dot {
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

.opportunity h2 {
  color: var(--teal);
  font-size: 0.83rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.opportunity p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 0.83rem;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
}

.button-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}

.button-primary:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

.button-secondary {
  border-color: var(--line-strong);
  background: #ffffff;
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--teal);
}

.profile-links,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-top: 15px;
}

.profile-links a,
.contact-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  color: var(--muted);
  font-size: 0.79rem;
  text-decoration: none;
}

.profile-links a:hover,
.contact-links a:hover {
  color: var(--blue);
  text-decoration: underline;
}

/* ==========================================================
   5. Research figure
   ========================================================== */

.research-figure {
  min-width: 0;
  padding: 24px;
  background: #fafcfb;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 35px rgb(32 48 57 / 3%);
}

.figure-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.figure-number {
  color: var(--subtle);
  font-size: 0.76rem;
}

.catchment-svg {
  display: block;
  width: 100%;
  height: auto;
  margin-inline: auto;
}

.figure-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px 17px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.figure-legend li {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.legend-number {
  display: inline-grid;
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: #ffffff;
  font-size: 0.64rem;
}

.legend-blue {
  color: var(--blue);
}

.legend-teal {
  color: var(--teal);
}

.legend-clay {
  color: var(--clay);
}

.model-flow {
  margin-top: 21px;
  padding-block: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.flow-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  max-width: 380px;
  margin-inline: auto;
  text-align: center;
}

.flow-node span,
.flow-node strong {
  display: block;
}

.flow-node span {
  color: var(--muted);
  font-size: 0.73rem;
}

.flow-node strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 0.79rem;
}

.flow-symbol,
.flow-down {
  color: var(--teal);
  font-size: 1rem;
  line-height: 1.3;
}

.flow-down {
  margin-block: 7px;
  text-align: center;
}

.research-figure figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.6;
}

/* ==========================================================
   6. Research questions
   ========================================================== */

.research-band {
  padding-block: 52px 56px;
  background: var(--canvas);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
  align-items: end;
  gap: 48px;
  margin-bottom: 30px;
}

.section-topline h2 {
  margin-top: 11px;
}

.section-intro {
  max-width: 49ch;
  justify-self: end;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.75;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.research-topic {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 27px;
}

.research-topic + .research-topic {
  border-left: 1px solid var(--line);
}

.topic-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.topic-letter {
  color: var(--topic-color);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1;
}

.topic-blue {
  --topic-color: var(--blue);
}

.topic-teal {
  --topic-color: var(--teal);
}

.topic-clay {
  --topic-color: var(--clay);
}

.research-topic h3 {
  margin-bottom: 14px;
  font-size: 1.12rem;
}

.research-topic > p:not(.topic-method) {
  color: var(--muted);
  font-size: 0.89rem;
  line-height: 1.75;
}

.research-topic .topic-method {
  margin-block: 20px;
  color: var(--topic-color);
  font-size: 0.73rem;
  line-height: 1.7;
}

.research-topic > .text-link {
  margin-top: auto;
  font-size: 0.8rem;
}

/* ==========================================================
   7. Shared section layout
   ========================================================== */

.section-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  padding-block: 64px;
}

.section-layout + .section-layout {
  border-top: 1px solid var(--line);
}

.section-heading {
  position: sticky;
  top: calc(var(--header-height) + 28px);
  align-self: start;
  min-width: 0;
}

.section-heading h2 {
  margin-top: 13px;
}

.section-heading > p:not(.eyebrow) {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.75;
}

.section-heading > p.small {
  font-size: 0.8rem;
}

.section-heading > .text-link,
.section-heading > .text-button {
  margin-top: 22px;
}

/* ==========================================================
   8. Publications
   ========================================================== */

.publication-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px auto;
  align-items: end;
  gap: 12px;
  padding: 0 0 17px;
  margin: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.publication-controls label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 500;
}

.publication-controls input,
.publication-controls select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #ffffff;
  font-size: 0.83rem;
}

.publication-controls input::placeholder {
  color: #697971;
  opacity: 1;
}

.reset-button {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #ffffff;
  font-size: 0.8rem;
}

.reset-button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.results-status {
  margin-top: 13px;
  color: var(--subtle);
  font-size: 0.73rem;
}

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

.publication {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 20px;
  padding-block: 25px;
}

.publication + .publication {
  border-top: 1px solid var(--line);
}

.paper-year {
  padding-top: 3px;
  color: var(--subtle);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.paper-body h3 {
  font-size: 1.04rem;
  font-weight: 600;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.paper-body h3 a {
  color: var(--ink);
  text-decoration: none;
}

.paper-body h3 a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.paper-authors {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.75;
}

.paper-authors strong {
  color: var(--ink);
}

.paper-venue {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.7;
}

.journal-name {
  color: var(--teal);
}

.paper-type {
  margin-bottom: 7px;
  color: var(--subtle);
  font-size: 0.69rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.paper-links,
.software-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 20px;
}

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

.paper-links a,
.software-links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  font-size: 0.76rem;
  text-decoration: none;
}

.paper-links a:hover,
.software-links a:hover {
  text-decoration: underline;
}

.empty-state {
  padding-block: 30px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ==========================================================
   9. Software
   ========================================================== */

.software-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.software-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.software-category {
  margin-bottom: 24px;
  color: var(--subtle);
  font-size: 0.71rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.software-card h3 {
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}

.software-card > p:not(.software-category) {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.75;
}

.software-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-block: 22px;
}

.software-tags span {
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 0.68rem;
  line-height: 1.6;
}

.software-links {
  width: 100%;
  padding-top: 14px;
  margin-top: auto;
  border-top: 1px solid var(--line);
}

/* ==========================================================
   10. Education
   ========================================================== */

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

.timeline-item {
  position: relative;
  padding: 0 0 33px 30px;
  border-left: 1px solid var(--line-strong);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  position: absolute;
  top: 7px;
  left: -5px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--teal);
  border-radius: 50%;
  background: #ffffff;
  content: "";
}

.record-date {
  color: var(--subtle);
  font-size: 0.78rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}

.timeline-item h3 {
  margin-top: 9px;
  font-size: 1.2rem;
}

.timeline-role {
  margin-top: 9px;
  font-size: 0.94rem;
}

.timeline-item .muted {
  margin-top: 8px;
  font-size: 0.87rem;
}

.timeline-item a {
  text-decoration-color: var(--line-strong);
}

/* ==========================================================
   11. Funding
   ========================================================== */

.subsection-title {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.subsection-spaced {
  margin-top: 32px;
}

.funding-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px 20px;
  padding-block: 24px;
}

.funding-item + .funding-item {
  border-top: 1px solid var(--line);
}

.funding-main h4 {
  margin-top: 8px;
}

.funding-main > .muted {
  margin-top: 5px;
  font-size: 0.84rem;
}

.title-qualifier {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 400;
}

.role-label {
  display: inline-block;
  padding: 4px 9px;
  margin-top: 3px;
  border: 1px solid #d4e5da;
  border-radius: 4px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 0.69rem;
  line-height: 1.55;
}

.role-neutral {
  border-color: var(--line);
  background: var(--canvas);
  color: var(--muted);
}

.funding-details {
  grid-column: 1 / -1;
}

.funding-details > summary {
  width: fit-content;
  padding-block: 5px;
  color: var(--blue);
  font-size: 0.79rem;
}

.funding-details > summary::marker {
  color: var(--subtle);
}

.details-body {
  padding: 14px 16px;
  margin-top: 8px;
  border-left: 2px solid var(--line-strong);
  background: var(--canvas);
  color: var(--muted);
  font-size: 0.82rem;
}

.details-body p + p {
  margin-top: 10px;
}

/* ==========================================================
   12. Academic record
   ========================================================== */

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 500;
}

.text-button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

.archive > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 66px;
  padding-block: 18px;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.5;
  list-style: none;
}

.archive > summary::-webkit-details-marker {
  display: none;
}

.archive-symbol {
  flex: 0 0 18px;
  color: var(--teal);
  font-size: 1.15rem;
  text-align: center;
}

.archive-symbol::before {
  content: "+";
}

.archive[open] > summary .archive-symbol::before {
  content: "−";
}

.archive-body {
  padding-bottom: 22px;
}

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

.record-list li {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 20px;
  padding-block: 12px;
  font-size: 0.85rem;
}

.record-list p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.patent-list {
  padding-left: 22px;
  margin: 0;
}

.patent-list li {
  padding: 10px 0 16px 6px;
}

.patent-list li::marker {
  color: var(--subtle);
  font-size: 0.8rem;
}

.patent-list h3 {
  margin-bottom: 7px;
  font-size: 0.94rem;
}

.patent-list p {
  color: var(--muted);
  font-size: 0.81rem;
}

.patent-list .patent-meta {
  margin-top: 4px;
  color: var(--subtle);
  font-size: 0.76rem;
}

.beyond-research {
  padding: 23px;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--canvas);
}

.beyond-research h3 {
  margin-top: 10px;
}

.beyond-research > p:last-child {
  margin-top: 11px;
  color: var(--muted);
  font-size: 0.87rem;
}

.beyond-research cite {
  font-style: normal;
}

/* ==========================================================
   13. Contact and footer
   ========================================================== */

.contact-section {
  padding-block: 54px;
  background: var(--canvas);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: start;
  gap: 80px;
}

.contact-section h2 {
  margin-top: 12px;
}

.contact-description {
  max-width: 59ch;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-label {
  margin-bottom: 7px;
  color: var(--subtle);
  font-size: 0.75rem;
}

.contact-email {
  display: inline-block;
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.contact-email:hover {
  text-decoration: underline;
}

.contact-affiliation {
  margin-top: 17px;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer {
  background: #ffffff;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 23px;
  color: var(--subtle);
  font-size: 0.72rem;
}

.footer-inner > a {
  flex-shrink: 0;
  text-decoration: none;
}

.footer-separator {
  margin-inline: 7px;
}

/* ==========================================================
   14. Responsive layout
   ========================================================== */

@media (max-width: 1100px) {
  .site-nav {
    gap: 16px;
  }

  .section-layout {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 32px;
  }

  .identity {
    gap: 14px;
  }

  .identity h1 {
    font-size: 2.55rem;
  }

  .portrait {
    flex-basis: 68px;
    width: 68px;
    height: 68px;
  }

  .research-topic,
  .software-card {
    padding: 23px;
  }
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    column-gap: 18px;
    row-gap: 0;
    padding-block: 13px;
  }

  /* Without JS, all navigation links remain visible. */
  .site-nav {
    flex-basis: 100%;
    flex-wrap: wrap;
    gap: 0 20px;
    padding-top: 8px;
  }

  .has-js .header-inner {
    flex-wrap: nowrap;
  }

  .has-js .menu-toggle {
    display: inline-flex;
  }

  .has-js .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 0 0 8px 8px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgb(32 48 57 / 6%);
  }

  .has-js .site-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 20px;
  }

  .site-nav a {
    min-height: 44px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-block: 42px 46px;
  }

  .hero-copy {
    max-width: 690px;
  }

  .identity h1 {
    font-size: clamp(2.5rem, 6vw, 3.2rem);
  }

  .hero-statement {
    max-width: 31ch;
  }

  .research-figure {
    width: 100%;
    max-width: 630px;
    justify-self: center;
  }

  .section-topline {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .section-intro {
    justify-self: start;
    max-width: 65ch;
  }

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

  .research-topic {
    padding: 25px;
  }

  .research-topic + .research-topic {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .research-topic .topic-method {
    margin-block: 15px;
  }

  .section-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-block: 46px;
  }

  .section-heading {
    position: static;
    max-width: 650px;
  }

  .section-heading > p:not(.eyebrow) {
    margin-top: 13px;
  }

  .section-heading > .text-link,
  .section-heading > .text-button {
    margin-top: 14px;
  }

  .contact-inner {
    gap: 36px;
  }
}

@media (max-width: 600px) {
  .container {
    width: calc(100% - 36px);
  }

  .header-inner {
    min-height: 66px;
    padding-block: 10px;
  }

  .brand {
    gap: 9px;
    font-size: 0.84rem;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 0.71rem;
  }

  .menu-toggle {
    padding-inline: 10px;
    font-size: 0.77rem;
  }

  .hero {
    padding-block: 32px 38px;
  }

  .hero > .hero-copy > .eyebrow {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }

  .identity {
    gap: 12px;
    margin-block: 20px;
  }

  .portrait {
    flex-basis: 58px;
    width: 58px;
    height: 58px;
  }

  .identity h1 {
    font-size: clamp(1.95rem, 7.5vw, 2.7rem);
  }

  .identity-note {
    margin-top: 7px;
    font-size: 0.7rem;
  }

  .hero-statement {
    font-size: 1.55rem;
  }

  .hero-intro {
    font-size: 0.9rem;
  }

  .hero-training {
    font-size: 0.79rem;
  }

  .opportunity {
    padding: 14px;
  }

  .opportunity h2,
  .opportunity p {
    font-size: 0.78rem;
  }

  .profile-links {
    gap: 4px 16px;
  }

  .research-figure {
    padding: 18px 15px;
    border-radius: 12px;
    box-shadow: none;
  }

  .figure-legend {
    justify-content: flex-start;
    gap: 9px 13px;
  }

  .figure-legend li {
    font-size: 0.67rem;
  }

  .flow-row {
    grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr);
    gap: 5px;
  }

  .flow-node span {
    font-size: 0.69rem;
  }

  .flow-node strong {
    font-size: 0.75rem;
  }

  .research-band {
    padding-block: 37px;
  }

  .research-topic {
    padding: 23px;
  }

  .section-layout {
    padding-block: 38px;
  }

  .publication-controls {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 11px;
  }

  .search-field {
    grid-column: 1 / -1;
  }

  .publication-controls input,
  .publication-controls select {
    font-size: 16px;
  }

  .publication {
    grid-template-columns: 1fr;
    gap: 7px;
    padding-block: 22px;
  }

  .paper-year {
    padding-top: 0;
    font-size: 0.73rem;
  }

  .paper-body h3 {
    font-size: 1rem;
  }

  .paper-authors,
  .paper-venue {
    font-size: 0.8rem;
  }

  .paper-links a,
  .software-links a {
    min-height: 36px;
  }

  .software-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .software-card {
    padding: 23px;
  }

  .timeline-item {
    padding-left: 24px;
  }

  .timeline-item h3 {
    font-size: 1.1rem;
  }

  .funding-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .role-label {
    justify-self: start;
    margin-top: 0;
  }

  .funding-details {
    grid-column: 1;
  }

  .archive > summary {
    min-height: 62px;
    font-size: 0.91rem;
  }

  .record-list li {
    grid-template-columns: 1fr;
    gap: 5px;
    padding-block: 13px;
  }

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

  .beyond-research {
    padding: 20px;
  }

  .contact-section {
    padding-block: 38px;
  }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .contact-email {
    font-size: 1.04rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ==========================================================
   15. Reduced motion
   ========================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-nav a::after {
    transition: none;
  }
}

/* ==========================================================
   16. Print
   ========================================================== */

@page {
  margin: 16mm;
}

@media print {
  html {
    scroll-behavior: auto;
    scroll-padding-top: 0;
  }

  body {
    background: #ffffff;
    color: #111111;
    font-size: 10pt;
    line-height: 1.5;
  }

  .container {
    width: 100%;
    max-width: none;
  }

  .site-header,
  .skip-link,
  .hero-actions,
  .profile-links,
  .research-figure,
  #publication-controls,
  #publication-status,
  #publication-empty,
  #print-page,
  .archive-symbol,
  .site-footer a {
    display: none !important;
  }

  .hero,
  .section-layout,
  .section-topline,
  .contact-inner {
    display: block;
  }

  .hero {
    padding: 0 0 20px;
  }

  .identity h1 {
    font-size: 26pt;
  }

  .hero-statement {
    max-width: none;
    font-size: 15pt;
  }

  .hero-intro,
  .hero-training {
    max-width: none;
  }

  .opportunity {
    background: #ffffff;
    border: 1px solid #cccccc;
    border-left: 3px solid #666666;
  }

  .research-band,
  .contact-section {
    padding-block: 20px;
    background: #ffffff;
  }

  .section-topline {
    margin-bottom: 15px;
  }

  .section-intro {
    max-width: none;
    margin-top: 10px;
  }

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

  .research-topic {
    padding: 12px;
  }

  .research-topic + .research-topic {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .research-topic h3 {
    font-size: 10pt;
  }

  .research-topic > p:not(.topic-method) {
    font-size: 8.5pt;
  }

  .topic-method,
  .research-topic > .text-link {
    display: none;
  }

  .section-layout {
    padding-block: 22px;
  }

  .section-heading {
    position: static;
    max-width: none;
    margin-bottom: 16px;
  }

  .section-heading h2,
  .section-topline h2,
  .contact-section h2 {
    font-size: 18pt;
  }

  .section-heading > .text-link {
    display: none;
  }

  #publication-list > .publication,
  #publication-list > .publication[hidden] {
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 14px;
    padding-block: 13px;
    break-inside: avoid;
  }

  .paper-body h3 {
    font-size: 10.5pt;
  }

  .paper-authors,
  .paper-venue {
    font-size: 9pt;
  }

  .paper-links a,
  .software-links a {
    min-height: 0;
  }

  .software-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .software-card {
    padding: 16px;
    break-inside: avoid;
  }

  .software-category {
    margin-bottom: 12px;
  }

  .software-tags {
    display: none;
  }

  .software-links {
    margin-top: 14px;
  }

  .funding-item {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-block: 14px;
  }

  .funding-details {
    grid-column: 1 / -1;
  }

  .details-body,
  .beyond-research {
    background: #ffffff;
  }

  .record-list li {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 15px;
    padding-block: 8px;
  }

  .timeline-item,
  .funding-item,
  .record-list li,
  .patent-list li {
    break-inside: avoid;
  }

  .contact-details {
    margin-top: 16px;
  }

  .contact-email {
    font-size: 11pt;
  }

  .footer-inner {
    display: block;
    padding-block: 15px;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  h2,
  h3,
  h4,
  summary {
    break-after: avoid;
  }

  p {
    orphans: 3;
    widows: 3;
  }
}
