@import url(./reset.css);
@import url('https://fonts.googleapis.com/css2?family=Asap:wght@600');

/* Desktop and up */
@media (min-width: 500px) {
  header {
    position: sticky;
    top: -60px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    height: 100px;
    margin-top: 100px;
  }

  #shadow-cover {
    background-color: light-dark(white, var(--off-black));
    position: absolute;
    top: -100px;
    width: 100%;
    height: 100px;
  }

  header a {
    position: sticky;
    top: 10px;
    flex-basis: 120px;
    height: 30px;
    margin-top: -10px;
    font-size: 24px;
    z-index: 1;
  }

  /* Image itself */
  header #flower img {
    position: relative;
    top: -5px;
    left: calc(50% - 35px); /* Halfway minus half the width of the image */
    width: 70px;
    display: block;
    border-radius: 35px;
    outline: 5px solid light-dark(white, var(--off-black));
    transition: filter 0.1s;
  }

  /* WRAPPER for image shadow */
  header #flower {
    position: sticky;
    width: 100vw;
    height: 30px;
    margin-top: -30px;
    z-index: 0; /* Ensure hover effect works for other links */
  } 


  header::after {
    content: "";
    position: fixed;
    top: 5px;
    left: calc(50% - 35px); /* Halfway minus half the width of the image */
    width: 70px;
    height: 70px;
    margin-top: 0;
    border-radius: 40px;
    box-shadow: 0 10px 35px 0 light-dark(var(--blue), var(--magenta));
    z-index: -1;
    clip-path: rect(50% 150% 150% -50%);
  }

  header::before {
    content: "";
    position: fixed;
    top: 0;
    width: 100%;
    z-index: -1;
    height: 40px;
    box-shadow: -50vw 5px 20px 0 light-dark(var(--pink), var(--dark-blue)), 50vw 5px 20px 0 light-dark(var(--orange), var(--dark-blue));
    backdrop-filter: blur(15px);
    /* light-dark doesn't work ig */
    @media (prefers-color-scheme: dark) {
      backdrop-filter: blur(15px) brightness(50%);
    }
  }

  header a::before, header a::after {
    content: "";
    display: block;
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0;
    border: 2px light-dark(var(--magenta), var(--pink));
    transform: scale(1.3);
    transition: transform 0.1s, opacity 0.1s;
  }
  
  header a::before {
    top: 0;
    left: 0;
    border-style: solid none none solid;
    transform-origin: top left;
  }
  
  header a::after {
    right: 0;
    bottom: 5px;
    border-style: none solid solid none;
    transform-origin: bottom right;
  }
  
  header a:hover::before, header a:hover::after {
    opacity: 1;
    transform: scale(1);
  }

  main {
    min-height: calc(100vh - 120px - 40px);
  }

  footer > * {
    justify-self: center;
    border-right: 2px solid var(--magenta);
    padding: 10px;
    text-align: center;
    height: 20px;
  }
  
  footer > *:first-child {
    border-left: 2px solid var(--magenta);
  }

  footer {
    display: flex;
    justify-content: center;
  }
}

/* Mobile */
@media (max-width: 499px) {
  header::after, header::before {
    backdrop-filter: blur(15px);
    @media (prefers-color-scheme: dark) {
      backdrop-filter: blur(15px) brightness(50%);
    }
  }

  header::after {
    content: "";
    background: no-repeat top 5px left 5px / 30px url("./assets/hamburger.svg") ;
    position: fixed;
    display: block;
    width: 50px;
    height: 50px;
    top: 0;
    left: 0;
    border-radius: 0 0 50px 0;
    border-style: none solid solid none;
    border-width: 2px;
    border-color: light-dark(var(--magenta), var(--pink));
    /*background-color: var(--pink);*/
  }

  header {
    position: fixed;
    top: 0;
    left: -100vw;
    width: 100vw;
    border-bottom: 2px solid light-dark(var(--magenta), var(--pink));
    padding-bottom: 10px;
  }

  header::before {
    content: "";
    position: absolute;
    z-index: -9999;
    display: block;
    top: 0;
    width: 100vw;
    height: 100%;
  }

  header:hover {
    left: 0;
    transition: left .1s;
  }

  header a {
    padding: 10px;
    display: block;
    width: 100px;
    margin: auto;
    font-size: 30px;
  }

  #flower {
    padding: 0;
    position: absolute;
    width: 50px;
    right: 5px;
    top: 5px;
  }

  #flower img {
    border-radius: 25px;
    width: 50px;
    outline: 5px solid light-dark(white, var(--off-black));
  }

  main {
    min-height: calc(100vh - 120px);
  }

  footer > * {
    display: block;
    width: 75px;
    margin: auto;
    justify-self: center;
    border-bottom: 2px solid var(--magenta);
    padding: 10px;
    text-align: center;
    height: 20px;
  }
  
  footer > *:first-child {
    border-top: 2px solid var(--magenta);
  }

  #copyright {
    width: 100%;
  }
}

header a {
  color: light-dark(black, white);
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  transition: color 0.1s;
}

header a:hover {
  color: light-dark(var(--magenta), var(--pink));
}


header #flower img:hover {
  filter: brightness(120%);
}

/* No standard hover effect */
header #flower::before, header #flower::after {
  display: none;
}

footer {
  min-height: 100px;
  color: white;
  font-size: 20px;
  padding: 10px;
  flex-wrap: wrap;
  position: relative;
  background: light-dark(var(--off-black), black);
  bottom: 0;
}

footer::after {
  content: "";
  position: absolute; /* To parent (footer) */
  top: -30px;
  left: 0;
  width: 100%;
  height: 30px;
  background: url(./assets/star.svg) no-repeat top 7px right / 25px, url(./assets/footer.svg) no-repeat bottom left / auto 30px;
}

footer a {
  color: var(--pink);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline solid 2px var(--magenta);
}

#copyright {
  display: block;
  border: none;
  line-height: 1.5;
  height: auto;
}

main {
  color: light-dark(black, white);
  background-color: light-dark(white, var(--off-black));
}