@media screen and (max-width: 999px) {
  .firstname {
    left: max(2dvw, 2dvh);
  }
  .container3 {
    grid-template-columns: repeat(1, 1fr);
  }
}
@media screen and (max-width: 2000px) {
  .lastname {
    left: max(9dvw, 9dvh);
  }
}
@media screen and (max-width: 500px) {
  .firstname {
    left: -2%;
    bottom: 60%;
  }
  .lastname {
    top: 0;
    left: 2%;
  }
  .lastname span,
  .firstname span {
    font-size: max(5.5dvw, 5.5dvh);
  }
}

@media screen and (max-width: 1100px) {
  .about {
    grid-template-columns: repeat(1, 1fr);
    place-items: center;
    width: min-content;
    text-align: center;
    padding: max(1dvw, 1dvh);
    padding-top: max(1.5dvw, 1.5dvh);
  }
  .about .Content .wrapper h2 {
    margin-top: max(2dvw, 2dvh);
    font-size: 90%;
  }
  .about .Content .wrapper p {
    font-size: 50%;
  }
  .photo {
    width: max(15dvw, 15dvh);
  }
}
@media screen and (max-width: 900px) {
  .link-images {
    right: 40%;
    transform: translate(50%);
    bottom: max(5dvw, 5dvh);
  }
}
@media screen and (max-width: 1024px) and (orientation: portrait) {
  .container2 section h3 {
    rotate: 0deg;
  }
  .grid {
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    flex-direction: column;
  }
  .container2 section {
    height: 6dvw;
    width: 60dvw;
    margin: 0;
  }
  .container2 section:hover {
    height: 30dvw;
    width: 60dvw;
  }
  .container2 section h3,
  .hidden .content span,
  .skill-name,
  .container2 section .description h4,
  .container2 section .description p {
    font-size: 2dvw;
  }
}
@media screen and (max-width: 1024px) and (min-width: 500px) and(orientation: portrait) {
  .container2 section:hover {
    height: 25dvw;
    width: 60dvw;
  }
}
@media screen and (max-height: 768px) and (max-width: 932px) and (orientation: landscape) {
  .firstname {
    left: -2%;
  }
  .lastname {
    left: 7%;
  }

  .container2 section {
    width: 6dvw;
    height: 30dvw;
  }
  .container {
    max-height: 100dvh;
  }
  .container2 section:hover {
    width: 35dvw;
  }
  .marquee {
    top: 0%;
  }
  body {
    overflow-y: hidden;
  }
  .link-images {
    right: 20%;
    bottom: max(2dvw, 2dvh);
  }
  .about {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    padding: 1dvw;
    width: 50dvw;
  }
  .photo {
    width: max(20dvw, 20dvh);
    aspect-ratio: 1/1;
    margin-right: 5dvw;
  }
  .about .Content {
    font-size: 1.5dvw;
  }

  .about .Content .wrapper h2 {
    text-align: left;
  }

  .about .Content .wrapper p {
    font-size: 1dvw;
    text-align: left;
  }
}
@media screen and (max-width: 500px) and (orientation: portrait) {
  nav p {
    font-size: 3dvh;
  }
  .form {
    height: 45dvh;
  }
  .form .wrapper input {
    padding: max(2dvw, 2dvh);
  }

  .form .wrapper label,
  .form button[type="submit"],
  .form button[type="reset"] {
    font-size: 1.25dvh;
  }
  .form .wrapper label {
    left: 5%;
  }
  .form .wrapper .label {
    top: 1%;
    left: 4%;
    font-size: 1dvh;
  }
}
@media screen and (max-width: 1001px) and (orientation: portrait) {
  .container4 h1 {
    font-size: 4.1dvw;
  }
  .container4 p {
    font-size: 2.1dvw;
  }
  .container4 .work {
    height: 80dvh; /* Adjust height for better fit on smaller screens */
    aspect-ratio: 16/9; /* Maintain aspect ratio */
  }
  .container4 .work video {
    -o-object-fit: cover;
    object-fit: cover;
  }
}
@media screen and (max-width: 431px) {
  nav {
    transform: translateX(-105%);
    writing-mode: horizontal-tb;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    position: fixed;
    transition: all 0.5s ease-in-out;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
  }
  nav.open {
    transform: translateX(0);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  }
  nav p {
    white-space: nowrap;
    width: 100%;
    padding: 2vh 15vh 2vh 2vh;
  }
  .Table::before {
    top: 10%;
    left: 0;
    width: 90%;
    height: 80%;
    border-radius: 0 max(1dvw, 1dvh) max(1dvw, 1dvh) 0;
    background-color: var(--bg-color);
  }
  .menu {
    width: 7vh;
    aspect-ratio: 1/1;
    display: flex;
    border: none;
    position: fixed;
    /* bottom: 2vh; */
    /* bottom: 10%; */
    bottom: 2%;
    left: 2%;
    z-index: 9999999;
    background-color: var(--h-color);
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
  }

  .menu span {
    width: 3.5vh;
    height: 0.6vh;
    background-color: var(--bg-color);
    padding: 0;
    border-radius: 1vh;
    transition: all 0.5s ease-in-out;
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .menu span:nth-child(1) {
    top: 37%;
  }

  .menu span:nth-child(2) {
    top: 50%;
  }

  .menu span:nth-child(3) {
    top: 63%;
  }

  .menu span.crossed:nth-child(1) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .menu span.crossed:nth-child(2) {
    opacity: 0;
  }

  .menu span.crossed:nth-child(3) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
  }
  .link-images {
    /* bottom: 10%; */
    bottom: 2%;
    /* bottom: 2dvh; */
    right: 25%;
  }
  .popup {
    display: flex;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -10%;
    height: 5vh;
    z-index: 9999999;
    width: 35vh;
    box-shadow: 0 0 5px black;
    height: min-content;
    transition: all 0.5s ease;
    color: white;
    background-color: black;
    border-radius: 2vh;
    padding: 1vh;
  }
  .popup .suggestion {
    width: 100%;
    font-size: 1.5vh;
    font-family: "Poppins", Arial, Helvetica, sans-serif, sans-serif;
  }
  .about{
    height: 40vh;
    width: 55vw;
  }
  .photo{
    width: 90%;
  }
  .about .Content{
    margin-top: -2vh;
    width: 100%;
    font-size: 2vh;
  }
  .about .Content .wrapper h2{
    width: 100%;
  }
  .about .Content .wrapper p{
    font-size: 1.1vh;
  }
  .firstname,.lastname{
    display: none;
  }
  .firstname-phone{
    display: block;
    position: absolute;
    left: -15%;
    bottom: -20%;
    height: 100vh;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    color: var(--h-color);
    font-size: 15vh;
    white-space: nowrap;
    font-optical-sizing: auto;
  }
}
