/* Adapted from Jon Barron's website template: https://github.com/jonbarron/jonbarron_website */

:root {
  --link: #1772d0;
  --link-hover: #f09228;
  --text: #222;
  --muted: #666;
  --highlight: #ffffd0;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

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

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

strong {
  font-weight: 700;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 16px 8px;
  box-sizing: border-box;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  gap: 4%;
  padding: 2.5% 0;
}

.header-text {
  flex: 0 0 63%;
}

.header-photo {
  flex: 0 0 33%;
  text-align: center;
}

.header-photo img {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
}

.name {
  margin: 0 0 16px;
  text-align: center;
  font-size: 32px;
  font-weight: 400;
}

.header-text p {
  margin: 0 0 14px;
}

.header-links {
  text-align: center;
}

.header-links a + a::before {
  content: " / ";
  color: var(--text);
}

/* Section headings */
h2 {
  margin: 28px 0 10px;
  font-size: 22px;
  font-weight: 400;
}

.year {
  margin: 22px 0 4px;
  padding-left: 2.5%;
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
}

/* News */
.news {
  max-height: 114px;
  margin: 0;
  padding: 0 0 0 2.5%;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: #d8d8d8 transparent;
  -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent);
  mask-image: linear-gradient(to bottom, #000 75%, transparent);
}

.news.at-end {
  -webkit-mask-image: none;
  mask-image: none;
}

.news::-webkit-scrollbar {
  width: 4px;
}

.news::-webkit-scrollbar-thumb {
  background: #d8d8d8;
  border-radius: 2px;
}

.news li {
  display: flex;
  gap: 12px;
  padding: 2px 0;
}

.news .date {
  flex: 0 0 60px;
  font-style: italic;
  color: var(--muted);
}

/* Publications */
.paper {
  display: flex;
  align-items: center;
  gap: 4%;
  padding: 16px 2.5%;
  border-radius: 6px;
}

.paper-image {
  flex: 0 0 26%;
}

.paper-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.paper-text {
  flex: 1;
  min-width: 0;
}

.papertitle {
  font-size: 14px;
  font-weight: 700;
}

.paper-text p {
  margin: 4px 0;
}

.award {
  color: #c00;
}

.links a + a::before {
  content: " / ";
  color: var(--text);
}

/* Visitor map */
.visitor-map {
  max-width: 300px;
  margin: 8px auto 0;
  text-align: center;
}

.visitor-map img {
  max-width: 100%;
}

/* Footer */
.footer {
  margin-top: 28px;
  padding: 12px 0 24px;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
}

/* Narrow screens */
@media (max-width: 640px) {
  .header {
    flex-direction: column-reverse;
    gap: 16px;
  }

  .header-text,
  .header-photo {
    flex: none;
    width: 100%;
  }

  .header-photo img {
    max-width: 180px;
  }

  .paper {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .paper-image {
    flex: none;
  }

  .footer {
    text-align: center;
  }
}
