#main .welcome,
.intro,
#portfolio,
#contact {
  animation: Bdanim 1s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

#main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 100dvh;
  text-align: center;
}

#main .welcome {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 var(--large-margin);
  position: absolute;
  align-items: flex-start;
  text-align: left;
  gap: 2rem;
  max-width: 1300px;
  z-index: 10;
  color: var(--color-text-secondary);
}

.intro {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 3.5rem;
  text-align: center;
}


/********************** LAST PROJECTS ***********************/


#portfolio {
  padding: 6rem var(--large-margin);
  position: relative;
  z-index: 2;
}

#portfolio h2 {
  text-align: center;
}


.grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.grid-item {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-direction: column;
  position: relative;
  padding: 1px;
  border-radius: 1.4rem;
  overflow: hidden;
  background-color: rgba(128, 128, 128, 0.1);
  transition: transform 0.5s ease-out;
}

@media (pointer: fine) {
  .grid-item:hover>.glow-section__top-layer {
    background: rgb(25, 25, 29, 0.85);
  }
}

.grid-item:hover .prez {
  transform: scale(1.0);
  display: flex;
}

.grid-item:hover .arrow-top-right {
  fill: var(--color-text-primary);
}

.image-wrapper {
  overflow: hidden;
  width: 100%;
  height: 250px;
  border-radius: 12px;
  position: relative;
}

.grid-item .prez {
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: transform 0.4s ease;
  transform: scale(1.05);
}

.glow-section__top-layer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  background-color: var(--color-bg-secondary);
  transition: background-color 0.3s ease-out;
  padding: 1rem;
  gap: 1.2rem;
  border-radius: 1.4rem;
}

.glow-section__blob {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  width: 200px;
  height: 200px;
  border-radius: 100%;
  filter: blur(40px);
  opacity: 0;
}

.glow-section__blob--1 {
  background: rgb(255, 255, 255, 0.8);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.card-header .arrow-top-right {
  width: 16px;
  height: 16px;
  fill: var(--color-text-tertiary)
}



/****************************** RESPONSIVE ********************************/

@media (min-width: 576px) {
  .buttons {
    flex-direction: row;
  }

  .grid {
    gap: 2.5rem;
  }
}



@media (min-width: 768px) {
  .glow-section__top-layer {
    padding: 1.2rem;
  }

  #main {
    gap: 8rem;
  }

  #portfolio h2 {
    text-align: left;
  }
}



@media (max-width: 992px) {
  .welcome {
    align-items: center !important;
  }
}


@media (min-width: 992px) {
  .intro {
    max-width: 80%;
    align-items: flex-start;
    text-align: left;
  }

  .grid {
    gap: 3rem;
  }

  .grid-item .prez,
  .image-wrapper {
    height: 300px;
  }

  .glow-section__blob {
    width: 300px;
    height: 300px;
    filter: blur(60px);
  }

  #myworkexperience {
    flex-direction: row;
  }
    .grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}



@media (min-width: 1200px) {

  .welcome .intro {
    max-width: 70%;
  }

  .grid-item .prez,
  .image-wrapper {
    height: 450px;
  }

  .project-container {
    display: grid;
    grid-template-columns: 320px 1fr;
  }
}



@media (min-width: 1800px) {
  .grid {
    gap: 3rem;
  }
}
