/* page styling */
body {
  background-color: #e7e6e6; /* very light grey background */
  font-family: Arial; /*Nice and basic*/
  line-height: 1.6; /* to increase seperation */
}

/* This is where all my content is (I do not have a header/footer/sidebar) */
main {
  max-width: 800px; /* otherwise will be wide and very left focused*/
  margin: auto; /*auto margin, not centered without*/
  padding: 2em; /* inner spacing */
  background-color: #ffffff; /* white area for main*/
  border-radius: 10px; /* rounding to not look ugly*/
}

.getting_there {
  text-shadow: 2px 2px 4px rgba(0, 0, 255, 0.4);
  transition: transform 200ms ease-out;
}
.getting_there:hover {
  transform: scale(1.05) rotate(-2deg);
}

.cool_h1 {
  display: inline-block; /* otherwise rotates weird*/

  font-family: Impact, "Arial Narrow Bold", sans-serif;
  font-size: 5em; /* Make it larger*/
  color: red;
  transform-style: preserve-3d;
  animation: spin3D 7.5s linear infinite;

  /*text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); doesn't apply after rotation, before*/
}

@keyframes spin3D {
  0% {
    transform: rotateX(5deg) rotateY(0deg); /* tilt 5deg back, start rotation */
  }
  100% {
    transform: rotateX(5deg) rotateY(360deg); /* keep tilt while spinning */
  }
}

.cool_p {
  display: inline-block; /* otherwise rotates weird*/
  font-size: 1.5em;
  font-weight: bold;
  color: red;

  aspect-ratio: 1 / 1; /*use center of page as rotation point, then make it as wide as it is tall, it's width is of the main element*/

  display: flex; /* otherwide not centered */
  align-items: center;
  justify-content: center;

  transform-origin: center;
  animation:
    spinCircle 5s linear infinite,
    hueSpin 5s linear infinite;
}

/* flat rotation */
@keyframes spinCircle {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* cycle through full color wheel */
@keyframes hueSpin {
  0% {
    filter: hue-rotate(0deg);
  }
  100% {
    filter: hue-rotate(360deg);
  }
}

.cool_h2 {
  font-size: 2em;
  display: inline-block;

  /* initial*/
  font-family: Arial, sans-serif;
  font-variant-caps: small-caps; /*to make it look cool*/

  font-weight: 400;

  /* animation */
  animation:
    cycleFonts 0.6s linear infinite,
    cycleWeights 0.6s linear infinite;
}

/* font-family cycle size 6 */
@keyframes cycleFonts {
  0% {
    font-family: Arial, sans-serif;
  }
  20% {
    font-family: "Courier New", monospace;
  }
  30% {
    font-family: "Impact", sans-serif;
  }
  40% {
    font-family: Georgia, serif;
  }
  60% {
    font-family: "Verdana", sans-serif;
  }
  80% {
    font-family: "Garamond";
  }
  100% {
    font-family: "Brush Script MT", sans-serif;
  }
}

/* font-weight cycle size 5*/
@keyframes cycleWeights {
  0% {
    font-weight: 400;
  }
  25% {
    font-weight: 600;
  }
  30% {
    font-weight: 100;
  }
  50% {
    font-weight: 700;
  }
  75% {
    font-weight: 200;
  }
  100% {
    font-weight: 1000;
  }
}

figure {
  display: flex;
  align-items: flex-end; /* align image and caption */
  padding-top: 2rem; /* extra space above to not touch existential crisis */
  margin: 0; /*reset default figure margin */
}

figure {
  display: flex;
  flex-direction: column; /* image above caption */
  align-items: flex-start; /* align left */
  padding-top: 2rem; /* even more space above rabbit */
  gap: 0.5rem; /* space between image and caption */
  margin: 0;
}

.cool_img {
  display: block;
  height: 128px; /* base height */
  animation: bounceRabbit 1s ease-in-out infinite;
  transform-origin: bottom center; /* scale from feet */
}

@keyframes bounceRabbit {
  0% {
    transform: translateY(0) scale(1);
  }
  25% {
    transform: translateY(-25px) scale(1.2);
  }
  50% {
    transform: translateY(0) scale(1);
  }
  75% {
    transform: translateY(-15px) scale(1.1);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

figcaption {
  margin: 0; /* remove default spacing */
}

/*I noticed that this footer was present on all of the examples, 
and I wanted to see if I could hide it. 
It works*/
codecraft-web-project-footer {
  display: none;
}
