/*==========================================================*/
/*Footer style*/
footer {
  margin-top: 40px;
}
#footer-content {
  height: fit-content;
  background-color: var(--bg-color);
  padding: 50px;
  display: grid;
  gap: 8px;
}
#footer-decor {
  height: 280px;
  width: 100%;
  background-image: url(footerdiv.webp);
  background-position: top;
  animation: animateframe steps(2, jump-none) 1s infinite;
}
footer a {
  color: var(--text-color);
  transition: color 0.2s;
}
footer a:hover {
  color: rgb(176, 193, 255);
}
#copyright {
  font-size: 1.3rem;
  color: var(--accent-light-color);
}

/*==========================================================*/
/* MAIN */
#grid-container {
  display: grid;
  gap: 3vw;
  animation: bobbing 4s infinite alternate ease-in-out;
}
.box {
  grid-row: span 2;
  position: relative;
}
.box-head {
  position: relative;
}
.head-bg {
  position: absolute;
  width: 100%;
  aspect-ratio: 1;
  background-image: url(boxhead.webp);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  transform: rotate(5deg);
}
#head-uxui .head-bg,
#head-3d .head-bg {
  top: -8vh;
  transform: rotate(-9deg);
}
.head-bg h2 {
  padding: 40% 2vw 0px;
  text-align: center;
}
/* SPACER */
.space {
  position: relative;
}
.flower {
  position: absolute;
  top: 0;
  left: 0;
}

/* ITEM */
.item {
  position: absolute;
  top: 10%;
}
/*==========================================================*/
/* GRID ITEM ORDER */
#head-3d {
  order: 5;
}
.box-3d {
  order: 6;
}
#head-uxui {
  order: 1;
}
.box-uxui {
  order: 2;
}
#head-sound {
  order: 3;
}
.box-sound {
  order: 4;
}
#head-video {
  order: 7;
}
.box-video {
  order: 8;
}
#head-graphics {
  order: 9;
}
.box-graphics {
  order: 10;
}

#space1 {
  order: 3;
}
#space2 {
  order: 6;
}
#space3 {
  order: 10;
}
/*==========================================================*/
/* GRID random offset & bobbing animation */
#box14,
#box20,
#box3,
#box11,
.box-head {
  animation: bobbing 3s infinite alternate ease-in-out -5s;
}
@keyframes bobbing {
  0% {
    transform: translateY(0px);
  }
  100% {
    transform: translateY(30px);
  }
}
#flower2 {
  top: -10vh;
}
/* PC 786px or larger */
@media only screen and (min-width: 768px) {
  #box1,
  #box5,
  #box19 {
    transform: translateX(-3vw);
  }
  #box9,
  #space3 {
    transform: translateX(3vw);
  }
  #grid-container {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(13, 1fr);
    aspect-ratio: 4/10;
    margin: 12vh 8vw 0vh;
    min-width: 600px;
  }
  #head-video .head-bg {
    top: -10vh;
  }
  #box3,
  #box7,
  #box12,
  #box20 {
    transform: translateY(7vh);
  }
  #box2,
  #box16 {
    transform: translateY(-7vh);
  }
  #flower1 {
    left: -8vw;
  }
  #flower3 {
    top: -14vh;
    left: 10vw;
  }
  .frog-container {
    top: 9%;
    right: 10%;
  }
}
/* Mobile 787px or smaller */
@media only screen and (max-width: 787px) {
  #grid-container {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(26, 1fr);
    aspect-ratio: 2/20;
    margin: 14vh 5vw 0vw;
  }
  #box3,
  #box7,
  #box12,
  #box20 {
    transform: translateY(3vh);
  }
  #box2,
  #box16 {
    transform: translateY(-3vh);
  }
  #space2 {
    grid-row: 17;
    grid-column: 1;
  }
  #space3 {
    grid-row: 25;
    grid-column: 1;
  }
  .frog-container {
    top: 5%;
    right: 0;
  }
  footer a {
    font-size: 1rem;
  }
}
/*==========================================================*/
/* DECORATIONS */
.fish {
  height: 400px;
  width: 400px;
  background-image: url(fishAnim.webp);
  background-size: auto 600%;
  background-repeat: no-repeat;
}
#fish {
  top: -400px;
  left: 30vw;
  transform-origin: -3000px 0px;
  position: fixed;
  z-index: -1;
}
.fishAnim {
  animation: animateframe steps(6, jump-none) 625ms 16, curvepath 12s ease-in;
}
#fish2 {
  bottom: -400px;
  right: 30vw;
  transform-origin: 3000px 0px;
  position: fixed;
  z-index: -1;
}
#mirror {
  transform: scaleY(-1);
}
.mirror {
  animation: animateframe steps(6, jump-none) 625ms 16 15s;
}
.fishAnimReverse {
  animation: curvepath 12s ease-in 15s;
}

.frog-container {
  position: absolute;
  width: 100px;
  display: grid;
  justify-items: center;
}
.frog {
  width: 60px;
  height: 60px;
  background-image: url(frog_sleep.webp);
  cursor: pointer;
}
.frog:active {
  scale: 105% 90%;
}
.frogAnim {
  background-image: url(frog_awake.webp);
  background-size: auto 200%;
  background-position: top;
  animation: animateframe steps(2, jump-none) 1s infinite;
}
#click-me {
  position: absolute;
  top: -20px;
  font-size: 1rem;
  transition: opacity 1s;
}
.fade {
  opacity: 0;
}

@keyframes curvepath {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(30deg);
  }
}
@keyframes animateframe {
  0% {
    background-position: top;
  }
  100% {
    background-position: bottom;
  }
}

.bub {
  position: absolute;
  z-index: -1;
  width: 100px;
  height: 100px;
  background-image: url(bubble.webp);
  background-size: auto 700%;
}
.bubAnim {
  animation: animateframe steps(7, jump-none) 1.2s;
}
#bub1 {
  top: 20vh;
  left: 0;
}
#bub2 {
  left: 10vw;
}
#bub3 {
  top: 50vh;
  right: 0;
}
#bub4 {
  bottom: 2vh;
  left: 50vw;
}
#bub5 {
  top: 240vh;
  left: 30vw;
}
