.portfolio-section {
  padding: 84px 0 102px;
  background: #fdfaf9;
}

.portfolio-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.portfolio-carousel {
  margin-top: 54px;
}

.portfolio-track {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.portfolio-track::-webkit-scrollbar {
  display: none;
}

.portfolio-track .portfolio-card {
  flex: 0 0 calc((100% - 64px) / 3);
}

.portfolio-carousel-nav {
  margin-top: 34px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.portfolio-carousel-nav.is-hidden {
  display: none;
}

.portfolio-carousel-button {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid #dde0e6;
  background: transparent;
  display: grid;
  place-items: center;
  color: #181112;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

.portfolio-carousel-button:hover {
  background: #f2767c;
  border-color: #f2767c;
  color: #ffffff;
}

.portfolio-carousel-button:disabled {
  opacity: 0.35;
  pointer-events: none;
}

.portfolio-card {
  display: flex;
  flex-direction: column;
}

.portfolio-media {
  border-radius: 28px;
  overflow: hidden;
  background: #dde8e5;
  aspect-ratio: 1.33 / 1;
  display: grid;
  place-items: center;
}

.portfolio-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform-origin: center center;
  transform: scale(1.14);
  transition: transform 0.35s ease;
}

.portfolio-card:hover .portfolio-media img {
  transform: scale(1.18);
}

.portfolio-media img.portfolio-image-zoomed-out {
  transform: scale(1);
}

.portfolio-card:hover .portfolio-media img.portfolio-image-zoomed-out {
  transform: scale(1.04);
}

.portfolio-meta {
  margin-top: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.portfolio-card-static .portfolio-media {
  cursor: default;
}

.portfolio-meta h3 {
  color: var(--text);
  font-size: 26px;
  line-height: 1.08;
  letter-spacing: var(--ls-title);
  font-weight: var(--fw-title);
  transition: color 0.3s ease;
}

.portfolio-card:hover .portfolio-card-static .portfolio-media {
  cursor: default;
}

.portfolio-meta h3 {
  color: var(--primary);
}

.tag-row {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tag {
  min-height: 28px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: var(--fw-label);
  letter-spacing: -0.02em;
}

.tag-accent {
  background: #f8e6e6;
  color: var(--primary);
}

.tag-muted {
  background: var(--tag-muted);
  color: var(--text-soft);
}

.portfolio-arrow {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid #dde0e6;
  display: grid;
  place-items: center;
  color: #181112;
  flex-shrink: 0;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.4s var(--ease-out);
}

.portfolio-card:hover .portfolio-arrow,
.portfolio-arrow:hover {
  background: #f2767c;
  border-color: #f2767c;
  color: #ffffff;
  transform: rotate(45deg);
}

@media (max-width: 1180px) {
  .portfolio-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .portfolio-track .portfolio-card {
    flex-basis: calc((100% - 32px) / 2);
  }
}

@media (max-width: 720px) {
  .portfolio-section {
    padding: 60px 0 78px;
  }

  .portfolio-topbar {
    align-items: center;
  }

  .portfolio-heading {
    text-align: center;
  }

  .portfolio-carousel {
    margin-top: 36px;
  }

  .portfolio-track {
    gap: 20px;
  }

  .portfolio-track .portfolio-card {
    flex-basis: 100%;
  }

  .portfolio-carousel-nav {
    margin-top: 26px;
    justify-content: center;
  }

  .portfolio-carousel-button {
    width: 46px;
    height: 46px;
  }

  .portfolio-card-static .portfolio-media {
  cursor: default;
}

.portfolio-meta h3 {
    font-size: 24px;
  }

  .portfolio-arrow {
    width: 46px;
    height: 46px;
  }
}
