:root {
  --bleed: 1.5rem;
  --sidebar-width: 10rem;
  --sidebar-gap: 1rem;
  --content-width: 65ch;
  --content-margin: calc(
    var(--bleed) + var(--sidebar-width) + var(--sidebar-gap)
  );
  --gallery-item-gap: 20px;
  --body-font-size: 16px;
  --section-gap: 4rem;
  --subsection-gap: 4rem;
  --top-gap: 4rem;
  --image-border-radius: 4px;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", serif;
  font-size: var(--body-font-size);
  line-height: 1.25rem;
  padding-top: var(--top-gap);
}

body > * {
  margin-left: var(--content-margin);
  margin-right: var(--bleed);
  max-width: var(--content-width);
}

footer {
  margin-top: var(--section-gap);
  margin-bottom: var(--bleed);
  text-align: right;
}

hr {
  clear: both;
  visibility: hidden;
  height: var(--section-gap);
}

h1,
h2,
h3 {
  font-family: "IBM Plex Sans", sans-serif;
  font-style: bold;
}

h1 {
  font-size: 60px;
  font-weight: bold;
  line-height: 1em;
  margin-bottom: 0;
}

h3 {
  margin-top: var(--subsection-gap);
}

code,
pre {
  font-family: "IBM Plex Mono", monospace;
}

blockquote {
  font-size: 90%;
  padding-left: 2em;
}

blockquote .source {
  display: inline-block;
  width: 100%;
  text-align: right;
}

em,
cite {
  font-style: normal;
  font-weight: bold;
}

ins {
  text-decoration: none;
  font-style: italic;
}

a {
  text-decoration: none;
  color: red;
}

a:hover {
  background-color: red;
  color: white;
}

a:hover > img {
  opacity: 0.5;
  filter: grayscale(100%) brightness(120%);
}

a:hover > img.thumb {
  filter: none;
}

a[href=""] {
  background-color: yellow;
}

a[href=""] > img {
  opacity: 0.5;
}

aside {
  margin-left: var(--bleed);
  max-width: 100%;
  width: calc(var(--sidebar-width));
  position: absolute;
  text-align: right;
}

aside a {
  display: inline-block;
}

aside img {
  width: var(--sidebar-width);
}

img {
  border-radius: var(--image-border-radius);
}

.panini {
  font-variant: small-caps;
}

p.footnote {
  font-size: small;
  line-height: 1.2;
  max-width: 80ch;
}

/*-----------------------------------------------------------------*/

.gallery {
  margin-left: 0;
  margin-right: 0;
  max-width: 100%;
  display: flex;
  overflow-x: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gallery::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.gallery > * {
  padding-right: var(--gallery-item-gap);
}

.gallery > *:first-child {
  padding-left: max(var(--gallery-item-gap), var(--bleed));
}

.gallery > *:last-child {
  padding-right: max(var(--gallery-item-gap), var(--bleed));
}

.gallery a {
  display: inline-block;
  border-radius: var(--image-border-radius);
}

/*-----------------------------------------------------------------*/

ul.big {
  padding: 0;
  list-style-type: "▐  ";
}

ul.big > li {
  padding-bottom: 1em;
}

p.big {
  display: list-item;
  list-style-type: "▐  ";
}

img.thumb {
  width: 64px;
  border: 1px solid black;
  box-shadow: 2px 2px 0px 0px black;
  border-radius: 0 !important;
}

img.thumb.secondary {
  border: 1px dotted black;
  box-shadow: none;
}

/*-----------------------------------------------------------------*/

.publication {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 1em;
}

.publication footer {
  display: flex;
  flex-direction: row;
  margin-top: 0.5em;
  text-align: left;
}

.doi {
  font-size: small;
  background-color: black;
  color: white;
  padding: 0 0.5em;
}

.nodoi {
  font-size: small;
  padding: 0 0.5em;
  border: 1px dotted black;
}

.venue {
  font-style: italic;
}

.publication footer > * {
  margin-right: 1em;
}

/*-----------------------------------------------------------------*/

@media all and (max-width: 660px) {
  :root {
    --section-gap: 3rem;
  }

  body > * {
    margin-left: var(--bleed);
    max-width: 100%;
  }

  blockquote {
    padding-left: 1em;
  }

  aside {
    width: initial;
    position: initial;
    text-align: initial;
  }

  aside.extra {
    display: none;
  }

  p.pub small {
    margin-left: initial;
    width: initial;
    position: initial;
    left: initial;
    text-align: initial;
    font-size: initial;
  }

  p.pub small time {
    display: initial;
  }

  p.pub small + br {
    display: initial;
  }

  h1 {
    font-size: max(10vw, 30px);
  }
}

/*-----------------------------------------------------------------*/

.headshot {
  border-radius: 50%;
}

.rainbow {
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
}

.rainbow2 {
  background: linear-gradient(-45deg, #23d5ab, #23a6d5, #e73c7e, #ee7752);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
}

.rainbow-text {
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/*-----------------------------------------------------------------*/

body > footer {
  margin-top: calc(var(--section-gap) * 2);
}

body > footer > a {
  font-size: 2em;
  text-decoration: none;
  background: linear-gradient(-45deg, #23d5ab, #23a6d5, #e73c7e, #ee7752);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body > footer > a:hover {
  color: red;
}

/*-----------------------------------------------------------------*/

.see-more-toggle {
  display: none;
}

.limited-list li {
  display: none;
}

.limited-list li:nth-child(-n+4) {
  display: list-item;
}

.see-more-toggle:checked ~ .limited-list li {
  display: list-item;
}

.see-more-toggle:checked ~ .see-more-label {
  display: none;
}

.see-more-label {
  color: red;
  cursor: pointer;
}

.see-more-label:hover {
  background-color: red;
  color: white;
}
