* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  line-height: 1.4;
}

@font-face{
  font-family: roboto;
  src: url(/assets/RobotoMono-VariableFont_wght.ttf);
}
@font-face{
  font-family: drawn;
  src: url(/assets/DJGROSS.ttf);
}

html{
  width: 200vw;
}

body{
  background-color: #d6d6d6;
  display: flex;
  height: 100vh;
  justify-content: center;
  align-items: center;

  &:has(h2:hover){
    background-color: black;

    section{
      border: white 1px solid;
      background: linear-gradient(0deg in oklch, black 40%, #F5296B 60%);


      h2{
        background-color: black;
        color: greenyellow;
      }
      .front-photo{
        background: url(/assets/boos.png);
        background-size: cover ;
      }

      li{
        font-family: drawn;
        border-bottom: dashed yellowgreen;
      }

      li:nth-of-type(even){
        color: yellow;

        label{
          color: lightblue;
        }
      }
      li:nth-of-type(odd){
        color: purple;

        label{
          color: white;
        }
      }
    }
    h1{
      font-family: drawn;
      color: lightblue;
    }
  }
}

@keyframes --rotate-self{
  from{
    transform: rotateY(0deg);
  }
  to{
    transform: rotateY(180deg);
  }
}

article{
  display: grid;
  perspective: 50rem;
  transform-style: preserve-3d;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  height: 600px;

  section{
    grid-area: 1/1;
    backface-visibility: hidden;
  }

  h1{
    transform: translateX(-50%);
    left: 50%;
    position: absolute;
    bottom: -6rem;
    width: max-content;
    font-family: roboto;
  }

}

.front{
  background-color: white;
  border-radius: 2rem;
  position: fixed;
  display: grid;
  grid-template-columns:300px 70px;
  grid-template-rows: auto auto;
  justify-items: center;

  animation-name: --rotate-self;  /* https://youtu.be/aaEvUfC14e4?si=XX5uYA9281zmRpEi */
  animation-timeline: scroll(inline);
  transform-origin: center;

  h2{
    background-color: #5a3821;
    color: white;
    border-radius: 0 2rem 2rem 0;
    width: 70px;
    position: absolute;
    writing-mode:vertical-lr;
    align-content: center;
    right: 0;
    height: 100%;
    text-align: center;
    font-family: Arial;
    font-size: 2.5rem;

    &:hover{
      font-family: drawn;
    }
  }

  img{
    align-self: center;
  }

  .front-photo{
    width: 240px;
    height: 310px;
    background: url(/assets/mugshot-za.png);
    background-size: cover;
    object-fit: cover;
    display: block;
  }

  ul{
    width: 240px;
    grid-row: 2;
    padding-block: 1rem;

    li{
      font-family: roboto;
      display: flex;
      flex-direction: column;
      border-bottom: dashed black;
      font-size: 20px;
      font-weight: 200;

      label{
        font-size: 16px;
      }

      &:hover{
        border-bottom: black solid;
        font-weight: 400;
      }
    }
  }
}

@keyframes --rotate-back{
  from{
    transform: rotateY(180deg);
  }
  to{
    transform: rotateY(360deg);
  } 
}

.back{
  width: 370px;
  background-color: white;
  border-radius: 2rem;
  display: flex;
  justify-content: center;

  transform: rotateY(180deg);

  animation-name: --rotate-back;
  animation-timeline: scroll(inline);
  transform-origin: center;

  &:hover{
    --x:100px;
    --y:100px;
    background: radial-gradient(at var(--x) var(--y), orangered 3%, white 70%);
  }

  h3{
    font-family: roboto;
    font-size: 2rem;
    /* font-weight: 300; */
    position: absolute;
    left: 1rem;
    top: 1rem;
    border-bottom: black dashed;
    border-right: black dashed;
    padding-right: .5rem;
  }
}
