:root {
  --page-bg: #fbfaf7;
  --page-surface: #fffefa;
  --page-surface-soft: #f1eee7;
  --page-ink: #181817;
  --page-ink-soft: #5a564f;
  --page-line: rgb(24 24 23 / .15);
  --page-line-strong: rgb(24 24 23 / .32);
  --page-accent: #76533d;
  --page-accent-soft: #d9cbbb;
  --page-gold: #9a7a50;
  --page-dark: #0a1d29;
  --header-height: 5.2rem;
  --section-space: clamp(5.5rem, 10vw, 10rem);
  color-scheme: light;
}

html[data-theme="dark"] {
  --paper: #071a28;
  --ink: #f4f7f7;
  --ink-soft: #c1d0d6;
  --surface: #0b2535;
  --surface-raised: rgb(14 43 59 / .94);
  --line: rgb(222 238 242 / .16);
  --line-strong: rgb(222 238 242 / .34);
  --focus: #8bd9e9;
  --page-bg: #071a28;
  --page-surface: #0c2738;
  --page-surface-soft: #102f40;
  --page-ink: #f2f7f8;
  --page-ink-soft: #bdcdd5;
  --page-line: rgb(222 238 242 / .16);
  --page-line-strong: rgb(222 238 242 / .34);
  --page-accent: #75cee3;
  --page-accent-soft: #1e5268;
  --page-gold: #d4c39f;
  --page-dark: #04131e;
  color-scheme: dark;
}

html[data-contrast="true"] {
  --page-bg: #fff;
  --page-surface: #fff;
  --page-surface-soft: #fff;
  --page-ink: #000;
  --page-ink-soft: #000;
  --page-line: #000;
  --page-line-strong: #000;
  --page-accent: #000;
  --focus: #000;
}

html[data-theme="dark"][data-contrast="true"] {
  --page-bg: #000;
  --page-surface: #000;
  --page-surface-soft: #000;
  --page-ink: #fff;
  --page-ink-soft: #fff;
  --page-line: #fff;
  --page-line-strong: #fff;
  --page-accent: #fff;
  --focus: #fff;
}

html[data-text-scale="90"] { font-size: 90%; }
html[data-text-scale="100"] { font-size: 100%; }
html[data-text-scale="110"] { font-size: 110%; }
html[data-text-scale="120"] { font-size: 120%; }
html[data-text-scale="130"] { font-size: 130%; }
html[data-grayscale="true"] { filter: grayscale(1); }
html[data-spacing="true"] body { letter-spacing: .055em; }
html[data-spacing="true"] :where(p, li, dd) { line-height: 1.95 !important; }
html[data-links="true"] a { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: .2em; }
html[data-readable="true"] body,
html[data-readable="true"] :where(h1, h2, h3, h4, p, a, button, input, select, dt, dd, li, span) { font-family: Arial, Helvetica, sans-serif !important; letter-spacing: normal; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 1rem); }
body { background: var(--page-bg); color: var(--page-ink); }
a { color: var(--page-accent); }
::selection { background: var(--page-accent-soft); color: var(--page-ink); }

/* The frozen light-key closing frame keeps its own contrast in every site theme. */
.final-scene {
  --ink: #0b2035;
  --ink-soft: #29465f;
  --blue: #176f91;
  --paper: #faf9f6;
}

.site-header {
  position: fixed;
  z-index: 80;
  inset: 0 0 auto;
  border-bottom: 1px solid var(--page-line);
  background: color-mix(in srgb, var(--page-bg) 92%, transparent);
  color: var(--page-ink);
  backdrop-filter: blur(18px) saturate(115%);
}

.intro-running .site-header { opacity: 0; visibility: hidden; pointer-events: none; }
.site-header__inner { display: grid; grid-template-columns: minmax(13rem, 1fr) auto; align-items: center; width: min(100% - 3rem, 92rem); min-height: var(--header-height); margin-inline: auto; gap: 2rem; }
.site-brand { display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 44px; color: var(--page-ink); font: 500 1.08rem/.98 "Cormorant Garamond", Georgia, serif; text-decoration: none; }
.site-brand span:last-child { color: var(--page-ink-soft); }
.site-navigation { display: flex; align-items: center; gap: clamp(.75rem, 2.3vw, 2rem); }
.site-navigation a { position: relative; display: inline-flex; align-items: center; min-height: 44px; color: var(--page-ink); font-size: .68rem; font-weight: 500; letter-spacing: .11em; text-decoration: none; text-transform: uppercase; }
.site-navigation a::after { position: absolute; right: 0; bottom: .32rem; left: 0; height: 1px; background: var(--page-accent); content: ""; transform: scaleX(0); transform-origin: right; transition: transform .2s ease; }
.site-navigation a:hover::after,
.site-navigation a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.menu-toggle { display: none; align-items: center; justify-content: center; min-width: 44px; color: var(--page-ink); border-color: var(--page-line); background: var(--page-surface); }

