@import url('https://fonts.googleapis.com/css2?family=Roboto:ital@1&family=Special+Elite&display=swap');
@import url("https://fonts.googleapis.com/css2?family=IM+Fell+English&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Electrolize&display=swap');

* {--clr-whiteish: hsl(0, 0%, 93%)}

html {
  min-width: 100%;
  min-height: 100%;
  background: url('animated2.webp');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed; /* not supported in Safari? */
  background-position: center;
}

body {
  min-height: 100%;
  display: flex;
  vertical-align: top;
  justify-content: center;
  position: relative;
}

.typing {
  min-width: max-content;
  font-family: 'Special Elite';
  color: var(--clr-whiteish);
  font-size: 2rem;
  top: 2.6rem;
  left: 1rem;
  position: fixed;
}

.typing::before {
  content: "";
  animation: text 5.15s linear forwards 1.5s;
}

@keyframes text {
  0% {
    content: "d";
  }
  4% {
    content: "dr";
  }
  6% {
    content: "dr ";
  }
  10% {
    content: "dr h";
  }
  14% {
    content: "dr ha";
  }
  18% {
    content: "dr hab";
  }
  28% {
    content: "dr hab.";
  }
  33% {
    content: "dr hab. ";
  }
  38% {
    content: "dr hab. M";
  }
  41% {
    content: "dr hab. Ma";
  }
  45% {
    content: "dr hab. Mar";
  }
  48% {
    content: "dr hab. Mari";
  }
  49% {
    content: "dr hab. Mariu";
  }
  52% {
    content: "dr hab. Marius";
  }
  55% {
    content: "dr hab. Mariusz";
  }
  59% {
    content: "dr hab. Mariusz ";
  }
  64% {
    content: "dr hab. Mariusz T";
  }
  69% {
    content: "dr hab. Mariusz Ta";
  }
  73% {
    content: "dr hab. Mariusz Tar";
  }
  76% {
    content: "dr hab. Mariusz Tarn";
  }
  84% {
    content: "dr hab. Mariusz Tarno";
  }
  87% {
    content: "dr hab. Mariusz Tarnop";
  }
  90% {
    content: "dr hab. Mariusz Tarnopo";
  }
  94% {
    content: "dr hab. Mariusz Tarnopol";
  }
  96% {
    content: "dr hab. Mariusz Tarnopols";
  }
  97% {
    content: "dr hab. Mariusz Tarnopolsk";
  }
  100% {
    content: "dr hab. Mariusz Tarnopolski";
  }
}

.typing::after {
  content: "";
  display: inline-block;
  width: 0.1em;
  height: 0.75em;
  margin-left: 0.1em;
  background-color: #fff;
  animation: blink 0.8s ease-in-out infinite;
}

@keyframes blink {
  0%, 25%, 100% {
    opacity: 1;
  }
  50%, 75% {
    opacity: 0;
  }
}


.enter {
  display: flex;
  vertical-align: bottom;
  justify-content: center;
  position: absolute;
}

#glow {
  width: 13em;
  height: 3em;
  font-size: 1.5rem;
  letter-spacing: 0.05em;

/* the same as .typing */
  font-family: 'Special Elite';
/*  padding: 1em;*/

/* or more modern; */
  font-family: 'Electrolize', sans-serif;

/* font from the XVII century... */
  font-family: "IM Fell English", serif;

  text-transform: uppercase;
  border: 2px solid white;
  border-radius: 0.4em;
  text-shadow: 0 0 2px black;
  box-shadow: 0 0 0.7em white;
  color: #0d0d0d;
  background-color: var(--clr-whiteish);
  position: fixed;
  top: 1em;
  right: 1em;
  z-index: 1;
  animation: slideIn 1s, appearance 0.45s forwards 1s;
  overflow: hidden
}

/* the rights are the actual slide-in; the other are to delay the fade-in to its final state (i.e., #glow from above that's animated by @appearance below) until it's in place */
@keyframes slideIn {
  0% {
    right: -14em;
      background-color: black;
      color: var(--clr-whiteish);
      border: 2px solid var(--clr-whiteish);
      box-shadow: 0 0 0.4em rgba(255, 255, 255, 0.411), inset 0 0 0.4em white;
  }
  95% {
    right: 1.2em;
      background-color: black;
      color: var(--clr-whiteish);
      border: 2px solid var(--clr-whiteish);
      box-shadow: 0 0 0.4em rgba(255, 255, 255, 0.411), inset 0 0 0.4em white;
  }
  100% {
    right: 1em;
      background-color: black;
      color: var(--clr-whiteish);
      border: 2px solid var(--clr-whiteish);
      box-shadow: 0 0 0.4em rgba(255, 255, 255, 0.411), inset 0 0 0.4em white;
  }
}

@keyframes appearance {
  0% {
    background-color: black;
    color: var(--clr-whiteish);
    border: 2px solid var(--clr-whiteish);
    box-shadow: 0 0 0.4em rgba(255, 255, 255, 0.411), inset 0 0 0.4em white;
  }
  100% {
    
  }
}

#glow:hover, #glow:focus {
  background-color: var(--clr-whiteish);
  color: black;
  text-shadow: 0 0 2px black;
  box-shadow: 0 0 0.9em white;
  cursor: pointer;
  transition: all 0.3s ease-out;
  transform: scale(1.02);
}

#glow::before {
  content: '';
  top: -90px;
  left: 30px;
  position: absolute;
  background-color: white;
  width: 250px;
  height: 250px;
  border-radius: 51% 17% 56% 50% / 26% 22% 68% 59%;
  z-index: -1;
  transition: transform 0.5s ease-in-out;
  transform: scale(0);
  transform-origin: center;
}

#glow:hover::before {
  transform: scale(1.5);
}

#glow:active {
  transform: scale(0.9);
}


@media (prefers-reduced-motion: reduce) {

  *, ::before, ::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }

  html {
    min-width: 100%;
    min-height: 100%;
    line-height: 1.3;
    background-color: khaki; /* fallback color */
    background: url('http://www.home.umk.pl/~mariusz.tarnopolski/home/bkg.jpg') hsl(54, 47%, 60%); /* rgba(240, 230, 140, 0.9); */
    background-blend-mode: lighten;
    background-attachment: fixed;
    background-size: contain;
  }

  .typing {
    color: black;
  }

  .typing:after {
  width: 0; 
  }

  #glow {
    border: 2px solid blue;
    color: white;
    background-color: blue;
  }

  #glow:hover, #glow:focus {
    background-color: RoyalBlue;
    border: 2px solid white;
    color: white;
    cursor: pointer;
  }

  #glow:active {
    background-color: RoyalBlue;
    transform: scale(0.9);
  }

}

@media (max-width:960px) {

  .typing {
    font-size: 2rem;
    top: 0.8em;
  }

  #glow {
    font-size: 1rem;
  }

#glow::before {
  content: '';
  top: -100px;
  left: -20px;
}

}

@media (max-width:640px) {

/*  html {
    min-width: 100%;
    min-height: 100%;
    background: url('animated.webp'), black;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
  }  */

  .typing {
    font-size: 1rem;
    top: 2em;
  }

  #glow {
    font-size: 1rem;
  }

}

@media (max-width:450px) {

  .typing {
    top: 1.25em;
  }

  #glow {
    font-size: 1rem;
    animation: none;
    position: absolute;
    top: 3em;
    left: 50%;
    margin-left: -104px;
  }

}












