:root {
  --bg: #fdfdfc;
  --text: #1d1d1f;
  --muted: #5a5a60;
  --rule: #e3e3e0;
  --link: #1f4f7a;
  --focus: #b45309;
  --tint: #f1f4f7;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141416;
    --text: #ececee;
    --muted: #a5a5ad;
    --rule: #2e2e33;
    --link: #8cbcea;
    --focus: #f5b45a;
    --tint: #1b1f25;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
main, header, footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}
header { padding-top: 2.5rem; }
.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  column-gap: 1rem;
}
.nav-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  padding: .75rem 0;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
  font-size: .9375rem;
}
.site-nav ul a {
  display: block;
  padding: .75rem 0;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.site-nav a:hover { color: var(--link); }
.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--link);
}
h1, h2, h3 { line-height: 1.25; text-wrap: balance; }
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 2.25rem;
  margin: 0 0 .25rem;
}
.tagline { color: var(--muted); margin: 0; }
.identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}
.tagline .role { display: block; }
.tagline .sep { display: none; }
@media (min-width: 32rem) {
  .identity { flex-direction: row; align-items: center; }
  .tagline .role { display: inline-block; }
  .tagline .sep { display: inline; }
}
.avatar {
  flex: none;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--tint);
}
.avatar.placeholder {
  display: grid;
  place-items: center;
  border: 1px dashed var(--rule);
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
}
h2 {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2.75rem 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--rule);
}
h3 { font-size: 1.0625rem; margin: 0; }
p { margin: 0 0 1rem; }
p, li {
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}
.tagline, .meta, figcaption, .resume-download {
  text-align: left;
  -webkit-hyphens: manual;
  hyphens: manual;
}
.tagline span, .meta span { display: inline-block; }
a { color: var(--link); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}
.intro { margin-top: 2rem; }
.entry { margin-bottom: 2rem; }
.entry:last-child { margin-bottom: 0; }
.meta { color: var(--muted); font-size: .9375rem; margin: .125rem 0 .5rem; }
.entry ul { margin: .5rem 0 1rem; padding-left: 1.25rem; }
.entry ul:last-child { margin-bottom: 0; }
.entry li + li { margin-top: .375rem; }
.entry-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: var(--tint);
  margin-bottom: 1rem;
}
.entry > .entry-img { margin-top: 1rem; }
.entry-img.placeholder {
  display: grid;
  place-items: center;
  border: 1px dashed var(--rule);
  color: var(--muted);
  font-size: .875rem;
}
.entry-figure { margin: 1rem 0; }
.entry-figure .entry-img { margin-bottom: .5rem; }
.entry-figure figcaption { color: var(--muted); font-size: .875rem; }
.entry + .entry { margin-top: 3rem; }

/* Research image carousel */
.research-carousel { position: relative; margin: 1rem 0; }
.research-carousel .entry-figure { margin: 0; }
.research-carousel .entry-img { aspect-ratio: 4 / 3; object-fit: contain; }
.research-carousel .carousel-image-cover { object-fit: cover; }
.carousel-image {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--tint);
  cursor: zoom-in;
}
.research-carousel .carousel-image .entry-img { margin: 0; }
.carousel-image + figcaption { margin-top: .5rem; }
.research-carousel .entry-figure + .entry-figure { margin-top: 1rem; }
.research-carousel:has(.carousel-controls:not([hidden])) .entry-figure { margin-top: 0; }
.carousel-controls:not([hidden]) {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 4 / 3;
  pointer-events: none;
}
.carousel-controls button {
  display: grid;
  place-items: center;
  flex: none;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: inherit;
  cursor: pointer;
  pointer-events: auto;
}
.carousel-controls .carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  background: rgb(15 17 20 / 70%);
  border: 1px solid rgb(255 255 255 / 35%);
  box-shadow: 0 2px 8px rgb(0 0 0 / 20%);
}
.carousel-arrow[data-previous] { left: .75rem; }
.carousel-arrow[data-next] { right: .75rem; }
.carousel-controls .carousel-arrow:hover { background: rgb(15 17 20 / 95%); }
.carousel-controls button:focus-visible, .carousel-image:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.carousel-indicators {
  position: absolute;
  bottom: .75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100% - 2rem);
  padding: 0 6px;
  border-radius: 999px;
  background: rgb(15 17 20 / 70%);
  pointer-events: auto;
}
.carousel-controls .carousel-indicator { width: 28px; min-height: 28px; }
.carousel-indicator::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgb(255 255 255 / 50%);
}
.carousel-indicator:hover::after { background: #fff; }
.carousel-indicator[aria-current="true"]::after { width: 18px; background: #fff; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Full-size research image popover */
body:has(.image-viewer[open]) { overflow: hidden; }
.image-viewer {
  width: min(96vw, 100rem);
  max-width: 96vw;
  max-height: 94dvh;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}
.image-viewer::backdrop { background: rgb(0 0 0 / 80%); }
.image-viewer-body { max-height: calc(94dvh - 3rem); overflow: auto; }
.image-viewer-body img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(94dvh - 3rem); margin: auto; }
.image-viewer-hint {
  margin: 0;
  padding: .625rem .5rem;
  color: rgb(255 255 255 / 75%);
  font-size: .8125rem;
  line-height: 1.5;
  text-align: center;
  cursor: pointer;
}
@media print {
  .research-carousel .entry-figure[hidden] { display: block; }
  .carousel-controls, .image-viewer { display: none !important; }
}

/* Contact */
.contact {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .5rem 1.5rem;
  margin: 2.5rem 0 0;
}
.contact dt { color: var(--muted); }
.contact dd { margin: 0; overflow-wrap: anywhere; }

/* Dogs */
.dogs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .5rem;
  margin-top: 2.5rem;
}
.dogs figure { margin: 0; }
.dogs img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: var(--tint);
}
@media (min-width: 32rem) {
  .dogs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dogs figure:first-child { grid-column: 1 / -1; }
}

/* Resume */
.resume-download { margin: 2.5rem 0 0; }
.resume-section > h3 ~ h3 { margin-block-start: 2rem; }
.resume-section p > br + strong {
  display: inline-block;
  padding-inline-start: 1rem;
  text-align: start;
}
.entry ul ul { margin: .375rem 0 0; font-size: .9375rem; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { margin-bottom: .625rem; }

footer {
  margin-top: 4rem;
  padding-bottom: 3rem;
  color: var(--muted);
  font-size: .875rem;
}
.skip {
  position: absolute;
  left: -999px;
  top: .5rem;
  background: var(--bg);
  padding: .5rem .75rem;
}
.skip:focus { left: .5rem; z-index: 20; }
@media (min-width: 40rem) {
  header { padding-top: 4rem; }
  h1 { font-size: 2.75rem; }
  .identity { gap: 1.5rem; }
  .avatar { width: 6.5rem; height: 6.5rem; }
}
@media print {
  :root { --bg: #fff; --text: #000; --muted: #444; --link: #000; }
  body { font-size: 11pt; }
  header { padding-top: 0; }
  .skip, .site-nav, footer { display: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: var(--muted); }
  .resume-download { display: none; }
  .entry, .plain li { break-inside: avoid; }
}
