.portfolio-page {
  overflow-x: hidden;
  background: #fff;
}

.portfolio-page .site-header.is-scrolled,
.portfolio-page .site-header.is-open {
  background: rgba(12, 12, 22, 0.96);
}

.portfolio-hero {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  padding: 166px 0 104px;
  color: #fff;
  background: var(--brand-dark);
  isolation: isolate;
}

.portfolio-hero::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 62px 62px;
  content: "";
  mask-image: linear-gradient(to bottom, #000 0%, transparent 92%);
}

.portfolio-hero::after {
  position: absolute;
  right: -8vw;
  bottom: -150px;
  z-index: -1;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(102, 102, 255, 0.24), transparent 66%);
  border: 1px solid rgba(184, 186, 255, 0.08);
  border-radius: 50%;
  content: "";
}

.portfolio-hero__glow {
  position: absolute;
  z-index: -1;
  width: 430px;
  height: 430px;
  filter: blur(115px);
  border-radius: 50%;
  opacity: 0.18;
}

.portfolio-hero__glow--one {
  top: 50px;
  right: 9%;
  background: var(--brand-primary);
}

.portfolio-hero__glow--two {
  bottom: -290px;
  left: -80px;
  background: var(--brand-sky);
  opacity: 0.1;
}

.portfolio-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.54fr);
  gap: clamp(70px, 10vw, 150px);
  align-items: end;
}

.portfolio-hero__copy {
  max-width: 800px;
}

.breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 62px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 180ms ease;
}

.breadcrumb a:hover {
  color: var(--brand-mint);
}

.portfolio-hero h1 {
  max-width: 840px;
  margin-bottom: 28px;
  font-size: clamp(3.6rem, 7vw, 7.4rem);
  font-weight: 600;
  line-height: 0.98;
}

.portfolio-hero__lead {
  max-width: 700px;
  margin-bottom: 36px;
  color: rgba(255, 255, 255, 0.66);
  font-size: clamp(1rem, 1.35vw, 1.16rem);
  line-height: 1.8;
}

