@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/lato-regular.woff2") format("woff2");
}

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

:root {
  color-scheme: light;
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  color: #222;
  background: #fff;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
}

.page {
  width: min(100% - 48px, 900px);
  margin: 48px auto 28px;
}

a {
  color: #1772d0;
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  color: #d87919;
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid #1772d0;
  outline-offset: 4px;
  border-radius: 2px;
}

p {
  margin: 0 0 14px;
}

h1 {
  margin: 0 0 22px;
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -1px;
  line-height: 1.2;
  text-align: center;
}

h2 {
  margin: 0 0 14px;
  padding-bottom: 7px;
  border-bottom: 1px solid #eaeaea;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
}

.profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  align-items: center;
  gap: 44px;
  margin-bottom: 32px;
}

.portrait {
  display: block;
  border-radius: 6px;
}

.portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 9px;
  margin-top: 18px;
}

.contact span,
.paper-links span {
  color: #777;
}

section {
  margin-top: 30px;
}

ul {
  padding-left: 21px;
  margin: 0;
}

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

.publication {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  align-items: center;
  gap: 26px;
  padding: 10px 0 4px;
}

.publication + .publication {
  margin-top: 24px;
}

.paper-image {
  display: block;
}

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

.paper-details h3 {
  margin: 0 0 5px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.paper-details p {
  margin-bottom: 4px;
}

.authors {
  font-size: 14px;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
}

.paper-details .paper-summary {
  margin: 10px 0 0;
}

.education-list {
  line-height: 1.7;
}

footer {
  margin-top: 46px;
  text-align: right;
  font-size: 12px;
  color: #777;
}

footer p {
  margin: 0;
}

@media (max-width: 640px) {
  .page {
    width: calc(100% - 40px);
    margin-top: 28px;
  }

  .profile {
    display: flex;
    flex-direction: column-reverse;
    gap: 22px;
    margin-bottom: 28px;
  }

  .portrait {
    width: 140px;
  }

  h1 {
    margin-bottom: 24px;
    font-size: 32px;
  }

  .contact {
    margin-top: 16px;
  }

  .publication {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .paper-image {
    width: min(100%, 300px);
    margin: 0 auto;
  }

  footer {
    margin-top: 32px;
    text-align: center;
  }
}

@media print {
  .page {
    width: 100%;
    margin: 0;
  }

  a {
    color: inherit;
  }

  .publication {
    break-inside: avoid;
  }
}
