@font-face {
  font-family: "Geist Pixel";
  /* ASCII subset with the ELSH axis pinned at 0 (~11 KB); the 3.6 MB
     variable TTF stays in the repo as the regeneration source only.
     Regenerate with tools/subset_geist_pixel.py. */
  src: url("assets/fonts/geist-pixel/GeistPixel-Regular-subset.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@view-transition {
  navigation: auto;
}

:root {
  color-scheme: light;
  --font-display: "Raleway", Arial, Helvetica, sans-serif;
  --font-body: "Outfit", Arial, Helvetica, sans-serif;
  --font-pixel: "Geist Pixel", "Courier New", monospace;
  --paper: #ffffff;
  --canvas: #f3f4f6;
  --ink: #484848;
  --nav-gray: #666666;
  --rule: #e3e3e3;
  --dither-25: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Cpath fill='%2325343f' d='M0 0h1v1H0zM2 0h1v1H2zM0 2h1v1H0zM2 2h1v1H2z'/%3E%3C/svg%3E");
  --dither-50: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Cpath fill='%2325343f' d='M0 0h1v1H0zM2 0h1v1H2zM1 1h1v1H1zM3 1h1v1H3zM0 2h1v1H0zM2 2h1v1H2zM1 3h1v1H1zM3 3h1v1H3z'/%3E%3C/svg%3E");
  --dither-75: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Cpath fill='%2325343f' d='M0 0h1v1H0zM1 0h1v1H1zM2 0h1v1H2zM3 0h1v1H3zM1 1h1v1H1zM3 1h1v1H3zM0 2h1v1H0zM1 2h1v1H1zM2 2h1v1H2zM3 2h1v1H3zM1 3h1v1H1zM3 3h1v1H3z'/%3E%3C/svg%3E");
  --prometheus-crop-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='18' shape-rendering='crispEdges'%3E%3Cpath fill='white' d='M0 0h4v14H0zM0 14h3v1H0zM0 15h1v1H0zM2 15h1v1H2zM1 16h1v1H1z'/%3E%3C/svg%3E");
  --harvard-crimson: #a51c30;
  --header-height: 90px;
  --pixel-field-height: min(30svh, 19rem);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  overscroll-behavior-y: none;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
}

a {
  color: inherit;
}

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10001;
  padding: 0.65rem 0.9rem;
  color: var(--paper);
  background: var(--ink);
  font-family: var(--font-display);
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10000;
  height: var(--header-height);
  color: var(--ink);
  background: var(--paper);
  border-bottom: 1px solid rgba(144, 144, 144, 0.25);
  box-shadow: 0 0.0375em 0.125em rgba(0, 0, 0, 0.05);
  font-family: var(--font-display);
  text-transform: uppercase;
  view-transition-name: site-header;
}

::view-transition-group(site-header) {
  animation-duration: 0.01ms;
}

::view-transition-old(site-header),
::view-transition-new(site-header) {
  animation: none;
  mix-blend-mode: normal;
}

.header-inner {
  position: relative;
  display: grid;
  align-items: center;
  grid-template-columns: max-content minmax(17.5rem, 1fr) max-content;
  gap: clamp(1rem, 1.5vw, 1.375rem);
  width: 100%;
  height: 100%;
  padding: 0 1.5625rem;
}

.site-identity {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.48rem;
  margin: 0;
  white-space: nowrap;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: 0.015em;
}

.site-identity a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

.site-identity a,
.nav-menu a {
  text-decoration: none;
}

.harvard-link {
  font-weight: 700;
}

.site-identity .harvard-link:hover,
.site-identity .harvard-link:focus-visible {
  color: var(--harvard-crimson);
}

.identity-divider {
  color: #9a9a9a;
  font-weight: 400;
}

.jlos-wordmark {
  font-family: var(--font-pixel);
  font-size: 0.98em;
  font-weight: 400;
  font-variation-settings: "ELSH" 0;
  letter-spacing: 0.04em;
}

.nav-disclosure {
  display: none;
}

.primary-nav,
.nav-disclosure {
  position: relative;
  z-index: 2;
}

.nav-disclosure > summary {
  display: none;
}

.nav-menu ul {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-menu a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--nav-gray);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color 160ms ease;
}

.nav-menu a::after {
  position: absolute;
  right: 0;
  bottom: 0.45rem;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 160ms ease, transform 160ms ease;
}

.nav-menu a:hover,
.nav-menu a:focus-visible,
.nav-menu a[aria-current="page"],
.site-identity a:hover,
.site-identity a:focus-visible {
  color: var(--ink);
}

