@media (max-width: 400px) {
    .sub-tech-box {
        flex-direction: column;
    }
}

@media (max-width: 576px) {

  .main-section {
    height: auto;
  }

  .main-section-container {
    margin: 10vw 5vw;
  }

  .main-section-display {
    font-size: 34px !important;
    line-height: 1.3;
  }

  .secondary-section {
    margin-left: 5vw;
    margin-right: 5vw;
  }

  .section-tech-display {
    flex-direction: column;
    gap: 30px;
  }

  .portfolio-footer {
    flex-direction: column;
    gap: 30px;
    text-align: center;
  }
}

@media (min-width: 577px) and (max-width: 768px) {

  .main-section-container {
    margin-left: 8vw;
    margin-top: 15vw;
  }

  .main-section-display {
    font-size: 44px !important;
  }

  .section-tech-display {
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
  }

}

@media (min-width: 769px) and (max-width: 1024px) {

  .main-section-display {
    font-size: 52px !important;
  }


}

@media (min-width: 1200px) {

  .main-section {
    height: 70vh;
  }

  .main-section-display {
    font-size: 64px;
  }

  .section-project-container,
  .section-project-container-sec {
    padding: 40px;
  }
}

@media (max-width: 576px) {

  .section-project-container,
  .section-project-container-sec {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 22px;
    gap: 24px;
  }

  .project-info-container,
  .project-info-container-sec {
    max-width: 100%;
    align-items: center;
    gap: 20px;
  }

  .project-tags,
  .project-tags-sec {
    justify-content: center;
  }

  .project-info h3,
  .project-info-sec h3 {
    font-size: 24px;
  }

  .project-info p,
  .project-info-sec p {
    font-size: 15px;
    max-width: 100%;
  }

  .project-info button,
  .project-info-sec button {
    align-self: center;
  }

  .project-tags span {
    font-size: 15px !important;
  }

  .project-btns a button {
    font-size: 13px !important;
    padding: 11px !important;
  }

  .project-img-container {
    width: 100%;
    height: 200px;
  }
  .section-tech-display {
    width: 90vw !important;
  }
}

@media (min-width: 577px) and (max-width: 768px) {

  .section-project-container,
  .section-project-container-sec {
    flex-direction: column;
    padding: 28px;
    gap: 28px;
  }

  .project-info-container,
  .project-info-container-sec {
    max-width: 100%;
  }

  .project-info h3,
  .project-info-sec h3 {
    font-size: 28px;
  }

  .project-img-container {
    width: 100%;
    height: 230px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {

  .section-project-container,
  .section-project-container-sec {
    gap: 20px;
    padding: 28px;
  }

  .project-info-container,
  .project-info-container-sec {
    max-width: 65%;
  }

  .project-info h3,
  .project-info-sec h3 {
    font-size: 30px;
  }

  .project-img-container {
    width: 240px;
    height: 160px;
  }
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1002;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background-color: #0f172a;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {

  .hamburger {
    display: flex;
    position: absolute;
    top: 22px;
    right: 6vw;
  }

  .nav-main {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    z-index: 1001;
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
    transition: all 0.4s ease;
  }

  .nav-main.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-elements a {
    font-size: 22px;
    font-weight: 600;
    color: #0f172a;
  }
}

body.menu-open {
  overflow: hidden;
  height: 100vh;
}

@media (max-width: 600px) {

  .page-main-section {
    width: 90vw;
  }

  .page-main-section h1 {
    font-size: 30px;
    text-align: center;
  }

  .page-main-section-underline {
    margin-left: auto;
    margin-right: auto;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 30px;
  }

  .skill-card {
    padding: 20px;
  }

  .skill-card h3 {
    font-size: 18px;
  }

  .skill {
    font-size: 13px;
    padding: 6px 12px;
  }

  #contactForm {
    margin: 40px 16px;
    padding: 24px;
  }

  #contactForm input,
  #contactForm textarea {
    font-size: 14px;
  }

  #contactForm button {
    font-size: 15px;
    padding: 10px;
  }

  .about-page {
    padding: 40px 16px;
  }

  .about-container h1 {
    font-size: 30px;
  }

  .about-intro {
    font-size: 16px;
  }

  .about-text {
    font-size: 15px;
  }
}

@media (min-width: 601px) and (max-width: 900px) {

  .page-main-section {
    width: 85vw;
  }

  .page-main-section h1 {
    font-size: 34px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  #contactForm {
    margin: 50px auto;
    padding: 28px;
  }

  .about-container h1 {
    font-size: 36px;
  }

  .about-intro {
    font-size: 17px;
  }
}

@media (min-width: 901px) and (max-width: 1200px) {

  .page-main-section {
    width: 82vw;
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .about-container {
    max-width: 720px;
  }
}
