
html {
  scroll-timeline-name: --page-scroll;
  scroll-timeline-axis: block;
}

/* ========= ВТОРОЙ БЛОК ========= */

.portfolio {
  position: relative;
  z-index: 10;
  margin-top: -220px;
  padding: 110px 0 0;
  background-color: rgb(245, 252, 238);
  box-shadow: 0 -12px 40px rgba(103, 81, 97);

  animation-name: portfolio-scroll-overlap;
  animation-duration: 1s;
  animation-timeline: --page-scroll;
  animation-timing-function: linear;
  animation-fill-mode: both;
}

/* ширина контента */

.portfolio > .container {
  max-width: 1200px;
}

/* заголовки */

.portfolio__text {
  text-align: center;
  margin-bottom: 40px;
}

.portfolio__title {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: 0.16em;
}

.portfolio__subtitle {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.18em;
}

/* контент: карусель */

.portfolio__content {
  display: block;
}

/* ========= КАРУСЕЛЬ ========= */

.portfolio__carousel {
  margin-top: 32px;
  position: relative;
  z-index: 1;
}

.carousel__track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
}

.carousel__item {
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  background: rgb(135, 171, 157);
  position: relative;
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
  transform-origin: center center;
}

.carousel__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel__item:hover {
  transform: scale(1.06);
  box-shadow: 0 18px 40px rgba(103, 81, 97);
}

/* ========= ЦИТАТА ========= */

.portfolio__quote {
  position: relative;
  z-index: 2;
  margin-top: -80px;
  padding: 72px 0px 72px;
  background: rgb(185, 205, 165);


  width: 100%;

}

.portfolio__quote-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* текст цитаты */

.portfolio__quote-text {
  margin: 0 0 22px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.6;
}

.portfolio__quote-author {
  margin: 0;
  font-size: 14px;
}


/* ========= КЛЮЧЕВАЯ АНИМАЦИЯ НАЕЗДА ПРИ СКРОЛЛЕ ========= */

@keyframes portfolio-scroll-overlap {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-490px);
  }
}
