@import "./variables.module.scss";

.homeContainer {
  min-height: 100dvh;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  color: white;
  font-family: $font;
  .hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: 90%;
    max-width: 1536px;
    margin: 3rem auto;
    @media (min-width: 768px) {
      width: 75%;
      margin: 8rem auto;
    }
    @media (max-height: 800px) {
      margin: 3rem auto;
    }
    .cta {
      width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      flex-direction: column-reverse;
      gap: 4rem;
      margin-bottom: 1.25rem;
      @media (min-width: 640px) {
        flex-direction: row;
        align-items: center;
        gap: 2rem;
      }
      .title {
        font-size: 2rem;
        font-weight: bold;
        margin-right: 1rem;
        @media (min-width: 640px) {
          font-size: 3rem;
          justify-content: center;
        }
        @media (min-width: 768px) {
          font-size: 4rem;
        }
        @media (min-width: 1024px) {
          font-size: 5rem;
        }
        @media (min-width: 1280px) {
          font-size: 6rem;
          margin-right: 2rem;
        }
        @media (min-width: 1536px) {
          font-size: 7.5rem;
          margin-right: 3rem;
        }
      }
      .portraitContainer {
        width: 100%;
        max-width: 200px;
        @media (min-width: 640px) {
          max-width: 200px;
        }
        @media (min-width: 1280px) {
          max-width: 300px;
        }
        @media (min-width: 1536px) {
          max-width: 400px;
        }
        .portrait {
          position: relative;
          width: 100%;
          object-fit: contain;
          height: 100%;
          border-radius: 2rem;
          box-shadow: 1.5rem 1.5rem white;
          filter: grayscale(100%) contrast(110%);
          clip-path: circle(100%);
          transition-duration: 0.3s;
          transition-timing-function: ease;
          transition-property: box-shadow, clip-path, filter;
        }

        @media (prefers-reduced-motion: no-preference) {
          &:hover .portrait {
            box-shadow: 0px 0px white;
            clip-path: circle(50%);
            filter: none;
            animation: bounceImage 600ms cubic-bezier(0.33, 1, 0.68, 1) infinite
              alternate;
          }
        }
      }
    }

    .jobTitle {
      font-size: 0.9rem;
      font-weight: 400;
      line-height: 1.5;
      @media (min-width: 768px) {
        font-size: 1.2rem;
      }
      @media (min-width: 1536px) {
        font-size: 1.4rem;
      }
    }
  }
  .aboutContainer {
    position: relative;
    width: 90%;
    margin: 4rem auto;
    max-width: 1536px;
    z-index: 10;
    @media (min-width: 768px) {
      width: 75%;
      margin: 8rem auto;
    }

    h2 {
      font-size: 1.5rem;
      font-weight: bold;
      margin-bottom: 1.5rem;

      @media (min-width: 768px) {
        font-size: 3rem;
        margin-bottom: 2.5rem;
      }
    }

    p {
      font-size: 1rem;
      line-height: 2;
      max-width: 65ch;

      @media (min-width: 768px) {
        font-size: 1.2rem;
      }
    }
  }
  .blogPreviewContainer {
    position: relative;
    width: 90%;
    margin: 4rem auto;
    max-width: 1536px;
    z-index: 10;
    @media (min-width: 768px) {
      width: 75%;
      margin: 8rem auto;
    }

    h2 {
      font-size: 1.5rem;
      font-weight: bold;
      margin-bottom: 1.5rem;

      @media (min-width: 768px) {
        font-size: 3rem;
        margin-bottom: 2.5rem;
      }
    }

    ul {
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      align-items: flex-start;
      gap: 1rem;
      margin-bottom: 2rem;

      li {
        display: block;

        a {
          color: white;
          display: block;
          text-decoration: none;
          border: 2px solid white;
          border-radius: 1rem;
          padding: 1rem;
          transition-property: background-color, color;
          transition-duration: 0.3s;
          transition-timing-function: ease;

          &:hover,
          &:focus {
            background-color: white;
            color: $black;
          }

          &:hover h3,
          &:focus h3 {
            text-decoration: underline;
          }

          h3 {
            font-size: 1rem;
            margin-bottom: 0.5rem;
            font-weight: bold;
            line-height: 1.2;

            @media (min-width: 768px) {
              font-size: 1.2rem;
            }
          }

          p {
            font-size: 0.875rem;

            @media (min-width: 768px) {
              font-size: 1rem;
            }
          }
        }
      }
    }
    .viewAllContainer {
      a {
        color: white;
        text-decoration: none;
      }
    }
  }
  .projectContainer {
    position: relative;

    .projectTitleContainer {
      width: 90%;
      max-width: 1536px;
      margin: 0 auto;
      color: $white;
      font-family: $font;
      @media (min-width: 768px) {
        width: 75%;
      }
    }

    h2 {
      font-size: 1.5rem;
      font-weight: bold;
      margin-bottom: 2.5rem;

      @media (min-width: 768px) {
        font-size: 3rem;
      }
    }

    .projectListingsContainer {
      display: grid;
      gap: 8rem;
      width: 90%;
      max-width: 1536px;
      margin: 0 auto;
      @media (min-width: 768px) {
        width: 75%;
      }
    }
  }

  footer {
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-family: $font;
    h2 {
      color: $white;
      font-size: 2.5rem;
      font-weight: bold;
      margin-bottom: 2rem;
      @media (min-width: 768px) {
        font-size: 4rem;
      }
    }
    .footerLinks {
      display: flex;
      justify-content: center;
      align-items: center;
      margin: 0;
      padding: 0;
      list-style-type: none;
      li {
        padding: 0 16px;
        @media (min-width: 768px) {
          padding: 0 32px;
        }
        a {
          display: flex;
          justify-content: center;
          align-items: center;
          gap: 0.5rem;
          font-family: $font;
          color: $white;
          text-decoration: none;
          font-weight: 700;
          font-size: 1rem;
          text-underline-offset: 0.25rem;
          @media (min-width: 768px) {
            font-size: 1.5rem;
          }
          &:hover {
            text-decoration: underline;
          }
          &:focus {
            text-decoration: underline;
          }

          svg {
            font-size: 1.5rem;
            @media (min-width: 768px) {
              font-size: 2rem;
            }
          }
        }
      }
    }
  }
}

@keyframes bounceImage {
  from {
    transform: translateY(0px) rotateX(20deg);
  }

  to {
    transform: translateY(-50px) rotateX(0deg);
  }
}
