.portfolio-section {
  width: 100%;
  padding: 9px 30px 96px;
  box-sizing: border-box;
  color: #18141e;
  background: #fcfcfc;
  font-family: "Mona Sans", "Helvetica Neue", Arial, sans-serif;
}

.portfolio-section__inner {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
}

.portfolio-section__eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 159px;
  height: 24px;
  margin: 0;
  padding: 0 15px;
  border-radius: 999px;
  box-sizing: border-box;
  color: #18141e;
  background: #e6ece9;
  font-size: 13px;
  font-style: normal;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.1em;
  text-align: center;
  white-space: nowrap;
}

.portfolio-section__title {
  width: min(799px, 100%);
  min-height: 70px;
  margin: 25px 0 0;
  color: #18141e;
  font-family: inherit;
  font-size: 60px;
  font-style: normal;
  font-weight: 500;
  line-height: 70px;
  letter-spacing: 0;
}

.portfolio-section__description {
  width: min(398px, 100%);
  min-height: 60px;
  margin: 26px 0 0;
  color: #18141e;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0;
}

.portfolio-section__cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px;
  margin-top: 48px;
}

.portfolio-section__cards:has(> slot[name="children"]) {
  display: block;
}

.portfolio-section__cards > slot[name="children"] {
  display: block !important;
  width: 100%;
}

.portfolio-section__cards > slot[name="children"]::slotted(*) {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
}

.portfolio-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 528px;
  overflow: hidden;
  border-radius: 20px;
  box-sizing: border-box;
  color: #18141e;
  background: linear-gradient(155.46deg, #fcfcfc -50.09%, #e6ece9 106.94%);
  font-family: "Mona Sans", "Helvetica Neue", Arial, sans-serif;
  text-decoration: none;
}

.portfolio-card__media {
  position: relative;
  flex: 0 0 222px;
  height: 222px;
  overflow: hidden;
  border-radius: 20px;
  background: #e6ece9;
}

.portfolio-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.portfolio-card__category {
  position: absolute;
  top: 17px;
  left: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  height: 29px;
  padding: 0 14px;
  gap: 8px;
  border-radius: 999px;
  box-sizing: border-box;
  color: #18141e;
  background: rgba(252, 252, 252, 0.6);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  font-size: 13px;
  font-style: normal;
  font-weight: 500;
  line-height: 16.25px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.portfolio-card__category-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.portfolio-card__category[data-category="movement"]
  .portfolio-card__category-icon {
  width: 16.69px;
  height: 13.53px;
}

.portfolio-card__category[data-category="lifestyle"]
  .portfolio-card__category-icon {
  width: 14px;
  height: 13px;
}

.portfolio-card__category[data-category="tracking"]
  .portfolio-card__category-icon {
  width: 18.4px;
  height: 10.99px;
}

.portfolio-card__content {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 0 22px 86px;
  box-sizing: border-box;
}

.portfolio-card__title {
  margin: 21px 0 0;
  color: inherit;
  font-family: inherit;
  font-size: 27px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
}

.portfolio-card__description {
  width: 100%;
  margin: 25px 0 0;
  color: inherit;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0;
}

.portfolio-card__footer {
  position: absolute;
  right: 24px;
  bottom: 24px;
  left: 24px;
  display: flex;
  justify-content: flex-end;
  padding: 22px 0 0;
  border-top: 1px solid #bac4bf;
}

.portfolio-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 17px;
  gap: 12px;
  color: inherit;
  font-size: 13px;
  font-style: normal;
  font-weight: 500;
  line-height: 16.25px;
  letter-spacing: 0.15em;
  text-align: right;
}

.portfolio-card__button-icon {
  width: 5.5px;
  height: 11px;
  flex: 0 0 auto;
  object-fit: contain;
}

a.portfolio-card {
  transition: filter 160ms ease, transform 160ms ease;
}

a.portfolio-card:hover {
  filter: brightness(0.99);
  transform: translateY(-2px);
}

a.portfolio-card:focus-visible {
  outline: 2px solid #18141e;
  outline-offset: 3px;
}

