:root {
  --text: #181818;
  --muted: #666;
  --line: #ddd;
  --link: #174ea6;
  --hover: #d11b1b;
  --w: 1020px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

.page {
  width: min(calc(100% - 40px), var(--w));
  margin: 0 auto;
  padding: 52px 0 40px;
}

header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 26px;
  margin-bottom: 32px;
}

h1 {
  font-size: 2rem;
  margin: 0 0 5px;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.02rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin: 0 0 12px;
}

h3 {
  font-size: 0.98rem;
  margin: 18px 0 8px;
}

p {
  margin: 0 0 12px;
}

section {
  margin-bottom: 34px;
}

a {
  color: var(--link);
  text-decoration: none;
  text-underline-offset: 2px;
  transition: color 0.12s ease;
}

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

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

.muted,
.meta,
.detail {
  color: var(--muted);
}

.affiliation-link,
.affiliation-link:visited {
  color: #1558b0;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #aac5e8;
  text-decoration-thickness: 1px;
}

.affiliation-link:hover,
.affiliation-link:focus {
  color: var(--hover);
  text-decoration-color: var(--hover);
}

.institution-link,
.institution-link:visited {
  color: inherit;
  text-decoration: none;
}

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

nav {
  margin-top: 16px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.profile-top {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-start;
}

.profile-top > div:first-child {
  flex: 1;
  min-width: 0;
}

.profile-photo {
  width: 570px;
  height: auto;
  max-width: 56%;
  object-fit: contain;
  border-radius: 0;
  flex: 0 0 auto;
}

.list,
.plain-list,
.service-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li,
.service-list li {
  margin-bottom: 5px;
}

.service-list li {
  position: relative;
  padding-left: 18px;
}

.service-list li::before {
  position: absolute;
  left: 0;
  width: auto;
}

.plain-list li::before,
.service-list li::before {
  content: "•";
  display: inline-block;
  width: 18px;
  color: var(--muted);
}

.list li {
  margin-bottom: 10px;
}

.date {
  display: inline-block;
  min-width: 112px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.detail {
  margin-top: 2px;
}

.dated-list .dated-entry {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  column-gap: 4px;
  align-items: start;
  margin-bottom: 14px;
}

.dated-list .date {
  display: block;
  min-width: 0;
}

.entry-body {
  min-width: 0;
}

.entry-body .detail {
  margin-left: 0;
  margin-top: 3px;
}

.citation-list {
  padding-left: 25px;
  margin: 0;
}

.citation-list li {
  margin-bottom: 10px;
  padding-left: 4px;
}

.citation-list.compact li {
  margin-bottom: 8px;
}

.teaching-courses {
  display: block;
}

.course-line {
  display: block;
}

.course-line + .course-line {
  margin-top: 3px;
}

.contact-line {
  margin-top: 3px;
}

footer {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 45px;
  color: var(--muted);
  font-size: 0.82rem;
}

.cv {
  padding-top: 32px;
}

.cv-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}

.cv-header {
  margin-bottom: 30px;
}

.cv-header h1 {
  font-size: 2.1rem;
}

.cv-entry {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 4px;
  margin-bottom: 10px;
}

.cv-entry > .date {
  white-space: nowrap;
}

.period-date {
  line-height: 1.45;
}

.award-entry {
  margin-bottom: 14px;
}

@media screen and (max-width: 760px) {
  .page {
    width: min(calc(100% - 28px), var(--w));
    padding-top: 30px;
  }

  .cv-entry {
    display: block;
  }

  .cv-entry .date {
    display: block;
    margin-bottom: 2px;
  }

  .profile-top {
    flex-direction: column-reverse;
    gap: 22px;
  }

  .profile-photo {
    width: min(100%, 520px);
    max-width: none;
    height: auto;
  }

  .date {
    min-width: 96px;
  }

  .dated-list .dated-entry {
    display: block;
  }

  .dated-list .date {
    margin-bottom: 2px;
  }

  .teaching-courses {
    display: block;
    margin-top: 2px;
  }
}

.publication-list {
  margin: 0;
  padding-left: 28px;
}

.publication-entry {
  margin-bottom: 14px;
  padding-left: 5px;
}

.publication-title {
  font-weight: 400;
}

.publication-authors {
  margin-top: 2px;
}

.publication-meta {
  margin-top: 2px;
}

.pub-links {
  margin-left: 8px;
  white-space: nowrap;
}

.pub-links a + a {
  margin-left: 5px;
}

.patent-list {
  margin: 0;
  padding-left: 28px;
}

.patent-entry {
  margin-bottom: 14px;
  padding-left: 5px;
}

.patent-title {
  font-weight: 400;
}

.patent-authors {
  margin-top: 2px;
}

.patent-meta {
  margin-top: 2px;
}

.patent-meta {
  color: var(--muted);
}

.patent-grant {
  margin-top: 0;
}
