:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #202122;
  --muted: #54595d;
  --link: #3366cc;
  --link-hover: #2a4b8d;
  --rule: #a2a9b1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

main {
  width: min(100% - 48px, 900px);
  margin: 0 auto;
  padding: 36px 0 28px;
}

header {
  display: flow-root;
  margin-bottom: 20px;
}

.profile-photo {
  float: right;
  width: min(42%, 380px);
  margin: 10px 0 12px 22px;
  padding: 4px;
  border: 1px solid #c8ccd1;
  background: #f8f9fa;
}

.profile-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.profile-photo figcaption {
  padding: 5px 5px 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

h1,
h2,
p,
ul {
  margin-top: 0;
}

h1 {
  margin-bottom: 2px;
  border-bottom: 1px solid var(--rule);
  font-family: "Linux Libertine", "Hoefler Text", Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 6vw, 2.7rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0;
}

h1 a {
  color: var(--ink);
  text-decoration: none;
}

h2 {
  margin: 22px 0 8px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--rule);
  font-family: "Linux Libertine", "Hoefler Text", Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 5px;
  font-family: "Linux Libertine", "Hoefler Text", Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: lowercase;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--link-hover);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.contact {
  margin: 6px 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.lede {
  max-width: 760px;
  margin-bottom: 0;
}

ul {
  margin-bottom: 8px;
  padding-left: 1.6rem;
}

li + li {
  margin-top: 3px;
}

.compact-list {
  margin-top: 0;
}

.cv-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.item-date {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.item-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.note {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-style: italic;
}

.entries {
  list-style: none;
  padding: 0;
}

.entries > li {
  position: relative;
  padding-left: 1rem;
}

.entries > li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
}

.entries > li + li {
  margin-top: 12px;
}

.teaching-list > li + li,
.awards-list > li + li {
  margin-top: 8px;
}

.research-list > li + li {
  margin-top: 8px;
}

.research-description,
.awards-list p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.course-grid ul {
  margin: 0;
}

.course-grid li + li {
  margin-top: 1px;
}

.entries p {
  margin-bottom: 1px;
}

.entry-title {
  font-weight: 700;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
}

section > p {
  margin-bottom: 4px;
}

footer {
  margin-top: 26px;
  padding-top: 8px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.82rem;
}

footer p {
  margin-bottom: 0;
}

@media (max-width: 560px) {
  body {
    font-size: 14px;
  }

  main {
    width: min(100% - 26px, 900px);
    padding-top: 20px;
  }

  header {
    margin-bottom: 16px;
  }

  .contact {
    margin-bottom: 12px;
  }

  h2 {
    margin-top: 18px;
    font-size: 1.3rem;
  }

  .profile-photo {
    float: none;
    width: 100%;
    margin: 10px 0 12px;
  }

  .cv-list li,
  .item-heading {
    display: block;
  }

  .course-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .item-date {
    display: block;
    margin-top: 1px;
  }
}

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