:root {
  --gray: #7a8288;
  --dark-gray: #494e52;
  --light-gray: #bdc1c4;
  --lighter-gray: #f2f3f3;
  --link: #224b8d;
  --link-hover: #19386a;
  --font: "Trebuchet MS", Helvetica, sans-serif;
  --max-width: 1280px;
}

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

html {
  min-height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 60px;
}

body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  background: #fff;
  color: var(--dark-gray);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: var(--link);
}

a:hover,
a:active {
  color: var(--link-hover);
  outline: 0;
}

p {
  margin: 0 0 0.5em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 1em 0 0.5em;
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  margin-top: 1em;
  font-size: 1.4em;
}

h2 {
  font-size: 1.2em;
}

h3,
h4,
h5,
h6 {
  font-size: 1em;
}

ul {
  margin-block-start: 0.5em;
  padding-inline-start: 2em;
}

ul li,
ol li {
  margin-bottom: 0.5em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--lighter-gray);
  transform: translateY(-150%);
}

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

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--lighter-gray);
  animation: intro 0.3s both 0.15s;
}

.masthead__inner-wrap {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 0.5em;
  font-family: var(--font);
}

.greedy-nav {
  position: relative;
  min-width: 250px;
  background: #fff;
}

.visible-links {
  display: table;
  margin: 0;
  padding: 0;
  list-style: none;
}

.masthead__menu-item {
  display: table-cell;
  margin: 0;
  vertical-align: middle;
  white-space: nowrap;
}

.masthead__menu-item--lg {
  padding-right: 2em;
  font-weight: 700;
}

.masthead__menu-item a {
  position: relative;
  display: block;
  margin: 0 1rem;
  padding: 0.5rem 0;
  color: var(--gray);
  text-decoration: none;
}

.masthead__menu-item:first-child a {
  margin-left: 0;
}

.masthead__menu-item:last-child a {
  margin-right: 0;
}

.masthead__menu-item a::before {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: #bdc1c4;
  content: "";
  transform: scaleX(0);
  transition: transform 0.2s ease-in-out;
}

.masthead__menu-item a:hover {
  color: #5b6267;
}

.masthead__menu-item a:hover::before,
.masthead__menu-item a:focus-visible::before {
  transform: scaleX(1);
}

.nav-toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: none;
  width: 48px;
  height: 100%;
  padding: 0 0.5rem;
  border: 0;
  background: var(--gray);
  color: #fff;
  cursor: pointer;
}

.navicon,
.navicon::before,
.navicon::after {
  position: absolute;
  left: 10px;
  width: 28px;
  height: 3px;
  background: #fff;
  content: "";
  transition: transform 0.2s ease;
}

.navicon {
  top: calc(50% - 1px);
}

.navicon::before {
  top: -8px;
  left: 0;
}

.navicon::after {
  top: 8px;
  left: 0;
}

#main {
  display: grid;
  width: min(100%, var(--max-width));
  margin: 1em auto 0;
  padding: 0 1em;
  grid-template-columns: minmax(150px, 2fr) minmax(0, 10fr);
  animation: intro 0.3s both 0.35s;
}

.sidebar {
  min-width: 0;
  margin-bottom: 1em;
  padding-right: 1.5em;
}

.profile-box {
  display: block;
}

.author__avatar {
  display: block;
  width: auto;
  height: auto;
}

.author__avatar img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 175px;
  min-width: 75px;
  aspect-ratio: 1;
  object-fit: cover;
  padding: 5px;
  border: 1px solid var(--lighter-gray);
  border-radius: 50%;
}

.author__content {
  display: block;
  width: 100%;
  min-width: 120px;
  padding: 0;
  line-height: 1;
}

.sidebar .author__name {
  margin: 10px 0;
  font-family: var(--font);
  font-size: 1.4em;
}

.author__bio {
  margin: 10px 0 20px;
  font-size: 1em;
  line-height: 1.5;
}

.author__urls-wrapper {
  position: relative;
  z-index: 10;
  display: block;
  font-family: var(--font);
}

.author__urls {
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  list-style: none;
}

.author__urls li {
  margin: 0;
  font-size: 1em;
  line-height: 1.5;
  white-space: nowrap;
}

