@font-face {
  font-family: Raleway;
  src: url("../assets/fonts/raleway.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color: #222;
  background: #fff;
  font-family: Raleway, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 93.75%;
  line-height: 1.6;
  --rule: #eee;
  --link: #087895;
  --link-hover: #075a70;
}

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

body {
  margin: 0;
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

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

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

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 3;
  padding: 0.4rem 0.75rem;
  background: #fff;
  transform: translateY(-150%);
}

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

.page {
  width: 100%;
  max-width: 800px;
  margin-inline: auto;
  padding-inline: 20px;
}

p, ul, ol {
  margin: 0 0 25px;
}

ul, ol {
  padding-left: 0;
  list-style-position: inside;
}

ul {
  list-style-type: circle;
}

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

b, strong {
  font-weight: 700;
}

h1, h2, h3 {
  margin: 0;
}

h1, h2, .reading-year {
  font-weight: 300;
}

h1 {
  font-size: 2.6667rem;
  line-height: 1.2;
  letter-spacing: -1px;
}

h2 {
  margin-bottom: 20px;
  font-size: 1.6rem;
  line-height: 1.35;
  letter-spacing: 1px;
}

.profile {
  margin-block: 60px;
}

.profile-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 704 / 674;
  object-fit: cover;
  margin-bottom: 7px;
  background: #e9eef1;
}

.profile-details p {
  margin: 0;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
}

.profile-icon {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #222;
}

.profile-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.profile-links .profile-cv {
  margin-inline-start: 5px;
}

.navigation {
  display: none;
}

.academic-section {
  border-top: 1px solid var(--rule);
  padding-block: 40px;
  scroll-margin-top: 1rem;
}

.academic-section + .academic-section {
  margin-top: 10px;
}

.academic-section > :last-child > :last-child {
  margin-bottom: 0;
}

.load-error {
  padding-block: 0.5rem;
  color: #982a26;
}

.publication-tabs {
  display: flex;
  align-items: end;
  gap: 4px;
  margin-bottom: 25px;
  padding-left: 5px;
  border-bottom: 1px solid #bbb;
}

.publication-tabs button {
  margin: 0 0 -1px;
  padding: 0 30px;
  min-height: 38px;
  border: 1px solid #bbb;
  border-radius: 4px 4px 0 0;
  background: #fff;
  color: #555;
  font: 500 0.8667rem/1.3 Raleway, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
}

.publication-tabs button[aria-selected="true"] {
  border-bottom-color: #fff;
  color: #222;
  font-weight: 600;
}

.publication-tabs button:hover {
  color: #222;
}

.publication, .project {
  margin-bottom: 20px;
}

.publication h3, .project h3 {
  margin: 0 0 2px;
  font-size: inherit;
  font-weight: 700;
}

.publication p, .project p {
  margin: 0 0 2px;
}

.author-note {
  font-size: 0.75em;
  line-height: 0;
}

.entry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 5px 0 10px;
}

.resource-link, .citation summary {
  display: inline-block;
  padding: 0 25px;
  min-height: 25px;
  border: 1px solid #aaa;
  border-radius: 4px;
  color: #555;
  font-size: 0.7333rem;
  line-height: 24px;
  letter-spacing: 1px;
  text-decoration: none;
  cursor: pointer;
}

.resource-link:hover, .citation summary:hover {
  border-color: #555;
  color: #222;
}

.citation pre {
  overflow: auto;
  max-width: 100%;
  margin: 5px 0 10px;
  padding: 10px;
  border: 1px solid var(--rule);
  white-space: pre-wrap;
}

.news-list, .reading-list {
  max-width: 100%;
  padding: 2px;
}

.news-list {
  max-height: 304px;
  overflow: auto;
}

.reading-year {
  font-size: 1.35rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

@media (min-width: 400px) {
  .page {
    width: 85%;
    padding-inline: 0;
  }
}

@media (min-width: 550px) {
  .page {
    width: 80%;
  }

  .profile {
    display: grid;
    grid-template-columns: 22% 74%;
    gap: 4%;
    margin-top: 50px;
  }

  h1 {
    font-size: 3.3333rem;
  }

  h2 {
    font-size: 2rem;
  }
}

@media (min-width: 750px) {
  .navigation {
    display: block;
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
  }

  .navigation-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0 35px;
    align-items: center;
    min-height: 67px;
    border-block: 1px solid var(--rule);
  }

  .navigation a {
    color: #222;
    font-size: 0.7333rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-decoration: none;
    text-transform: uppercase;
  }

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

  main.page {
    margin-top: 10px;
  }

  .academic-section {
    scroll-margin-top: 77px;
  }

  .profile-links .profile-cv {
    display: none;
  }
}

/* Align publication buttons horizontally */
.publication .entry-links {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 5px 5px 10px 0;
    vertical-align: top;
}

.publication .citation {
    display: inline-block;
    margin: 5px 0 10px;
    vertical-align: top;
    max-width: 100%;
}

.publication .citation[open] {
    display: block;
}
