:root {
  color-scheme: light dark;
  --text: #282d2b;
  --background: #faf9f6;
  --muted: #646962;
  --accent: #285e51;
  --border: #dedfd8;
  --portrait-background: #e6ede9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--background);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

body { margin: 0; }

.page {
  width: min(100% - 4rem, 58rem);
  margin-inline: auto;
  padding-block: clamp(3rem, 12vh, 8rem) 2rem;
}

.identity {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 0;
}

.name-block { min-width: 0; max-width: 100%; justify-self: start; text-align: left; }

main { margin-top: 2.75rem; }

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(2.75rem, 5vw, 3.75rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.role {
  margin: 0.875rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.biography p {
  margin: 0 0 1rem;
  font-size: 1.0625rem;
  line-height: 1.8;
}

.biography p:last-child { margin-bottom: 0; }

.portrait {
  position: relative;
  overflow: hidden;
  width: 10rem;
  justify-self: center;
  aspect-ratio: 4 / 5;
  border-radius: 0.375rem;
  background: var(--portrait-background);
}

/* Focus the frame on the central graduate, using the original photo. */
.portrait img {
  position: absolute;
  width: 280%;
  max-width: none;
  height: auto;
  left: -94%;
  top: 0;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  font-size: 1rem;
  line-height: 1.8;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}

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

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

footer {
  margin-top: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}

footer p { margin: 0; }

@media (max-width: 46rem) {
  .page { width: min(100% - 3rem, 32rem); padding-top: 2rem; }
  .identity { grid-template-columns: 1fr; gap: 2rem; }
  .portrait { width: min(100%, 10rem); justify-self: start; }
  h1 { font-size: clamp(2.75rem, 10vw, 3.25rem); }
  main { margin-top: 2rem; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e9e8e2;
    --background: #181a19;
    --muted: #a3aba5;
    --accent: #aad7c2;
    --border: #353a36;
    --portrait-background: #272e2a;
  }
}
