/* =====================
</> by valentin salaud
====================== */
nav {
  position: fixed;
  width: 86%;
  max-width: 1200px;
  margin: 30px 7% 0;
  z-index: 300;

  /* border: 1px solid red; */
}

/* Animation Tng */
.Tng {
  position: relative;
  list-style: none;
  display: inline-block;

  padding: 0;
  margin: 0;
}
.Tng li {
  display: inline-block;
  float: left;
  font-family: "Avenir";
  font-weight: 100;
  font-size: 2em;
  opacity: 1;
  transition: all 0.5s ease-in-out;
  max-width: 2em;
}
.Tng.hidden li.spaced {
  padding-left: 0;
  transition-delay: 0.5s;
  transition: all 0.5s ease;
}
.Tng li.spaced {
  padding-left: 0.5em;
  transition-delay: 0.5s;
  transition: all 0.5s ease;
}
.Tng.hidden li.ghost {
  opacity: 0;
  max-width: 0;
  transform: translateY(10px);
}
.ghost:nth-child(1),
.hidden .ghost:nth-child(5) {
  transition-delay: 0.2s;
}
.ghost:nth-child(2),
.hidden .ghost:nth-child(4) {
  transition-delay: 0.2s;
}
.ghost:nth-child(3),
.hidden .ghost:nth-child(3) {
  transition-delay: 0.3s;
}
.ghost:nth-child(4),
.hidden .ghost:nth-child(2) {
  transition-delay: 0.4s;
}
.ghost:nth-child(5),
.hidden .ghost:nth-child(1) {
  transition-delay: 0.5s;
}

/* BTN DARK MODE */
.darkmode-layer {
  transition: all 1s ease;
}
.darkmode-toggle {
  /* float: right;
  margin: 5px 0 5px 30px;  */

  border: 1px solid var(--black) !important;
  background: var(--white) !important;

  font-family: "Avenir Book" !important;
  font-size: 84% !important;
  cursor: pointer !important;

  transition: all 1s ease;
  z-index: 500 !important;
}
.darkmode-layer--button,
.darkmode-toggle {
  width: 84px !important;
  height: 30px !important;
  transform: translate(-70px, 35px);

  right: 0 !important;

  bottom: inherit !important;
  top: 0;

  border-radius: 0 !important;
}
.darkmode-layer--simple.darkmode-layer--button {
  width: 100% !important;
  height: 100% !important;
}

.nav-links {
  position: absolute;
  width: 400px;
  top: 0;
  margin-left: 50%;
  transform: translateX(-50%);

  display: flex;
  margin-top: 10px;
  transition: all 1s ease;
}
.nav-links a {
  flex: 1;
  text-align: center;
  opacity: 0.4;

  transition: all 0.2s ease;
}
.nav-links a:hover {
  opacity: 1;
  text-decoration: none;
}
.nav-select {
  opacity: 1 !important;
}



/* Ingored DarkMode */
/* img, */
iframe,
.content .ignored,
.ignored {
  isolation: isolate !important;
  position: relative !important;
  z-index: 201 !important;
}
.darkmode-layer,
.darkmode-toggle {
  z-index: 200;
}
.darkmode--activated nav a {
  color: var(--white) !important;
}

.intro{
  position: fixed;
  z-index: 800;
  width: 100vw;
  height: 100vh;

  pointer-events: none;
  opacity: 0;

  transition: all 1.5s ease;
}
.intro.animationed {
  display: inherit;
  background: var(--white);
  color: var(--black);

  opacity: 1;
}
.intro p {
  text-align: center;
  line-height: 100vh;
  margin: 0;
  font-size: 5em;
  font-weight: 900;
  display: none;
}
.intro.intro.animationed p {
  display: inherit;
}
#endIntro {
  position: fixed;
  z-index: 1001;
  right: 0;
  width: 100vw;
  height: 100vh;
  background: var(--white);
  mix-blend-mode: difference;
  border: 50px solid var(--white);

  animation: open 3.5s cubic-bezier(.7,.12,.68,.65) forwards;
}
@keyframes open {
  0% {
    width: 80vw;
    transform: skewX(-10deg) scaleX(1.6);
  }
  85% {
    width: 0vw;
    height: 100vh;
    transform: translate(0,0) scaleX(1.1);
    border: 50px solid var(--white);
  }
  100% {
    width: 84px ;
    height: 30px;
    transform: translate(-70px, 35px);
    border: 0px solid var(--white);
  }
}
@keyframes open1 {
  0% {
    width: 80vw;
    transform: skewX(-10deg) scaleX(1.6);
  }
  85% {
    width: 0vw;
    height: 100vh;
    transform: translate(0,0) scaleX(1.1);
    border: 50px solid var(--white);
  }
  100% {
    width: 84px ;
    height: 30px;
    transform: translate(-50px, 35px);
    border: 0px solid var(--white);
  }
}
@keyframes open2 {
  0% {
    width: 80vw;
    transform: skewX(-10deg) scaleX(1.6);
  }
  85% {
    width: 0vw;
    height: 100vh;
    transform: translate(0,0) scaleX(1.1);
    border: 50px solid var(--white);
  }
  100% {
    width: 84px ;
    height: 30px;
    transform: translate(calc((100vw - 1200px) / (-2)), 55px);
    border: 0px solid var(--white);
  }
}






/* RESPONSIVE */
@media screen and (min-width: 1400px) {
  nav {
    margin: 50px calc((100vw - 1200px) / 2) 0;
  }
  .darkmode-layer--button,
  .darkmode-toggle {
    transform: translate(calc((100vw - 1200px) / (-2)), 55px);
  }
  #endIntro {  
    animation: open2 3.5s cubic-bezier(.7,.12,.68,.65) forwards;
  }
}

@media screen and (max-width: 700px) {
  .nav-links {
    width: 350px;
  }
}
@media screen and (max-width: 650px) {
  .nav-links {
    display: none;
  }
  .darkmode-layer--button,
  .darkmode-toggle {
    transform: translate(-50px, 35px);
  }
  #endIntro {  
    animation: open1 3.5s cubic-bezier(.7,.12,.68,.65) forwards;
  }
}