.subpage-main { padding-top: var(--header-height); }
.section-shell { width: min(100% - 3rem, 86rem); margin-inline: auto; }
.page-section { padding-block: var(--section-space); }
.subpage-main :where(h1, h2, h3, p, a, dt, dd, li, span) { overflow-wrap: anywhere; }
.subpage-main :where(.section-shell, [class$="__grid"], [class$="-grid"], [class$="__copy"], .prose-column, article) { min-width: 0; }

.section-kicker { display: flex; align-items: center; gap: .8rem; margin: 0 0 1.5rem; color: var(--page-accent); font-size: .68rem; font-weight: 600; letter-spacing: .18em; line-height: 1.4; text-transform: uppercase; }
.section-kicker::before { width: 2.7rem; height: 1px; background: var(--page-accent); content: ""; }
.display-title { max-width: 17ch; margin: 0; color: var(--page-ink); font: 500 clamp(3.25rem, 7vw, 7.7rem)/.88 "Cormorant Garamond", Georgia, serif; letter-spacing: -.052em; text-wrap: balance; }
.display-title--compact { font-size: clamp(2.9rem, 5.8vw, 6.25rem); }
.lead { color: var(--page-ink-soft); font-size: clamp(1.05rem, 1.55vw, 1.34rem); line-height: 1.72; }
.text-link { display: inline-flex; align-items: center; gap: .65rem; min-height: 44px; margin-top: 1rem; color: var(--page-ink); font-weight: 600; }
.button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 1rem; padding: .85rem 1.25rem; border: 1px solid var(--page-ink); border-radius: 0; color: var(--page-ink); font-size: .78rem; font-weight: 600; text-decoration: none; }
.button-link:hover { background: var(--page-ink); color: var(--page-bg); }

.home-overview { position: relative; overflow: hidden; background: var(--page-bg); }
.home-overview::before { position: absolute; inset: 8% -10% auto 43%; height: 16rem; background: linear-gradient(93deg, transparent, color-mix(in srgb, var(--page-accent-soft) 48%, transparent) 20% 78%, transparent); clip-path: polygon(0 41%, 8% 30%, 32% 36%, 51% 14%, 68% 31%, 100% 17%, 96% 69%, 71% 58%, 53% 81%, 29% 62%, 4% 75%); content: ""; opacity: .55; }
.home-overview__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(24rem, .92fr); align-items: center; gap: clamp(3rem, 8vw, 8rem); }
.home-overview__copy > p:not(.section-kicker) { max-width: 47rem; line-height: 1.78; }
.home-overview__copy > p:not(.lead):not(.section-kicker) { color: var(--page-ink-soft); }

.portrait-brush { position: relative; display: grid; min-height: 42rem; margin: 0; place-items: center; isolation: isolate; }
.portrait-brush::before { position: absolute; z-index: -2; width: 112%; height: 78%; border-radius: 42% 58% 47% 53% / 58% 39% 61% 42%; background: linear-gradient(96deg, transparent 1%, color-mix(in srgb, var(--page-accent-soft) 68%, var(--page-surface)) 10% 90%, transparent 99%); content: ""; filter: blur(.3px); transform: rotate(-4deg); }
.portrait-brush::after { position: absolute; z-index: 1; right: 1%; bottom: 19%; width: 48%; height: 2px; background: linear-gradient(90deg, transparent, var(--page-accent), transparent); content: ""; transform: rotate(-4deg); }
.portrait-brush__photo { display: block; width: min(31rem, 86%); height: auto; clip-path: polygon(8% 3%, 28% 0, 47% 4%, 66% 1%, 93% 8%, 100% 29%, 96% 51%, 100% 76%, 88% 96%, 62% 100%, 38% 96%, 16% 100%, 3% 84%, 6% 61%, 0 40%, 4% 19%); box-shadow: 0 28px 70px rgb(49 37 28 / .14); -webkit-mask: url("./../images/portrait-brush-mask.0d73459108bc3394.svg") center / 100% 100% no-repeat; mask: url("./../images/portrait-brush-mask.0d73459108bc3394.svg") center / 100% 100% no-repeat; }
.portrait-brush__mark { position: absolute; z-index: -1; inset: 12% 0 18% 12%; border: 1px solid var(--page-line-strong); clip-path: polygon(0 23%, 94% 0, 100% 74%, 11% 100%); }
.portrait-brush figcaption { position: absolute; right: 4%; bottom: 2.5rem; max-width: 22rem; padding: .75rem 0 0 2.4rem; border-top: 1px solid var(--page-line); color: var(--page-ink-soft); font-size: .68rem; line-height: 1.6; text-align: right; }
.portrait-brush--large { min-height: 46rem; }
.portrait-brush--large .portrait-brush__photo { width: min(35rem, 94%); }

