.portfolio-page {
  background: #05070d;
  color: #fff;
  overflow: hidden;
}

.portfolio-hero {
  position: relative;
  min-height: calc(100svh - var(--header-height, 100px));
  display: flex;
  align-items: center;
  overflow: hidden;
}

.portfolio-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(0,0,0,.78),
      rgba(0,0,0,.35) 45%,
      rgba(0,0,0,.2)
    ),
    radial-gradient(
      circle at 20% 40%,
      rgba(0,113,235,.28),
      transparent 38%
    );
}

.portfolio-hero__content {
  position: relative;
  z-index: 2;
  max-width: 920px;
}

.portfolio-kicker {
  color: #ffffff;
  text-shadow:
    0 2px 10px rgba(0, 0, 0, 0.9),
    0 0 18px rgba(0, 113, 235, 0.65);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}

.portfolio-hero h1,
.section-head h2,
.portfolio-showreel h2,
.portfolio-map h2,
.portfolio-cta h2 {
  font-weight: 800;
  line-height: .95;
}

.portfolio-hero h1 {
  color: #fff;
  font-size: clamp(44px, 6vw, 92px);
  max-width: 820px;
  margin-bottom: 24px;
  text-shadow:
    0 4px 18px rgba(0, 0, 0, 0.85),
    0 0 34px rgba(0, 113, 235, 0.35);
}

.portfolio-hero__lead {
  font-size: clamp(18px, 2vw, 26px);
  max-width: 680px;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.85);
}

.portfolio-stats {
  display: flex;
  gap: 14px;
  margin-top: 42px;
  align-items: stretch;
}

.portfolio-stat {
  width: 210px;
  min-height: 108px;
  padding: 22px 24px;
  border-left: 3px solid #0071eb;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.48),
    rgba(0, 0, 0, 0.18)
  );
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.35);
}

.portfolio-stat strong {
  display: block;
}

.portfolio-stat-sup {
  color: #fff;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.9);
}

.portfolio-stat-sub {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  line-height: 1.35;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}

.portfolio-featured,
.portfolio-feed,
.portfolio-showreel,
.portfolio-map,
.portfolio-cta {
  padding: 90px 0;
}

.section-head {
  margin-bottom: 34px;
}

.section-head h2 {
  font-size: clamp(34px, 4vw, 64px);
}

.section-head--row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.featured-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
}

.featured-card {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  background: #111;
}

.featured-card--large {
  grid-row: span 2;
  min-height: 680px;
}

.featured-card img,
.portfolio-item img,
.portfolio-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-card::after,
.portfolio-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.82), transparent 65%);
}

.featured-card__content,
.portfolio-item__info {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
}

.featured-card span,
.portfolio-item span {
  color: #57a8ff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
}

.featured-card h3,
.portfolio-item h3 {
  margin: 8px 0 0;
  font-size: 24px;
}

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

.portfolio-filters button {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
}

.portfolio-filters button.is-active,
.portfolio-filters button:hover {
  background: #0071eb;
  border-color: #0071eb;
}

.portfolio-bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 260px;
  gap: 0;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.portfolio-item--wide {
  grid-column: span 2;
}

.portfolio-item--tall {
  grid-row: span 2;
}

.featured-card img,
.portfolio-item img,
.portfolio-item video {
  transition: transform .7s ease, filter .7s ease;
}

.featured-card:hover img,
.portfolio-item:hover img,
.portfolio-item:hover video {
  transform: scale(1.06);
  filter: brightness(1.1);
}

.portfolio-item.is-hidden {
  display: none;
}

.showreel-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.portfolio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  background: #0071eb;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
}

.portfolio-btn--ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,.28);
}

.portfolio-cta {
  position: relative;
  padding: 110px 0;
  background:
    radial-gradient(circle at 18% 25%, rgba(0, 113, 235, .38), transparent 32%),
    radial-gradient(circle at 82% 70%, rgba(87, 168, 255, .22), transparent 34%),
    linear-gradient(135deg, #030712 0%, #07111f 52%, #02040a 100%);
  color: #fff;
  text-align: center;
  overflow: hidden;
}

.portfolio-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black, transparent 72%);
  pointer-events: none;
}

.portfolio-cta .container {
  position: relative;
  z-index: 2;
  max-width: 980px;
  padding: clamp(34px, 6vw, 72px);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.13), rgba(255,255,255,.045));
  box-shadow:
    0 24px 80px rgba(0,0,0,.38),
    inset 0 1px 0 rgba(255,255,255,.18);
  backdrop-filter: blur(18px);
}

.portfolio-cta h2 {
  max-width: 780px;
  margin: 0 auto 18px;
  color: #fff;
  font-size: clamp(34px, 4.6vw, 68px);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -0.04em;
  text-shadow: 0 4px 22px rgba(0,0,0,.45);
}

.portfolio-cta p {
  max-width: 660px;
  margin: 0 auto;
  color: rgba(255,255,255,.78);
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.6;
}

