:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  color: #494e52;
  background: #fff;
  --muted: #646c70;
  --rule: #e9ecee;
  --link: #23768c;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--link); text-underline-offset: 0.13em; }
a:hover { color: #154b5a; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }

.wrap {
  width: min(100%, 1280px);
  margin-inline: auto;
  padding-inline: 1.1rem;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
  padding: 0.45rem 0.8rem;
  background: white;
  transform: translateY(-160%);
}

.skip-link:focus { transform: none; }

.masthead { border-bottom: 1px solid var(--rule); }

.masthead nav {
  min-height: 3.85rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 2rem;
  row-gap: 0.3rem;
  padding-block: 0.9rem;
}

.masthead a {
  color: #555d61;
  text-decoration: none;
}

.masthead a:hover,
.masthead a[aria-current="page"]:not(.site-name) {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.site-name { font-weight: 700; }

.layout {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: clamp(2rem, 4.5vw, 4rem);
  align-items: start;
  flex: 1;
  padding-top: 2rem;
  padding-bottom: 3.3rem;
}

.profile { font-size: 0.79rem; }

.profile-photo {
  display: block;
  width: 175px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  padding: 5px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  object-fit: cover;
}

.profile-name {
  margin: 0.55rem 0 0.2rem;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 700;
}

.profile-role { margin: 0; }

.profile-details { margin-top: 0.85rem; }
.profile-details summary { display: none; }

.profile-links {
  display: grid;
  gap: 0.36rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.profile-links li {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}

.profile-links a { color: inherit; text-decoration: none; }
.profile-links a:hover { text-decoration: underline; }

.profile-links svg {
  width: 1em;
  height: 1em;
  flex: none;
  align-self: center;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.content { max-width: 46rem; }
.content h1, .content h2, .content h3 { line-height: 1.25; }
.content h1 { font-size: 1.57rem; margin: 0 0 0.72rem; }
.content h2 {
  font-size: 1.23rem;
  margin: 1.9rem 0 0.8rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--rule);
}
.content h3 { font-size: 1.04rem; margin: 1.15rem 0 0.25rem; }
.content p { margin: 0 0 1.15rem; }
.content ol, .content ul { margin: 0 0 1rem; padding-left: 1.42rem; }
.content li { margin-bottom: 0.46rem; }
.content .citation { margin-bottom: 0.55rem; color: var(--muted); font-size: 0.92rem; }

.cv-pdf {
  display: block;
  width: 100%;
  height: clamp(28rem, 80vh, 65rem);
  border: 1px solid var(--rule);
}

.footer {
  background: #f2f3f3;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-block: 1.5rem 1.75rem;
  font-size: 0.75rem;
}

.footer p { margin: 0; }

@media (max-width: 899px) {
  .layout { display: block; padding-top: 1.35rem; }
  .profile {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.55rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--rule);
  }
  .profile-photo { width: 48px; padding: 2px; }
  .profile-name { margin-top: 0; }
  .profile-details { margin-top: 0; position: relative; }
  .profile-details summary {
    display: list-item;
    cursor: pointer;
    padding: 0.3rem 0.55rem;
    border: 1px solid #d7dce0;
    border-radius: 0.2rem;
  }
  .profile-details .profile-links {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    width: max-content;
    max-width: calc(100vw - 2.2rem);
    padding: 0.6rem 0.75rem;
    background: white;
    border: 1px solid #d7dce0;
    border-radius: 0.2rem;
    box-shadow: 0 4px 14px #17262f14;
    z-index: 1;
  }
}

@media (max-width: 600px) {
  :root { font-size: 16px; }
  .masthead nav { column-gap: 1.15rem; }
  .masthead .site-name { flex-basis: 100%; }
}
