:root {
  --text: #222222;
  --muted: #666666;
  --link: #1756a9;
  --line: #dddddd;
  --note: #f6f7f8;
  --focus: #c06420;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  background: #ffffff;
}

body {
  margin: 0;
  color: var(--text);
  background: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-underline-offset: 0.16em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0.55rem 0.75rem;
  background: #ffffff;
  transform: translateY(-120%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page {
  width: min(calc(100% - 2rem), 780px);
  margin: 0 auto;
  padding: 2.5rem 0 1.5rem;
}

.profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 2rem;
  align-items: start;
  margin-bottom: 0;
}

.profile-text {
  grid-column: 1;
  grid-row: 1;
}

.profile-photo {
  grid-column: 2;
  grid-row: 1;
  display: block;
  width: 148px;
  height: auto;
  border-radius: 4px;
}

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

h1 {
  margin-bottom: 0.15rem;
  font-size: 2.15rem;
  line-height: 1.25;
}

.role {
  margin-bottom: 0.75rem;
  color: var(--muted);
}

.profile p:not(.role) {
  max-width: 70ch;
  margin-bottom: 0.5rem;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin-top: 0.75rem;
}

.profile-links span {
  color: #aaaaaa;
}

section {
  margin-top: 1.75rem;
}

h2 {
  margin-bottom: 0.75rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.4rem;
  line-height: 1.3;
}

h3 {
  margin-bottom: 0.15rem;
  font-size: 1.05rem;
  line-height: 1.45;
}

.publication {
  margin-bottom: 0.85rem;
}

.publication:last-child {
  margin-bottom: 0;
}

.publication p {
  margin-bottom: 0;
}

.item-links {
  margin-left: 0.5rem;
  font-size: 0.94rem;
}

.item-links a {
  display: inline-block;
}

.item-links a + a {
  margin-left: 0.5rem;
}

section > p {
  margin-bottom: 0.5rem;
}

.project p {
  margin-bottom: 0.75rem;
}

.project ul {
  margin: 0.25rem 0 1rem;
  padding-left: 1.3rem;
}

.project li {
  margin-bottom: 0.15rem;
}

.authors-note {
  margin: -0.25rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.publication sup,
.authors-note sup {
  line-height: 0;
}

.project + .project {
  margin-top: 1.75rem;
}

.project figure {
  margin: 1rem 0;
}

.project figure a {
  display: block;
}

.project figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.project-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 1.5rem;
  margin: 1.25rem 0;
}

.project-gallery figure {
  min-width: 0;
  margin: 0;
}

.project-gallery figure a {
  display: flex;
  height: 240px;
  align-items: center;
  justify-content: center;
}

.project-gallery figure img {
  width: auto;
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
}

.education-entry + .education-entry {
  margin-top: 0.75rem;
}

.education-entry p {
  margin-bottom: 0;
}

.experience-list {
  margin: 0;
  padding-left: 1.25rem;
}

.experience-list li + li {
  margin-top: 0.25rem;
}

.project figcaption {
  max-width: 70ch;
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

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

@media (max-width: 640px) {
  .profile {
    display: flow-root;
  }

  .profile-photo {
    float: right;
    width: 88px;
    margin: 0 0 0.75rem 1rem;
  }

  .profile-text {
    display: contents;
  }

  .page {
    padding-top: 1.5rem;
  }

  h1 {
    font-size: 1.85rem;
  }

  section {
    margin-top: 1.75rem;
  }

  .publication {
    margin-bottom: 0.85rem;
  }

  .project-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .project-gallery figure:last-child {
    grid-column: 1 / -1;
  }

  .project-gallery figure a {
    height: auto;
  }

  .project-gallery figure img {
    max-height: 220px;
  }

}
