body {
  display: grid;
  grid-template-columns: 5rem auto;
  transition: grid-template-columns 0.1s ease;
}

body:has(nav:hover) {
  grid-template-columns: 8rem 1fr;
}

.main-firstpage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 1rem clamp(2rem, 4cqw, 4rem);
  background-color: var(--color-grey-light);
  position: relative;
  width: 100%;
  height: 12rem;
  container-type: inline-size;
}

.header__welcome {
  font: var(--font-all-capital);
  font-size: clamp(1.8rem, 3.5cqw, 2.5rem);
  width: clamp(10rem, 35%, 50rem);
}

.header__mehran {
  font: var(--font-mehran);
  font-size: clamp(1.5rem, 4cqw, 2.5rem);
  color: var(--color-gold);
  text-shadow: 0.8rem 0.8rem 0.5rem var(--color-gold);
  -webkit-text-stroke: 0.5px black;
}

.mehran__m {
  font: var(--font-mehran);
  font-size: clamp(2rem, 6cqw, 4rem);
  color: var(--color-gold);
  text-shadow: 0.8rem 0.8rem 0.5rem var(--color-gold);
  -webkit-text-stroke: 0.5px black;
}

.nav {
  position: sticky;
  top: 0;
  height: 100dvh;
  background-color: var(--color-navy-light);
  /* opacity: 0.9; */
  display: flex;
  justify-content: center;
}

nav ul {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  list-style: none;

}

.nav li {
  padding: 4rem 0;
  font-size: 1.2rem;
}

.nav li a {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Hide the text initially */
.nav li span {
  display: none;
  transition: display 0.2s ease;
  color: var(--color-white);
  font: var(--font-stylish-bold);
  font-size: 1.2rem;
}

/* Show the text when the sidebar is hovered */
.nav:hover li span {
  display: block;
}

span.span-experience {
  display: block;
}

.icon-nav {
  color: var(--color-white);
  font-size: 2rem;
}

.icon-nav-active {
  background-color: var(--color-white);
  color: var(--color-navy-light);
  border-radius: 0.1em;
  padding: 0.5em;
}

.menu-button,
.close-button {
  background: none;
  border: none;
  font-size: 5rem;
  color: #333;
  cursor: pointer;
  display: none;
  align-items: center;
  background-color: transparent;
}

.hamburger-menu,
.icon-xmark {
  font-size: 2rem;
}

.banner-image {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.banner-image img {
  width: 100%;
  object-fit: cover;
}

.my-intro {
  height: auto;
  min-height: 50rem;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(15rem, 1fr) minmax(0, 2fr);
  align-items: center;
  container-type: size-inline;
}

.my-intro__photo {
  height: 100%;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.my-intro__photo img {
  height: auto;
  width: clamp(15rem, 50%, 50rem);
  border-radius: 50%;
  box-shadow: 0px 1rem 5rem var(--color-black);
}

.my-intro__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: auto;
  margin: clamp(1rem, 2dvw, 3rem);
  padding: clamp(1.5rem, 2dvw, 3rem);
  background-color: var(--color-navy-light);
  border-radius: 1rem;
  min-width: 0;
}

.my-intro p {
  font: var(--font-text-sec);
  font-size: clamp(1.1rem, 1.2dvw, 1.5rem);
  line-height: 1.5em;
  /* text-align: justify; */
  margin: 0.5em 0;
  overflow-wrap: anywhere;
  color: var(--color-white)
}

.cards {
  background-color: var(--color-grey-light);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(2rem, 2dvw, 5rem);
  height: auto;
  min-height: 20rem;
  padding: clamp(2rem, 2dvw, 5rem);
}

.card {
  background-color: var(--color-white);
  /* border-radius: 2rem; */
  box-shadow: 5px 5px 5px var(--color-semilight-grey);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(0.5rem, 5dvw, 2rem);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: scale(1.05);
}

.card-photo {
  width: 70%;
  height: auto;
  display: flex;
  justify-content: center;
}


.card-photo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 50%;
}

#research-photo {
  width: 90%;
  height: clamp(10rem, 30%, 60rem);
  display: flex;
  justify-content: center;
}

#research-photo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 0;
}

.card p {
  font-size: clamp(0.9rem, 0.8dvw, 1rem);
  margin: clamp(0.5rem, 1cqw, 2rem);
  text-align: justify;
}

.card-link {
  background-color: var(--color-blue);
  color: var(--color-white);
  padding: 0.75em clamp(0.5rem, 1dvw, 1.5rem);
  font: var(--font-stylish-bold);
  font-size: clamp(0.7rem, 0.8dvw, 1rem);
}

.main-footer {
  height: auto;
  min-height: 20rem;
  width: 100%;
  background-color: var(--color-navy-lightest);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 0.1rem;
  padding: 1rem;
}

.footer__column {
  border-right: 1px solid var(--color-white-dimmed);
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  margin: 2rem;
  /* container-type: size-inline; */
}

.footer__column:last-child {
  border-right: none;
  justify-self: center;
  width: 80%;
}

.footer-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: clamp(0.5rem, 1dvw, 1rem);
}

.footer-row__i {
  color: var(--color-white);
  font-size: 2rem;
}

.footer-row a {
  margin-inline-start: 1rem;
  color: var(--color-white);
  font-size: clamp(0.7rem, 2dvw, 0.9rem);
}

.footer__column p {
  color: var(--color-white);
  margin-block-start: 0.5rem;
  font-size: clamp(0.7rem, 2dvw, 0.9rem);
}

.footer__column:first-child {
  justify-content: start;
  margin-block-start: clamp(1.5rem, 10dvw, 3rem);
}

.location-map {
  width: 90%;
  height: 15rem;
  border: 0;
}

@media (max-width: 60rem) {

  body {
    transition: none;
    grid-template-columns: 1fr;
  }

  body:has(nav:hover) {
    grid-template-columns: 1fr;
  }

  .menu-button {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    height: auto;
    width: 100dvw;
    background-color: var(--color-navy-light);
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    z-index: 1;
  }

  .nav li {
    padding: 1.5rem 0;
    font-size: 1rem;
  }

  .close-button {
    width: fit-content;
    height: auto;
    cursor: pointer;
    margin: 1rem 0;
    z-index: 1;
  }

  .icon-xmark {
    color: var(--color-white);
  }

  .nav li span {
    display: flex;
  }

  .my-intro {
    height: auto;
    min-height: 50rem;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(15rem, 1fr);
    align-items: center;
    padding: 2rem 1rem;
  }

  .my-intro__text {
    height: auto;
  }

  .cards {
    background-color: var(--color-grey-light);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2rem;
    height: auto;
    min-height: 20rem;
    padding: 2rem;
  }

  .main-footer {
    height: auto;
    width: 100%;
    background-color: var(--color-navy-lightest);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.1rem;
    padding: 1rem;
  }

  .footer__column {
    border-right: none;
    border-bottom: 1px solid var(--color-white-dimmed);
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    margin: 0 2rem;
    padding: 2rem 0;
  }

  .footer__column:last-child {
    border-bottom: none;
  }

  .location-map {
    width: 90%;
    height: 200px;
    border: 0;
    margin-inline: auto;
  }

  .menu-button {
    display: flex;
    flex: column;
    align-items: center;
  }

  .card-photo img {
    width: 70%;
    height: auto;
    object-fit: contain;
    border-radius: 50%;
  }

}

@media (max-width: 30rem) {
  .card-photo {
    width: 100%;
  }

  .nav li {
    padding: 1.5rem 0;
    font-size: 1rem;
  }
}