.author__urls .research-description {
  margin-bottom: 1em;
  white-space: normal;
}

.author__urls a {
  display: block;
  margin-bottom: 5px;
  padding: 2px 5px 2px 0;
  color: inherit;
  font-size: 1em;
  text-decoration: none;
}

.author__urls a:hover {
  color: inherit;
  text-decoration: underline;
}

.author__urls i {
  color: var(--dark-gray);
}

.author__urls-sm {
  display: none;
}

.page {
  min-width: 0;
  padding-left: 4.1667%;
}

.page__inner-wrap,
.page__content {
  width: 100%;
}

.page__content .anchor {
  position: relative;
  display: block;
  width: 0;
  height: 0;
  visibility: hidden;
}

.page__content h1 {
  margin-top: 1em;
  padding-bottom: 0.5em;
  border-bottom: 1px solid var(--lighter-gray);
}

.page__content p,
.page__content li,
.page__content dl {
  font-size: 1em;
}

.page__content a {
  color: var(--link);
  text-decoration: underline;
}

.page__content a:hover {
  color: var(--link-hover);
}

.publication-note {
  color: var(--dark-gray);
}

.publication-list li {
  margin-bottom: 0.8em;
}

.site-footer {
  width: min(calc(100% - 2em), var(--max-width));
  margin: 2.5rem auto 0;
  padding: 1.1rem 1rem 1.5rem;
  border-top: 1px solid var(--lighter-gray);
  color: var(--gray);
  font-size: 12px;
  text-align: center;
}

.page-view-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  white-space: nowrap;
}

.page-view-counter svg {
  width: 15px;
  height: 15px;
}

#homepage-view-count {
  font-variant-numeric: tabular-nums;
}

@keyframes intro {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 924px) {
  #main {
    display: block;
  }

  .sidebar {
    padding-right: 0;
  }

  .profile-box {
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  .author__avatar {
    display: table-cell;
    width: 75px;
    vertical-align: top;
  }

  .author__avatar img {
    width: 75px;
    min-width: 75px;
    padding: 0;
    border: 0;
  }

  .author__content {
    display: table-cell;
    width: auto;
    padding-left: 10px;
    vertical-align: top;
  }

  .sidebar .author__name {
    margin: 0;
    font-size: 1.2em;
  }

  .author__bio {
    max-width: 260px;
    margin: 4px 0 0;
  }

  .author__urls-wrapper {
    display: table-cell;
    margin-left: auto;
    vertical-align: middle;
  }

  .author__urls {
    display: none;
  }

  .author__urls-sm {
    display: flex;
    padding: 0.25em;
    gap: 10px;
    font-size: 1.45em;
  }

  .author__urls-sm a {
    color: inherit;
  }

  .page {
    padding-left: 0;
  }
}

@media (max-width: 680px) {
  html {
    scroll-padding-top: 50px;
  }

  .masthead__inner-wrap {
    min-height: 46px;
  }

  .greedy-nav {
    min-height: 32px;
  }

  .nav-toggle {
    display: block;
  }

  .visible-links {
    position: absolute;
    top: 38px;
    right: 0;
    z-index: 30;
    display: none;
    width: min(280px, calc(100vw - 1em));
    padding: 5px;
    border: 1px solid var(--lighter-gray);
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
  }

  .visible-links.open {
    display: block;
  }

  .masthead__menu-item {
    display: block;
    border-bottom: 1px solid var(--lighter-gray);
  }

  .masthead__menu-item:last-child {
    border-bottom: 0;
  }

  .masthead__menu-item--lg {
    padding-right: 0;
  }

  .masthead__menu-item a,
  .masthead__menu-item:first-child a,
  .masthead__menu-item:last-child a {
    margin: 0;
    padding: 10px 20px;
    font-size: 1em;
  }

  .masthead__menu-item a::before {
    display: none;
  }

  #main {
    margin-top: 0.75em;
    padding: 0 0.75em;
  }

  .profile-box {
    align-items: flex-start;
  }

  .author__bio {
    max-width: 160px;
    font-size: 0.82em;
  }

  .author__urls-sm {
    gap: 8px;
    font-size: 1.25em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
