:root {
  color-scheme: light;
  --paper: #fff;
  --robot-art: url("../../images/robot-doctor-background.webp");
  --ink: #202c3d;
  --accent: #874b32;
  --muted: #545e6b;
  --rule: #d8d8d2;
  --site-font: "Denim", Arial, sans-serif;
}
* { box-sizing: border-box; }
body {
  isolation: isolate;
  max-width: 79rem;
  margin: auto;
  padding-inline: clamp(1.2rem, 5vw, 5rem);
  color: var(--ink);
  background: var(--paper);
  font: 1rem/1.65 var(--site-font);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--robot-art) right bottom / auto min(55vh, 46vw) no-repeat;
}
a { color: var(--accent); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.skip { position: absolute; top: -4rem; z-index: 2; background: var(--paper); }
.skip:focus { top: .5rem; }
.mast, nav, .contacts, footer { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.3rem; }
.mast, footer { justify-content: space-between; padding-block: 1.1rem; }
.mast { border-bottom: 2px solid var(--ink); }
.mast a { color: var(--ink); text-decoration: none; }
.mast a:hover { text-decoration: underline; }
.brand { font: 1.45rem var(--site-font); }
nav, footer, .contacts { font-size: .9rem; }
main { display: grid; grid-template-columns: minmax(14rem, .8fr) minmax(0, 2fr); gap: clamp(2.5rem, 7vw, 6rem); align-items: start; padding-block: 3.3rem; }
.profile { border-bottom: 1px solid var(--rule); padding-bottom: 1.6rem; }
.portrait { display: block; width: 100%; height: auto; aspect-ratio: 5 / 6; object-fit: cover; object-position: center 37%; }
h1, h2, h4 { font-family: var(--site-font); font-weight: 400; }
h1 { font-size: clamp(2.4rem, 4vw, 3.8rem); letter-spacing: -.055em; line-height: 1.1; margin: 1rem 0; }
h1 span { display: block; font-size: 1.05rem; letter-spacing: .12em; color: var(--muted); margin-top: .4rem; }
.role { font-weight: 650; margin-bottom: 0; }
.role + p { margin-top: .15rem; }
.contacts { gap: .7rem 1rem; }
#research { margin-bottom: 2rem; }
.panel { border-top: 1px solid var(--rule); }
.panel:last-child { border-bottom: 1px solid var(--rule); }
.panel summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.15rem .3rem;
  cursor: pointer;
  font: 1.65rem/1.25 var(--site-font);
  list-style: none;
}
.panel summary::-webkit-details-marker { display: none; }
.panel summary::after {
  content: "";
  width: .5rem;
  height: .5rem;
  border: solid var(--accent);
  border-width: 0 2px 2px 0;
  margin: 0 .6rem .25rem;
  transform: rotate(45deg);
}
.panel[open] summary::after { transform: rotate(225deg); }
.panel summary:hover { color: var(--accent); }
.panel summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.panel-body { padding: 0 .3rem 1.3rem; }
@media (prefers-reduced-motion: no-preference) {
  @supports (interpolate-size: allow-keywords) and selector(details::details-content) {
    .panel { interpolate-size: allow-keywords; }
    .panel::details-content {
      height: 0;
      overflow: clip;
      transition: height .22s ease, content-visibility .22s allow-discrete;
    }
    .panel[open]::details-content { height: auto; }
  }
}
h2 { font-size: clamp(1.875rem, 3.5vw, 3rem); line-height: 1.1; letter-spacing: -.025em; margin: 0 0 1.3rem; }
.statement { max-width: 70ch; font: 1.24rem/1.64 var(--site-font); }
h3 { font-size: 1.08rem; line-height: 1.4; margin: 1.65rem 0 .4rem; }
.interests-heading { color: var(--accent); font-size: 1.22rem; }
.institution { font-size: 1.125rem; }
h3 + p { margin-top: 0; }
.funding { border-inline-start: 3px solid var(--accent); background: #f1eee7; margin-bottom: 1.2rem; padding: 1rem 1.25rem; }
.funding h3, .funding p { margin: 0 0 .35rem; }
small, .year { color: var(--muted); }
.paper { position: relative; padding: 1.25rem 0 1.25rem 3.7rem; border-bottom: 1px solid var(--rule); }
.paper h4 { margin: 0; line-height: 1.28; font-size: 1.42rem; }
.paper p { margin: .32rem 0 0; font-size: .92rem; color: var(--muted); }
.year { position: absolute; left: 0; top: 1.4rem; font: .9rem/1.5 var(--site-font); }
footer { border-top: 1px solid var(--rule); }
@media (max-width: 46rem) {
  main { display: block; padding-block: 1.6rem; }
  .profile { display: grid; grid-template-columns: minmax(6rem, .65fr) minmax(0, 1.4fr); gap: 1rem; align-items: start; margin-bottom: 2rem; }
  h1 { margin-top: 0; }
  .identity p { line-height: 1.45; }
  .mast { gap: .4rem 1rem; }
  nav { gap: 0 .75rem; }
  nav a, .contacts a { display: inline-flex; align-items: center; min-height: 44px; }
  nav a { min-width: 44px; justify-content: center; }
  .contacts { row-gap: 0; }
  .paper { padding-left: 0; }
  .year { position: static; }
}

@media (max-width: 30rem) {
  .mast { display: block; padding-block: .65rem .15rem; }
  nav { justify-content: space-between; font-size: 1rem; }
  .profile {
    grid-template-columns: clamp(5.5rem, 25vw, 7.5rem) 1fr;
    gap: 0 1.15rem;
    padding-bottom: .85rem;
    margin-bottom: 1.6rem;
  }
  .identity { display: contents; }
  .portrait { grid-row: 1 / 3; }
  .identity h1 { align-self: end; margin: 0; }
  .identity .role { margin: .45rem 0 0; }
  .identity .role + p, .identity .contacts { grid-column: 1 / -1; }
  .identity .role + p { margin: 1rem 0 .15rem; line-height: 1.65; }
  .identity .contacts { column-gap: 1.25rem; }
  .statement { font-size: 1.125rem; }
  .work ul { padding-inline-start: 1.35rem; }
}

@media (max-width: 46rem), (pointer: coarse), (orientation: landscape) and (max-height: 32rem) {
  body::before {
    /* The small viewport stays stable as the mobile browser toolbar retracts. */
    inset: 0 max(.5rem, env(safe-area-inset-right)) auto auto;
    width: min(34vw, 9rem);
    height: 100%;
    height: 100svh;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    background-origin: content-box;
    background-size: contain;
    opacity: .86;
  }
  .funding { background-color: rgba(223, 215, 197, .32); }
}
