@font-face {
  font-family: Femero;
  font-weight: 300;
  font-style: normal;
  src: url("fonts/femero-light-webfont.woff2") format("woff2"), url("fonts/femero-light-webfont.woff") format("woff");
}
@font-face {
  font-family: Femero;
  font-weight: 300;
  font-style: italic;
  src: url("fonts/femero-lightitalic-webfont.woff2") format("woff2"), url("fonts/femero-lightitalic-webfont.woff") format("woff");
}
@font-face {
  font-family: Femero;
  font-weight: 400;
  font-style: normal;
  src: url("fonts/femero-regular-webfont.woff2") format("woff2"), url("fonts/femero-regular-webfont.woff") format("woff");
}
@font-face {
  font-family: Femero;
  font-weight: 400;
  font-style: italic;
  src: url("fonts/femero-regularitalic-webfont.woff2") format("woff2"), url("fonts/femero-regularitalic-webfont.woff") format("woff");
}
@font-face {
  font-family: Femero;
  font-weight: 500;
  font-style: normal;
  src: url("fonts/femero-medium-webfont.woff2") format("woff2"), url("fonts/femero-medium-webfont.woff") format("woff");
}
@font-face {
  font-family: Femero;
  font-weight: 500;
  font-style: italic;
  src: url("fonts/femero-mediumitalic-webfont.woff2") format("woff2"), url("fonts/femero-mediumitalic-webfont.woff") format("woff");
}

