/* Adapted from https://github.com/jonbarron/jonbarron_website */

:root {
  --bg: #ffffff;
  --text: #222222;
  --muted: #666666;
  --link: #1772d0;
  --link-hover: #f09228;
  --highlight: #ffffd0;
  --award: #c0392b;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161616;
    --text: #e6e6e6;
    --muted: #a0a0a0;
    --link: #6aa9ff;
    --link-hover: #f5a54a;
    --highlight: #2c2a17;
    --award: #ff6b5b;
  }
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body, td, th, tr, p, a, strong {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
}

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

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

h2 {
  margin: 0;
  font-weight: normal;
  font-size: 22px;
}

table {
  width: 100%;
  border: 0;
  border-spacing: 0;
  border-collapse: separate;
  margin-right: auto;
  margin-left: auto;
}

table.page {
  max-width: 800px;
}

.name {
  padding-top: 20px;
  margin: 0;
  font-size: 32px;
  text-align: center;
}

.intro {
  padding: 2.5%;
  width: 63%;
  vertical-align: middle;
}

.links {
  text-align: center;
}

.photo {
  padding: 2.5%;
  width: 37%;
  max-width: 37%;
}

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

.heading {
  padding: 16px;
  vertical-align: middle;
}

.papers {
  border-spacing: 0 10px;
}

.papers tr.highlight,
span.highlight {
  background-color: var(--highlight);
}

.teaser {
  padding: 16px;
  width: 25%;
  vertical-align: middle;
}

.teaser img,
.teaser video {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 6px;
}

.details {
  padding: 8px;
  width: 75%;
  vertical-align: middle;
  line-height: 1.5;
}

.papertitle {
  font-weight: 700;
}

.award {
  color: var(--award);
  font-weight: 700;
}

.misc td {
  padding: 0 16px 16px;
  line-height: 1.8;
}

.credit {
  text-align: right;
  font-size: small;
  color: var(--muted);
  padding: 16px 16px 0;
}

@media (max-width: 600px) {
  table, tbody, tr, td {
    display: block;
    width: auto !important;
    max-width: none;
  }

  .intro, .photo, .teaser, .details, .heading, .misc td {
    padding: 8px 16px;
  }

  .photo {
    text-align: center;
  }

  .photo img {
    max-width: 220px;
    margin: 0 auto;
    display: block;
  }

  .papers tr {
    margin-bottom: 16px;
  }

  .teaser img,
  .teaser video {
    max-height: 220px;
  }
}