.portfolio-cta__buttons {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.portfolio-cta .portfolio-btn {
  min-height: 54px;
  padding: 0 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0071eb, #58aaff);
  color: #fff;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 14px 36px rgba(0,113,235,.34);
}

.portfolio-cta .portfolio-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(0,113,235,.45);
}

.portfolio-cta .portfolio-btn--ghost {
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: none;
}

.portfolio-cta .portfolio-btn--ghost:hover {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.45);
}

@media (max-width: 991px) {
  .section-head--row,
  .showreel-card {
    display: block;
  }

  .portfolio-filters {
    margin-top: 22px;
  }

  .featured-grid,
  .portfolio-bento {
    grid-template-columns: 1fr;
  }

  .featured-card--large,
  .portfolio-item--wide,
  .portfolio-item--tall {
    grid-column: auto;
    grid-row: auto;
  }

  .featured-card,
  .featured-card--large,
  .portfolio-item {
    min-height: 360px;
  }
}

/* Featured projects */
.featured-grid--5 {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr;
  grid-template-rows: 340px 340px;
  gap: 18px;
}

.featured-grid--5 .featured-card--hero {
  grid-row: span 2;
}

.featured-card {
  position: relative;
  overflow: hidden;
  background: #080b12;
  cursor: pointer;
}

.featured-card video,
.featured-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .8s ease, filter .8s ease;
}

.featured-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 35% 80%, rgba(0, 113, 235, .28), transparent 34%),
    linear-gradient(0deg, rgba(0,0,0,.82), rgba(0,0,0,.08) 62%);
}

.featured-card:hover video,
.featured-card:hover img {
  transform: scale(1.055);
  filter: brightness(1.12) saturate(1.08);
}

.featured-card__content {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 26px;
  z-index: 2;
  pointer-events: none;
}

.featured-card__content span {
  display: inline-block;
  margin-bottom: 8px;
  color: #57a8ff;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.featured-card__content h3 {
  margin: 0;
  max-width: 620px;
  color: #fff;
  font-size: clamp(20px, 1.8vw, 34px);
  line-height: 1.05;
  font-weight: 800;
}

.featured-card--hero .featured-card__content h3 {
  font-size: clamp(28px, 3vw, 48px);
}

.featured-card__content p {
  max-width: 560px;
  margin: 14px 0 0;
  color: rgba(255,255,255,.76);
  font-size: 16px;
  line-height: 1.45;
}

.featured-card__play {
  position: absolute;
  z-index: 3;
  top: 22px;
  right: 22px;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  background: rgba(0,0,0,.36);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.featured-card__play::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 16px;
  border-left: 14px solid #fff;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

/* Video modal */
.portfolio-video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,.86);
  backdrop-filter: blur(14px);
}

.portfolio-video-modal.is-active {
  display: flex;
}

.portfolio-video-modal__inner {
  width: min(1200px, 96vw);
  max-height: 88vh;
}

.portfolio-video-modal__player {
  width: 100%;
  max-height: 88vh;
  display: block;
  background: #000;
}

.portfolio-video-modal__close,
.portfolio-video-modal__nav {
  position: fixed;
  z-index: 10000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.06));
  color: #fff;
  backdrop-filter: blur(16px);
  box-shadow:
    0 18px 45px rgba(0,0,0,.38),
    inset 0 1px 0 rgba(255,255,255,.18);
  cursor: pointer;
  transition:
    transform .25s ease,
    background .25s ease,
    border-color .25s ease,
    box-shadow .25s ease;
}

.portfolio-video-modal__close {
  top: 22px;
  right: 26px;
  width: 52px;
  height: 52px;
  font-size: 0;
}

.portfolio-video-modal__nav {
  top: 50%;
  width: 58px;
  height: 58px;
  font-size: 0;
  transform: translateY(-50%);
}

.portfolio-video-modal__nav--prev {
  left: 28px;
}

.portfolio-video-modal__nav--next {
  right: 28px;
}

.portfolio-video-modal__nav::before {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  border-top: 3px solid #fff;
  border-left: 3px solid #fff;
}

.portfolio-video-modal__nav--prev::before {
  transform: rotate(-45deg);
  margin-left: 4px;
}

.portfolio-video-modal__nav--next::before {
  transform: rotate(135deg);
  margin-right: 4px;
}

.portfolio-video-modal__close::before,
.portfolio-video-modal__close::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 3px;
  border-radius: 999px;
  background: #fff;
}

.portfolio-video-modal__close::before {
  transform: rotate(45deg);
}

.portfolio-video-modal__close::after {
  transform: rotate(-45deg);
}

.portfolio-video-modal__close:hover,
.portfolio-video-modal__nav:hover {
  background:
    radial-gradient(circle at 35% 25%, rgba(255,255,255,.32), transparent 34%),
    linear-gradient(180deg, rgba(0,113,235,.95), rgba(0,75,180,.88));
  border-color: rgba(87,168,255,.85);
  box-shadow:
    0 20px 55px rgba(0,113,235,.42),
    inset 0 1px 0 rgba(255,255,255,.24);
}

.portfolio-video-modal__close:hover {
  transform: scale(1.06);
}

