/***************************************************/
/* BELOW 1200px     BELOW 1200px     BELOW 1200px */
/***************************************************/

@media (max-width: 75em) {
  .hero {
    max-width: 120rem;
  }

  .heading-primary {
    font-size: 4.4rem;
  }

  .grid--5--cols {
    grid-template-columns: repeat(3, 1fr);
  }

}



/***************************************************/
/* BELOW 1100px     BELOW 1100px     BELOW 1100px */
/***************************************************/

@media (max-width: 68em) {

  html {
    font-size: 56.25%;
  }

  .heading-secondary {
    font-size: 3.6rem;
  }

  .heading-tertiary {
    font-size: 2.4rem;
  }

  .grid {
    row-gap: 4.8rem;
    column-gap: 4.8rem;
  }


  .other-projects {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
  }

  .other-project-img {
    margin-bottom: 1.8rem;
  }

}

/***************************************************/
/* BELOW 960px     BELOW 960px     BELOW 960px */
/***************************************************/

@media (max-width: 60em) {
  html {
    font-size: 50%;
  }

  .contact {
    grid-template-columns: 3 5;
  }


  .main-nav-list {
    display: none;
  }


  /* hamburger */
  .checkbox {
    display: none;
  }

  .mobile-button {
    position: absolute;
    background-color: #4361EE;
    height: 8rem;
    width: 8rem;
    border-radius: 50%;
    top: 6%;
    right: 2%;
    z-index: 2000;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.766);
    text-align: center;
    cursor: pointer;
  }

  .background {
    height: 5rem;
    width: 5rem;
    border-radius: 50%;
    position: absolute;
    top: 6%;
    right: 3.5%;
    background-image: linear-gradient(rgba(67, 98, 238, 0.97),  rgba(62, 55, 201, 0.97));
    z-index: 1000;

    transition: transform 0.8s cubic-bezier(0.86, 0, 0.07, 1);
  }

  .nav {
    display: block;
    height: 100vh;
    position: fixed;
    top: 0;
    right: -60vw;
    z-index: 1500;
    opacity: 0;
    width: 0;
    transition: all 0.8s;
  }

  .list {
    position: absolute;
    display: flex;
    flex-direction: column;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    list-style: none;
    text-align: center;
    width: 100%;
  }

  .item {
    margin: 4rem;
    font-size: 4.2rem;
  }

  .link:link,
  .link:visited {
    display: inline-block;
    font-size: 4.2rem;
    padding: 1rem 2rem;
    color: rgba(255, 255, 255, 0.923);
    text-decoration: none;
    background-size: 220%;
    transition: all 0.4s;
  }

  .link:hover,
  .link:active {
    color: #fff;
    cursor: pointer;
    font-family: "Poppins-Bold", sans-serif;
  }

  /* functionality */
  .checkbox:checked~.background {
    transform: scale(100);
    position: fixed;
  }

  .checkbox:checked~.nav {
    opacity: 1;
    width: 100%;
    right: 0;
    position: fixed;
  }

  /*  */
  /* styling hamb ICON */
  .icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .icon,
  .icon::before,
  .icon::after {
    width: 3rem;
    height: 2px;
    background-color: white;
    display: inline-block;
  }

  .icon::before,
  .icon::after {
    content: "";
    position: absolute;
    left: 0;
    transition: all 0.2s;
  }

  .icon::before {
    top: -0.8rem;
  }

  .icon::after {
    top: 0.8rem;
  }

  .mobile-button:hover icon:before {
    top: -1rem;
  }

  .mobile-button:hover icon::after {
    top: 1rem;
  }

  .checkbox:checked+.mobile-button .icon {
    background-color: transparent;
  }

  .checkbox:checked+.mobile-button .icon::before {
    top: 0;
    transform: rotate(135deg);
  }

  .checkbox:checked+.mobile-button .icon::after {
    top: 0;
    transform: rotate(-135deg);
  }


}


/***************************************************/
/* BELOW 786px     BELOW 786px     BELOW 786px */
/***************************************************/

@media (max-width: 49em) {
  .grid--3--cols {
    grid-template-columns: 1fr 1fr;
  }

  .section-hero {
    padding: 2.4rem 0 6.4rem 0;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 3.2rem 3.2rem 0 3.2rem;
  }

  .hero {
    padding: 0 3.2rem;
    text-align: center;
  }

  .hero-img {
    width: 60%;
  }

  .all-projects {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .all-projects::after {
    content:"";
    flex-basis:100%;
 }

  .all-projects .project:nth-child(n + 4) { /* the last 3 element after the "after" */
  order:2;
}


}


/***************************************************/
/* BELOW 554px  (For Phones)*/
/***************************************************/

@media (max-width: 35em) {



  .grid {
    row-gap: 4rem;
  }

  .grid--4--cols {
    grid-template-columns: 1fr 1fr;
  }

  .grid--2--cols,
  .grid--3--cols,
  .grid--5--cols {
    grid-template-columns: 1fr;
  }

  .all-projects {
    grid-template-columns: 1fr;
  }

  .contact {
    grid-template-columns: 1fr;
  }

  .job {
    padding: 8rem 0;
  }

  .contact-img {
    padding: 8rem 0 3.2rem 0;
  }

}