:root {
  --bg: #ffffff;
  --text: #222222;
  --muted: #555555;
  --rule: #dddddd;
  --link: #2a6478;
  --max: 820px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--link);
  text-decoration-color: rgba(42, 100, 120, 0.35);
  text-underline-offset: 0.16em;
}

a:hover {
  color: #17495a;
  text-decoration-color: rgba(23, 73, 90, 0.55);
}

main,
footer {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 275px;
  align-items: center;
  gap: 36px;
  padding: 52px 0 34px;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  line-height: 1.25;
}

h1 {
  font-size: 2.6rem;
  font-weight: 500;
}

h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

h3 {
  margin: 18px 0 0;
  font-size: 1rem;
  font-weight: 700;
}

.intro-copy p:first-of-type {
  margin-top: 14px;
}

.intro p:last-child,
.section p:last-child,
.section ul:last-child,
.section ol:last-child {
  margin-bottom: 0;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 18px;
}

.links a {
  font-weight: 600;
}

.profile-photo {
  margin: 0;
}

.profile-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 62%;
  border-radius: 8px;
  border: 1px solid var(--rule);
}

.section {
  padding: 30px 0;
  border-top: 1px solid var(--rule);
}

.section p,
.section li {
  color: var(--text);
}

ul,
ol {
  margin: 12px 0 0;
  padding-left: 22px;
}

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

.pub-list li {
  padding-left: 2px;
}

footer {
  padding-top: 20px;
  padding-bottom: 36px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.92rem;
}

footer p {
  margin: 0;
}

@media (max-width: 640px) {
  h1 {
    font-size: 2.25rem;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 34px;
  }

  .profile-photo {
    order: -1;
    justify-self: center;
    width: clamp(170px, 48vw, 210px);
  }
}