.portfolio-video-modal__nav:hover {
  transform: translateY(-50%) scale(1.06);
}

.portfolio-video-modal__close:active {
  transform: scale(.96);
}

.portfolio-video-modal__nav:active {
  transform: translateY(-50%) scale(.96);
}

@media (max-width: 575px) {
  .portfolio-video-modal__close {
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
  }

  .portfolio-video-modal__close::before,
  .portfolio-video-modal__close::after {
    width: 17px;
    height: 2.5px;
  }

  .portfolio-video-modal__nav {
    width: 46px;
    height: 46px;
  }

  .portfolio-video-modal__nav::before {
    width: 12px;
    height: 12px;
    border-top-width: 2.5px;
    border-left-width: 2.5px;
  }

  .portfolio-video-modal__nav--prev {
    left: 10px;
  }

  .portfolio-video-modal__nav--next {
    right: 10px;
  }
}

/* Portfolio gallery filters */
.section-head--row {
  display: block;
}

.portfolio-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 22px;
  margin-bottom: 28px;
}

.portfolio-filters__main {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.portfolio-filters button {
  flex: 0 0 auto;
  white-space: nowrap;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(0, 113, 235, .22);
  border-radius: 999px;
  background: rgba(0, 113, 235, .06);
  color: #1f2328;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.portfolio-filters button:hover {
  background: rgba(0, 113, 235, .12);
  border-color: rgba(0, 113, 235, .45);
  color: #0071eb;
}

.portfolio-filters button.is-active {
  background: #0071eb;
  border-color: #0071eb;
  color: #fff;
}

.portfolio-filters-more {
  position: relative;
  flex: 0 0 auto;
}

.portfolio-filters-more.is-hidden {
  display: none;
}

.portfolio-filters-more:hover .portfolio-filters-more__menu {
  display: grid;
  gap: 6px;
}

.portfolio-filters-more:hover .portfolio-filters-more__button {
  background: rgba(0, 113, 235, .12);
  border-color: rgba(0, 113, 235, .45);
  color: #0071eb;
}

.portfolio-filters-more__button::after {
  content: "▾";
  margin-left: 7px;
  font-size: 11px;
}

.portfolio-filters-more__menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 50;
  display: none;
  min-width: 240px;
  padding: 12px 8px 8px 8px;
  border: 1px solid rgba(0, 113, 235, .18);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
}

.portfolio-filters-more.is-open .portfolio-filters-more__menu {
  display: grid;
  gap: 6px;
  z-index: 100;
}

.portfolio-filters-more__menu button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  border-radius: 12px;
}


/* Portfolio gallery */
.portfolio-item {
  position: relative;
  overflow: hidden;
  background: #080b12;
  cursor: pointer;
}

.portfolio-item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      0deg,
      rgba(0, 0, 0, .82) 0%,
      rgba(0, 0, 0, .55) 28%,
      rgba(0, 0, 0, .12) 62%,
      rgba(0, 0, 0, 0) 100%
    );
}

.portfolio-item__info {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  color: #fff;
  pointer-events: none;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .65);
}

.portfolio-item__info span {
  display: inline-block;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.portfolio-item__info h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(18px, 1.6vw, 26px);
  line-height: 1.08;
  font-weight: 800;
}

.portfolio-item.is-hidden {
  display: none;
}

.portfolio-loadmore-wrap {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}

.portfolio-loadmore, 
.portfolio-loadmore-bluerow {
  min-height: 48px;
  padding: 0 28px;
  border: 1px solid;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: background .25s ease, border-color .25s ease, color .25s ease, transform .25s ease;
}

.portfolio-loadmore:hover, 
.portfolio-loadmore-bluerow:hover {
  transform: translateY(-1px);
}

.portfolio-loadmore {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

.portfolio-loadmore:hover {
  border-color: var(--accent-color);
  background: rgba(0, 113, 235, .06);
  color: var(--accent-color);
}

.portfolio-loadmore-bluerow {
  background: var(--surface-color);
  border-color: var(--surface-color);
  color: #fff;
}

.portfolio-loadmore-bluerow:hover {
  border-color: var(--surface-color);
  background: rgba(252, 81, 48, .06);
  color: var(--surface-color);
}

.portfolio-loadmore.is-hidden, 
.portfolio-loadmore-bluerow.is-hidden {
  display: none;
}

/* Responsive */
@media (max-width: 991px) {
  .featured-grid--5 {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .featured-grid--5 .featured-card,
  .featured-grid--5 .featured-card--hero {
    min-height: 380px;
    grid-row: auto;
  }
}

@media (max-width: 575px) {
  .featured-grid--5 .featured-card,
  .featured-grid--5 .featured-card--hero {
    min-height: 320px;
  }

  .featured-card__content {
    left: 20px;
    right: 20px;
    bottom: 20px;
  }

  .featured-card__content p {
    display: none;
  }

  .featured-card__play {
    width: 46px;
    height: 46px;
    top: 18px;
    right: 18px;
  }

  .featured-card__play::before {
    left: 19px;
    top: 14px;
  }
}
