/* --- Fonts --- */

@font-face {
  font-family: "Supreme";
  src:  url("/assets/fonts/SupremeLLWeb-Book.woff") format("woff"),
        url("/assets/fonts/SupremeLLWeb-Book.woff2") format("woff2");
}

/* --- Baseline --- */

:root {
    --content-width: 65rem;
    --main-white: #fff;
    --main-black: #101010;
    --main-grey: #dedede;
    --dark-grey: #585858;
    --main-color: var(--main-white);
    --main-padding: 1rem;
    --swiper-theme-color: var(--main-color);
  }
  
  *,
  *:after,
  *:before{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  html {
    font-family: "Supreme", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";;
    color: var(--main-black);
    scroll-behavior: smooth;
    font-size: 22px;
    line-height: 1.35;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  body {
    min-height: 100vh;
    background-color: var(--main-grey);
  }

  h1, h2, h3, h4 ,h5, h6 {
    margin: 0;
    font-weight: normal;
    font-feature-settings: 'ss14' on;
    line-height: 1.1;
  }

  h1{
    font-size: 6rem;
  }

  h2{
    font-size: 3rem;
  }

  h3{
    font-size: 1.5rem;
  }
  
  li {
    list-style: none;
  }
  
  a {
    color: currentColor;
    text-decoration: none;
  }

  sup{
    vertical-align: baseline;
    top: -0.1rem;
  }
  
  strong, b {
    font-weight: 500;
  }
  
  img, video {
    width: 100%;
  }

  figcaption {
    font-size: .66rem;
  }

  /* --- Foldout Nav --- */

  nav.main {
    position: fixed;
    width: 30rem;
    height: 100%;
    right: -30rem;
    background-color: var(--main-black);
    color: var(--main-white);
    transition: right .25s ease-in-out;
    z-index: 10;
    padding: var(--main-padding);
  }

  nav.main.show {
    right: 0%;
    overflow-y: scroll;
  }

  nav.main h1, nav.main span, section.exercise span{
    font-size: 3rem;
  }

  nav.main span, section.exercise span{
  position: absolute;
  top: var(--main-padding);
  right: var(--main-padding);
  cursor: pointer;
  line-height: 1;
  }

  nav.main h2{
    font-size: 2rem;
    padding: var(--main-padding);
  }

  nav.main ol{
    padding: 0 0 calc(var(--main-padding) * 2) calc(var(--main-padding) * 2);
  }

  nav.main li{
    line-height: 1.5;
  }

  nav.main a:hover{
    color: var(--main-color)
  }

  nav.main ol{
    padding-left: calc(var(--main-padding) * 2);
  }

  .navbutton {
    position: fixed;
    width: 3rem;
    height: auto;
    right: 1rem;
    top: 1.5rem;
    cursor: pointer;
    z-index: 9;
  }

  .navbutton:hover, main.chapter header a:hover, nav.next a:hover, .close:hover{
    opacity: 0.66;
  }

  nav.prevnext{
    text-align: right;
    margin-top: var(--main-padding);
    display: flex;
    justify-content: space-between;
    padding-bottom: var(--main-padding);
  }

  footer {
    color: var(--dark-grey);
    background-color: var(--main-grey);
    padding: var(--main-padding);
    font-size: 0.75rem;
    line-height: 1.5;
  }

footer p {
    column-count: 2;
    column-gap: calc(var(--main-padding) * 2);
}

footer nav {
    padding-top: var(--main-padding);
}

  /* --- Home --- */

  main.home header {
    padding: var(--main-padding);
    background-color: var(--main-white);
  }
  
  ul.projects li {
    background-color: var(--main-color);
    padding: var(--main-padding) 0;
    width: 100%;
  }

  ul.projects summary::after{
    content: '▼';
    position: relative;
    display: inline-block;
    font-size: 3rem;
    line-height: 1;
    margin-left: var(--main-padding);
  }
  
  summary:focus{
    outline: none;
  }

  ul.projects li details summary {
    list-style: none;
    cursor: pointer;
  }
  ul.projects li details summary h2 { 
    display: inline;
  }


  ul.projects li details[open] > summary:hover::after {
    content: '▲';
    position: relative;
    display: inline-block;
    font-size: 3rem;
    line-height: 1;
    margin-left: var(--main-padding);
  }

  ul.projects li details {
    margin: var(--main-padding) calc(var(--main-padding) * 3);
  }
  
  ul.projects li details p {
    margin: var(--main-padding) calc(var(--main-padding) * 4);
    max-width: 85ch;
  }

  
  .swiper.video {
    padding: 0 calc(var(--main-padding) * 3);
  }
  
  .swiper.video .swiper-slide {
    width: 33%;
    margin-right: var(--main-padding);
  }

  .swiper.video .swiper-slide figure  {
  position: relative;
  width: 100%;
  height: 0px;
  padding-top: 56.25%;
  overflow: hidden;
}
.swiper.video .swiper-slide figure video {
  opacity: 1;
  transition: opacity .25s;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.swiper.video .swiper-slide a:hover figure video {
  opacity: 0;
}
.swiper.video .swiper-slide figure figcaption {
  position: absolute;
  text-align: center;
  z-index: -1;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  font-family: serif;
  padding: 0 var(--main-padding);
  font-size: 2vw;
  line-height: 1.2;
}
.swiper.video .swiper-slide h3 {
  font-size: 1rem;
  font-weight: inherit;
  margin-top: .5rem;
}

.swiper-button-next, .swiper-button-prev {
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, var(--main-color) 100%);
  height: 100%;
  top: 0;
  margin-top: 0;
  width: 20%;
  max-width: 25rem;
  right: 0;
  color: var(--main-white);
  opacity: 0;
  transition: opacity .25s;
  padding-left: 5%;
}

.swiper-button-prev {
    left: 0;
    right: auto;
    background: linear-gradient( 
270deg
 , rgba(255,255,255,0) 0%, var(--main-color) 100%);
    padding-right: 5%;
    padding-left: initial;
}

.swiper-button-next:hover, .swiper-button-prev:hover {
  opacity: 1;
}

.swiper-button-next:after, .swiper-button-prev:after {
    font-family: 'Supreme';
    font-size: 3rem;
    color: black;
    content: '►';
}

.swiper-button-prev:after {
    content: '◄';
}

.swiper-button-next.swiper-button-disabled, .swiper-button-prev.swiper-button-disabled {
    opacity: 0;
}
.swiper-button-next.swiper-button-disabled {
  opacity: 0;
}

/* --- Main --- */

main.chapter {
  background-color: var(--main-color);
  padding: var(--main-padding);
}

main.chapter header {
  padding-bottom: 2rem;
}

main.chapter h1, main.chapter article {
  margin: var(--main-padding);
  max-width: 85ch;
  margin: auto;
}

main.chapter article {
    position: relative;
    height: 80vh;
    overflow: hidden;
    /* margin-bottom: 5rem; */
}

main.chapter.legal article {
    height: auto;
}

.plyr--video{
  margin: 1rem 0;
}

main.chapter article p, main.chapter article blockquote, main.chapter article div#footnotes, main.chapter article h4, main.chapter article ul, h4 main.chapter article ol{
    font-family: serif;
}

main.chapter article section {
    margin-bottom: 5rem;
}

main.chapter article aside.options {
    position: absolute;
    width: 100%;
    bottom: 0;
    height: 15rem;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, var(--main-color) 100%);
  }