.identity-strip { border-block: 1px solid var(--page-line); background: var(--page-surface); }
.identity-strip__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.identity-strip article { display: flex; flex-direction: column; gap: .65rem; min-height: 10rem; padding: 2rem; border-right: 1px solid var(--page-line); }
.identity-strip article:last-child { border-right: 0; }
.identity-strip strong { color: var(--page-ink); font: 500 clamp(1.9rem, 3vw, 3.1rem)/1 "Cormorant Garamond", Georgia, serif; }
.identity-strip span { color: var(--page-ink-soft); font-size: .76rem; line-height: 1.6; }

.portal-section { background: var(--page-surface-soft); }
.section-heading { max-width: 61rem; margin-bottom: clamp(2.8rem, 6vw, 5.5rem); }
.section-heading .lead { max-width: 43rem; }
.section-heading--split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(17rem, .7fr); align-items: end; max-width: none; gap: 3rem; }
.portal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.portal-card { position: relative; display: grid; grid-template-rows: 13.5rem auto; min-height: 0; overflow: hidden; border: 1px solid var(--page-line); background: var(--page-surface); color: var(--page-ink); text-decoration: none; transition: transform .25s ease, border-color .25s ease; }
.portal-card:hover { border-color: var(--page-line-strong); transform: translateY(-5px); }
.portal-card__media { position: relative; display: block; overflow: hidden; background: var(--page-surface-soft); }
.portal-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
.portal-card:hover .portal-card__media img { transform: scale(1.025); }
.portal-card--professor .portal-card__media img { object-fit: contain; object-position: center; }
.portal-card--professor:hover .portal-card__media img { transform: none; }
.portal-card--device .portal-card__media img { object-fit: contain; padding: 1rem; }
.portal-card--works .portal-card__media { background: linear-gradient(140deg, var(--page-surface), var(--page-accent-soft)); }
.portal-card--works .portal-card__media::before { position: absolute; inset: 18% 9%; background: repeating-linear-gradient(to bottom, transparent 0 1.8rem, var(--page-line) 1.8rem calc(1.8rem + 1px)); content: ""; transform: rotate(-2deg); }
.portal-card--works .portal-card__media::after { position: absolute; right: 8%; bottom: -23%; color: color-mix(in srgb, var(--page-ink) 9%, transparent); content: "03"; font: 500 13rem/1 "Cormorant Garamond", Georgia, serif; }
.portal-card__body { position: relative; display: flex; flex-direction: column; min-height: 15rem; padding: 1.6rem; }
.portal-card__number { color: var(--page-ink-soft); font-size: .68rem; }
.portal-card__eyebrow { margin-top: auto; color: var(--page-accent); font-size: .67rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.portal-card strong { margin: .5rem 0 .8rem; font: 500 clamp(2.35rem, 3.5vw, 3.75rem)/.94 "Cormorant Garamond", Georgia, serif; letter-spacing: -.035em; }
.portal-card__description { color: var(--page-ink-soft); font-size: .8rem; line-height: 1.65; }
.portal-card__arrow { position: absolute; right: 1.5rem; top: 1.35rem; font-size: 1.1rem; }

.invention-teaser { background: var(--page-bg); }
.invention-teaser__grid { display: grid; grid-template-columns: minmax(18rem, .72fr) minmax(0, 1.28fr); align-items: center; gap: clamp(3rem, 8vw, 8rem); }
.device-teaser { margin: 0; padding: 2rem; border: 1px solid var(--page-line); background: var(--page-surface); }
.device-teaser img { display: block; width: 100%; height: auto; }
.device-teaser figcaption,
.bridge-section figcaption,
.device-gallery figcaption,
.software-strip figcaption,
.device-hero__visual figcaption { padding-top: .8rem; border-top: 1px solid var(--page-line); color: var(--page-ink-soft); font-size: .66rem; line-height: 1.55; }

.subpage-hero { padding-block: clamp(6rem, 12vw, 11rem); background: var(--page-bg); }
.professor-hero { position: relative; overflow: hidden; }
.professor-hero::before { position: absolute; inset: 8% 0 auto 38%; height: 21rem; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--page-accent-soft) 55%, transparent), transparent); clip-path: polygon(0 43%, 19% 14%, 40% 29%, 61% 6%, 100% 21%, 92% 68%, 68% 59%, 42% 93%, 20% 72%, 3% 86%); content: ""; }
.professor-hero__grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(24rem, .88fr); align-items: center; gap: clamp(3rem, 8vw, 8rem); }
.subpage-hero__copy .lead { max-width: 44rem; }
.identity-list { display: grid; margin: 2.5rem 0 0; border-top: 1px solid var(--page-line); }
.identity-list div { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; padding: .95rem 0; border-bottom: 1px solid var(--page-line); }
.identity-list dt { color: var(--page-ink-soft); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.identity-list dd { margin: 0; font-size: .8rem; line-height: 1.55; }

.biography-section { background: var(--page-surface); }
.biography-grid,
.clinical-question__grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(22rem, 1fr); gap: clamp(3rem, 9vw, 10rem); }
.prose-column p { margin: 0 0 1.45rem; color: var(--page-ink-soft); font-size: clamp(1rem, 1.25vw, 1.15rem); line-height: 1.88; }