html {
  margin: 0;
  padding: 0;
  font-size: 13.12pt;
  color-scheme: light dark;
  --text: light-dark(#111, #eee);
  --mild: #777;
  --shadow: light-dark(#ccc, #444);
  --background: light-dark(#fff, #111);
  --cherry: #c30;
  --bean: light-dark(#cb5, #982);
  --roast: light-dark(#631, #964);
}

body {
  margin: 0;
  padding: 0;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 300;
  color: var(--text);
  background-color: var(--background);
}

menu {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: baseline;
  padding: 0;
  margin: 0;
  li {
    margin: 0;
    list-style-type: none;
  }
}

body > header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 93;
  box-shadow: 0 0.13rem 0.51rem var(--shadow);
  background-color: var(--background);
  font-family: Femero, ui-serif;
  font-size: 1.312rem;

  nav { margin: 0 auto; }

  a {
    display: inline-block;
    padding: 0.5rem 1rem;
    line-height: 2rem;
    text-decoration: none;
    color: var(--mild);
    &.current {
      font-weight: 500;
      color: var(--roast);
    }
  }

  h1 {
    margin: 0;
    font-size: inherit;
    font-weight: 500;
    color: var(--cherry);
    white-space: pre;
  }

  @media (max-width: 750px) {
    & { font-size: 1.42rem; }
    &::before, nav::before {
      float: right;
      color: var(--bean);
      text-align: center;
      margin: 0.5rem;
      box-sizing: border-box;
      width: 2rem;
      height: 2rem;
      font-size: 2rem;
      line-height: 2rem;
      cursor: pointer;
      position: relative;
      z-index: 1312;
    }
    &::before { content: '×'; font-weight: bold; display: none; }
    &:focus-within:not(:focus)::before { display: block; }
    nav::before { content: '≡'; display: block; }
    nav:focus-within::before { display: none; }
    menu {
      flex-direction: column;
      justify-content: flex-start;
      align-items: stretch;
    }
    a { display: none; }
    nav:focus-within a { display: block; }
    a.current { display: inline-block; }
    nav:focus-within h1 { color: var(--cherry); }
  }
  @media ((max-width: 1000px) and (min-width: 751px)) or (max-height: 450px) {
    & { font-size: 1rem; }
    & a {
      padding: 0.5rem 0.68rem;
      line-height: 1.5rem;
    }
    &::before, nav::before {
      margin: 0.25rem;
      font-size: 1.5rem;
    }
  }
  @media (max-height: 350px) {
    nav:focus-within a {
      padding: 0 0.68rem;
      line-height: 12.5dvh;
    }
  }
}

body > main {
  position: relative;
  box-sizing: border-box;
  margin: 3rem auto 0 auto;
  padding: 1rem 1rem 2rem 1rem;
  max-width: 51rem;
  min-height: calc(100dvh - 3rem);
  line-height: 1.75;

  nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: baseline;
    gap: 0.25rem 1.5rem;
    padding: 0.25rem 0;
    margin: -1rem 0 0.5rem 0;
    border-bottom: 1px dotted var(--bean);
    font-size: 0.93rem;
    menu {
      flex-wrap: wrap;
      justify-content: flex-start;
      li { margin-right: 0.42rem; }
      li::before { color: var(--bean); }
      &.b li::before { content: '› '; }
      &.a li::before { content: '#'; }
      &.s li::before { content: '| '; }
    }
    menu + menu:last-child { margin-left: auto; }
  }
  :target { scroll-margin-top: 4rem; }

  @media (max-width: 1000px) and (min-width: 751px) {
    & {
      margin-top: 2.5rem;
      min-height: calc(100dvh - 2.5rem);
    }
    nav { top: calc(2.5rem - 1px); }
    :target { scroll-margin-top: 3.5rem; }
  }
}

body > footer {
  box-sizing: border-box;
  margin: 0;
  padding: 1rem;
  box-shadow: 0 -0.13rem 0.51rem var(--shadow);
  background-color: var(--background);
  font-family: Femero, ui-serif;
  font-size: 0.81rem;
  color: var(--mild);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;

  img {
    flex: none;
    opacity: 0.42;
    transition: opacity 0.42s ease-in-out;
  }
  &:hover img { opacity: 0.81; }
  p {
    margin: 0;
    flex-grow: 1;
    text-align: center;
    line-height: 1.5;
  }
  p:first-line { font-size: 0.93rem; }
  p span { white-space: nowrap; }
  a {
    color: inherit;
    text-decoration: underline dotted var(--mild);
    text-decoration-thickness: 1px;
  }
}

h2, h3, h4 {
  margin: 0.93em 0 0.42em 0;
  font-weight: 500;
  font-family: Femero, ui-serif;
  line-height: 1.23;
  color: var(--roast);
  &::before {
    content: '';
    position: absolute;
    left: calc(-1.312em);
    display: block;
    width: 1.312em;
    height: 1.312em;
    background-repeat: no-repeat;
    background-size: auto 1.23em;
  }
}
h2 { font-size: 1.68rem; }
h3 { font-size: 1.42rem; }
h4 { font-size: 1.23rem; }
@media (prefers-color-scheme: light) {
  h2::before { background-image: url(icons/cherry-light.svg); }
  h3::before { background-image: url(icons/bean-light.svg); }
  h4::before { background-image: url(icons/roast-light.svg); }
}
@media (prefers-color-scheme: dark) {
  h2::before { background-image: url(icons/cherry-dark.svg); }
  h3::before { background-image: url(icons/bean-dark.svg); }
  h4::before { background-image: url(icons/roast-dark.svg); }
}
h2 a, h3 a, h4 a { font-weight: inherit; }

aside {
  position: relative;
  float: right;
  width: 42%;
  margin: 0.5rem 0 0.5rem 1rem;
  padding: 0.68rem 1rem;
  border: 1px solid var(--bean);
  border-radius: 0.42rem;

  @media (max-width: 750px) {
    & {
      float: none;
      width: auto;
      margin: 2rem 0 0 0;
    }
  }
}

a {
  font-weight: 400;
  text-decoration: underline solid var(--bean);
  text-decoration-thickness: 0.13rem;
  color: inherit;
  transition: color 0.21s ease-in-out;
  &:hover, &:focus { color: var(--roast); }
}
strong { font-weight: 500; }
strong a { font-weight: inherit; }
i { font-family: ui-serif, serif; }
small { font-size: 0.75em; }
sup { font-size: 0.8em; }
kbd { font-family: ui-monospace, monospace; }

p, ul, ol, dl {
  padding: 0;
  margin: 0.5em 0;
}
ul, ol { margin-left: 1.5rem; }
ul li {
  margin-bottom: 0.25rem;
  list-style-type: circle;
  list-style-position: outside;
}
ul ul li, ol ul li {
  margin-bottom: 0.25rem;
  list-style-type: square;
}
dl dt { font-weight: 500; }
dl dd { margin: 0 0 0.5rem 0; }
blockquote {
  margin: 0 0 0.5rem 1rem;
  padding: 0 2.5rem 0 1rem;
  border-left: 0.5rem solid #ccc;
  font-family: ui-serif, serif;
  line-height: 1.23;
}
p.quote {
  margin: 0 0 0.5rem 0;
  text-align: right;
  font-family: Femero, ui-serif;
  font-style: italic;
  font-size: 0.93rem;
  line-height: 1.23;
  color: var(--mild);
}
p.quote ~ h2:first-of-type { margin-top: 0; }
p.info {
  font-size: 0.93em;
  line-height: 1.23;
}

.home header h1 { color: var(--mild); }
.home main {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
  gap: 2.5rem;
  line-height: 1.312;
  font-family: Femero, ui-serif;

  .portait { flex: 1 1 42%; }
  .presentation { flex: 1 1 51%; }
  img {
    display: block;
    width: 17rem;
    margin: 1rem auto;
    border-radius: 50%;
    filter: grayscale(93%);
    transition: filter 1.3s ease-in-out;
  }
  .portait:hover img { filter: grayscale(13%); }
  h1 {
    margin: 0 auto;
    width: fit-content;
    font-size: 3rem;
    white-space: pre;
    transition: color 1.3s ease;
  }
  .portait:hover h1 { color: var(--cherry); }
  p {
    font-size: 1.312rem;
    white-space: preserve-breaks nowrap;
  }
  @media (min-width: 1500px) {
    & { gap: 4.2rem; }
    img { width: 19.81rem; }
    h1 { font-size: 3.51rem; }
    p { font-size: 1.51rem; }
  }
  @media (max-width: 800px) {
    p { font-size: 1.23rem; }
  }
  @media (max-width: 750px) {
    & {
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 1rem;
    }
    .portait, .presentation { flex: none; }
    h1 { font-size: 2rem; }
    @media (max-width: 500px) {
      p { font-size: 1.1rem; }
    }
  }
}

.about main {
  p.quote ~ div h2:first-of-type { margin-top: 0; }

  blockquote {
    text-align: center;
    font-family: Femero, ui-serif;
    font-style: italic;
    line-height: 1.23;
    padding: 0;
    margin: 0.75rem 0;
    border-left-width: 0;
  }

  article {
    padding-bottom: 1.23rem;
    margin-bottom: 0.68rem;
    border-bottom: 1px dotted var(--bean);
    header {
      display: flex;
      flex-direction: row;
      flex-wrap: nowrap;
      justify-content: space-between;
      align-items: baseline;
      time { flex-shrink: 0; }
    }
    footer {
      font-size: 0.81rem;
      text-align: right;
    }
  }

  #latestupdate {
    &::before {
      content: 'Latest update';
      display: block;
      position: absolute;
      top: -0.72rem;
      left: 0.64rem;
      padding: 0 0.36rem;
      background-color: var(--background);
      border-radius: 0.42rem;
      font-family: Femero, ui-serif;
      font-size: 0.93rem;
      color: var(--roast);
    }
    article {
      padding: 0.51rem 0 0 0;
      margin-bottom: unset;
      border-bottom: unset;
      h3 {
        margin: 0;
        font-size: 1rem;
        color: inherit;
        &::before { display: none; }
      }
      time {
        font-size: 0.81rem;
        line-height: 0.81rem;
      }
      p {
        margin-bottom: 0;
        font-size: 0.93rem;
      }
    }
  }

  @media (max-width: 750px) {
    & {
      display: flex;
      flex-direction: column;
    }
    time { font-size: 0.81rem; }
    #latestupdate { order: 1871; }
  }
}

.research main dl {
  dt {
    a { opacity: 0.25; text-decoration: none; }
    &:hover a, &:has(+ dd:hover) a { opacity: 1.0); }
    &:target + dd p.abs { display: block; }
    &:target + dd label span:first-of-type { display: none; }
    &:target + dd label span:last-of-type { display: inline; }
    &:target + dd input:checked ~ label span:first-of-type { display: inline; }
    &:target + dd input:checked ~ label span:last-of-type { display: none }
    &:target + dd input:checked ~ p.abs { display: none; }
  }
  dd {
    margin-bottom: 0.81rem;
    ul, li { margin: 0; }
    ul.authors li {
      display: inline;
      font-size: 0.93em;
      &::after { content: ', '; }
      &:last-child::after { content: ''; margin-right: 0; }
    }
    ul.in {
      li { list-style-type: none; }
      li::before {
        margin-right: 0.25rem;
        font-size: 0.81em;
        font-variant: small-caps;
        color: var(--mild);
      }
      li.workshop::before { content: 'workshop'; }
      li.conference::before { content: 'conference'; }
      li.journal::before { content: 'journal'; }
      li.book::before { content: 'book'; }
    }
    ul.info {
      display: inline;
      color: var(--mild);
      li { display: inline; }
      li::after { content: ' · '; }
    }
    label {
      color: var(--mild);
      font-size: 0.81em;
      margin: 0;
      cursor: pointer;
    }
    p { margin: 0; }
    p.abs {
      display: none;
      margin: 0.5rem 0 1rem 0;
      border-left: 0.36rem solid var(--bean);
      padding-left: 0.5rem;
      font-size: 0.93em;
      font-family: ui-serif, serif;
    }
    input[type="checkbox"] { display: none; }
    label span:first-of-type { display: inline; }
    label span:last-of-type { display: none; }
    input:checked ~ label span:first-of-type { display: none; }
    input:checked ~ label span:last-of-type { display: inline }
    input:checked ~ p.abs { display: block; }
  }
}

.links main {
  @media (min-width: 600px) { ul { column-count: 2; } }
  @media (min-width: 900px) { ul { column-count: 3; } }
}

.miscellaneous main #bookshelf {
  input { display: none; }
  label {
    border-width: 1px;
    border-style: solid;
    border-color: var(--bean);
    border-radius: 0.42rem;
    padding: 0.1rem 0.25rem;
    font-size: 0.81em;
    cursor: pointer;
    white-space: pre;
    color: var(--roast);
    background-color: var(--background);
  }
  input:checked + label {
    color: var(--background);
    background-color: var(--bean);
  }
}

@media print {
  body > header { position: relative; }
  body > main { margin: 0; }
  body > footer { display: none; }
}
