/* Shared palette and dimensions. Keep this stylesheet directly browser-readable. */
:root {
  --text: #364153;
  --muted: #4a5565;
  --heading: #101828;
  --border: #e5e7eb;
  --shaded: #f9fafb;
  --link: #1447e6;
  --link-dark: #193cb8;
  --link-border: #155dfc;
  --prose-link: #4f39f6;
  --radius: 0.25rem;
  --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --small-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

/* Base typography and predictable box sizing. */
*, *::before, *::after {
  box-sizing: border-box;
}
html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}
body {
  margin: 0;
  padding-bottom: 1.5rem;
  background: white;
  color: black;
}
h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, figure {
  margin: 0;
}
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
}
ul, ol {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
}
strong, b {
  font-weight: bolder;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
svg {
  vertical-align: middle;
}
.hidden {
  display: none;
}

/* Hidden labels remain available to screen readers; the skip link appears on focus. */
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 50;
  padding: 0.75rem 1rem;
  background: white;
}
a:focus {
  outline: 2px solid var(--link);
  outline-offset: 4px;
}

.container {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}
.section-content {
  min-width: 0;
}
.last-updated {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.25rem;
  text-align: right;
}

/* Navigation wraps below 64rem. */
.site-nav {
  width: 100%;
  background: white;
  box-shadow: var(--small-shadow);
}
.nav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0.5rem 0;
}
.nav-brand {
  padding-left: 1rem;
}
.nav-title {
  color: var(--heading);
  font-weight: 800;
}
.nav-content {
  width: 100%;
  flex-grow: 1;
  margin-top: 0.5rem;
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.nav-links > li {
  margin-right: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.nav-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  color: var(--muted);
}
.nav-link:hover {
  color: var(--heading);
  text-decoration: underline;
}
.nav-link-active {
  color: #0084d1;
  font-weight: 700;
}

/* Biography and research sections deliberately use independent column widths. */
.biography-grid {
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.profile {
  margin: 0 auto;
}
.portrait {
  width: 13rem;
  height: 13rem;
  margin: 0 auto;
  border-radius: 50%;
  object-position: center;
}
.profile-name, .profile-role {
  padding: 0.25rem 0;
  text-align: center;
  font-weight: 700;
}
.profile-name {
  color: var(--heading);
  font-size: 1.875rem;
  line-height: 2.25rem;
}
.profile-role {
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.75rem;
}
.profile-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 2.5rem 0;
}
.profile-links > li {
  padding: 0.75rem;
  color: var(--link);
}
@media (hover: hover) {
  .profile-links > li:hover {
    transform: scale(1.25);
  }
}
.biography-updated {
  margin-top: 0.25rem;
}
.biography-details {
  padding: 1rem 0;
}
.biography-heading {
  padding: 0.25rem 0;
  color: var(--heading);
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
}
.interest-list {
  list-style: disc;
  padding-left: 1rem;
}
.interest-list > li, .education-list > li {
  padding: 0.25rem 0;
}
.education-institution {
  color: var(--muted);
}

/* Markdown typography. */
.prose {
  color: var(--text);
  line-height: 1.75;
  overflow-wrap: break-word;
}
.prose p, .prose ul, .prose ol {
  margin: 1.25em 0;
}
.prose a {
  color: var(--prose-link);
  font-weight: 500;
  text-decoration: underline;
}
.prose strong {
  color: var(--heading);
  font-weight: 600;
}
.prose a strong {
  color: inherit;
}
.prose ul, .prose ol {
  padding-left: 1.625em;
}
.prose ul {
  list-style: disc;
}
.prose ol {
  list-style: decimal;
}
.prose li {
  margin: 0.5em 0;
  padding-left: 0.375em;
}
.prose li::marker {
  color: #d1d5dc;
}
.prose ol > li::marker {
  color: var(--muted);
}
.prose li > p {
  margin: 0.75em 0;
}
.prose h2, .prose h3, .prose h4 {
  color: var(--heading);
  font-weight: 600;
}
.prose h2 {
  margin: 2em 0 1em;
  font-size: 1.5em;
  line-height: 1.333333;
  font-weight: 700;
}
.prose h3 {
  margin: 1.6em 0 0.6em;
  font-size: 1.25em;
  line-height: 1.6;
}
.prose h4 {
  margin: 1.5em 0 0.5em;
  line-height: 1.5;
}
.prose blockquote {
  margin: 1.6em 0;
  padding-left: 1em;
  border-left: 0.25rem solid var(--border);
  font-style: italic;
}
.prose > :first-child {
  margin-top: 0;
}
.prose > :last-child {
  margin-bottom: 0;
}
.zola-anchor {
  padding-left: 0.5rem;
  opacity: 0.6;
}
.zola-anchor:hover {
  opacity: 1;
}

/* Grid is an enhancement: older browsers retain spaced, stacked sections. */
.page-section {
  border-top: 1px solid var(--border);
  background: white;
}
.page-section-shaded {
  background: var(--shaded);
}
.section-inner {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}
.section-heading {
  margin-bottom: 1.25rem;
}
.section-heading h2 {
  color: var(--heading);
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
}
.biography-grid > .section-content {
  margin-top: 1.25rem;
}
.biography-details > * + * {
  margin-top: 1.5rem;
}
@supports (display: grid) {
  .biography-grid, .section-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-gap: 1.25rem;
  }
  .biography-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-gap: 1.5rem;
  }
  .section-heading, .biography-grid > .section-content, .biography-details > * + * {
    margin: 0;
  }
}