.portfolio-hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.portfolio-summary {
  position: relative;
  overflow: hidden;
  padding: 28px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.portfolio-summary::before {
  position: absolute;
  top: -26px;
  right: -24px;
  width: 100px;
  height: 100px;
  background: var(--brand-primary);
  border-radius: 32px;
  content: "";
  opacity: 0.55;
  transform: rotate(18deg);
}

.portfolio-summary__header {
  display: flex;
  min-height: 110px;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.portfolio-summary__header span {
  max-width: 90px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

.portfolio-summary__header strong {
  font-family: "Sora", sans-serif;
  font-size: 4.5rem;
  font-weight: 600;
  letter-spacing: -0.08em;
  line-height: 0.82;
}

.portfolio-summary__list {
  padding: 18px 0;
}

.portfolio-summary__list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
}

.portfolio-summary__list strong {
  display: grid;
  min-width: 32px;
  height: 32px;
  place-items: center;
  color: var(--brand-dark);
  background: var(--brand-periwinkle);
  border-radius: 50%;
  font-size: 0.72rem;
}

.portfolio-summary > p {
  margin: 0;
  padding-top: 18px;
  color: rgba(255, 255, 255, 0.42);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.73rem;
}

.portfolio-gallery {
  padding: 112px 0 130px;
  background:
    radial-gradient(circle at 95% 5%, rgba(201, 232, 255, 0.45), transparent 28%),
    #fff;
}

.portfolio-gallery__heading {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 0.52fr);
  gap: 64px;
  align-items: end;
  margin-bottom: 58px;
}

.portfolio-gallery__heading h2 {
  max-width: 730px;
  margin-bottom: 0;
  font-size: clamp(2.8rem, 5.2vw, 5.4rem);
  font-weight: 600;
  line-height: 1.02;
}

.portfolio-gallery__heading > p {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.8;
}

.portfolio-toolbar {
  position: sticky;
  top: calc(var(--header-height) + 14px);
  z-index: 20;
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  margin-bottom: 48px;
  background: rgba(248, 248, 252, 0.92);
  border: 1px solid rgba(12, 12, 22, 0.1);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(12, 12, 22, 0.08);
  backdrop-filter: blur(18px);
}

.portfolio-filters {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.portfolio-filter {
  display: inline-flex;
  min-height: 46px;
  gap: 11px;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  color: #55556b;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.portfolio-filter:hover {
  color: var(--brand-dark);
  background: #fff;
  border-color: rgba(12, 12, 22, 0.1);
}

.portfolio-filter.is-active,
.portfolio-filter[aria-pressed="true"] {
  color: var(--brand-dark);
  background: var(--brand-periwinkle);
  border-color: rgba(102, 102, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.portfolio-filter small {
  display: grid;
  min-width: 23px;
  height: 23px;
  place-items: center;
  color: inherit;
  background: rgba(12, 12, 22, 0.07);
  border-radius: 50%;
  font-size: 0.63rem;
  font-weight: 700;
}

.portfolio-status {
  flex: 0 0 auto;
  margin: 0 12px 0 0;
  color: #68687b;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px 24px;
  scroll-margin-top: calc(var(--header-height) + 110px);
}

.portfolio-project[hidden] {
  display: none !important;
}

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

.portfolio-project__media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid rgba(12, 12, 22, 0.08);
  border-radius: 24px;
  box-shadow: 0 20px 46px rgba(12, 12, 22, 0.08);
  aspect-ratio: 1 / 1;
}

.portfolio-project__media::after {
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(to bottom, transparent, rgba(12, 12, 22, 0.64));
  content: "";
  opacity: 0.2;
  transition: opacity 300ms ease;
}

.portfolio-project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 560ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.portfolio-project__open {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  color: #fff;
  background: rgba(12, 12, 22, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(12px);
}

.portfolio-project:hover .portfolio-project__media img {
  transform: scale(1.045);
}

.portfolio-project:hover .portfolio-project__media::after {
  opacity: 1;
}

.portfolio-project:hover .portfolio-project__open,
.portfolio-project__media:focus-visible .portfolio-project__open {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-project__body {
  padding: 22px 5px 0;
}

.portfolio-project__type {
  width: fit-content;
  margin-bottom: 10px;
  padding: 5px 9px;
  color: #4242ca;
  background: rgba(184, 186, 255, 0.34);
  border-radius: 999px;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.portfolio-project h3 {
  margin-bottom: 12px;
  font-size: clamp(1.22rem, 1.8vw, 1.52rem);
  font-weight: 600;
  line-height: 1.25;
}

.portfolio-project h3 a {
  transition: color 180ms ease;
}

.portfolio-project h3 a:hover {
  color: #4848df;
}

.portfolio-project__summary {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 19px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.72;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.portfolio-project__link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
  font-size: 0.72rem;
  font-weight: 700;
}

.portfolio-project__link span {
  transition: transform 180ms ease;
}

.portfolio-project__link:hover span {
  transform: translate(2px, -2px);
}

.portfolio-empty {
  padding: 72px 34px;
  text-align: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 28px;
}

.portfolio-empty h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.portfolio-empty p {
  max-width: 580px;
  margin: 0 auto 28px;
  color: var(--muted);
}

.portfolio-cta {
  padding: 0 0 110px;
  background: #fff;
}

.portfolio-cta__inner {
  position: relative;
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 70px;
  align-items: end;
  padding: clamp(42px, 6vw, 76px);
  color: #fff;
  background: var(--brand-dark);
  border-radius: 34px;
  isolation: isolate;
}

.portfolio-cta__inner::before {
  position: absolute;
  top: -180px;
  right: -120px;
  z-index: -1;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(102, 102, 255, 0.46), transparent 65%);
  content: "";
}

.portfolio-cta h2 {
  max-width: 780px;
  margin-bottom: 20px;
  font-size: clamp(2.3rem, 4.8vw, 5rem);
  font-weight: 600;
  line-height: 1.02;
}

.portfolio-cta__inner > div:first-child > p:last-child {
  max-width: 680px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.62);
}

.portfolio-cta__actions {
  display: flex;
  min-width: 210px;
  flex-direction: column;
  gap: 11px;
}

.portfolio-page .new-footer__links span:not([aria-hidden]) {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.82rem;
}

@media (max-width: 1100px) {
  .portfolio-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.45fr);
    gap: 46px;
  }

  .portfolio-hero h1 {
    font-size: clamp(3.5rem, 7vw, 5.6rem);
  }

  .portfolio-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .portfolio-status {
    margin: 0 0 4px 4px;
  }
}

@media (max-width: 880px) {
  .portfolio-hero {
    min-height: auto;
    padding: 132px 0 84px;
  }

  .portfolio-hero__grid {
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .breadcrumb {
    margin-bottom: 42px;
  }

  .portfolio-summary {
    max-width: 620px;
  }

  .portfolio-gallery {
    padding: 90px 0 100px;
  }

  .portfolio-gallery__heading {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 44px;
  }

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

  .portfolio-cta {
    padding-bottom: 90px;
  }

  .portfolio-cta__inner {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .portfolio-cta__actions {
    min-width: 0;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  .portfolio-hero {
    padding: 116px 0 70px;
  }

  .portfolio-hero h1 {
    font-size: clamp(2.85rem, 14vw, 4.5rem);
  }

  .portfolio-hero__actions,
  .portfolio-hero__actions .button {
    width: 100%;
  }

  .portfolio-summary {
    padding: 22px;
    border-radius: 22px;
  }

  .portfolio-summary__header strong {
    font-size: 3.8rem;
  }

  .portfolio-gallery {
    padding: 74px 0 82px;
  }

  .portfolio-gallery__heading h2 {
    font-size: clamp(2.35rem, 11.5vw, 3.6rem);
  }

  .portfolio-toolbar {
    top: calc(var(--header-height) + 8px);
    padding: 10px;
    margin-right: -4px;
    margin-left: -4px;
    border-radius: 18px;
  }

  .portfolio-filters {
    width: 100%;
  }

  .portfolio-filter {
    flex: 1 1 calc(50% - 7px);
    padding-inline: 11px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .portfolio-project__open {
    opacity: 1;
    transform: none;
  }

  .portfolio-cta {
    padding-bottom: 74px;
  }

  .portfolio-cta__inner {
    padding: 36px 22px;
    border-radius: 24px;
  }

  .portfolio-cta__actions,
  .portfolio-cta__actions .button {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .portfolio-filter {
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-project__media img,
  .portfolio-project__open,
  .portfolio-filter {
    transition: none;
  }
}
