@font-face {
  font-family: "Custom Serif";
  src: url("fonts/serif-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Custom Serif";
  src: url("fonts/serif-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Custom Serif";
  src: url("fonts/serif-italic.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Custom Serif";
  src: url("fonts/serif-bolditalic.woff") format("woff");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Custom Serif";
  src: url("fonts/serif-semibold-italic.woff") format("woff");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Custom Serif";
  src: url("fonts/serif-semibold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #FFFFFF;
  --outside: #FFFFFF;
  --ink: #172B36;
  --muted: #59636A;
  --line: #DBDFE1;
  --pad: 12px;
  --serif: "Custom Serif", Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  font: 13px/1.45 var(--sans);
  color: var(--ink);
  background: var(--paper);
}

body {
  overflow: hidden;
}

::selection {
  background: #1B3640;
  color: #FFFFFF;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: .6px;
  text-underline-offset: 2px;
}

a:hover {
  color: #59636A;
}

p {
  margin: 0 0 12px;
}

h1, h2, h3 {
  margin: 0;
}

h1 {
  font: 400 36px/1 var(--serif);
  letter-spacing: -.01em;
}

h2 {
  font: 500 12px/1.3 var(--sans);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

h3 {
  font-size: 11px;
  margin: 0 0 5px;
}

.site {
  height: calc(100dvh - 24px);
  margin: 12px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-columns: minmax(190px, .8fr) minmax(330px, 1.55fr) minmax(270px, 1.2fr);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 5px 22px #00000010;
}

.column {
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #c9c6bf transparent;
  border-right: 1px solid var(--line);
}

.column.right {
  border-right: 0;
}

.column-header {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 25px;
  padding: 5px var(--pad);
  border-bottom: 1px solid var(--line);
  background: #FFFFFFED;
  color: var(--muted);
  font-size: 9px;
}

.content {
  padding: var(--pad);
}

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 14px 0;
}

.small {
  font-size: 11px;
  color: var(--muted);
}

.left h1 a {
  text-decoration: none;
}

.location {
  margin-top: 13px;
}

.contact {
  margin-top: 28px;
}

.contact p {
  margin-bottom: 13px;
}

.portrait {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: auto;
  margin: 18px 0 12px;
  display: block;
  background: transparent;
  filter: none;
}

.portrait img,
img.profile-photo {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center top;
}

.section {
  margin-bottom: 22px;
}

.section + .section {
  padding-top: 2px;
}

.bio p {
  max-width: 70ch;
}

.bio .abstract-text {
  font: 13px/1.55 var(--serif);
}

.cvgrid {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 0 10px;
}

.cvrow {
  display: contents;
}

.year {
  font-size: 10px;
  color: var(--muted);
  padding: 0 0 13px;
}

.entry {
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 0 0 13px;
}

.entry p {
  margin: 0 0 5px;
}

.entry p:last-child {
  margin-bottom: 0;
}

.talks .entry {
  padding-bottom: 15px;
}

.label {
  font-size: 9px;
  letter-spacing: .03em;
}

.cv-section {
  margin-bottom: 20px;
}

.endnote {
  font-size: 9px;
  color: var(--muted);
}

@media (max-width: 820px) {
  body {
    height: auto;
    min-height: 100%;
    overflow: auto;
  }

  .site {
    height: auto;
    min-height: calc(100dvh - 16px);
    margin: 8px;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  .column {
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: none;
  }

  .column-header {
    position: sticky;
    top: 0;
  }

  .content {
    padding: 16px;
  }

  .left .content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
  }

  .left .nameblock,
  .left .portrait,
  .left .contact,
  .left .profile-photo {
    grid-column: 1 / -1;
  }

  .contact {
    margin-top: 14px;
  }

  .left .portrait {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
  }

  .cvgrid {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  h1 {
    font-size: 34px;
  }
}

@media (min-width: 821px) and (max-width: 1050px) {
  .site {
    grid-template-columns: minmax(170px, .8fr) minmax(290px, 1.4fr) minmax(240px, 1.1fr);
  }

  :root {
    --pad: 10px;
  }

  .cvgrid {
    grid-template-columns: 56px minmax(0, 1fr);
  }
}

.portrait {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: auto;
  margin: 18px 0 12px;
  display: block;
  color: var(--ink);
  background: transparent;
  filter: none;
}

.portrait .profile-photo,
.profile-photo {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center top;
}

/* Footer */
.site-footer {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
  padding: 7px var(--pad) 8px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
  text-align: right;
}

.site-footer time {
  font-variant-numeric: tabular-nums;
}

/* Expandable publication abstracts */
.publication-entry {
  padding-bottom: 16px;
}

.publication-toggle {
  display: block;
  width: 100%;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: .6px;
  text-underline-offset: 2px;
  cursor: pointer;
}

.publication-toggle::after {
  content: "+";
  display: inline-block;
  margin-left: 5px;
  color: var(--muted);
  font-size: 11px;
  text-decoration: none;
}

.publication-toggle[aria-expanded="true"]::after {
  content: "−";
}

.publication-toggle:hover {
  color: var(--muted);
}

.publication-toggle:focus-visible {
  outline: 1px solid #8f8b80;
  outline-offset: 3px;
}

.abstract-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 260ms ease, opacity 220ms ease;
  margin: 0;
}

.abstract-panel.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin: 7px 0 9px;
}

.abstract-clip {
  min-height: 0;
  overflow: hidden;
}

.abstract-card {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #DBDFE1;
  color: #0E1A21;
  box-shadow: 0 2px 5px #00000006;
  transform: translateY(-5px);
  transition: transform 260ms ease;
  font: 14px/1.3 var(--serif);
}

.abstract-panel.is-open .abstract-card {
  transform: translateY(0);
}

.abstract-card p {
  margin: 0;
}

.publication-citation {
  margin: 0 0 4px;
  font-size: 11px;
}

.publication-links {
  margin: 0;
  font-size: 10px;
  color: var(--muted);
}

.publication-links a {
  white-space: normal;
}

.publication-links .separator {
  margin: 0 4px;
  color: #a6a299;
}

@media (prefers-reduced-motion: reduce) {
  .abstract-panel,
  .abstract-card {
    transition: none;
  }
}

@media (max-width: 820px) {
  .site-footer {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    text-align: left;
    padding: 10px 16px;
  }

  .publication-entry {
    padding-bottom: 18px;
  }
}

.cv-link {
  display: inline-block;
  padding: 0 8px;
  border: 1px solid var(--line);
  text-decoration: none;
  font-size: 14px;
}

.cv-link:hover {
  background: var(--line);
  color: var(--ink);
}

@media (max-width: 820px) {
  .left .content img.profile-photo {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    height: auto;
    justify-self: stretch;
    object-fit: contain;
  }
}