.career-section { background: var(--page-bg); }
.career-timeline { position: relative; display: grid; margin: 0; padding: 0; list-style: none; }
.career-timeline::before { position: absolute; top: 0; bottom: 0; left: 8rem; width: 1px; background: var(--page-line); content: ""; }
.career-timeline li { position: relative; display: grid; grid-template-columns: 8rem 1fr; min-height: 10rem; }
.career-timeline li::before { position: absolute; top: 1.3rem; left: calc(8rem - .34rem); width: .7rem; height: .7rem; border: 2px solid var(--page-bg); border-radius: 50%; background: var(--page-accent); box-shadow: 0 0 0 1px var(--page-accent); content: ""; }
.career-timeline time { padding: 1rem 2rem 0 0; color: var(--page-accent); font: 500 1.45rem/1 "Cormorant Garamond", Georgia, serif; text-align: right; }
.career-timeline li > div { padding: .7rem 0 3rem 3rem; }
.career-timeline h3 { margin: 0 0 .5rem; font: 500 clamp(1.65rem, 2.6vw, 2.55rem)/1 "Cormorant Garamond", Georgia, serif; }
.career-timeline p { max-width: 52rem; margin: 0; color: var(--page-ink-soft); line-height: 1.72; }

.research-map { background: var(--page-surface-soft); color: var(--page-ink); }
.research-map .display-title { color: var(--page-ink); }
.research-map__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; border: 1px solid var(--page-line); background: var(--page-line); }
.research-map__grid article { min-height: 18rem; padding: clamp(1.6rem, 4vw, 3rem); background: var(--page-surface); }
.research-map__grid span { color: var(--page-accent); font-size: .7rem; letter-spacing: .16em; }
.research-map__grid h3 { margin: 4rem 0 .8rem; font: 500 clamp(1.95rem, 3vw, 3.05rem)/1 "Cormorant Garamond", Georgia, serif; }
.research-map__grid p { max-width: 35rem; color: var(--page-ink-soft); line-height: 1.72; }

.bridge-section { background: var(--page-bg); }
.bridge-section__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(18rem, .82fr); align-items: center; gap: clamp(3rem, 8vw, 8rem); }
.bridge-section figure { margin: 0; }
.bridge-section img { display: block; width: 100%; height: auto; clip-path: polygon(2% 4%, 94% 0, 100% 11%, 97% 93%, 86% 100%, 4% 96%, 0 81%, 3% 18%); }

.sources-section { background: var(--page-surface); }
.sources-section__grid { display: grid; grid-template-columns: minmax(14rem, .55fr) minmax(20rem, 1.2fr); gap: clamp(2.5rem, 8vw, 8rem); }
.sources-section h2 { margin: 0; font: 500 clamp(2.45rem, 4vw, 4.6rem)/.95 "Cormorant Garamond", Georgia, serif; }
.sources-section ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--page-line); }
.sources-section li { border-bottom: 1px solid var(--page-line); }
.sources-section a { display: flex; align-items: center; min-height: 4.2rem; color: var(--page-ink); font-size: .8rem; line-height: 1.55; }

.strabiscan-page { background: var(--page-bg); }
.device-hero { min-height: calc(100svh - var(--header-height)); background: var(--page-bg); color: var(--page-ink); }
.device-hero__grid { display: grid; grid-template-columns: minmax(18rem, .75fr) minmax(0, 1.25fr); align-items: center; min-height: calc(100svh - var(--header-height) - 10rem); gap: clamp(2rem, 6vw, 6rem); }
.device-title { margin: 0; color: var(--page-ink); font: 500 clamp(5rem, 12vw, 12rem)/.74 "Cormorant Garamond", Georgia, serif; letter-spacing: -.075em; }
.subpage-main .device-title { overflow-wrap: normal; word-break: normal; }
.subpage-main .device-title span { display: inline-block; white-space: nowrap; overflow-wrap: normal; }
.device-hero .lead,
.device-hero .subpage-hero__copy > p:not(.section-kicker) { color: var(--page-ink-soft); line-height: 1.78; }
.device-hero__visual { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 38rem; margin: 0; isolation: isolate; }
.device-hero__halo { position: absolute; z-index: -1; inset: 5% 4% 13%; border: 1px solid var(--page-line); border-radius: 50%; box-shadow: 0 0 8rem color-mix(in srgb, var(--page-accent-soft) 55%, transparent); }
.device-hero__visual img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; filter: drop-shadow(0 30px 42px rgb(49 37 28 / .18)); }

