:root {
  --text: #222222;
  --muted: #666666;
  --link: #315f86;
  --border: #d8d8d8;
  --background: #ffffff;
  --subtle-background: #f7f7f7;
  --page-width: 880px;
}

* {
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.65;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--page-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
}

.site-name {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: bold;
}

.site-name:hover {
  text-decoration: none;
}

.site-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-navigation a {
  color: var(--muted);
}

.site-navigation a.active {
  color: var(--text);
  font-weight: bold;
}

.page {
  width: min(var(--page-width), calc(100% - 40px));
  min-height: 70vh;
  margin: 55px auto 90px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 55px;
  align-items: start;
}

.intro h1 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 2.35rem;
  font-weight: normal;
  line-height: 1.2;
}

.position {
  margin-top: 0;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1.08rem;
}

.intro-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
}

section {
  margin-bottom: 58px;
}

section:not(.intro) {
  clear: both;
}

h2 {
  margin-top: 0;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
  font-size: 1.55rem;
  font-weight: normal;
}

h3 {
  margin-bottom: 5px;
  font-size: 1.12rem;
}

.item {
  margin: 28px 0;
}

.item p {
  margin: 6px 0;
}

.item-details {
  color: var(--muted);
  font-style: italic;
}

.math {
  white-space: nowrap;
}

.button {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 14px;
  border: 1px solid var(--link);
  border-radius: 3px;
}

.button:hover {
  color: var(--background);
  background: var(--link);
  text-decoration: none;
}

.site-footer {
  padding: 25px 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  background: var(--subtle-background);
  text-align: center;
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 760px) {
  .header-inner {
    display: block;
  }

  .site-navigation {
    margin-top: 15px;
    gap: 10px 16px;
  }

  .intro {
    display: flex;
    flex-direction: column-reverse;
    gap: 30px;
  }

  .intro-photo img {
    width: 190px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .header-inner,
  .page {
    width: min(100% - 28px, var(--page-width));
  }

  .page {
    margin-top: 38px;
  }

  .site-navigation {
    font-size: 0.95rem;
  }

  .intro h1 {
    font-size: 2rem;
  }
}