.nav-menu a:hover::after,
.nav-menu a:focus-visible::after,
.nav-menu a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.page-shell {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100svh;
  margin: 0;
  padding: calc(var(--header-height) + clamp(4.5rem, 11vh, 8rem)) clamp(1.5rem, 7vw, 7rem) 6rem;
  overflow: hidden;
  background: var(--paper);
}

.page-intro {
  position: relative;
  z-index: 2;
  max-width: 43rem;
  margin-left: auto;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--nav-gray);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5.25rem);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.035em;
}

.shell-copy {
  max-width: 35rem;
  margin: 1.75rem 0 0;
  color: var(--nav-gray);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
}

.content-page .page-shell {
  padding: calc(var(--header-height) + clamp(3.5rem, 8vh, 6rem)) clamp(1.5rem, 5vw, 4.5rem) calc(4rem + var(--pixel-field-height));
  overflow: visible;
}

.content-layout {
  position: relative;
  z-index: 2;
  width: min(100%, 62.5rem);
  margin-inline: auto;
}

.content-page .page-intro {
  max-width: 43rem;
  margin-left: 0;
}

.content-sections {
  display: grid;
  gap: clamp(2.75rem, 5vw, 4.25rem);
  width: min(100%, 44rem);
  margin-top: clamp(3.5rem, 7vw, 6rem);
}

.content-section {
  position: relative;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.content-section::before {
  position: absolute;
  top: -0.25rem;
  left: 0;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--ink);
  box-shadow: 0.75rem 0 0 #b6b6b6;
  content: "";
}

.content-kicker {
  margin: 0 0 0.7rem;
  color: var(--nav-gray);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.content-section h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
}

.content-section > p:last-child {
  margin: 1rem 0 0;
  color: var(--nav-gray);
  font-size: clamp(0.98rem, 1.2vw, 1.075rem);
  line-height: 1.72;
}

.research-page .research-intro {
  max-width: 44rem;
}

.research-page .research-intro .eyebrow {
  margin-bottom: 0.65rem;
}

.research-page .research-intro h1 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.025em;
}

.research-page .research-intro .shell-copy {
  margin-top: 1rem;
}

.research-register {
  gap: 0;
  width: 100%;
  margin-top: clamp(2.75rem, 5vw, 4.5rem);
  border-bottom: 1px solid var(--rule);
}

.research-entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(11rem, 0.65fr) minmax(0, 2fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: clamp(2rem, 3.5vw, 2.75rem) 0;
  border-top: 1px solid var(--rule);
}

.research-entry::before {
  position: absolute;
  top: -0.25rem;
  left: 0;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--ink);
  box-shadow: 0.75rem 0 0 #b6b6b6;
  content: "";
}

.research-entry--featured {
  border-top-color: var(--ink);
}

.research-entry-meta {
  display: grid;
  align-content: start;
  gap: 0.65rem;
  min-width: 0;
}

.research-entry-type {
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  letter-spacing: 0.055em;
  line-height: 1.35;
  text-transform: uppercase;
}

.research-entry-source {
  margin: 0;
  color: var(--nav-gray);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.55;
  text-transform: uppercase;
}

.research-entry-body {
  min-width: 0;
  max-width: 42rem;
}

.research-entry-body h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.5vw, 2.25rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.027em;
}

.research-entry-summary {
  max-width: 39rem;
  margin: 1rem 0 0;
  color: var(--nav-gray);
  font-size: clamp(0.98rem, 1.15vw, 1.065rem);
  line-height: 1.65;
}

.paper-feature {
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.paper-link-copy {
  display: grid;
  gap: 0.45rem;
  padding: 1.25rem 0 1.5rem;
  border-bottom: 1px solid var(--ink);
}

.paper-link {
  display: inline;
  padding: 0.15rem 0;
  color: var(--ink);
  text-decoration: none;
}

.paper-link-source {
  color: var(--nav-gray);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.paper-link-copy h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3vw, 2.65rem);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.03em;
}

.paper-link-subtitle {
  max-width: 38rem;
  color: var(--nav-gray);
  line-height: 1.55;
}

.paper-link-arrow {
  display: inline-block;
  color: inherit;
  font-family: var(--font-pixel);
  font-size: 1.05rem;
  line-height: 1;
  vertical-align: 0.08em;
}

.paper-link:hover,
.paper-link:focus-visible {
  color: var(--harvard-crimson);
}

