@view-transition {
  navigation: auto;
}

body {
    font-size: 1.3em;
    font-family: "Schibsted Grotesk";
}

.drive a, h1, nav {
    font-size: 1.3em;
    font-family: "EB Garamond";
}

h2 span {
    /*font-family: "Array-Wide";*/
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.social-icons {
    position:absolute;
    display:none;
    left: 189px;
    top: 281px;
    place-items:center;
}

.drive .social-icons a:nth-child(1) {
    --i: 0;
}
.drive .social-icons a:nth-child(2) {
    --i: 1;
}
.drive .social-icons a:nth-child(3) {
    --i: 2;
}

.drive .social-icons a:nth-child(4) {
    --i: 3;
}

.drive .social-icons a:nth-child(5) {
    --i: 4;
}

.drive .social-icons a {
    position: absolute;
    width: 2.5em;
    display:block;

  --bias: 180deg;
  --angle: calc((180deg / 4 * var(--i)) + var(--bias));
  --dist: 55px;

  transform:
    rotate(var(--angle))
    translate(var(--dist))
    rotate(calc(-1 * var(--angle)));
}


.author-avatar {

    filter: none;
    width: 70px;
    height: 70px;
    border-radius: 100%;
    user-select: none;
    -ms-user-select: none;
    -webkit-user-select: none;
    -webkit-animation: 0.5s ease-in forwards fadein;
    animation: 0.5s ease-in forwards fadein;
    opacity: 1;
    object-fit: cover;
    display: grid;
    place-items: center

}

.drive .author {
    left: 259px;
    top: 202px;
    position: absolute;
    width: 2.5em;
    display:block;
    place-items: center
}

.drive {
    position:relative;
    width: 800px;
    margin-right:0px;
    margin-top:-40px;

    font-size: 1.3em;
    font-family: "EB Garamond";
    font-weight: 200;

    view-transition-name: drive;
}


.author-name {
    view-transition-name: name;
    position:absolute;
    left: 200px;
    top: 200px;
}

@media (max-width: 450px) {
    .social-icons {
        top: calc(9vh + 60px);
        left: auto;
        right: 80px;
        display: grid;
    }
    .drive .social-icons a {
        --dist: 70px;
        --bias: 225deg;
        width: 1.5em;
    }
}

@media (max-width: 768px) {
  .drive {
    position:absolute;
    left:-400px;
    top: -150px;
  }
  .author-name {
    position:absolute;
      left: 410px;
      top: 170px;
  }
}

@media (max-height: 600px) {
  .drive {
    position:absolute;
    top: -150px;
  }
  .author-name {
    position:absolute;
      left: 410px;
      top: 170px;
  }
}

@media (min-width: 600px) {
  .drive {
    position:absolute;
    left:-400px;
    top: -150px;
  }
  .author-name {
    position:absolute;
      left: 410px;
      top: 170px;
  }
}

@media (min-width: 1350px) and (min-height: 650px) {
  .drive {
    position:absolute;
    left: calc(33vw - 400px);
    top: calc(50vh - (1162px*(0.60)));
    scale: 160%;
  }
  .author-name {
    position:absolute;
      left: 370px;
      top: 150px;
  }

  .social-icons {
    display:grid;
    left: 589px;
    top: 281px;
  }
}
@media (min-width: 1350px) and (max-height: 860px) and (min-height: 650px){
    .drive {
        top: calc(66vh - (1162px*(0.70)));
    }
}


.disk {
    position:absolute;
    width:100%;
    transform-origin: 50% 40.1%;

    mask-image: linear-gradient(to bottom, black 70%, transparent 95%);
}

.disk img {
    view-transition-name: disk-pic;
}

.arm object {
    view-transition-name: arm-pic;
}



.arm {
    pointer-events: none;
    position:absolute;
    width:100%;
    top:188px;
    left:50px;
    transform-origin: 35% 64%;
    transform: scale(0.63);
    transition: rotate  0.1s ease-in-out;
    transition-delay: 2s;
    rotate: 12deg;
    mask-image: linear-gradient(to bottom, black 30%, transparent 140%);
}

.drive a:hover ~ .arm {
    transition-delay: 0s;
}

.drive a {
    position:absolute;
    padding: 4px 30px;
    box-sizing: border-box;
    --start-left: 470px;
    --start-top: 300px;
}

.about:hover ~ .arm {
    rotate: -13deg;
}
.about {
    left: var(--start-left);
    top: var(--start-top);
    view-transition-name: about;
}

.projects:hover ~ .arm {
    rotate: -10deg;
}
.projects {
    left: calc(var(--start-left) + 60px);
    top: calc(var(--start-top) + 1.5em);
    view-transition-name: projects;
}


.recipes:hover ~ .arm {
    rotate: -3deg;
}
.recipes {
    left: calc(var(--start-left) + 120px);
    top: calc(var(--start-top) + 3em);
    view-transition-name: recipes;
}


.links:hover ~ .arm {
    rotate: 0deg;
}
.links {
    left: calc(var(--start-left) + 150px);
    top: calc(var(--start-top) + 4.5em);
    view-transition-name: links;
}

.git:hover ~ .arm {
    rotate: 5deg;
}
.git {
    left: calc(var(--start-left) + 180px);
    top: calc(var(--start-top) + 6em);
    view-transition-name: git;
}

.drive.side {
    position:absolute;
    left:-400px;
    top: -150px;
}

.drive.side .social-icons {
    display:none;
}

.drive.side .author-name {
    position:absolute;
    left: 410px;
    top: 170px;
}


@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #121212;
    --text-color: #f5f5f5;
    background-color: #0D0E0E;
    color: #e8e6e3;
  }

  a {
    color: #e8e6e3;
  }

  object, img {
        filter: invert(100%) brightness(0.8);
  }
}
