/* CSS Reset: http://meyerweb.com/eric/tools/css/reset */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}

body {
  line-height: 1;
}

ol, ul {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/**************************************************/

#body {
  background: #fff;
  color: #150c21;
  font-family: 'Asap', Roboto, sans-serif;
  font-size: 1em;
  line-height: 1.5em;
}

#main {
  position: relative;
  width: 54em;
  min-height: 100vh;
  margin: 0 auto;
}

a {
  color: rgb(20, 110, 190);
  text-decoration: none;
}

a:hover {
  border-bottom: 1px solid rgb(20, 110, 190);
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid rgb(20, 110, 190);
  outline-offset: 3px;
}

i {
  font-style: italic;
}

b {
  font-weight: 700;
}

h1 {
  font-size: 2.4em;
  font-weight: 500;
  line-height: 2.4em;
}

/**************************************************/
/* Profile image and description. */

#intro {
  display: flex;
  padding-top: 6em;
}

#intro-text {
  width: 40em;
}

#intro-text > p {
  margin-bottom: 1em;
}

.profile-links {
  display: flex;
  align-items: center;
  gap: 1.15em;
  margin-top: 1.5em;
}

.social-icon {
  display: inline-flex;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  color: rgb(20, 110, 190);
}

.social-icon:hover {
  border-bottom: none;
  color: #150c21;
}

.social-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.social-icon.scholar-icon svg,
.social-icon.mail-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

#intro-image {
  width: 12em;
  height: 12em;
  margin: 3em 0 0 2em;
  overflow: hidden;
  border-radius: 1em;
}

#intro-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 36% 28%;
  transform: scale(1.25) translate(11%, 9%);
}

/**************************************************/
/* Section buttons. */

.button {
  display: inline-block;
  float: left;
  margin-top: 0.5em;
  margin-right: 1em;
  padding: 0;
  border: none;
  background: none;
  color: #a0a8b0;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.6em;
  line-height: 2.4em;
}

.button:hover,
.button:active,
.button.is-checked {
  color: #150c21;
}

.button-group::after {
  display: block;
  clear: both;
  content: '';
}

/**************************************************/
/* Filtered list. */

.grid {
  padding-bottom: 8em;
}

.grid::after {
  display: block;
  clear: both;
  content: '';
}

.description {
  margin-bottom: 1em;
  padding-bottom: 0.5em;
}

.list-item {
  width: 100%;
  margin-top: 1em;
  line-height: 1em;
}

.list-item[hidden] {
  display: none;
}

.list-item p.date {
  display: inline-block;
  width: 3em;
  color: #a0a8b0;
}

.service.list-item:not(.description):not([hidden]),
.research.list-item:not(.description):not([hidden]) {
  display: grid;
  grid-template-columns: 3em minmax(0, 1fr);
  align-items: start;
  line-height: 1.5em;
}

.service.list-item:not(.description) p.date,
.research.list-item:not(.description) p.date {
  width: auto;
}

.service-detail,
.research-detail {
  min-width: 0;
}

.opensource.list-item:not(.description):not([hidden]) {
  display: grid;
  grid-template-columns: 6.5em minmax(0, 1fr);
  align-items: start;
  line-height: 1.5em;
}

.opensource-role {
  color: #a0a8b0;
}

.opensource-detail {
  min-width: 0;
}

/**************************************************/
/* Publication details. */

h3 {
  font-size: 1em;
  line-height: 1.5em;
}

h3 a {
  color: #150c21;
}

h3 a:hover {
  color: rgb(20, 110, 190);
}

.publication {
  margin-bottom: 1.6em;
}

.publication h3 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 1.5em;
}

.publication h3 > span:first-child {
  color: #150c21;
  font-size: 1.05em;
  font-weight: 700;
}

.publication p {
  margin-top: 0.35em;
  color: #4f5963;
  font-size: 1em;
  line-height: 1.5em;
}

.publication .publication-authors {
  margin-top: 0.35em;
  color: #6f7780;
  font-size: 0.9em;
  font-weight: 400;
}

.publication .publication-links {
  margin-top: 0.1em;
  font-size: 0.92em;
}

.publication .publication-summary {
  margin-top: 0.5em;
}

.publication-citation {
  color: #4f5963;
  font-size: 0.92em;
  text-align: right;
  white-space: nowrap;
}

.project-description {
  float: left;
  width: 80%;
}

.project-description.full-width {
  float: none;
  width: 100%;
}

@media (max-width: 920px) {
  #main {
    width: auto;
    margin: 0 2em;
  }

  #intro-text {
    width: calc(100% - 14em);
  }
}

@media (max-width: 660px) {
  #main {
    margin: 0 1.25em;
  }

  #intro {
    flex-direction: column-reverse;
    padding-top: 2.5em;
  }

  #intro-text {
    width: 100%;
  }

  #intro-image {
    width: 10em;
    height: 10em;
    margin: 0 0 1.5em;
  }

  h1 {
    font-size: 2em;
    line-height: 1.4em;
    margin-bottom: 0.6em;
  }

  .profile-links {
    line-height: 2em;
  }

  .button {
    margin-right: 0.75em;
    font-size: 1.25em;
  }

  .list-item {
    line-height: 1.5em;
  }

  .list-item p.date {
    display: block;
  }

  .publication h3 {
    grid-template-columns: minmax(0, 1fr) 8.5em;
    gap: 0.75em;
  }

  .publication-citation {
    white-space: normal;
  }
}