.clinical-question { background: var(--page-surface); }
.mechanism-section { background: var(--page-surface-soft); }
.mechanism-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 clamp(4rem, 9vw, 8rem); padding: 0; list-style: none; border-block: 1px solid var(--page-line); }
.mechanism-grid li { min-height: 17rem; padding: 2rem; border-right: 1px solid var(--page-line); }
.mechanism-grid li:last-child { border-right: 0; }
.mechanism-grid span { color: var(--page-accent); font-size: .68rem; letter-spacing: .15em; }
.mechanism-grid h3 { margin: 4rem 0 .7rem; font: 500 clamp(1.85rem, 3vw, 2.85rem)/1 "Cormorant Garamond", Georgia, serif; }
.mechanism-grid p { color: var(--page-ink-soft); line-height: 1.68; }
.device-detail-grid { display: grid; grid-template-columns: minmax(16rem, .75fr) minmax(20rem, 1fr); align-items: center; gap: clamp(3rem, 10vw, 10rem); }
.device-detail-grid figure { min-height: 38rem; margin: 0; }
.device-detail-grid img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 28px 38px rgb(49 37 28 / .16)); }
.device-detail-grid h3 { margin: 0 0 1.5rem; font: 500 clamp(2.45rem, 4.6vw, 5rem)/.95 "Cormorant Garamond", Georgia, serif; }
.device-detail-grid p { color: var(--page-ink-soft); line-height: 1.82; }

.device-proof { background: var(--page-surface); color: var(--page-ink); }
.device-proof .display-title { color: var(--page-ink); }
.device-gallery { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 1rem; }
.device-gallery figure,
.software-strip figure { display: grid; grid-template-rows: minmax(0, 1fr) auto; margin: 0; overflow: hidden; border: 1px solid var(--page-line); background: var(--page-surface); }
.device-gallery img { width: 100%; height: 27rem; object-fit: cover; }
.device-gallery figcaption,
.software-strip figcaption { padding: .85rem 1rem; border-color: var(--page-line); color: var(--page-ink-soft); }
.software-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.software-strip img { display: block; width: 100%; height: auto; }

