/* Newsreader is used under the SIL Open Font License. See /fonts/OFL.txt. */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/newsreader-roman.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/newsreader-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f6f4ef;
  --ink: #1c1916;
  --muted: #5a534a;
  --line: #ddd6cb;
  --accent: #1d5c4a;
  --accent-hover: #144436;
  --soft: #e7f2ee;
  --selection: #d7ebe4;
  --selection-ink: #14241c;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #141614;
  --ink: #f3f0e8;
  --muted: #c2bbb0;
  --line: #31362f;
  --accent: #8dcebb;
  --accent-hover: #b7e6d8;
  --soft: #1c2c27;
  --selection: #234840;
  --selection-ink: #f3f0e8;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141614;
    --ink: #f3f0e8;
    --muted: #c2bbb0;
    --line: #31362f;
    --accent: #8dcebb;
    --accent-hover: #b7e6d8;
    --soft: #1c2c27;
    --selection: #234840;
    --selection-ink: #f3f0e8;
    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Newsreader", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  font-size: 1.0625rem;
  font-weight: 440;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
  font-variant-numeric: lining-nums;
}

@media (min-width: 860px) {
  body {
    font-size: 1.125rem;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, p {
  overflow-wrap: break-word;
}

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-skip-ink: auto;
}

a:visited {
  color: var(--accent);
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: var(--selection);
  color: var(--selection-ink);
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  transform: translateY(-160%);
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0.55rem 0.8rem;
  z-index: 30;
  text-decoration: none;
}

.skip:focus {
  transform: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "mark toggle"
    "nav nav";
  align-items: center;
  gap: 0.15rem 1rem;
  padding-block: 0.55rem 0.35rem;
}

.wordmark {
  grid-area: mark;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 1.15rem;
}

.wordmark:hover {
  color: var(--accent);
}

.nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.15rem;
  margin: 0;
  padding: 0 0 0.35rem;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  white-space: nowrap;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

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

.theme-toggle {
  grid-area: toggle;
  width: 2.75rem;
  height: 2.75rem;
  display: inline-grid;
  place-items: center;
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.icon-sun {
  display: none;
}

:root[data-theme="dark"] .icon-moon {
  display: none;
}

:root[data-theme="dark"] .icon-sun {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-moon {
    display: none;
  }

  :root:not([data-theme="light"]) .icon-sun {
    display: block;
  }
}

@media (min-width: 860px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "mark nav toggle";
    min-height: 4.25rem;
    padding-block: 0;
    gap: 1.5rem;
  }

  .nav {
    justify-content: flex-end;
    padding-bottom: 0;
  }
}

.wrap {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6.4rem;
  column-gap: 1.15rem;
  row-gap: 1.15rem;
  padding-top: 2.25rem;
}

.hero-intro {
  align-self: end;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow a {
  color: var(--muted);
  text-decoration: none;
}

.eyebrow a:hover {
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(2.5rem, 9vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
}

.role {
  grid-column: 1 / -1;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.portrait {
  width: 6.4rem;
  height: 7.6rem;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 0.35rem;
  border: 1px solid var(--line);
  justify-self: end;
}

.lede {
  grid-column: 1 / -1;
  max-width: 38rem;
  font-size: 1.2rem;
  line-height: 1.45;
}

.hero-links {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  list-style: none;
  margin: 0.15rem 0 0;
  padding: 0;
}

.hero-links a {
  font-weight: 600;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

section {
  padding-top: 4.25rem;
  scroll-margin-top: 6.5rem;
}

.section-index {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

h2 {
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  margin-bottom: 1.15rem;
}

.about-grid,
.stack-block {
  max-width: 40rem;
}

.about-grid p + p,
.stack-block p + p,
.prose p + p,
.article p + p,
.article ul + p,
.article p + ul,
.article h2,
.article h3 {
  margin-top: 1rem;
}

.about-grid h3,
.stack-block h3 {
  margin-top: 1.75rem;
  font-size: 1.15rem;
}

.interest-list,
.plain-list {
  margin: 0.4rem 0 0;
  padding-left: 1.15rem;
}

.interest-list li + li,
.plain-list li + li {
  margin-top: 0.25rem;
}

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

.timeline {
  border-left: 1px solid var(--line);
  max-width: 46rem;
}

.timeline li {
  position: relative;
  padding: 0 0 2rem 1.35rem;
}

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

.timeline li::before {
  content: "";
  position: absolute;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  left: -0.3rem;
  top: 0.4rem;
  background: var(--bg);
  border: 1.5px solid var(--accent);
}

.timeline li.current::before {
  background: var(--accent);
}

.when {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.timeline h3,
.work-list h3,
.paper-title {
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

.where,
.paper-authors,
.paper-venue,
figcaption,
.note {
  color: var(--muted);
  max-width: 46rem;
}

.where {
  margin-top: 0.15rem;
}

.timeline p + p,
.work-summary {
  margin-top: 0.55rem;
}

.work-list li,
.papers li {
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
}

.work-list li:last-child,
.papers li:last-child {
  border-bottom: 1px solid var(--line);
}

.work-list h3,
.paper-title {
  color: var(--ink);
}

.work-list h3 a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.18em;
}

.work-list h3 a:hover,
.papers a:hover {
  color: var(--accent);
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: 0.55rem;
}

.paper-links a {
  font-weight: 600;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

.me {
  color: var(--ink);
  font-weight: 600;
}

.contact-lead {
  max-width: 38rem;
  font-size: 1.2rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
}

.contact-links a {
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

.site-footer {
  margin-top: 4.5rem;
  border-top: 1px solid var(--line);
}

.footer-inner {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
  padding: 1.25rem 0 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.98rem;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--accent);
}

.article {
  max-width: 44rem;
  padding-top: 2.4rem;
  padding-bottom: 1rem;
}

.article h1 {
  font-size: clamp(2.15rem, 6vw, 3.5rem);
  line-height: 1.02;
  max-width: 18ch;
}

.dek {
  margin-top: 1rem;
  font-size: 1.25rem;
  line-height: 1.4;
}

.article h2 {
  font-size: 1.55rem;
  margin-top: 2.25rem;
  margin-bottom: 0.7rem;
}

.article h3 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
}

.article ul {
  margin: 0.6rem 0 0;
  padding-left: 1.2rem;
}

.article li + li {
  margin-top: 0.35rem;
}

figure {
  margin: 1.6rem 0 0;
}

figcaption {
  margin-top: 0.45rem;
  font-size: 0.95rem;
}

.shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.4rem;
}

.shots figure {
  margin: 0;
}

.shots img,
.frame {
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: var(--soft);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  margin: 1.2rem 0 0;
  padding: 0;
}

.metrics div {
  border-top: 1px solid var(--line);
  padding-top: 0.55rem;
}

.metrics dt {
  color: var(--muted);
  font-size: 0.92rem;
}

.metrics dd {
  margin: 0.1rem 0 0;
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.note {
  margin-top: 1rem;
  font-size: 0.98rem;
}

@media (min-width: 700px) {
  .metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

  .work-list li,
  .papers li {
    display: grid;
    grid-template-columns: minmax(12rem, 17rem) minmax(0, 1fr);
    gap: 0.35rem 2.5rem;
    align-items: start;
  }

  .work-summary,
  .paper-authors,
  .paper-venue,
  .paper-links {
    grid-column: 2;
    max-width: 38rem;
  }

  .work-meta,
  .paper-title {
    grid-column: 1;
  }

  .work-summary,
  .paper-authors {
    grid-row: 1;
  }

  .work-summary {
    margin-top: 0;
  }

  .paper-venue {
    margin-top: 0.35rem;
  }

  .paper-links {
    margin-top: 0.65rem;
  }
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 19.5rem;
    column-gap: 4.5rem;
    row-gap: 1.2rem;
    align-items: center;
    padding-top: 4.75rem;
  }

  .hero-intro,
  .role,
  .lede,
  .hero-links {
    grid-column: 1;
  }

  .portrait {
    grid-column: 2;
    grid-row: 1 / span 4;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    justify-self: end;
    align-self: center;
    border-radius: 0.5rem;
  }

  .lede {
    font-size: 1.4rem;
    margin-top: 0.35rem;
  }

  section {
    padding-top: 6rem;
  }
}

@media (max-width: 380px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 5.2rem;
  }

  .portrait {
    width: 5.2rem;
    height: 6.3rem;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .site-header,
  .skip,
  .theme-toggle,
  .hero-links,
  .site-footer {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  a {
    color: #000;
  }

  .portrait {
    width: 3.2cm;
    height: 3.8cm;
  }
}