/* News dates stack above the text on the narrowest screens. */
.news-list, .news-text {
  min-width: 0;
}
.news-item {
  padding: 0.5rem 0;
}
.news-item:not(:last-child) {
  border-bottom: 1px solid var(--border);
}
.news-date {
  display: block;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75rem;
}
.news-text > p {
  margin: 0;
}
@media (min-width: 25rem) {
  .news-item {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    grid-column-gap: 0.75rem;
  }
}

/* Shared compact cards for publications, talks, and teaching. */
.card {
  padding: 0.75rem;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--card-shadow);
}
.record-list > * + * {
  margin-top: 0.5rem;
}
.record {
  display: flex;
  flex-wrap: wrap;
}
.record > h4, .record > div, .record > p {
  flex-basis: 100%;
  min-width: 0;
}
.record-title {
  color: var(--heading);
  font-weight: 700;
}
.publication-title {
  color: var(--link-dark);
}
.record-authors, .record-year {
  color: var(--muted);
}
.record-year {
  padding-top: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}
.record-year:first-child {
  padding-top: 0;
}
.record-summary {
  margin-top: 0.25rem;
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.625;
}
.research-highlight {
  display: inline-flex;
  align-items: center;
  color: #973c00;
  border-radius: 9999px;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
}
.research-highlight .icon {
  margin-right: 0.25rem;
}
.award-icon {
  color: #e17100;
}
.talk-highlight {
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius);
  background: #eff6ff;
  color: var(--link-dark);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
}

/* Margins provide wrapping gaps without requiring Flexbox gap support. */
.resource-links {
  display: flex;
  flex-wrap: wrap;
  margin: 0.25rem -0.25rem -0.25rem 0;
}
.resource-links > li {
  margin: 0 0.25rem 0.25rem 0;
}
.resource-link {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem;
  border: 1px solid var(--link-border);
  border-radius: var(--radius);
  color: var(--link);
  font-size: 0.75rem;
  line-height: 1rem;
  text-transform: uppercase;
}
.resource-link-compact {
  min-height: 1.5rem;
  padding: 0.125rem 0.375rem;
}
.resource-link:hover {
  background: var(--link-border);
  color: white;
}
.teaching-title {
  font-weight: 700;
}
.teaching-institution {
  margin-top: 0.125rem;
  color: var(--muted);
}
.teaching-subheading {
  margin-top: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}
.course-list {
  margin-top: 0.25rem;
  padding-left: 1.25rem;
  list-style: disc;
}
.course-list > li + li {
  margin-top: 0.25rem;
}

/* SVG sizing is shared between profile links, inline icons, and contacts. */
.icon {
  display: inline-block;
  height: 1em;
  width: auto;
  fill: currentColor;
  vertical-align: -0.125em;
}
.profile-icon {
  font-size: 3rem;
  line-height: 1;
}
.contact-list > li + li {
  margin-top: 0.25rem;
}
.contact-item {
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 700;
}
.contact-details {
  display: flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.25rem 0;
}
a.contact-details {
  color: var(--link-border);
}
a.contact-details:hover {
  color: var(--link-dark);
}
.contact-icon {
  width: 1.25rem;
  flex-shrink: 0;
  margin-right: 0.75rem;
  text-align: center;
}

/* Quiet 404 page. */
.not-found {
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.not-found-content {
  max-width: 36rem;
  margin: 0 auto;
  text-align: center;
}
.not-found-title {
  margin-top: 1rem;
  color: var(--heading);
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.not-found-message {
  margin-top: 1rem;
  color: var(--muted);
  line-height: 1.75rem;
}
.not-found-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}
.home-button {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  background: var(--link);
  color: white;
  font-weight: 600;
  box-shadow: var(--small-shadow);
}
.home-button:hover {
  background: var(--link-dark);
}

@media (min-width: 40rem) {
  .section-roomy {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  .news-item {
    grid-template-columns: 6.5rem minmax(0, 1fr);
  }
  .not-found {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
  .not-found-title {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
}
@media (min-width: 48rem) {
  .biography-grid {
    grid-template-columns: 14rem minmax(0, 1fr);
    grid-gap: 2.5rem;
  }
  .section-grid {
    grid-template-columns: 10rem minmax(0, 1fr);
    grid-gap: 2.5rem;
  }
}
@media (min-width: 64rem) {
  .nav-inner {
    flex-wrap: nowrap;
  }
  .nav-content {
    width: auto;
    margin-top: 0;
  }
  .nav-links {
    justify-content: flex-end;
  }
  .biography-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