main.chapter article aside.options.opened {
    background: none;
    height: auto;
}

main.chapter article aside.options ul {
    display: flex;
    align-items: flex-end;
    width: 100%;
    height: 100%;
    justify-content: center;
}

main.chapter article aside.options ul li {
  background-color: var(--main-white);
  padding: 0.6rem 1rem;
  border-radius: 2rem;
  margin: 0.5rem;
  cursor: pointer;
  font-family: 'Supreme';
}

main.chapter section.abstract, main.chapter article section > p, main.chapter article section blockquote, main.chapter article section #footnotes, main.chapter article section.bib ul, main.chapter article section ol, main.chapter article section h4, main.chapter article section h2, main.chapter article section h3, main.legal figure{ 
  padding-bottom: var(--main-padding);
  max-width: 40rem;
  margin: auto;
}

main.chapter article section #footnotes{
  max-width: none;
  column-count: 3;
  column-gap: 2rem;
  margin-top: calc(var(--main-padding) * 3)
}

#footnotes a, p a{
  text-decoration: underline;
}


main.chapter article section #footnotes li{
  padding-bottom: var(--main-padding);
}

article section h2, article section h3{
  padding-bottom: var(--main-padding);

}

article section h4{
  font-weight: bold;
}

main.chapter article section blockquote {
  padding: 0 0 var(--main-padding) calc(var(--main-padding) * 2);
}

main.chapter h1{
  padding-bottom: calc(var(--main-padding) * 2);
}

sup.footnote a, #footnotes span.footnotereverse a, aside.floatnote {
  background-color: var(--main-white);
  padding: 0.15rem 0.4rem 0.1rem 0.4rem;
    text-align: center;
    border-radius: 1rem;
    margin: 0.1rem;
    text-decoration: none;
    scroll-margin-top: 50vh;
}

sup.footnote a:hover, #footnotes span.footnotereverse a:hover, main.chapter article aside.options ul li:hover{
  background-color: var(--main-black);
  color: var(--main-white);
}

#footnotes span.footnotereverse a{
  padding: 0 0.3rem 0 0.3rem;
  font-size: 0.6rem;
  }

  div#footnotes, section.bib {
  padding: 0 calc(var(--main-padding) * 1.5);
  font-size: 0.85rem;
}

div#footnotes ol li {
  list-style: decimal;
}

div#footnotes ol li::marker {
  /* display: block; */
  position: absolute;
  top: 15px;
}

main.chapter article section.bib h4 {
  padding-bottom: 0;
  margin-top: 1rem;
}

section.bib li {
  list-style: square;
}

aside.floatnote {
  position: fixed;
  right: 1rem;
  max-width: 26ch;
  line-height: 1.15;
  transition: opacity .33s;
  opacity: 0;
  font-size: 0.75rem;
  padding: .5rem;
  box-shadow: 0px 0px 10px var(--main-color);
  z-index: 10;
}

.logo img {
  max-width: 10rem;
}

footer nav li {
  display: inline-block;
  margin-right: 0.5rem;
}

.further {
  color: var(--main-grey);
  background-color: var(--dark-grey);
  margin: 0 calc(-1 * var(--main-padding)) calc(-1 * var(--main-padding));
  padding: var(--main-padding);
}

.further p {
  max-width: 40rem;
  margin: auto;
}

/* ----- Lightbox ------ */

.basicLightbox {
  background: var(--main-grey);
  align-items: initial;
  overflow: auto;
}

.basicLightbox__placeholder {
  transform: translateY(25px);
}
.basicLightbox--visible .basicLightbox__placeholder {
  transform: translateY(0px);
}

.exercise {
  padding: var(--main-padding);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--main-padding);
}

.exercise h4 {
  align-self: center;
}

.exercise .close {
  position: unset;
  justify-self: end;
}