.project-list {
  display: grid;
  margin-top: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.project-item {
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid var(--rule);
}

.project-title-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.project-title-row h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.project-external-link {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.25rem;
  min-width: 44px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.project-external-icon {
  display: block;
  width: 22px;
  height: 22px;
  background: currentColor;
}

.project-external-icon--github {
  -webkit-mask: url("assets/github-icon.png") center / contain no-repeat;
  mask: url("assets/github-icon.png") center / contain no-repeat;
}

.project-external-icon--medium {
  width: 25px;
  height: 18px;
  -webkit-mask: url("assets/medium-icon.svg") center / contain no-repeat;
  mask: url("assets/medium-icon.svg") center / contain no-repeat;
}

.project-external-icon--play {
  -webkit-mask: url("assets/play-icon.svg") center / contain no-repeat;
  mask: url("assets/play-icon.svg") center / contain no-repeat;
}

.project-external-arrow {
  color: inherit;
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  line-height: 1;
}

.project-external-link:hover,
.project-external-link:focus-visible {
  color: var(--harvard-crimson);
}

.project-item > p {
  max-width: 38rem;
  margin: 0.45rem 0 0;
  color: var(--nav-gray);
  line-height: 1.65;
}

.certification-empty-state {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.certification-badge-placeholder {
  position: relative;
  display: block;
  width: 3rem;
  height: 3.5rem;
  background: var(--rule);
  clip-path: polygon(
    0.5rem 0,
    calc(100% - 0.5rem) 0,
    100% 0.5rem,
    100% calc(100% - 0.75rem),
    50% 100%,
    0 calc(100% - 0.75rem),
    0 0.5rem
  );
}

.certification-badge-placeholder::before {
  position: absolute;
  inset: 1px;
  background: var(--paper);
  clip-path: inherit;
  content: "";
}

.certification-badge-placeholder::after {
  position: absolute;
  top: 1rem;
  left: 0.875rem;
  width: 1rem;
  height: 1rem;
  background: var(--ink);
  box-shadow: 0.25rem 0.25rem 0 #b6b6b6;
  content: "";
}

.certification-empty-state p {
  margin: 0;
}

.certification-empty-state p:last-child {
  margin-top: 0.35rem;
  color: var(--nav-gray);
  line-height: 1.6;
}

.certification-empty-title {
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 0.76rem;
  letter-spacing: 0.055em;
  line-height: 1.4;
  text-transform: uppercase;
}

.resume-page .page-shell {
  /* The resume document runs to the bottom of the shell, so reserve a
     quiet footer band as tall as the pixel splash: the field renders on
     every page but must never sit behind the profile links. */
  padding: calc(var(--header-height) + clamp(2.5rem, 6vh, 4.5rem)) clamp(1.25rem, 5vw, 4.5rem) calc(4.5rem + var(--pixel-field-height));
  overflow: visible;
}

.resume-layout {
  position: relative;
  z-index: 2;
  width: min(100%, 72rem);
  margin-inline: auto;
}

.resume-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.resume-heading-copy {
  max-width: 42rem;
}

.resume-heading h1 {
  font-size: clamp(2.75rem, 5vw, 4.75rem);
}

.resume-intro {
  max-width: 38rem;
  margin: 1.25rem 0 0;
  color: var(--nav-gray);
  font-size: clamp(0.98rem, 1.35vw, 1.08rem);
}

.resume-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.resume-file-link,
.resume-profile-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.resume-file-link {
  gap: 0.45rem;
  padding: 0.25rem 0.9rem;
  border: 1px solid var(--rule);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.resume-file-link:hover,
.resume-file-link:focus-visible {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.resume-pdf {
  display: block;
  width: 100%;
  height: clamp(58rem, 108vw, 96rem);
  background: var(--canvas);
  border: 1px solid var(--rule);
}

.resume-pdf[hidden] {
  display: none;
}

.resume-pdf-fallback {
  margin: 0;
  padding: 2rem;
  color: var(--nav-gray);
}

.resume-pdf-fallback a {
  color: var(--ink);
  font-weight: 600;
}

.resume-pdf-unavailable {
  min-height: 16rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  place-content: center start;
  background: var(--canvas);
  border: 1px solid var(--rule);
}

.resume-pdf-unavailable:not([hidden]) {
  display: grid;
}

.resume-pdf-unavailable h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  line-height: 1;
}

.resume-pdf-unavailable > p:not(.eyebrow) {
  max-width: 39rem;
  margin: 1rem 0 1.5rem;
  color: var(--nav-gray);
}

.resume-pdf-unavailable .resume-actions {
  justify-content: flex-start;
}

.resume-profiles {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.resume-profiles ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.resume-profile-link {
  justify-content: space-between;
  gap: 0.85rem;
  width: 100%;
  min-height: 64px;
  padding: 0.65rem 0.25rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-display);
  font-weight: 600;
  transition: padding 160ms ease, border-color 160ms ease;
}

.resume-profile-link:hover,
.resume-profile-link:focus-visible {
  padding-inline: 0.75rem;
  border-color: var(--ink);
}

.resume-profile-link img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.resume-profile-link span:nth-child(2) {
  margin-right: auto;
}

.profile-link-mark {
  color: var(--nav-gray);
  font-weight: 400;
}

.home-page .page-shell {
  display: block;
  width: 100%;
  padding-top: max(calc(var(--header-height) + 3.5rem), 9.25rem);
  padding-inline: clamp(1.5rem, 5vw, 4.5rem);
  padding-bottom: calc(1rem + 1px + var(--pixel-field-height));
}

.page-shell::after {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 0;
  /* Box tracks the SVG's 1200x352 aspect so it hugs the ink and never
     reaches the page copy; the fade itself is geometric (dot size and
     Bayer dropout inside the asset), not an opacity or mask wash. */
  width: min(80vw, calc(var(--pixel-field-height) * 3.4091));
  aspect-ratio: 1200 / 352;
  background-image: url("assets/pixel-field.svg");
  background-position: left bottom;
  background-repeat: no-repeat;
  background-size: contain;
  content: "";
  pointer-events: none;
}

.home-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: end;
  gap: 4rem;
  width: min(100%, 62.5rem);
  margin-inline: auto;
}

.home-layout > * {
  min-width: 0;
}

.home-page .page-intro {
  width: auto;
  max-width: none;
  margin: 0;
}

.home-prose {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.75rem;
  color: var(--nav-gray);
  font-size: clamp(1rem, 1.2vw, 1.075rem);
  line-height: 1.72;
}

.home-prose p {
  margin: 0;
}

.home-prose .shell-copy {
  max-width: none;
  margin: 0;
  font-size: inherit;
}

.home-media {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 1.5rem;
  width: 100%;
}

.home-photo {
  margin: 0;
}

.home-photo-image {
  display: block;
  width: 100%;
  height: auto;
}

.hero-prometheus {
  position: relative;
  z-index: 1;
  width: clamp(17.5rem, 24vw, 19rem);
  height: 100%;
  margin: 0;
  overflow: hidden;
  justify-self: end;
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: var(--prometheus-crop-mask);
  mask-image: var(--prometheus-crop-mask);
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
  -webkit-mask-size: 4px 100%;
  mask-size: 4px 100%;
}

.hero-prometheus-image {
  position: absolute;
  top: -3.2rem;
  left: -20%;
  display: block;
  width: 145%;
  max-width: none;
  height: auto;
  margin: 0;
  filter: brightness(1.04);
  image-rendering: pixelated;
  mix-blend-mode: multiply;
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  -webkit-mask-size: 12px 12px;
  mask-size: 12px 12px;
}

.prometheus-arrival .hero-prometheus-image {
  animation: prometheus-enter 920ms steps(1, end) 180ms both;
}

@keyframes prometheus-enter {
  0% {
    opacity: 0;
    transform: translateX(calc(100% + 1.25rem));
    -webkit-mask-image: var(--dither-25);
    mask-image: var(--dither-25);
  }

  34% {
    opacity: 0.3;
    transform: translateX(72%);
    -webkit-mask-image: var(--dither-25);
    mask-image: var(--dither-25);
  }

  58% {
    opacity: 0.62;
    transform: translateX(42%);
    -webkit-mask-image: var(--dither-50);
    mask-image: var(--dither-50);
  }

  78% {
    opacity: 0.86;
    transform: translateX(16%);
    -webkit-mask-image: var(--dither-75);
    mask-image: var(--dither-75);
  }

  100% {
    opacity: 1;
    transform: none;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .prometheus-arrival .hero-prometheus-image,
  .hero-prometheus-image {
    opacity: 1;
    transform: none;
    -webkit-mask-image: none;
    mask-image: none;
    animation: none;
  }
}

@media (min-width: 75rem) {
  .site-header {
    overflow: hidden;
  }
}

@media (max-width: 74.99rem) {
  .header-inner {
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    gap: clamp(0.75rem, 2vw, 1.25rem);
  }

  .nav-disclosure {
    display: block;
    position: relative;
  }

  .primary-nav {
    display: none;
  }

  .nav-disclosure > summary {
    display: grid;
    min-width: 44px;
    min-height: 44px;
    padding: 0.6rem;
    place-items: center;
    color: var(--nav-gray);
    cursor: pointer;
    list-style: none;
  }

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

  .nav-disclosure > summary span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .nav-disclosure:not([open]) .mobile-nav {
    display: none;
  }

  .mobile-nav {
    position: absolute;
    top: calc(100% + 0.875rem);
    right: 0;
    width: min(18rem, calc(100vw - 2rem));
    max-block-size: calc(100dvh - var(--header-height) - 0.5rem);
    padding: 0.75rem 1rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--paper);
    border: 1px solid var(--rule);
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.12);
  }

  .mobile-nav ul {
    display: block;
  }

  .mobile-nav a {
    display: flex;
    min-height: 48px;
    border-bottom: 1px solid var(--rule);
  }

  .mobile-nav li:last-child a {
    border-bottom: 0;
  }

  .mobile-nav a::after {
    right: auto;
    bottom: 0.45rem;
    width: 2.25rem;
  }

  .hero-prometheus {
    width: min(100%, 19rem);
  }
}

@media (max-width: 56rem) {
  :root {
    --header-height: 72px;
    --pixel-field-height: min(26svh, 15rem);
  }

  .header-inner {
    padding-inline: 1.25rem;
  }

  .site-identity {
    font-size: clamp(0.9rem, 3.6vw, 1.08rem);
  }

  .page-intro {
    margin-left: 0;
  }

  .home-page .page-intro {
    width: min(100%, 34rem);
  }

  .home-page .page-shell {
    padding-top: calc(var(--header-height) + 3rem);
    padding-right: 5vw;
    padding-bottom: calc(3rem + var(--pixel-field-height));
    padding-left: 5vw;
  }

  .home-layout {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 1.5rem;
  }

  .home-media {
    width: min(100%, 34rem);
    margin-inline: auto;
  }

  .page-shell::after {
    width: min(100%, calc(var(--pixel-field-height) * 1.6522));
    aspect-ratio: 608 / 368;
    background-image: url("assets/pixel-field-compact.svg");
  }

  .hero-prometheus {
    width: min(100%, 15rem);
    justify-self: center;
  }

  .hero-prometheus-image {
    top: -2.25rem;
  }

  .resume-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .resume-actions {
    justify-content: flex-start;
  }

  .content-page .page-shell {
    padding-top: calc(var(--header-height) + 3rem);
    padding-right: 5vw;
    padding-left: 5vw;
  }

  .research-register {
    margin-top: 2.5rem;
  }

  .research-entry {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    padding: 1.75rem 0 2rem;
  }

  .research-entry-body h2 {
    font-size: clamp(1.55rem, 7vw, 1.6875rem);
    line-height: 1.08;
  }
}

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

  ::view-transition-group(root),
  ::view-transition-group(site-header),
  ::view-transition-old(root),
  ::view-transition-new(root),
  ::view-transition-old(site-header),
  ::view-transition-new(site-header) {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 34rem) {
  .page-shell {
    padding-inline: 1.25rem;
  }

  .hero-prometheus {
    width: 100%;
  }

  .hero-prometheus-image {
    top: -0.25rem;
    left: -95%;
    width: 250%;
  }

  .home-page .page-shell {
    padding-inline: 1.25rem;
  }

  .content-page .page-shell {
    padding-inline: 1.25rem;
  }

  .resume-page .page-shell {
    padding-top: calc(var(--header-height) + 2rem);
  }

  .resume-pdf {
    height: max(58rem, 78svh);
  }

  .resume-profiles ul {
    grid-template-columns: 1fr;
  }
}

/* Short viewports at ANY width: the centred copy drops toward the bottom
   of the shell, so the splash has to give way rather than crowd it. */
@media (max-height: 46rem) {
  :root {
    --pixel-field-height: min(19svh, 7.5rem);
  }
}

@media (max-height: 34rem) {
  .page-shell::after {
    content: none;
  }
}

@media print {
  .page-shell::after {
    content: none;
  }
}

@media (max-width: 56rem) and (max-height: 32rem) {
  .home-page .page-shell {
    align-items: start;
    padding-top: calc(var(--header-height) + 1rem);
  }

  .home-page .page-intro {
    width: 100%;
  }

  .home-page .shell-copy {
    margin-top: 0.9rem;
    font-size: 0.9rem;
    line-height: 1.45;
  }
}