.invention-history { background: var(--page-bg); }
.career-timeline--device::before { background: var(--page-line-strong); }
.evidence-publication { background: var(--page-surface-soft); }
.evidence-publication__grid { display: grid; grid-template-columns: minmax(17rem, .7fr) minmax(22rem, 1fr); gap: clamp(3rem, 8vw, 8rem); }
.publication-proof { padding: clamp(1.6rem, 4vw, 3rem); border: 1px solid var(--page-line); background: var(--page-surface); }
.publication-proof__journal { color: var(--page-accent); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.publication-proof h3 { margin: 2rem 0 1rem; font: 500 clamp(1.95rem, 3vw, 3rem)/1.05 "Cormorant Garamond", Georgia, serif; }
.publication-proof > p:not(.publication-proof__journal) { color: var(--page-ink-soft); line-height: 1.72; }
.publication-proof dl { border-top: 1px solid var(--page-line); }
.publication-proof dl div { display: grid; grid-template-columns: 8rem 1fr; padding: .8rem 0; border-bottom: 1px solid var(--page-line); }
.publication-proof dt { color: var(--page-ink-soft); font-size: .68rem; text-transform: uppercase; }
.publication-proof dd { margin: 0; overflow-wrap: anywhere; font-size: .8rem; }

.empty-works { display: grid; min-height: calc(100svh - var(--header-height)); place-items: center; padding-block: clamp(5rem, 12vw, 10rem); background: linear-gradient(145deg, var(--page-bg), var(--page-surface-soft)); }
.empty-works__inner { max-width: 70rem; }
.empty-works .display-title { max-width: 15ch; }
.empty-works .lead,
.empty-works p:not(.section-kicker) { max-width: 50rem; }

.legal-page { background: var(--page-bg); }
.legal-article { max-width: 64rem; padding-block: clamp(5rem, 10vw, 9rem); }
.legal-article .lead { max-width: 49rem; }
.legal-article h2 { margin: 3.5rem 0 1rem; font: 500 clamp(1.95rem, 3vw, 3rem)/1 "Cormorant Garamond", Georgia, serif; }
.legal-article p,
.legal-article li { color: var(--page-ink-soft); line-height: 1.82; }
.legal-article li + li { margin-top: .45rem; }

.site-footer { position: relative; min-height: clamp(54rem, 72vw, 72rem); overflow: hidden; border-top: 1px solid var(--page-line); background: #f7f6f2; color: #161817; isolation: isolate; }
.footer-art { position: absolute; z-index: -3; inset: 0; }
.footer-art img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.footer-wash { position: absolute; z-index: -2; inset: 0; background: linear-gradient(180deg, rgb(255 255 255 / .02) 0 48%, rgb(250 249 246 / .76) 68%, rgb(250 249 246 / .98) 88%); }
.footer-content { display: grid; grid-template-columns: minmax(16rem, .72fr) minmax(24rem, 1.28fr); align-content: end; width: min(100% - 3rem, 86rem); min-height: inherit; margin-inline: auto; padding: clamp(20rem, 39vw, 37rem) 0 3rem; gap: 2.2rem 5rem; }
.footer-heading { align-self: start; }
.footer-signature { margin: 0; font: 500 clamp(1.3rem, 2.2vw, 2rem)/1.05 "Cormorant Garamond", Georgia, serif; }
.footer-signature strong { font-weight: 500; }
.footer-motto { margin: 1rem 0 0; color: #625e56; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.footer-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem; }
.footer-navigation nav { display: flex; flex-direction: column; align-items: flex-start; }
.footer-navigation nav > p,
.footer-label { margin: 0 0 1rem; color: #76533d; font-size: .62rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.footer-navigation a { display: inline-flex; min-height: 2.5rem; align-items: center; color: #161817; font-size: .78rem; text-decoration: none; }
.footer-navigation a:hover,
.footer-engineering a:hover { text-decoration: underline; text-underline-offset: .25em; }
.footer-disclaimer { grid-column: 1 / -1; padding-block: 1.5rem; border-block: 1px solid rgb(22 24 23 / .15); }
.footer-disclaimer p { max-width: 67rem; margin: 0; color: #625e56; font-size: .72rem; line-height: 1.72; }
.footer-engineering { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(15rem, .72fr) minmax(24rem, 1.28fr); gap: 5rem; }
.footer-engineering p { margin: 0 0 .6rem; color: #625e56; font-size: .72rem; line-height: 1.7; }
.footer-engineering strong { color: #161817; }
.footer-engineering a { color: #76533d; }
.footer-strong-link { display: inline-flex; color: #161817 !important; font-weight: 700; text-decoration: none; }

.accessibility-trigger { position: fixed; z-index: 72; left: 1.25rem; bottom: 1.25rem; display: grid; width: 3rem; min-width: 3rem; height: 3rem; padding: 0; place-items: center; border: 1px solid var(--page-line-strong); border-radius: 50%; background: var(--page-surface); color: var(--page-ink); box-shadow: 0 14px 34px rgb(24 24 23 / .12); }
.accessibility-trigger svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.45; }
.accessibility-panel { width: min(25rem, calc(100% - 1.5rem)); max-height: calc(100svh - 1.5rem); padding: 1rem; overflow: auto; border: 1px solid #181817; border-radius: 0; background: #fbfaf7; color: #181817; box-shadow: 0 28px 80px rgb(0 0 0 / .24); }
.accessibility-panel::backdrop { background: rgb(5 16 22 / .64); backdrop-filter: blur(7px); }
.accessibility-panel__header { display: flex; align-items: center; justify-content: space-between; padding-bottom: .9rem; border-bottom: 1px solid rgb(24 24 23 / .18); }
.accessibility-panel__header h2 { margin: 0; font: 600 1rem/1.2 Manrope, Arial, sans-serif; }
.accessibility-panel__close { display: grid; width: 2.25rem; min-width: 2.25rem; min-height: 2.25rem; padding: 0; place-items: center; border: 1px solid #76533d; border-radius: .35rem; background: transparent; color: #76533d; font-size: 1.4rem; }
.accessibility-group { padding-top: 1.1rem; }
.accessibility-group h3 { margin: 0 0 .75rem; color: #625e56; font: 600 .62rem/1.2 Manrope, Arial, sans-serif; letter-spacing: .2em; text-transform: uppercase; }
.text-size-control { display: grid; grid-template-columns: 2.8rem 1fr 2.8rem; gap: .4rem; }
.text-size-control button,
.text-size-control output,
.theme-choice button,
.accessibility-switch,
.accessibility-reset { min-height: 2.7rem; border: 1px solid rgb(24 24 23 / .2); border-radius: 0; background: transparent; color: #181817; font-size: .76rem; }
.text-size-control output { display: grid; place-items: center; background: #f0ede5; }
.theme-choice { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; margin-block: .45rem; }
.theme-choice button[aria-pressed="true"] { border-color: #181817; background: #181817; color: #fff; }
.accessibility-switch { display: flex; width: 100%; align-items: center; justify-content: space-between; margin-top: .45rem; padding-inline: .75rem; text-align: left; }
.switch-indicator { position: relative; width: 2rem; height: 1.15rem; border: 1px solid rgb(24 24 23 / .35); border-radius: 99px; background: #e5e1d8; }
.switch-indicator::after { position: absolute; top: .16rem; left: .18rem; width: .72rem; height: .72rem; border-radius: 50%; background: #625e56; content: ""; transition: transform .15s ease; }
.accessibility-switch[aria-pressed="true"] .switch-indicator { background: #181817; }
.accessibility-switch[aria-pressed="true"] .switch-indicator::after { background: #fff; transform: translateX(.82rem); }
.accessibility-reset { width: 100%; margin-top: 1rem; border-color: #181817; font-size: .66rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }

.back-to-top { position: fixed; z-index: 70; right: 1.25rem; bottom: 1.25rem; display: grid; width: 3rem; min-width: 3rem; height: 3rem; padding: 0; place-items: center; border: 1px solid var(--page-line-strong); border-radius: 50%; background: var(--page-surface); color: var(--page-ink); box-shadow: 0 15px 38px rgb(24 24 23 / .14); opacity: 0; pointer-events: none; transform: translateY(1rem); transition: opacity .2s ease, transform .2s ease; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }

[data-home-narrative].reveal-ready [data-reveal] { opacity: 0; transform: translateY(1.1rem); transition: opacity .75s ease, transform .75s cubic-bezier(.2,.8,.2,1); }
[data-home-narrative].reveal-ready [data-reveal].is-revealed { opacity: 1; transform: none; }

html[data-theme="dark"] .site-footer { background: var(--page-dark); color: #f2f7f8; }
html[data-theme="dark"] .footer-art img { opacity: .34; filter: invert(.91) sepia(.14) hue-rotate(155deg) saturate(.8); }
html[data-theme="dark"] .footer-wash { background: linear-gradient(180deg, rgb(4 19 30 / .05) 0 42%, rgb(4 19 30 / .78) 67%, rgb(4 19 30 / .99) 88%); }
html[data-theme="dark"] :where(.footer-signature, .footer-navigation a, .footer-engineering strong) { color: #f2f7f8; }
html[data-theme="dark"] :where(.footer-motto, .footer-disclaimer p, .footer-engineering p) { color: #bdcdd5; }
html[data-theme="dark"] :where(.footer-label, .footer-navigation nav > p, .footer-engineering a) { color: #75cee3; }
html[data-theme="dark"] :where(.footer-disclaimer) { border-color: rgb(242 247 248 / .16); }

@media (max-width: 1060px) {
  .home-overview__grid,
  .professor-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(20rem, .68fr); }
  .portal-grid { grid-template-columns: 1fr 1fr; }
  .portal-card:last-child { grid-column: 1 / -1; }
  .device-hero__grid { grid-template-columns: 1fr; }
  .device-title { font-size: clamp(5rem, 18vw, 10rem); }
  .device-hero__visual { min-height: 32rem; }
  .device-gallery { grid-template-columns: 1fr 1fr; }
  .device-gallery figure:first-child { grid-column: 1 / -1; }
  .site-footer { min-height: 65rem; }
  .footer-content { padding-top: 31rem; }
}

@media (max-width: 820px) {
  :root { --header-height: 4.7rem; }
  .site-header__inner { grid-template-columns: 1fr auto; width: min(100% - 2rem, 92rem); }
  .menu-toggle { display: inline-flex; }
  .menu-toggle__lines { position: relative; width: 1rem; height: 1px; background: currentColor; }
  .menu-toggle__lines::before,
  .menu-toggle__lines::after { position: absolute; right: 0; left: 0; height: 1px; background: currentColor; content: ""; }
  .menu-toggle__lines::before { top: -.3rem; }
  .menu-toggle__lines::after { top: .3rem; }
  .site-navigation { position: absolute; top: calc(100% + 1px); right: 0; left: 0; display: none; align-items: stretch; padding: 1rem 1.25rem 1.5rem; border-bottom: 1px solid var(--page-line); background: var(--page-bg); box-shadow: 0 18px 35px rgb(24 24 23 / .1); }
  .site-navigation.is-open { display: grid; }
  .site-navigation a { justify-content: center; border-bottom: 1px solid var(--page-line); }
  .home-overview__grid,
  .professor-hero__grid,
  .invention-teaser__grid,
  .biography-grid,
  .clinical-question__grid,
  .bridge-section__grid,
  .sources-section__grid,
  .device-detail-grid,
  .evidence-publication__grid,
  .section-heading--split { grid-template-columns: minmax(0, 1fr); }
  .portrait-brush { min-height: 36rem; }
  .portrait-brush--large { min-height: 40rem; }
  .identity-strip__grid { grid-template-columns: 1fr 1fr; }
  .identity-strip article:nth-child(2) { border-right: 0; }
  .identity-strip article:nth-child(-n+2) { border-bottom: 1px solid var(--page-line); }
  .portal-grid { grid-template-columns: 1fr; }
  .portal-card:last-child { grid-column: auto; }
  .portal-card { grid-template-columns: minmax(9rem, .42fr) minmax(0, .58fr); grid-template-rows: auto; }
  .portal-card__body { min-height: 18rem; }
  .research-map__grid { grid-template-columns: 1fr; }
  .device-detail-grid figure { min-height: 28rem; }
  .mechanism-grid { grid-template-columns: 1fr; }
  .mechanism-grid li { min-height: 0; border-right: 0; border-bottom: 1px solid var(--page-line); }
  .mechanism-grid h3 { margin-top: 2.2rem; }
  .software-strip { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr; gap: 2rem; padding-top: 32rem; }
  .footer-navigation { grid-template-columns: 1fr 1fr; }
  .footer-disclaimer,
  .footer-engineering { grid-column: auto; }
  .footer-engineering { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 560px) {
  .site-brand { font-size: .94rem; }
  .menu-toggle { padding: .5rem; }
  .menu-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .section-shell { width: min(100% - 2rem, 86rem); }
  .display-title { font-size: clamp(3rem, 16vw, 5rem); }
  .display-title--compact { font-size: clamp(2.7rem, 14vw, 4.4rem); }
  .portrait-brush,
  .portrait-brush--large { min-height: 31rem; }
  .portrait-brush figcaption { right: 0; bottom: 1rem; max-width: 16rem; }
  .identity-strip__grid { grid-template-columns: 1fr; }
  .identity-strip article { min-height: 0; border-right: 0; border-bottom: 1px solid var(--page-line); }
  .identity-strip article:last-child { border-bottom: 0; }
  .portal-card { grid-template-columns: 1fr; grid-template-rows: 12rem auto; }
  .portal-card__body { min-height: 14rem; }
  .device-hero__visual { min-height: 23rem; }
  .device-gallery { grid-template-columns: 1fr; }
  .device-gallery figure:first-child { grid-column: auto; }
  .device-gallery img { height: auto; }
  .career-timeline::before { left: 1rem; }
  .career-timeline li { grid-template-columns: 1fr; padding-left: 2.8rem; }
  .career-timeline li::before { left: .66rem; }
  .career-timeline time { padding: 1rem 0 .4rem; text-align: left; }
  .career-timeline li > div { padding: 0 0 2.7rem; }
  .identity-list div { grid-template-columns: 1fr; gap: .35rem; }
  .site-footer { min-height: 73rem; }
  .footer-art img { object-position: 42% top; }
  .footer-wash { background: linear-gradient(180deg, rgb(255 255 255 / .06) 0 28%, rgb(250 249 246 / .89) 42%, rgb(250 249 246 / .99) 59%); }
  .footer-content { width: min(100% - 2rem, 86rem); padding-top: 24rem; }
  .footer-navigation { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}


/* Keep footer content readable and the complete illustration visible on mobile. */
.footer-content > *,
.footer-navigation > *,
.footer-engineering > * { min-width: 0; }
.footer-content { grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); }
.footer-engineering { grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); }
.site-footer :where(p, a, strong) { overflow-wrap: anywhere; }
html[data-theme="dark"] .footer-strong-link { color: #f2f7f8 !important; }

@media (max-width: 820px) {
  .site-footer { --footer-art-height: calc(100vw * 941 / 1672); min-height: 0; }
  .footer-art { inset: 0 0 auto; height: var(--footer-art-height); }
  .footer-art img { object-fit: contain; object-position: center top; }
  .footer-wash { background: linear-gradient(180deg, transparent 0, transparent calc(var(--footer-art-height) * .8), #f7f6f2 var(--footer-art-height)); }
  .footer-content { grid-template-columns: minmax(0, 1fr); width: calc(100% - 2rem); min-height: 0; padding: calc(var(--footer-art-height) + 1.5rem) 0 calc(5.5rem + env(safe-area-inset-bottom, 0px)); gap: 2rem; }
  .footer-signature { font-size: 1.5rem; line-height: 1.2; }
  .footer-motto { font-size: .875rem; line-height: 1.6; letter-spacing: .06em; }
  .footer-navigation { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .footer-navigation nav > p,
  .footer-engineering .footer-label { font-size: .875rem; line-height: 1.6; letter-spacing: .06em; }
  .footer-navigation a { max-width: 100%; min-height: 44px; padding-block: .375rem; font-size: 1rem; line-height: 1.5; }
  .footer-disclaimer p,
  .footer-engineering p:not(.footer-label) { font-size: 1rem; line-height: 1.7; }
  .footer-engineering { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .footer-strong-link { min-height: 44px; align-items: center; }
  html[data-theme="dark"] .footer-navigation nav > p,
  html[data-theme="dark"] .footer-engineering .footer-label { color: #75cee3; }
  html[data-theme="dark"] .footer-wash { background: linear-gradient(180deg, transparent 0, transparent calc(var(--footer-art-height) * .8), var(--page-dark) var(--footer-art-height)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  [data-home-narrative].reveal-ready [data-reveal] { opacity: 1; transform: none; }
}