@keyframes portfolio-reveal-up {
  from {
    opacity: 0;
    transform: translateY(36px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.portfolio-reveal .portfolio-section__eyebrow,
.portfolio-reveal .portfolio-section__title,
.portfolio-reveal .portfolio-section__description {
  opacity: 0;
}

.portfolio-reveal.is-revealed .portfolio-section__eyebrow,
.portfolio-reveal.is-revealed .portfolio-section__title,
.portfolio-reveal.is-revealed .portfolio-section__description,
.portfolio-reveal.is-revealed .portfolio-card {
  animation: portfolio-reveal-up 850ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.portfolio-reveal.is-revealed .portfolio-section__eyebrow,
.portfolio-reveal.is-revealed .portfolio-section__title,
.portfolio-reveal.is-revealed .portfolio-section__description {
  animation-delay: 80ms;
}

@media (max-width: 991px) {
  .portfolio-section {
    padding-right: 30px;
    padding-bottom: 80px;
    padding-left: 30px;
  }

  .portfolio-section__title {
    min-height: 0;
    font-size: 52px;
    line-height: 1.12;
  }

  .portfolio-section__description {
    min-height: 0;
  }

  .portfolio-section__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-section__cards > slot[name="children"]::slotted(*) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .portfolio-section {
    padding-top: 24px;
    padding-right: 15px;
    padding-bottom: 64px;
    padding-left: 15px;
    border-top: 0;
  }

  .portfolio-section__eyebrow {
    min-width: 0;
  }

  .portfolio-section__title {
    width: min(323px, 100%);
    min-height: 0;
    margin-top: 24px;
    font-size: 32px;
    line-height: 1.1;
  }

  .portfolio-section__description {
    width: min(323px, 100%);
    min-height: 0;
    margin-top: 28px;
    font-size: 14px;
    line-height: 18px;
  }

  .portfolio-section__cards {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    gap: 24px;
    margin-top: 40px;
  }

  .portfolio-section__cards > slot[name="children"]::slotted(*) {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    gap: 24px;
  }

  .portfolio-card {
    width: 100%;
    min-height: 387px;
    border-radius: 15px;
  }

  .portfolio-card__media {
    flex-basis: 142px;
    height: 142px;
    border-radius: 15px 15px 20px 20px;
  }

  .portfolio-card__content {
    padding: 0 12px 72px;
  }

  .portfolio-card__title {
    margin-top: 15px;
    font-size: 27px;
    line-height: 1.2;
  }

  .portfolio-card__description {
    margin-top: 15px;
    font-size: 14px;
    line-height: 18px;
  }

  .portfolio-card__footer {
    right: 12px;
    bottom: 18px;
    left: 12px;
    padding-top: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-reveal .portfolio-section__eyebrow,
  .portfolio-reveal .portfolio-section__title,
  .portfolio-reveal .portfolio-section__description {
    opacity: 1;
    animation: none;
  }
}

/* Transform only: the category badge's backdrop-filter pops if opacity
   animates on the card */
@keyframes portfolio-card-reveal {
  from {
    opacity: 0;
    transform: translateY(36px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.portfolio-card--reveal {
  opacity: 0;
}

.portfolio-card--reveal.is-revealed {
  animation: portfolio-card-reveal 850ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-card--reveal {
    opacity: 1;
    animation: none;
  }
}

/* Waterfall: siblings entering together stagger left-to-right */

/* waterfall-portfolio-card */
:host(:nth-child(2)) .portfolio-card--reveal.is-revealed,
.portfolio-card--reveal.is-revealed:nth-child(2) {
  animation-delay: 160ms;
}
:host(:nth-child(3)) .portfolio-card--reveal.is-revealed,
.portfolio-card--reveal.is-revealed:nth-child(3) {
  animation-delay: 260ms;
}
:host(:nth-child(4)) .portfolio-card--reveal.is-revealed,
.portfolio-card--reveal.is-revealed:nth-child(4) {
  animation-delay: 360ms;
}
:host(:nth-child(5)) .portfolio-card--reveal.is-revealed,
.portfolio-card--reveal.is-revealed:nth-child(5) {
  animation-delay: 460ms;
}
:host(:nth-child(6)) .portfolio-card--reveal.is-revealed,
.portfolio-card--reveal.is-revealed:nth-child(6) {
  animation-delay: 560ms;
}
:host(:nth-child(7)) .portfolio-card--reveal.is-revealed,
.portfolio-card--reveal.is-revealed:nth-child(7) {
  animation-delay: 660ms;
}

/* Direction variety: headings/copy arrive from the left */
@keyframes portfolio-reveal-from-left {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.portfolio-reveal.is-revealed .portfolio-section__eyebrow,
.portfolio-reveal.is-revealed .portfolio-section__title {
  animation-name: portfolio-reveal-from-left;
}

/* waterfall-ext-portfolio-card: items 8+ keep cascading instead of snapping to the base delay */
:host(:nth-child(8)) .portfolio-card--reveal.is-revealed,
.portfolio-card--reveal.is-revealed:nth-child(8) {
  animation-delay: 760ms;
}
:host(:nth-child(9)) .portfolio-card--reveal.is-revealed,
.portfolio-card--reveal.is-revealed:nth-child(9) {
  animation-delay: 860ms;
}
:host(:nth-child(n + 10)) .portfolio-card--reveal.is-revealed,
.portfolio-card--reveal.is-revealed:nth-child(n + 10) {
  animation-delay: 960ms;
}

/* Authored \n breaks are desktop-only; below the site's mobile breakpoint
   (navbar switch, 1280px) the text reflows naturally. */
@media (max-width: 1280px) {
  br.multiline-br {
    display: none;
  }
}

