:root {
  color-scheme: dark;
  --bg: #080d12;
  --bg-deep: #060a0e;
  --surface: #0d1319;
  --surface-2: #111820;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.15);
  --text: #f4f4f6;
  --muted: #9499a2;
  --muted-2: #6d747e;
  --purple: #9c4df4;
  --purple-2: #7428c9;
  --green: #4ee28a;
  --sidebar: 210px;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}
html {
  background: var(--bg);
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 87% 12%, rgba(32, 45, 59, 0.15), transparent 28%),
    linear-gradient(135deg, #080d12 0%, #070c11 52%, #080d12 100%);
  color: var(--text);
}
button,
input,
textarea,
select {
  font: inherit;
}
a {
  color: inherit;
}
img,
video {
  display: block;
  max-width: 100%;
}
[hidden] {
  display: none !important;
}

.portfolio-shell {
  min-height: 100vh;
}
.portfolio-sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: var(--sidebar);
  border-right: 1px solid var(--line);
  background: rgba(6, 11, 16, 0.88);
  backdrop-filter: blur(18px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  height: 92px;
  padding: 0 24px;
  text-decoration: none;
  font-size: 22px;
  letter-spacing: -0.035em;
}
.brand-planet {
  font-size: 25px;
  filter: saturate(1.15);
}
.side-nav {
  display: grid;
  padding: 3px 0;
}
.side-nav a {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  min-height: 51px;
  padding: 0 24px;
  color: #aeb3bc;
  text-decoration: none;
  font-size: 13px;
  transition:
    color 0.16s ease,
    background 0.16s ease;
}
.side-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.025);
}
.side-nav a.active {
  color: #fff;
  background: linear-gradient(
    90deg,
    rgba(143, 67, 235, 0.16),
    rgba(143, 67, 235, 0.025)
  );
}
.side-nav a.active::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--purple);
  box-shadow: 0 0 20px rgba(156, 77, 244, 0.85);
}
.nav-icon {
  color: #a7adb7;
  font-size: 18px;
}
.sidebar-footer {
  margin-top: auto;
  padding: 20px 25px 28px;
  color: var(--muted-2);
}
.socials {
  display: flex;
  gap: 30px;
  margin-bottom: 18px;
}
.socials a {
  color: #959ca7;
  text-decoration: none;
  font-size: 15px;
}
.socials a {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  transition:
    color 0.16s ease,
    transform 0.16s ease;
}
.socials a:hover {
  color: #fff;
  transform: translateY(-1px);
}
.socials svg {
  width: 18px;
  height: 18px;
  display: block;
}
.socials .social-artstation:hover {
  color: #13aff0;
}
.socials .social-discord:hover {
  color: #8794ff;
}
.sidebar-footer small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
}

.mobile-header {
  display: none;
}
.portfolio-main {
  min-height: 100vh;
  margin-left: var(--sidebar);
  padding: 31px clamp(24px, 2.2vw, 44px) 22px;
}
.portfolio-content {
  width: 100%;
  max-width: none;
  margin: 0;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  min-height: 87px;
  border-bottom: 1px solid var(--line);
}
.page-header h1 {
  margin: 0 0 9px;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.04em;
}
.page-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.header-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 16px rgba(156, 77, 244, 0.85);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 38px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(9, 14, 19, 0.75);
  color: #e3e5e8;
  text-decoration: none;
  font-size: 12px;
  white-space: nowrap;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}
.button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}
.button.primary {
  min-width: 104px;
  border-color: rgba(173, 96, 255, 0.5);
  background: linear-gradient(180deg, #8236d6, #6523ad);
  color: #fff;
}
.button.icon {
  min-width: 39px;
  padding: 0 12px;
}
.button.youtube-button {
  min-width: 122px;
  border-color: rgba(255, 72, 72, 0.46);
  background: linear-gradient(
    180deg,
    rgba(219, 38, 38, 0.96),
    rgba(165, 22, 22, 0.96)
  );
  color: #fff;
  box-shadow: 0 10px 28px rgba(176, 20, 20, 0.14);
}
.button.youtube-button:hover {
  border-color: rgba(255, 115, 115, 0.8);
  background: linear-gradient(180deg, #ed3030, #b71818);
  box-shadow: 0 12px 34px rgba(197, 28, 28, 0.24);
}
.button.youtube-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.portfolio-filters {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 68px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.category-tabs {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 58px;
  padding: 8px 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar {
  display: none;
}
.category-tabs a {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  text-decoration: none;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #aeb5bf;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  transition:
    color 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}
.category-tabs a:hover {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: #fff;
}
.category-tabs a.active {
  border-color: rgba(171, 91, 255, 0.42);
  background: linear-gradient(
    180deg,
    rgba(142, 62, 222, 0.19),
    rgba(93, 34, 153, 0.1)
  );
  color: #fff;
  box-shadow:
    inset 0 -2px 0 var(--purple),
    0 8px 24px rgba(70, 23, 117, 0.12);
}
.category-tabs a:active {
  transform: translateY(1px);
}
.category-tabs a:focus-visible {
  outline: 2px solid rgba(187, 111, 255, 0.72);
  outline-offset: 2px;
}

.category-share-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  max-width: 230px;
  padding: 0 12px;
  border: 1px solid rgba(177, 96, 255, 0.36);
  border-radius: 9px;
  background: rgba(117, 47, 181, 0.1);
  color: #cf9bff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}
.category-share-button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}
.category-share-button:hover {
  border-color: rgba(190, 113, 255, 0.68);
  background: rgba(133, 53, 207, 0.2);
  color: #fff;
}
.category-share-button:active {
  transform: translateY(1px);
}
.category-share-button:focus-visible {
  outline: 2px solid rgba(187, 111, 255, 0.72);
  outline-offset: 2px;
}
.category-share-button.copied {
  border-color: rgba(72, 217, 151, 0.55);
  background: rgba(38, 139, 94, 0.14);
  color: #8ff0bd;
}
.category-share-success {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
}

.software-filter {
  position: relative;
  flex: 0 0 auto;
}
.software-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(10, 15, 21, 0.86);
  color: #d4d8de;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease;
}
.software-filter-toggle > svg {
  width: 18px;
  height: 18px;
  color: #aeb4be;
}
.software-filter-toggle:hover,
.software-filter.open .software-filter-toggle {
  border-color: rgba(177, 96, 255, 0.55);
  background: rgba(92, 35, 148, 0.18);
  color: #fff;
}
.software-filter-toggle.active {
  border-color: rgba(177, 96, 255, 0.48);
}
.software-filter-status {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #aeb4bd;
  font-size: 10px;
  font-weight: 600;
}
.software-filter-toggle.active .software-filter-status {
  background: rgba(156, 77, 244, 0.24);
  color: #dab8ff;
}
.software-filter-chevron {
  color: #858d98;
  font-size: 15px;
  transition: transform 0.18s ease;
}
.software-filter.open .software-filter-chevron {
  transform: rotate(180deg);
}
.software-filter-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 9px);
  right: 0;
  width: min(380px, calc(100vw - 36px));
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(9, 14, 20, 0.98);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(156, 77, 244, 0.05);
  backdrop-filter: blur(20px);
}
.software-filter-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 2px 12px;
}
.software-filter-heading > span {
  display: grid;
  gap: 4px;
}
.software-filter-heading strong {
  font-size: 13px;
  font-weight: 600;
}
.software-filter-heading small {
  color: #858d98;
  font-size: 10px;
  line-height: 1.4;
}
.software-filter-heading button {
  padding: 4px 7px;
  border: 0;
  background: transparent;
  color: #b983ef;
  cursor: pointer;
  font-size: 11px;
}
.software-filter-heading button:disabled {
  color: #5c626b;
  cursor: default;
}
.software-filter-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-height: min(430px, 56vh);
  overflow: auto;
  padding: 2px;
}
.software-filter-option {
  position: relative;
  display: grid;
  grid-template-columns: 18px 29px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 47px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.018);
  color: #b9bec6;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.25;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease;
}
.software-filter-option:hover {
  border-color: rgba(177, 96, 255, 0.3);
  background: rgba(140, 58, 220, 0.08);
  color: #fff;
}
.software-filter-option:has(input:checked) {
  border-color: rgba(177, 96, 255, 0.48);
  background: rgba(140, 58, 220, 0.13);
  color: #fff;
}
.software-filter-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.software-filter-check {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  color: transparent;
  font-size: 11px;
}
.software-filter-option input:checked + .software-filter-check {
  border-color: #a84fff;
  background: #7c2fc3;
  color: #fff;
}
.software-filter-option input:focus-visible + .software-filter-check {
  outline: 2px solid rgba(190, 113, 255, 0.8);
  outline-offset: 2px;
}
.software-filter-icon {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
}
.software-filter-icon svg {
  width: 27px;
  height: 27px;
}
.software-filter-apply {
  width: 100%;
  min-height: 39px;
  margin-top: 12px;
  border: 1px solid rgba(177, 96, 255, 0.52);
  border-radius: 8px;
  background: linear-gradient(180deg, #8236d6, #6523ad);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.software-filter-apply:hover {
  filter: brightness(1.08);
}

.featured-project {
  position: relative;
  min-height: 342px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #10151a;
  isolation: isolate;
  cursor: pointer;
  outline: none;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}
.featured-project:hover {
  border-color: rgba(169, 91, 255, 0.46);
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(156, 77, 244, 0.08);
}
.featured-project:focus-visible {
  border-color: rgba(190, 112, 255, 0.84);
  box-shadow: 0 0 0 3px rgba(156, 77, 244, 0.22);
}
.featured-stage {
  position: relative;
  min-height: 342px;
  overflow: hidden;
  isolation: isolate;
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0) scale(1);
  transition:
    opacity 0.25s ease,
    filter 0.34s ease,
    transform 0.48s cubic-bezier(0.2, 0.82, 0.2, 1);
  will-change: opacity, filter, transform;
}
.featured-project.is-switching.is-next .featured-stage {
  opacity: 0;
  filter: blur(8px);
  transform: translate3d(-46px, 0, 0) scale(0.985);
}
.featured-project.is-switching.is-prev .featured-stage {
  opacity: 0;
  filter: blur(8px);
  transform: translate3d(46px, 0, 0) scale(0.985);
}
.featured-project.is-entering.from-next .featured-stage {
  opacity: 0;
  filter: blur(8px);
  transform: translate3d(46px, 0, 0) scale(0.985);
  transition: none;
}
.featured-project.is-entering.from-prev .featured-stage {
  opacity: 0;
  filter: blur(8px);
  transform: translate3d(-46px, 0, 0) scale(0.985);
  transition: none;
}
.featured-project::after {
  content: "";
  position: absolute;
  z-index: 4;
  inset: -35% auto -35% -32%;
  width: 28%;
  pointer-events: none;
  opacity: 0;
  transform: skewX(-18deg) translateX(-180%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(190, 114, 255, 0.14),
    rgba(255, 255, 255, 0.16),
    transparent
  );
}
.featured-project.is-switching::after {
  animation: featured-sheen 0.58s cubic-bezier(0.2, 0.75, 0.2, 1);
}
@keyframes featured-sheen {
  0% {
    opacity: 0;
    transform: skewX(-18deg) translateX(-180%);
  }
  28% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: skewX(-18deg) translateX(620%);
  }
}
.featured-media,
.featured-media img,
.featured-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.featured-media {
  z-index: 0;
}
.featured-media img,
.featured-media video {
  object-fit: cover;
}
.featured-stage::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(5, 8, 12, 0.98) 0%,
      rgba(5, 8, 12, 0.92) 22%,
      rgba(5, 8, 12, 0.58) 38%,
      rgba(5, 8, 12, 0.12) 66%,
      rgba(5, 8, 12, 0.22) 100%
    ),
    linear-gradient(0deg, rgba(4, 7, 10, 0.52), transparent 54%);
  pointer-events: none;
}
.featured-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(390px, 45%);
  min-height: 342px;
  padding: 31px 27px;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
}
.featured-kicker {
  margin-bottom: 17px;
  color: #b36aff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.featured-copy h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 39px;
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.96);
}
.featured-copy p {
  margin: 0;
  max-width: 310px;
  color: #e2e4e7;
  font-size: 13px;
  line-height: 1.65;
}
.project-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}
.project-chips span {
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  background: rgba(12, 17, 21, 0.66);
  color: #d8dbe0;
  font-size: 11px;
  line-height: 1;
}
.featured-link {
  display: inline-flex;
  align-items: center;
  gap: 19px;
  width: fit-content;
  margin-top: 36px;
  color: #bb6dff;
  text-decoration: none;
  font-size: 12px;
}
.featured-controls {
  position: absolute;
  z-index: 6;
  right: 27px;
  bottom: 25px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.featured-count {
  font-size: 12px;
  color: #e8e9eb;
}
.featured-arrows {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(12, 18, 24, 0.82);
  backdrop-filter: blur(8px);
}
.featured-arrows button {
  width: 55px;
  height: 37px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}
.featured-arrows button + button {
  border-left: 1px solid var(--line);
}
.featured-arrows button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
  margin-top: 15px;
}
.project-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(13, 19, 25, 0.78);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}
.project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(156, 77, 244, 0.45);
  background: #111922;
}
.project-card-media {
  position: relative;
  aspect-ratio: 1.56 / 1;
  overflow: hidden;
  background: #111820;
}
.project-card-media img,
.project-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.project-card:hover .project-card-media img,
.project-card:hover .project-card-media video {
  transform: scale(1.035);
}
.project-card-body {
  position: relative;
  min-height: 63px;
  padding: 13px 30px 10px 12px;
}
.project-card h3 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
}
.project-card p {
  margin: 6px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #858b95;
  font-size: 11px;
}
.project-card-arrow {
  position: absolute;
  right: 11px;
  top: 14px;
  color: #ccd0d6;
  font-size: 18px;
}

.info-panel {
  display: grid;
  grid-template-columns: minmax(300px, 1.05fr) minmax(620px, 2.35fr) minmax(
      360px,
      1.4fr
    );
  min-height: 232px;
  margin-top: 15px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(7, 12, 17, 0.56);
}
.info-column {
  min-width: 0;
  padding: 20px 24px;
}
.info-column + .info-column {
  border-left: 1px solid var(--line);
}
.info-column h3 {
  margin: 0 0 17px;
  font-size: 14px;
  font-weight: 600;
}
.workflow-list {
  position: relative;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 1px 0 1px 31px;
  list-style: none;
  color: #c1c6ce;
  font-size: clamp(15px, 0.92vw, 17px);
  line-height: 1.4;
}
.workflow-list::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 9px;
  bottom: 9px;
  width: 1px;
  background: #606874;
}
.workflow-list li {
  position: relative;
}
.workflow-list li::before {
  content: "";
  position: absolute;
  left: -29px;
  top: 0.36em;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--purple);
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 10px rgba(156, 77, 244, 0.28);
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(72px, 1fr));
  gap: 15px 12px;
}
.tool {
  min-width: 0;
  text-align: center;
  color: #a5abb4;
  font-size: 9px;
  line-height: 1.25;
}
.tool > span:last-child {
  display: block;
  min-height: 23px;
}
.tool-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  margin: 0 auto 8px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #090d11;
  overflow: hidden;
}
.tool-icon svg,
.tool-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.tool-icon .unreal-mark {
  width: 36px;
  height: 36px;
  overflow: visible;
}
.tool-icon img {
  filter: brightness(1.06);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  text-align: center;
}
.stat strong {
  display: block;
  color: var(--purple);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.1;
}
.stat span {
  display: block;
  min-height: 30px;
  margin-top: 9px;
  color: #a8adb5;
  font-size: 11px;
  line-height: 1.4;
}
.stat small {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-size: 9px;
}

.cta-panel {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 82px;
  margin-top: 14px;
  padding: 14px 26px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(
    90deg,
    rgba(17, 23, 30, 0.9),
    rgba(11, 16, 21, 0.72)
  );
}
.cta-symbol {
  font-size: 38px;
}
.cta-copy {
  flex: 1;
}
.cta-copy strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}
.cta-copy span {
  color: #979da6;
  font-size: 12px;
}
.cta-actions {
  display: flex;
  gap: 16px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 342px;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  text-align: center;
  background: rgba(13, 19, 25, 0.65);
}
.empty-state h2 {
  margin: 0 0 0.6rem;
}
.empty-state p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.loading-state {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 70px);
  color: var(--muted);
}
.loading-state span {
  width: 34px;
  height: 34px;
  border: 2px solid var(--line);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Project detail */
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 18px;
  color: #aeb4bd;
  text-decoration: none;
  font-size: 13px;
}
.detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: end;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.detail-kicker {
  color: var(--purple);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.detail-header h1 {
  margin: 8px 0 10px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}
.detail-header p {
  margin: 0;
  max-width: 720px;
  color: #a8aeb7;
  line-height: 1.6;
}
.detail-hero {
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #090d11;
}
.detail-hero img,
.detail-hero video {
  width: 100%;
  max-height: 760px;
  object-fit: cover;
}
.detail-body {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.8fr);
  gap: 36px;
  margin-top: 30px;
}
.detail-meta {
  align-self: start;
  position: sticky;
  top: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(13, 19, 25, 0.72);
}
.detail-meta h3 {
  margin: 0 0 10px;
  font-size: 12px;
  color: #b9bec6;
}
.detail-meta + .detail-meta {
  margin-top: 12px;
}
.detail-description {
  color: #c8ccd2;
  line-height: 1.75;
}
.detail-description > :first-child {
  margin-top: 0;
}
.detail-description h2,
.detail-description h3,
.detail-description h4 {
  color: #fff;
  line-height: 1.2;
}
.detail-description a {
  color: #bd72ff;
}
.detail-description code {
  padding: 0.15rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #0b1117;
}
.detail-gallery {
  display: grid;
  gap: 20px;
  margin-top: 30px;
}
.detail-media {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #090d11;
}
.detail-media img,
.detail-media video,
.detail-media iframe {
  display: block;
  width: 100%;
  border: 0;
}
.detail-media video {
  max-height: 760px;
}
.detail-media iframe {
  aspect-ratio: 16 / 9;
}
.detail-media figcaption {
  padding: 12px 15px;
  color: #9298a1;
  font-size: 12px;
}

@media (max-width: 1460px) {
  .info-panel {
    grid-template-columns: minmax(210px, 0.85fr) minmax(480px, 1.9fr);
  }
  .info-column:last-child {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 1180px) {
  .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .info-panel {
    grid-template-columns: 1fr 1.55fr;
  }
  .info-column:last-child {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 1050px) {
  .portfolio-filters {
    align-items: flex-start;
  }
  .category-tabs {
    padding-bottom: 10px;
  }
}

@media (max-width: 760px) {
  .portfolio-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding-bottom: 12px;
  }
  .category-tabs {
    width: 100%;
    min-height: 54px;
  }
  .category-share-button {
    justify-self: start;
    max-width: min(100%, 280px);
  }
  .software-filter {
    justify-self: start;
  }
  .software-filter-menu {
    right: auto;
    left: 0;
  }
}

@media (max-width: 850px) {
  :root {
    --sidebar: 0px;
  }
  .portfolio-sidebar {
    transform: translateX(-100%);
    width: 240px;
    transition: transform 0.2s ease;
  }
  body.menu-open .portfolio-sidebar {
    transform: translateX(0);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.45);
  }
  .mobile-header {
    position: sticky;
    z-index: 19;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 12, 17, 0.9);
    backdrop-filter: blur(14px);
  }
  .mobile-header .brand {
    height: auto;
    padding: 0;
    font-size: 18px;
  }
  .mobile-header .brand-planet {
    font-size: 21px;
  }
  .mobile-header button {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: transparent;
    color: #fff;
  }
  .portfolio-main {
    margin-left: 0;
    padding: 24px 18px;
  }
  .page-header {
    min-height: 96px;
  }
  .featured-copy {
    width: 62%;
  }
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .info-panel {
    grid-template-columns: 1fr;
  }
  .info-column + .info-column,
  .info-column:last-child {
    grid-column: auto;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .cta-panel {
    flex-wrap: wrap;
  }
  .cta-actions {
    width: 100%;
  }
  .cta-actions .button {
    flex: 1;
  }
  .detail-body {
    grid-template-columns: 1fr;
  }
  .detail-meta {
    position: static;
  }
}

@media (max-width: 590px) {
  .portfolio-main {
    padding: 20px 13px;
  }
  .category-tabs {
    gap: 6px;
    margin-right: -13px;
    padding-right: 13px;
  }
  .category-tabs a {
    min-height: 40px;
    padding: 0 13px;
    font-size: 13px;
  }
  .category-share-button {
    min-height: 40px;
    padding: 0 11px;
    font-size: 11px;
  }
  .software-filter-toggle {
    min-height: 40px;
  }
  .software-filter-menu {
    width: min(360px, calc(100vw - 26px));
  }
  .software-filter-options {
    grid-template-columns: 1fr;
    max-height: 52vh;
  }
  .page-header {
    display: grid;
    gap: 18px;
    padding-bottom: 18px;
  }
  .page-header h1 {
    font-size: 30px;
  }
  .header-actions {
    gap: 10px;
  }
  .header-dot {
    display: none;
  }
  .featured-project {
    min-height: 470px;
  }
  .featured-project::before {
    background: linear-gradient(
      0deg,
      rgba(8, 12, 16, 0.98) 0%,
      rgba(8, 12, 16, 0.86) 52%,
      rgba(8, 12, 16, 0.18) 100%
    );
  }
  .featured-copy {
    justify-content: flex-end;
    width: 100%;
    min-height: 470px;
    padding: 24px 20px 74px;
  }
  .featured-copy h2 {
    font-size: 34px;
  }
  .featured-controls {
    right: 17px;
    bottom: 18px;
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
  .project-card-media {
    aspect-ratio: 1.8 / 1;
  }
  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 18px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 22px;
  }
  .cta-panel {
    padding: 18px;
  }
  .cta-symbol {
    display: none;
  }
  .cta-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .detail-header {
    grid-template-columns: 1fr;
  }
}

/* Portfolio detail additions: linked asset and two/three-image comparison */
.detail-asset-link p {
  margin: 0 0 12px;
  color: #9298a1;
  font-size: 12px;
  line-height: 1.55;
}

.detail-asset-link a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(156, 77, 244, 0.42);
  border-radius: 7px;
  background: rgba(128, 48, 209, 0.13);
  color: #c982ff;
  text-decoration: none;
  font-size: 12px;
}

.detail-asset-link a:hover {
  border-color: #a95cff;
  background: rgba(128, 48, 209, 0.2);
}

.portfolio-comparison-section {
  margin-top: 42px;
}

.portfolio-comparison-section-heading {
  margin-bottom: 15px;
}

.portfolio-comparison-section-heading span {
  color: var(--purple);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portfolio-comparison-section-heading h2 {
  margin: 7px 0 0;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: -0.035em;
}

.portfolio-comparison-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: auto;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #070b0f;
  isolation: isolate;
  touch-action: pan-y;
  user-select: none;
}

.portfolio-comparison-viewport img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.portfolio-comparison-base {
  position: relative;
  inset: auto;
  height: auto !important;
  object-fit: contain;
}

.portfolio-comparison-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  will-change: clip-path;
}

.portfolio-comparison-layer.before {
  z-index: 3;
  clip-path: inset(0 calc(100% - var(--compare-one)) 0 0);
}

.portfolio-comparison-layer.middle {
  z-index: 2;
  clip-path: inset(0 calc(100% - var(--compare-two)) 0 0);
}

.portfolio-comparison-label {
  position: absolute;
  z-index: 7;
  top: 16px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(4, 8, 12, 0.72);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.portfolio-comparison-label.before {
  left: 16px;
}
.portfolio-comparison-label.middle {
  left: 50%;
  transform: translateX(-50%);
}
.portfolio-comparison-label.after {
  right: 16px;
}

.portfolio-comparison-handle {
  position: absolute;
  z-index: 8;
  top: 0;
  bottom: 0;
  width: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: ew-resize;
  transform: translateX(-50%);
  touch-action: none;
}

.portfolio-comparison-handle.first {
  left: var(--compare-one);
}
.portfolio-comparison-handle.second {
  left: var(--compare-two);
}

.portfolio-comparison-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.65);
  transform: translateX(-50%);
}

.portfolio-comparison-handle span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: rgba(10, 14, 19, 0.86);
  font-size: 17px;
  letter-spacing: -4px;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(8px);
}

.portfolio-comparison-handle:hover span,
.portfolio-comparison-handle:focus-visible span {
  border-color: #c176ff;
  background: rgba(87, 27, 145, 0.92);
}

.portfolio-comparison-handle:focus-visible {
  outline: none;
}

@media (max-width: 850px) {
  .portfolio-comparison-viewport {
    min-height: 0;
    aspect-ratio: auto;
  }
}

@media (max-width: 590px) {
  .portfolio-comparison-section {
    margin-top: 30px;
  }
  .portfolio-comparison-viewport {
    min-height: 0;
    aspect-ratio: auto;
  }
  .portfolio-comparison-label {
    top: 10px;
  }
  .portfolio-comparison-label.before {
    left: 10px;
  }
  .portfolio-comparison-label.after {
    right: 10px;
  }
  .portfolio-comparison-handle {
    width: 34px;
  }
  .portfolio-comparison-handle span {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}

/* 2026-07-31 wide portfolio layout */
@media (min-width: 1500px) {
  .featured-project {
    min-height: 390px;
  }
  .featured-copy {
    min-height: 390px;
    width: min(470px, 36%);
    padding-left: 36px;
  }
  .featured-copy p {
    max-width: 370px;
  }
  .project-grid {
    gap: 16px;
  }
  .project-card-body {
    min-height: 70px;
    padding-top: 15px;
  }
}

/* Contact actions */
.contact-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 320px;
  max-width: calc(100vw - 32px);
  padding: 13px 14px 13px 16px;
  border: 1px solid rgba(178, 92, 255, 0.42);
  border-radius: 10px;
  background: rgba(13, 17, 23, 0.96);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  color: #f4f1f8;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  backdrop-filter: blur(14px);
}

.contact-toast.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.contact-toast span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.contact-toast strong {
  font-size: 13px;
}
.contact-toast small {
  color: #a9a2b3;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.contact-toast a {
  margin-left: auto;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  color: #fff;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}
.contact-toast a:hover {
  border-color: #a94cff;
  background: rgba(169, 76, 255, 0.12);
}
.button.contact-copied {
  border-color: #49d98a;
  background: rgba(32, 130, 82, 0.22);
  color: #eafff3;
}

@media (max-width: 590px) {
  .contact-toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
    min-width: 0;
  }
}

/* Project detail redesign and software icons v8 */
.detail-page {
  width: min(1680px, 100%);
  margin: 0 auto;
}

.detail-page .detail-back {
  margin-bottom: 20px;
  padding: 7px 0;
  color: #aab1bb;
}

.detail-page .detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 40px;
  padding: 28px 30px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(16, 23, 31, 0.92),
    rgba(9, 14, 19, 0.72)
  );
}

.detail-title-block {
  min-width: 0;
}
.detail-page .detail-kicker {
  display: block;
  margin-bottom: 10px;
  color: #b36aff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.detail-page .detail-header h1 {
  max-width: 1100px;
  margin: 0;
  font-size: clamp(40px, 5vw, 74px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.detail-page .detail-header p {
  max-width: 900px;
  margin: 17px 0 0;
  color: #aeb4bd;
  font-size: 15px;
  line-height: 1.65;
}

.detail-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.detail-category-list span {
  padding: 6px 10px;
  border: 1px solid rgba(173, 96, 255, 0.28);
  border-radius: 999px;
  background: rgba(128, 48, 209, 0.09);
  color: #c9a4f5;
  font-size: 11px;
}

.detail-header-actions {
  display: grid;
  min-width: 226px;
  gap: 10px;
}

.detail-header-actions .button {
  width: 100%;
  min-height: 44px;
  justify-content: space-between;
  padding-inline: 16px;
}

.detail-page .detail-hero {
  display: grid;
  place-items: center;
  min-height: 320px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 35%, rgba(39, 51, 65, 0.26), transparent 50%),
    #070b0f;
}

.detail-page .detail-hero img,
.detail-page .detail-hero video {
  width: 100%;
  max-height: min(76vh, 860px);
  object-fit: contain;
  background: #070b0f;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(330px, 0.72fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.detail-description-card,
.detail-panel {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(12, 18, 24, 0.74);
}

.detail-description-card {
  min-height: 260px;
  padding: clamp(24px, 3.2vw, 46px);
}

.detail-section-eyebrow {
  display: block;
  margin-bottom: 22px;
  color: var(--purple);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-page .detail-description {
  max-width: 940px;
  color: #c8cdd4;
  font-size: 15px;
  line-height: 1.8;
}

.detail-page .detail-description h1,
.detail-page .detail-description h2,
.detail-page .detail-description h3 {
  margin-top: 1.5em;
  color: #fff;
}

.detail-sidebar {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 12px;
}

.detail-panel {
  padding: 20px;
}
.detail-panel h2 {
  margin: 0 0 16px;
  color: #f2f3f5;
  font-size: 13px;
  font-weight: 600;
}

.detail-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.detail-tool {
  min-width: 0;
  padding: 10px 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(6, 10, 14, 0.58);
  color: #aeb4bd;
  text-align: center;
  font-size: 9px;
  line-height: 1.25;
}

.detail-tool-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: #080c10;
  overflow: hidden;
}

.detail-tool-icon svg {
  width: 36px;
  height: 36px;
}

.detail-tags {
  margin-top: 0;
}
.detail-asset-card {
  border-color: rgba(156, 77, 244, 0.32);
  background: linear-gradient(
    145deg,
    rgba(128, 48, 209, 0.15),
    rgba(12, 18, 24, 0.78)
  );
}
.detail-asset-card > span {
  color: #bd72ff;
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.detail-asset-card h2 {
  margin: 8px 0 9px;
  font-size: 16px;
}
.detail-asset-card p {
  margin: 0 0 16px;
  color: #979ea8;
  font-size: 12px;
  line-height: 1.55;
}
.detail-asset-card a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(172, 91, 255, 0.5);
  border-radius: 8px;
  background: rgba(128, 48, 209, 0.18);
  color: #d29cff;
  text-decoration: none;
  font-size: 12px;
}
.detail-asset-card a:hover {
  background: rgba(128, 48, 209, 0.28);
}

.detail-page .portfolio-comparison-section,
.detail-page .detail-gallery {
  margin-top: 18px;
}

.detail-page .detail-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.detail-page .detail-media {
  display: grid;
  place-items: center;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.detail-page .detail-media img,
.detail-page .detail-media video {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(86vh, 980px);
  object-fit: contain;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.detail-page .detail-media figcaption {
  width: 100%;
}

@media (max-width: 1100px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .detail-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .detail-asset-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .detail-page .detail-header {
    grid-template-columns: 1fr;
    padding: 22px 18px;
    gap: 24px;
  }
  .detail-header-actions {
    min-width: 0;
    width: 100%;
  }
  .detail-page .detail-header h1 {
    font-size: clamp(36px, 12vw, 54px);
  }
  .detail-page .detail-hero {
    min-height: 190px;
  }
  .detail-sidebar {
    grid-template-columns: 1fr;
  }
  .detail-asset-card:last-child:nth-child(odd) {
    grid-column: auto;
  }
  .detail-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Fullscreen portfolio renders and shared AstraVortex media loader v10 */
.detail-page [data-render-fullscreen],
.portfolio-comparison-viewport [data-render-fullscreen] {
  cursor: zoom-in;
}

.detail-page [data-render-fullscreen]:focus-visible,
.portfolio-comparison-viewport [data-render-fullscreen]:focus-visible {
  outline: 2px solid #b663ff;
  outline-offset: -3px;
}

.detail-hero.av-image-host,
.detail-media.av-image-host,
.project-card-media.av-image-host,
.portfolio-comparison-viewport.av-image-host {
  isolation: isolate;
}

.featured-media.av-image-host {
  position: absolute !important;
  inset: 0;
  isolation: isolate;
}

.detail-media.av-image-host figcaption {
  position: relative;
  z-index: 10;
  background: #0b1015;
}

body.render-lightbox-open {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}

.render-lightbox {
  --render-origin-x: 50vw;
  --render-origin-y: 50vh;
  position: fixed;
  z-index: 2147483000;
  inset: 0;
  display: grid;
  place-items: stretch;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  padding: 0;
  overflow: hidden;
  background: #000;
  opacity: 0;
  visibility: hidden;
  transition:
    background-color 0.28s ease,
    opacity 0.22s ease,
    visibility 0.28s step-end;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

.render-lightbox::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -5%;
  background-image: var(--render-lightbox-backdrop);
  background-position: center;
  background-size: cover;
  filter: blur(34px) brightness(0.34) saturate(0.9);
  transform: scale(1.08);
  opacity: 0.92;
  pointer-events: none;
}

.render-lightbox:fullscreen {
  width: 100%;
  height: 100%;
  padding: 0;
  background: #000;
}

.render-lightbox.is-open {
  background: rgba(0, 0, 0, 0.985);
  opacity: 1;
  visibility: visible;
  transition:
    background-color 0.28s ease,
    opacity 0.22s ease,
    visibility 0s step-start;
}

.render-lightbox-frame {
  position: absolute !important;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 0;
  z-index: 1;
  background: transparent !important;
  opacity: 0;
  filter: blur(9px);
  transform: scale(0.86) translateY(18px);
  transform-origin: var(--render-origin-x) var(--render-origin-y);
  transition:
    transform 0.34s cubic-bezier(0.2, 0.82, 0.2, 1),
    filter 0.28s ease,
    opacity 0.22s ease;
  will-change: transform, opacity, filter;
  touch-action: none;
  cursor: zoom-out;
  overflow: hidden;
  contain: strict;
}

.render-lightbox.is-open .render-lightbox-frame {
  opacity: 1;
  filter: blur(0);
  transform: scale(1) translateY(0);
}

.render-lightbox-panzoom {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
  touch-action: none;
  contain: strict;
}

.render-lightbox-panzoom > img {
  --render-scale: 1;
  --render-pan-x: 0px;
  --render-pan-y: 0px;
  --render-swipe-x: 0px;
  display: block;
  width: var(--render-fit-width, auto) !important;
  height: var(--render-fit-height, auto) !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: 50% 50% !important;
  transform: translate3d(
      calc(var(--render-pan-x) + var(--render-swipe-x)),
      var(--render-pan-y),
      0
    )
    scale(var(--render-scale));
  transform-origin: center center;
  transition:
    opacity 260ms ease,
    transform 0.22s cubic-bezier(0.2, 0.75, 0.2, 1) !important;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
  cursor: zoom-out;
  touch-action: none;
}

.render-lightbox-frame.is-gesturing .render-lightbox-panzoom > img {
  transition: opacity 260ms ease !important;
}

.render-lightbox-frame.is-zoomed,
.render-lightbox-frame.is-zoomed .render-lightbox-panzoom > img {
  cursor: grab;
}

.render-lightbox-frame.is-gesturing.is-zoomed,
.render-lightbox-frame.is-gesturing.is-zoomed .render-lightbox-panzoom > img {
  cursor: grabbing;
}

.render-lightbox-frame .av-image-loader-mark {
  width: clamp(72px, 12vw, 132px);
}

.render-lightbox-toolbar {
  position: absolute;
  z-index: 20;
  top: max(14px, env(safe-area-inset-top, 0px));
  right: max(14px, env(safe-area-inset-right, 0px));
  left: max(14px, env(safe-area-inset-left, 0px));
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 0.2s ease 0.08s,
    transform 0.24s ease 0.08s;
}

.render-lightbox.is-open .render-lightbox-toolbar {
  opacity: 1;
  transform: translateY(0);
}

.render-lightbox-toolbar > span {
  display: grid;
  gap: 2px;
  max-width: min(70vw, 760px);
  overflow: hidden;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.render-lightbox-toolbar > span small {
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  font-weight: 400;
}

.render-lightbox-toolbar button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(12, 15, 19, 0.72);
  color: #fff;
  font:
    300 30px/1 Arial,
    sans-serif;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(14px);
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.render-lightbox-toolbar button:hover,
.render-lightbox-toolbar button:focus-visible {
  border-color: rgba(190, 108, 255, 0.72);
  background: rgba(111, 42, 172, 0.72);
  outline: none;
  transform: rotate(7deg) scale(1.06);
}

@media (max-width: 590px) {
  .render-lightbox-toolbar > span {
    display: none;
  }
  .render-lightbox-toolbar button {
    width: 42px;
    height: 42px;
  }
  .render-lightbox-frame {
    transform: scale(0.91) translateY(10px);
  }
}

@media (orientation: landscape) and (max-height: 600px) {
  .render-lightbox-toolbar {
    top: max(8px, env(safe-area-inset-top, 0px));
    right: max(8px, env(safe-area-inset-right, 0px));
  }
  .render-lightbox-toolbar > span {
    display: none;
  }
  .render-lightbox-toolbar button {
    width: 38px;
    height: 38px;
    font-size: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .featured-stage,
  .featured-project,
  .featured-project::after,
  .render-lightbox,
  .render-lightbox-frame,
  .render-lightbox-panzoom > img,
  .render-lightbox-toolbar,
  .render-lightbox-toolbar button {
    transition: none !important;
  }
}

/* v19 — Portfolio inside the same Quartz navigation shell as product pages. */
body[data-slug="portfolio"] {
  --portfolio-shell-sidebar: 280px;
  overflow-x: clip;
}

body[data-slug="portfolio"] #quartz-root.page {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

body[data-slug="portfolio"] #quartz-root.page > #quartz-body {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  grid-template:
    "grid-sidebar-left grid-center"
    "grid-sidebar-left grid-footer" / var(--portfolio-shell-sidebar) minmax(
      0,
      1fr
    ) !important;
}

body[data-slug="portfolio"] #quartz-root.page > #quartz-body > .sidebar.left {
  background: linear-gradient(
    180deg,
    rgba(20, 21, 24, 0.58),
    rgba(13, 14, 17, 0.48)
  ) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.025),
    16px 0 42px rgba(0, 0, 0, 0.18) !important;
  -webkit-backdrop-filter: blur(26px) saturate(125%) !important;
  backdrop-filter: blur(26px) saturate(125%) !important;
}

body[data-slug="portfolio"]
  #quartz-root.page
  > #quartz-body
  > .sidebar.left::before,
body[data-slug="portfolio"]
  #quartz-root.page
  > #quartz-body
  > .sidebar.left::after {
  background: transparent !important;
}

body[data-slug="portfolio"]
  #quartz-root.page
  > #quartz-body
  > .sidebar.left
  .explorer,
body[data-slug="portfolio"]
  #quartz-root.page
  > #quartz-body
  > .sidebar.left
  .explorer-content,
body[data-slug="portfolio"]
  #quartz-root.page
  > #quartz-body
  > .sidebar.left
  .folder-container,
body[data-slug="portfolio"]
  #quartz-root.page
  > #quartz-body
  > .sidebar.left
  .folder-outer {
  background: transparent !important;
}

body[data-slug="portfolio"]
  #quartz-root.page
  > #quartz-body
  > .sidebar.left
  .explorer,
body[data-slug="portfolio"]
  #quartz-root.page
  > #quartz-body
  > .sidebar.left
  .explorer-content,
body[data-slug="portfolio"]
  #quartz-root.page
  > #quartz-body
  > .sidebar.left
  .folder-container,
body[data-slug="portfolio"]
  #quartz-root.page
  > #quartz-body
  > .sidebar.left
  .folder-outer,
body[data-slug="portfolio"]
  #quartz-root.page
  > #quartz-body
  > .sidebar.left
  .folder-title,
body[data-slug="portfolio"]
  #quartz-root.page
  > #quartz-body
  > .sidebar.left
  .folder-button,
body[data-slug="portfolio"]
  #quartz-root.page
  > #quartz-body
  > .sidebar.left
  .folder-icon,
body[data-slug="portfolio"] #quartz-root.page > #quartz-body > .sidebar.left a {
  color: rgba(226, 230, 236, 0.76) !important;
}

body[data-slug="portfolio"]
  #quartz-root.page
  > #quartz-body
  > .sidebar.left
  a:hover,
body[data-slug="portfolio"]
  #quartz-root.page
  > #quartz-body
  > .sidebar.left
  button:hover,
body[data-slug="portfolio"]
  #quartz-root.page
  > #quartz-body
  > .sidebar.left
  .folder-title:hover {
  color: #f4f5f7 !important;
}

body[data-slug="portfolio"] #quartz-root.page > #quartz-body > .center {
  grid-area: grid-center !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 clamp(1rem, 1.6vw, 2rem) 2rem !important;
  box-sizing: border-box !important;
}

body[data-slug="portfolio"]
  #quartz-root.page
  > #quartz-body
  > .center
  > .page-header,
body[data-slug="portfolio"] #quartz-root.page > #quartz-body > .center > hr,
body[data-slug="portfolio"]
  #quartz-root.page
  > #quartz-body
  > .center
  .page-footer,
body[data-slug="portfolio"] #quartz-root.page > #quartz-body > .right.sidebar,
body[data-slug="portfolio"] #quartz-root.page > #quartz-body > footer {
  display: none !important;
}

body[data-slug="portfolio"]
  #quartz-root.page
  > #quartz-body
  > .center
  > article {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body[data-slug="portfolio"] .portfolio-app-shell,
body[data-slug="portfolio"] .portfolio-main {
  width: 100%;
  min-width: 0;
  max-width: none;
}

body[data-slug="portfolio"] .portfolio-main {
  min-height: 100vh;
  margin-left: 0 !important;
  padding: 31px clamp(8px, 1vw, 18px) 22px !important;
}

body[data-slug="portfolio"] .av-custom-solution-card {
  position: fixed !important;
  z-index: 12 !important;
  left: 1rem !important;
  bottom: 7.3rem !important;
  width: 248px !important;
  box-sizing: border-box !important;
  padding: 1rem !important;
  border: 1px solid rgba(220, 226, 235, 0.16) !important;
  border-radius: 12px !important;
  background: rgba(25, 28, 33, 0.91) !important;
  color: #eef1f5 !important;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  backdrop-filter: blur(16px) !important;
}

body[data-slug="portfolio"] .av-custom-solution-card__top {
  display: grid !important;
  grid-template-columns: 2.35rem minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 0.72rem !important;
}

body[data-slug="portfolio"] .av-custom-solution-card__icon {
  display: grid !important;
  place-items: center !important;
  width: 2.35rem !important;
  height: 2.35rem !important;
  border: 1px solid rgba(220, 226, 235, 0.16) !important;
  border-radius: 999px !important;
  background: rgba(220, 226, 235, 0.07) !important;
  color: #f0f2f5 !important;
  font-size: 1.15rem !important;
}

body[data-slug="portfolio"] .av-custom-solution-card strong {
  display: block !important;
  margin: 0 !important;
  color: #f2f4f7 !important;
  font-size: 0.83rem !important;
  line-height: 1.35 !important;
}

body[data-slug="portfolio"] .av-custom-solution-card p {
  margin: 0.3rem 0 0 !important;
  color: rgba(219, 225, 233, 0.68) !important;
  font-size: 0.72rem !important;
  line-height: 1.52 !important;
}

body[data-slug="portfolio"] .av-custom-solution-card a {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 2.45rem !important;
  margin-top: 0.9rem !important;
  padding: 0 0.8rem !important;
  border: 1px solid rgba(220, 226, 235, 0.14) !important;
  border-radius: 8px !important;
  background: rgba(220, 226, 235, 0.07) !important;
  color: #eef1f5 !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

body[data-slug="portfolio"] .av-custom-solution-card a:hover {
  border-color: rgba(238, 242, 247, 0.32) !important;
  background: rgba(238, 242, 247, 0.1) !important;
  color: #fff !important;
}

body[data-slug="portfolio"] .av-sidebar-socials {
  position: fixed !important;
  z-index: 13 !important;
  left: 1rem !important;
  bottom: 2.2rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.72rem !important;
  width: 248px !important;
  padding: 0 0.25rem !important;
  box-sizing: border-box !important;
}

body[data-slug="portfolio"] .av-sidebar-socials a {
  display: grid !important;
  place-items: center !important;
  width: 2.2rem !important;
  height: 2.2rem !important;
  padding: 0 !important;
  border: 1px solid rgba(226, 231, 237, 0.16) !important;
  border-radius: 9px !important;
  background: rgba(226, 231, 237, 0.055) !important;
  color: rgba(235, 238, 243, 0.76) !important;
  line-height: 0 !important;
  text-decoration: none !important;
  transition:
    color 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease !important;
}

body[data-slug="portfolio"] .av-sidebar-socials a:hover {
  color: #fff !important;
  border-color: rgba(244, 246, 249, 0.38) !important;
  background: rgba(244, 246, 249, 0.1) !important;
  transform: translateY(-1px) !important;
}

body[data-slug="portfolio"] .av-sidebar-socials svg {
  display: block !important;
  width: 1.2rem !important;
  height: 1.2rem !important;
  margin: 0 !important;
  overflow: visible !important;
}

body[data-slug="portfolio"] .av-sidebar-copyright {
  position: fixed;
  z-index: 13;
  left: 1.25rem;
  bottom: 0.72rem;
  width: 248px;
  color: rgba(199, 205, 214, 0.48);
  font-size: 0.65rem;
  line-height: 1.35;
}

@media (min-width: 1680px) {
  body[data-slug="portfolio"] {
    --portfolio-shell-sidebar: 292px;
  }
  body[data-slug="portfolio"] .av-custom-solution-card {
    width: 258px !important;
  }
  body[data-slug="portfolio"] .av-sidebar-socials,
  body[data-slug="portfolio"] .av-sidebar-copyright {
    width: 258px !important;
  }
}

@media (max-width: 1260px) and (min-width: 801px) {
  body[data-slug="portfolio"] {
    --portfolio-shell-sidebar: 245px;
  }
  body[data-slug="portfolio"] .av-custom-solution-card {
    left: 0.9rem !important;
    width: 215px !important;
  }
  body[data-slug="portfolio"] .av-sidebar-socials,
  body[data-slug="portfolio"] .av-sidebar-copyright {
    left: 0.9rem !important;
    width: 215px !important;
  }
}

@media (max-width: 800px) {
  html:has(body[data-slug="portfolio"]),
  body[data-slug="portfolio"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: clip !important;
  }

  body[data-slug="portfolio"] #quartz-root.page,
  body[data-slug="portfolio"] #quartz-root.page > #quartz-body {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  body[data-slug="portfolio"] #quartz-root.page > #quartz-body {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto !important;
    grid-template-areas: "grid-sidebar-left" "grid-center" "grid-footer" !important;
    gap: 0 !important;
    padding: 0 !important;
  }

  body[data-slug="portfolio"] #quartz-root.page > #quartz-body > .sidebar.left {
    grid-area: grid-sidebar-left !important;
    position: sticky !important;
    z-index: 1000 !important;
    top: 0 !important;
    left: auto !important;
    right: auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.55rem !important;
    width: 100% !important;
    height: auto !important;
    min-height: 3.75rem !important;
    margin: 0 !important;
    padding: max(0.55rem, env(safe-area-inset-top))
      max(0.8rem, env(safe-area-inset-right)) 0.55rem
      max(0.8rem, env(safe-area-inset-left)) !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(235, 239, 245, 0.12) !important;
    background: rgba(13, 15, 18, 0.76) !important;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.22) !important;
    -webkit-backdrop-filter: blur(20px) saturate(115%) !important;
    backdrop-filter: blur(20px) saturate(115%) !important;
  }

  body[data-slug="portfolio"]
    #quartz-root.page
    > #quartz-body
    > .sidebar.left
    .page-title {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  body[data-slug="portfolio"]
    #quartz-root.page
    > #quartz-body
    > .sidebar.left
    .page-title
    a,
  body[data-slug="portfolio"]
    #quartz-root.page
    > #quartz-body
    > .sidebar.left
    .page-title
    img {
    max-width: min(46vw, 176px) !important;
    max-height: 2rem !important;
    margin: 0 !important;
    object-fit: contain !important;
    object-position: left center !important;
  }

  body[data-slug="portfolio"]
    #quartz-root.page
    > #quartz-body
    > .sidebar.left
    .search,
  body[data-slug="portfolio"]
    #quartz-root.page
    > #quartz-body
    > .sidebar.left
    .darkmode,
  body[data-slug="portfolio"]
    #quartz-root.page
    > #quartz-body
    > .sidebar.left
    .readermode,
  body[data-slug="portfolio"]
    #quartz-root.page
    > #quartz-body
    > .sidebar.left
    .explorer {
    flex: 0 0 auto !important;
    margin: 0 !important;
  }

  body[data-slug="portfolio"]
    #quartz-root.page
    > #quartz-body
    > .sidebar.left
    .explorer
    .explorer-content {
    top: 0 !important;
    left: 0 !important;
    width: 100dvw !important;
    max-width: 100dvw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding: calc(4.25rem + env(safe-area-inset-top))
      max(1rem, env(safe-area-inset-right))
      calc(2rem + env(safe-area-inset-bottom))
      max(1rem, env(safe-area-inset-left)) !important;
    box-sizing: border-box !important;
    background: rgba(12, 14, 17, 0.96) !important;
    -webkit-backdrop-filter: blur(24px) saturate(110%) !important;
    backdrop-filter: blur(24px) saturate(110%) !important;
  }

  body[data-slug="portfolio"] .av-custom-solution-card,
  body[data-slug="portfolio"] .av-sidebar-socials,
  body[data-slug="portfolio"] .av-sidebar-copyright {
    display: none !important;
  }

  body[data-slug="portfolio"] #quartz-root.page > #quartz-body > .center {
    grid-area: grid-center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 max(0.75rem, env(safe-area-inset-right))
      calc(3rem + env(safe-area-inset-bottom))
      max(0.75rem, env(safe-area-inset-left)) !important;
    box-sizing: border-box !important;
  }

  body[data-slug="portfolio"]
    #quartz-root.page
    > #quartz-body
    > .center
    > article {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0.85rem 0 0 !important;
  }

  body[data-slug="portfolio"] .portfolio-main {
    margin-left: 0 !important;
    padding: 0 0 1.5rem !important;
  }
}

/* v22 — recover portfolio layout after moving it into the Quartz/product navigation shell.
   The sidebar keeps the product-page geometry, while portfolio content is allowed to use
   the full remaining viewport instead of inheriting Quartz article constraints. */
body[data-slug="portfolio"] #quartz-root.page > #quartz-body {
  grid-template:
    "grid-sidebar-left grid-header"
    "grid-sidebar-left grid-center"
    "grid-sidebar-left grid-footer" / 280px minmax(0, 1fr) !important;
  column-gap: 0 !important;
  row-gap: 0 !important;
}

body[data-slug="portfolio"] #quartz-root.page > #quartz-body > .sidebar.left {
  grid-area: grid-sidebar-left !important;
  width: 280px !important;
  min-width: 280px !important;
  max-width: 280px !important;
  box-sizing: border-box !important;
  font-family: var(--bodyFont), "Source Sans Pro", sans-serif !important;
}

body[data-slug="portfolio"] #quartz-root.page > #quartz-body > .center {
  grid-area: grid-center !important;
  align-self: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 clamp(18px, 1.55vw, 34px) 34px !important;
  overflow: visible !important;
}

body[data-slug="portfolio"]
  #quartz-root.page
  > #quartz-body
  > .center
  > article,
body[data-slug="portfolio"]
  #quartz-root.page
  > #quartz-body
  > .center
  > article.portfolio-quartz-article {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body[data-slug="portfolio"] .portfolio-app-shell,
body[data-slug="portfolio"] .portfolio-main,
body[data-slug="portfolio"] .portfolio-content,
body[data-slug="portfolio"] .detail-page {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

body[data-slug="portfolio"] .portfolio-main {
  min-height: 100vh !important;
  padding: 30px 0 24px !important;
}

/* The old 1680px detail cap caused a large empty gutter on wide monitors. */
body[data-slug="portfolio"] .detail-page {
  margin: 0 !important;
}

body[data-slug="portfolio"] .detail-page .detail-header,
body[data-slug="portfolio"] .detail-page .detail-hero,
body[data-slug="portfolio"] .detail-page .detail-layout,
body[data-slug="portfolio"] .detail-page .detail-gallery,
body[data-slug="portfolio"] .detail-page .portfolio-comparison-section {
  width: 100% !important;
  max-width: none !important;
}

body[data-slug="portfolio"] .detail-page .detail-hero img,
body[data-slug="portfolio"] .detail-page .detail-hero video {
  width: 100% !important;
}

/* Keep the three information columns stable without forcing horizontal overflow. */
body[data-slug="portfolio"] .info-panel {
  grid-template-columns:
    minmax(250px, 0.95fr)
    minmax(520px, 2.25fr)
    minmax(300px, 1.25fr) !important;
  width: 100% !important;
  min-width: 0 !important;
}

body[data-slug="portfolio"] .info-column,
body[data-slug="portfolio"] .tools-grid,
body[data-slug="portfolio"] .stats-grid {
  min-width: 0 !important;
}

@media (min-width: 1680px) {
  body[data-slug="portfolio"] #quartz-root.page > #quartz-body {
    grid-template:
      "grid-sidebar-left grid-header"
      "grid-sidebar-left grid-center"
      "grid-sidebar-left grid-footer" / 292px minmax(0, 1fr) !important;
  }

  body[data-slug="portfolio"] #quartz-root.page > #quartz-body > .sidebar.left {
    width: 292px !important;
    min-width: 292px !important;
    max-width: 292px !important;
  }
}

@media (max-width: 1380px) and (min-width: 801px) {
  body[data-slug="portfolio"] .info-panel {
    grid-template-columns: minmax(245px, 0.9fr) minmax(0, 2fr) !important;
  }

  body[data-slug="portfolio"] .info-column.stats-column,
  body[data-slug="portfolio"] .info-column:last-child {
    grid-column: 1 / -1 !important;
    border-top: 1px solid var(--line) !important;
    border-left: 0 !important;
  }
}

@media (max-width: 1260px) and (min-width: 801px) {
  body[data-slug="portfolio"] #quartz-root.page > #quartz-body {
    grid-template:
      "grid-sidebar-left grid-header"
      "grid-sidebar-left grid-center"
      "grid-sidebar-left grid-footer" / 245px minmax(0, 1fr) !important;
  }

  body[data-slug="portfolio"] #quartz-root.page > #quartz-body > .sidebar.left {
    width: 245px !important;
    min-width: 245px !important;
    max-width: 245px !important;
  }
}

@media (max-width: 1000px) and (min-width: 801px) {
  body[data-slug="portfolio"] .info-panel {
    grid-template-columns: 1fr !important;
  }

  body[data-slug="portfolio"] .info-column + .info-column {
    border-top: 1px solid var(--line) !important;
    border-left: 0 !important;
  }

  body[data-slug="portfolio"] .info-column:last-child {
    grid-column: auto !important;
  }
}

@media (max-width: 800px) {
  body[data-slug="portfolio"] #quartz-root.page > #quartz-body > .sidebar.left {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body[data-slug="portfolio"] #quartz-root.page > #quartz-body > .center {
    padding: 0 max(0.75rem, env(safe-area-inset-right))
      calc(3rem + env(safe-area-inset-bottom))
      max(0.75rem, env(safe-area-inset-left)) !important;
  }

  body[data-slug="portfolio"] .portfolio-main {
    padding: 0.85rem 0 1.5rem !important;
  }

  body[data-slug="portfolio"] .info-panel {
    grid-template-columns: 1fr !important;
  }

  body[data-slug="portfolio"] .info-column + .info-column {
    border-top: 1px solid var(--line) !important;
    border-left: 0 !important;
  }
}

/* v24 — keep Portfolio sidebar footer geometrically centered inside the same
   column used by product pages. */
@media (min-width: 801px) {
  body[data-slug="portfolio"] .av-sidebar-socials {
    left: 0 !important;
    right: auto !important;
    width: 280px !important;
    padding: 0 !important;
    justify-content: center !important;
  }

  body[data-slug="portfolio"] .av-sidebar-copyright {
    left: 0 !important;
    right: auto !important;
    width: 280px !important;
    padding: 0 0.75rem !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }
}

@media (min-width: 1680px) {
  body[data-slug="portfolio"] .av-sidebar-socials,
  body[data-slug="portfolio"] .av-sidebar-copyright {
    width: 292px !important;
  }
}

@media (max-width: 1260px) and (min-width: 801px) {
  body[data-slug="portfolio"] .av-sidebar-socials,
  body[data-slug="portfolio"] .av-sidebar-copyright {
    left: 0 !important;
    width: 245px !important;
  }
}

/* v24 mobile shell reset: this rule intentionally comes after the desktop v22
   recovery block so the Portfolio sidebar becomes the same compact top bar as
   the rest of the site instead of keeping a 280px desktop column. */
@media (max-width: 800px) {
  body[data-slug="portfolio"] #quartz-root.page > #quartz-body {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto !important;
    grid-template-areas:
      "grid-sidebar-left"
      "grid-center"
      "grid-footer" !important;
    gap: 0 !important;
    padding: 0 !important;
  }
}

/* Professional game credits */
.game-credits-section {
  margin: 18px 0 4px;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(7, 12, 17, 0.56);
}

.game-credits-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.game-credits-heading > div {
  display: grid;
  gap: 5px;
}
.game-credits-heading span {
  color: #b36aff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.game-credits-heading h2 {
  margin: 0;
  color: #f2f3f5;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.game-credits-heading p {
  max-width: 420px;
  margin: 0;
  color: #858b95;
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

.game-credits-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.game-credit-card-link {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.game-credit-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(13, 19, 25, 0.8);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.game-credit-card-link[href]:hover .game-credit-card {
  transform: translateY(-2px);
  border-color: rgba(156, 77, 244, 0.46);
  background: #111922;
}

.game-credit-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0c1117;
}
.game-credit-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.game-credit-card-link[href]:hover .game-credit-cover img {
  transform: scale(1.035);
}

.game-credit-body {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 12px;
}
.game-credit-card.no-cover .game-credit-body {
  min-height: 128px;
}
.game-credit-body h3 {
  margin: 0;
  color: #eef0f3;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.game-credit-body p {
  margin: 0;
}
.game-credit-roles {
  color: #c79cff;
  font-size: 11px;
  line-height: 1.4;
}
.game-credit-meta {
  color: #858b95;
  font-size: 10px;
  line-height: 1.4;
}
.game-credit-description {
  color: #aeb4bd;
  font-size: 10.5px;
  line-height: 1.45;
}
.game-credit-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  margin-top: 3px;
  color: #bb6dff;
  font-size: 10.5px;
}

@media (max-width: 1450px) {
  .game-credits-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .game-credits-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .game-credits-section {
    margin-top: 14px;
    padding: 15px;
  }
  .game-credits-heading {
    display: grid;
    gap: 8px;
    align-items: start;
  }
  .game-credits-heading p {
    max-width: none;
    text-align: left;
  }
  .game-credits-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(210px, 76vw);
    grid-template-columns: none;
    gap: 10px;
    margin: 0 -15px;
    padding: 0 15px 4px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .game-credits-grid::-webkit-scrollbar {
    display: none;
  }
  .game-credit-card-link {
    scroll-snap-align: start;
  }
}

.page-header + .featured-project {
  margin-top: 18px;
}

/* v28 — portfolio information architecture for recruiters, clients and mobile */
body[data-slug="portfolio"] .portfolio-content {
  width: min(100%, 1880px) !important;
  max-width: 1880px !important;
  margin: 0 auto !important;
  padding: 0 clamp(18px, 2vw, 38px) 28px !important;
}

.portfolio-intro {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 3vw, 48px);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background:
    radial-gradient(
      circle at 88% 12%,
      rgba(146, 67, 231, 0.12),
      transparent 30%
    ),
    linear-gradient(135deg, rgba(14, 20, 27, 0.96), rgba(8, 13, 18, 0.84));
}
.portfolio-intro::after {
  content: "";
  position: absolute;
  inset: auto -12% -45% 40%;
  height: 72%;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(81, 130, 180, 0.08),
    transparent 65%
  );
}
.portfolio-intro-topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: clamp(30px, 4vw, 58px);
}
.portfolio-intro-kicker {
  color: #b36aff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.portfolio-availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #82d9ad;
  font-size: 11px;
  font-weight: 600;
}
.portfolio-availability i,
.portfolio-mobile-contact i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #57dda0;
  box-shadow:
    0 0 0 4px rgba(87, 221, 160, 0.09),
    0 0 14px rgba(87, 221, 160, 0.38);
}
.portfolio-intro-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.72fr);
  align-items: end;
  gap: clamp(34px, 5vw, 86px);
}
.portfolio-intro-title-wrap h1 {
  max-width: 930px;
  margin: 0;
  color: #f5f5f7;
  font-size: clamp(44px, 5vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}
.portfolio-intro-specialty {
  margin: 16px 0 0;
  color: #aeb5bf;
  font-size: clamp(17px, 1.4vw, 24px);
  line-height: 1.25;
  letter-spacing: -0.018em;
}
.portfolio-intro-copy > p {
  max-width: 620px;
  margin: 0;
  color: #bdc2ca;
  font-size: 14px;
  line-height: 1.72;
}
.portfolio-intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.portfolio-intro-actions .button {
  min-height: 42px;
  padding: 0 16px;
  cursor: pointer;
}
.portfolio-youtube-link {
  color: #d1d5da;
}
.portfolio-intro-skills {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: clamp(34px, 4vw, 56px);
  padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.portfolio-intro-skills span {
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: #9fa6af;
  font-size: 10.5px;
}

.portfolio-section {
  scroll-margin-top: 24px;
  margin-top: clamp(30px, 3.2vw, 52px);
}
.portfolio-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 15px;
}
.portfolio-section-heading > div {
  min-width: 0;
}
.portfolio-section-heading > div > span {
  display: block;
  margin-bottom: 7px;
  color: #a55ae9;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.portfolio-section-heading h2 {
  margin: 0;
  color: #f0f2f4;
  font-size: clamp(25px, 2.2vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.portfolio-section-heading > p {
  max-width: 520px;
  margin: 0;
  color: #858d97;
  font-size: 12px;
  line-height: 1.55;
  text-align: right;
}

/* Professional credits are now immediately visible after the intro. */
.game-credits-section {
  margin: clamp(24px, 2.8vw, 42px) 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.game-credits-heading {
  align-items: end;
  margin-bottom: 15px;
}
.game-credits-heading span {
  color: #a55ae9;
  font-size: 10px;
  letter-spacing: 0.1em;
}
.game-credits-heading h2 {
  font-size: clamp(25px, 2.2vw, 36px);
  letter-spacing: -0.035em;
}
.game-credits-heading p {
  color: #858d97;
}
.game-credits-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.game-credit-card {
  border-radius: 11px;
  background: rgba(12, 18, 24, 0.7);
}
.game-credit-body {
  padding: 14px;
}
.game-credit-body h3 {
  font-size: 14px;
}
.game-credit-roles {
  color: #c88fff;
  font-size: 11.5px;
}
.game-credit-meta {
  font-size: 10.5px;
}
.game-credit-description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 10.5px;
}

.portfolio-selected-section .featured-project {
  min-height: clamp(390px, 34vw, 620px);
}
.portfolio-selected-section .featured-stage {
  min-height: clamp(390px, 34vw, 620px);
}
.portfolio-selected-section .featured-copy {
  width: min(510px, 46%);
  min-height: clamp(390px, 34vw, 620px);
  padding: clamp(28px, 3vw, 48px);
}
.portfolio-selected-section .featured-copy h2 {
  font-size: clamp(38px, 3.7vw, 66px);
}
.portfolio-selected-section .featured-copy p {
  max-width: 440px;
  font-size: 13px;
}

.portfolio-all-work .portfolio-filters {
  min-height: 60px;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.portfolio-all-work .project-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-top: 17px;
}
.project-card {
  border-radius: 11px;
}
.project-card-media {
  aspect-ratio: 1.68 / 1;
}
.project-card-body {
  min-height: 154px;
  padding: 15px 38px 15px 15px;
}
.project-card-category {
  margin: 0 0 7px !important;
  color: #b46cf0 !important;
  font-size: 9.5px !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.project-card h3 {
  white-space: normal;
  font-size: 14px;
  line-height: 1.35;
}
.project-card-summary {
  display: -webkit-box;
  overflow: hidden !important;
  margin-top: 8px !important;
  color: #8f969f !important;
  font-size: 10.5px !important;
  line-height: 1.48;
  white-space: normal !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.project-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 11px;
}
.project-card-chips span {
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 5px;
  color: #9fa6ae;
  font-size: 8.5px;
  line-height: 1;
}
.project-card-arrow {
  top: 15px;
  right: 13px;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.capability-card {
  min-height: 180px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(10, 16, 22, 0.6);
}
.capability-card > span {
  color: #71409b;
  font-size: 10px;
  font-weight: 700;
}
.capability-card h3 {
  margin: 28px 0 9px;
  color: #edf0f2;
  font-size: 16px;
}
.capability-card p {
  margin: 0;
  color: #9299a3;
  font-size: 11.5px;
  line-height: 1.6;
}

.process-panel {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.8fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 14, 19, 0.58);
}
.process-workflow,
.process-tools {
  min-width: 0;
  padding: 22px clamp(20px, 2vw, 30px);
}
.process-tools {
  border-left: 1px solid var(--line);
}
.process-workflow h3,
.process-tools h3 {
  margin: 0 0 20px;
  font-size: 13px;
}
.process-workflow .workflow-list {
  gap: 16px;
  font-size: 12px;
}
.process-workflow .workflow-list li {
  display: grid;
  gap: 3px;
}
.process-workflow .workflow-list strong {
  color: #d9dde2;
  font-size: 12px;
}
.process-workflow .workflow-list span {
  color: #858d97;
  font-size: 10.5px;
  line-height: 1.4;
}
.process-tools .tools-grid {
  grid-template-columns: repeat(5, minmax(72px, 1fr));
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 14, 19, 0.5);
}
.experience-stat {
  min-height: 120px;
  padding: 22px;
  text-align: center;
}
.experience-stat + .experience-stat {
  border-left: 1px solid var(--line);
}
.experience-stat strong {
  display: block;
  color: #ad65ed;
  font-size: clamp(28px, 2.5vw, 42px);
  line-height: 1;
}
.experience-stat span {
  display: block;
  margin-top: 10px;
  color: #a5abb4;
  font-size: 11px;
}
.experience-stat small {
  display: block;
  margin-top: 5px;
  color: var(--green);
  font-size: 9px;
}

.portfolio-final-cta {
  min-height: 132px;
  margin-top: clamp(30px, 3.2vw, 52px);
  padding: clamp(22px, 2.4vw, 34px);
  border-color: rgba(155, 83, 222, 0.25);
  background:
    radial-gradient(
      circle at 85% 50%,
      rgba(119, 49, 182, 0.14),
      transparent 28%
    ),
    linear-gradient(90deg, rgba(15, 21, 28, 0.95), rgba(9, 15, 20, 0.78));
}
.portfolio-final-cta .cta-copy strong {
  margin: 5px 0 7px;
  font-size: clamp(18px, 1.7vw, 26px);
  line-height: 1.2;
}
.portfolio-final-cta .cta-copy > span:last-child {
  font-size: 12px;
}
.cta-eyebrow {
  color: #a85aeb !important;
  font-size: 9.5px !important;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.portfolio-final-cta .button {
  min-height: 44px;
  min-width: 140px;
}

.portfolio-mobile-contact {
  display: none;
}

@media (max-width: 1500px) {
  .portfolio-all-work .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .game-credits-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .portfolio-intro-grid {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.7fr);
  }
}

@media (max-width: 1180px) {
  .portfolio-intro-grid {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 28px;
  }
  .portfolio-intro-copy > p {
    max-width: 760px;
  }
  .capability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .process-panel {
    grid-template-columns: 1fr;
  }
  .process-tools {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .process-tools .tools-grid {
    grid-template-columns: repeat(5, minmax(68px, 1fr));
  }
  .game-credits-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body[data-slug="portfolio"] .portfolio-content {
    padding-right: 18px !important;
    padding-left: 18px !important;
  }
  .portfolio-section-heading {
    align-items: start;
  }
  .portfolio-section-heading > p {
    max-width: 390px;
  }
  .portfolio-all-work .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .experience-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .experience-stat:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .experience-stat:nth-child(4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  body[data-slug="portfolio"] .portfolio-content {
    padding: 0 0 calc(82px + env(safe-area-inset-bottom)) !important;
  }
  .portfolio-intro {
    padding: 22px 18px;
    border-radius: 12px;
  }
  .portfolio-intro-topline {
    align-items: flex-start;
    margin-bottom: 30px;
  }
  .portfolio-availability {
    max-width: 170px;
    justify-content: flex-end;
    text-align: right;
    font-size: 9.5px;
    line-height: 1.35;
  }
  .portfolio-intro-title-wrap h1 {
    font-size: clamp(38px, 12vw, 58px);
    line-height: 0.97;
  }
  .portfolio-intro-specialty {
    margin-top: 12px;
    font-size: 17px;
  }
  .portfolio-intro-copy > p {
    font-size: 12.5px;
    line-height: 1.65;
  }
  .portfolio-intro-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .portfolio-intro-actions .button:first-child {
    grid-column: 1 / -1;
  }
  .portfolio-intro-skills {
    flex-wrap: nowrap;
    margin-right: -18px;
    padding-right: 18px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .portfolio-intro-skills::-webkit-scrollbar {
    display: none;
  }
  .portfolio-intro-skills span {
    flex: 0 0 auto;
  }

  .portfolio-section {
    margin-top: 32px;
  }
  .portfolio-section-heading,
  .game-credits-heading {
    display: grid;
    gap: 8px;
    align-items: start;
  }
  .portfolio-section-heading > p,
  .game-credits-heading p {
    max-width: none;
    text-align: left;
  }
  .portfolio-section-heading h2,
  .game-credits-heading h2 {
    font-size: 27px;
  }

  .game-credits-section {
    margin-top: 32px;
  }
  .game-credits-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(235px, 78vw);
    grid-template-columns: none;
    gap: 11px;
    margin-right: -12px;
    padding-right: 12px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .game-credits-grid::-webkit-scrollbar {
    display: none;
  }
  .game-credit-card-link {
    scroll-snap-align: start;
  }

  .portfolio-selected-section .featured-project,
  .portfolio-selected-section .featured-stage {
    min-height: 430px;
  }
  .portfolio-selected-section .featured-copy {
    justify-content: flex-end;
    width: 100%;
    min-height: 430px;
    padding: 24px 19px 76px;
  }
  .portfolio-selected-section .featured-copy h2 {
    font-size: 36px;
  }
  .portfolio-selected-section .featured-stage::before {
    background: linear-gradient(
      0deg,
      rgba(5, 8, 12, 0.99) 0%,
      rgba(5, 8, 12, 0.9) 50%,
      rgba(5, 8, 12, 0.16) 100%
    );
  }

  .portfolio-all-work .portfolio-filters {
    display: grid;
    gap: 7px;
    padding-bottom: 12px;
  }
  .portfolio-all-work .category-tabs {
    width: calc(100% + 12px);
    margin-right: -12px;
    padding-right: 12px;
  }
  .portfolio-all-work .project-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .project-card-media {
    aspect-ratio: 1.72 / 1;
  }
  .project-card-body {
    min-height: 144px;
  }

  .capability-grid {
    grid-template-columns: 1fr;
  }
  .capability-card {
    min-height: auto;
    padding: 18px;
  }
  .capability-card h3 {
    margin-top: 18px;
  }

  .process-workflow,
  .process-tools {
    padding: 19px 17px;
  }
  .process-tools .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 18px;
  }

  .experience-stat {
    min-height: 105px;
    padding: 18px 10px;
  }
  .experience-stat strong {
    font-size: 30px;
  }

  .portfolio-final-cta {
    display: grid;
    gap: 18px;
    margin-bottom: 8px;
    padding: 20px;
  }
  .portfolio-final-cta .cta-actions {
    width: 100%;
  }
  .portfolio-final-cta .button {
    width: 100%;
  }

  .portfolio-mobile-contact {
    position: fixed;
    z-index: 90;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid rgba(167, 93, 229, 0.35);
    border-radius: 12px;
    background: rgba(10, 15, 21, 0.94);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(16px);
    color: #f0f2f4;
    text-decoration: none;
  }
  .portfolio-mobile-contact > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #9ea5ae;
    font-size: 10px;
  }
  .portfolio-mobile-contact > strong {
    color: #c47cff;
    font-size: 12px;
  }
}

@media (max-width: 430px) {
  .portfolio-intro-topline {
    display: grid;
    gap: 10px;
  }
  .portfolio-availability {
    max-width: none;
    justify-content: flex-start;
    text-align: left;
  }
  .portfolio-intro-actions {
    grid-template-columns: 1fr;
  }
  .portfolio-intro-actions .button:first-child {
    grid-column: auto;
  }
  .experience-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* v29 — portfolio layout corrections */
body[data-slug="portfolio"] .portfolio-content > .portfolio-intro {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  align-self: stretch !important;
}

.portfolio-intro {
  display: grid;
  gap: clamp(24px, 2.4vw, 36px);
  padding: clamp(26px, 2.5vw, 40px);
}
.portfolio-intro-topline {
  margin: 0;
}
.portfolio-intro-topline h1 {
  margin: 0;
  color: #f5f5f7;
  font-size: clamp(38px, 3.5vw, 58px);
  line-height: 1;
  letter-spacing: -0.045em;
}
.portfolio-intro-actions {
  position: relative;
  z-index: 1;
  margin: 0;
}

/* A straight workflow connector with every marker centered on the same axis. */
.process-workflow .workflow-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.process-workflow .workflow-list::before {
  content: none;
}
.process-workflow .workflow-list li {
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 0 0 20px 34px;
}
.process-workflow .workflow-list li:last-child {
  min-height: 0;
  padding-bottom: 0;
}
.process-workflow .workflow-list li::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 0;
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  border: 1.5px solid var(--purple);
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 10px rgba(156, 77, 244, 0.28);
}
.process-workflow .workflow-list li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 15px;
  bottom: -3px;
  left: 5.5px;
  width: 1px;
  background: #606874;
}

/* Production overview belongs to the same process panel, directly below Tools. */
.process-main {
  min-width: 0;
  border-left: 1px solid var(--line);
}
.process-main .process-tools {
  border: 0;
}
.process-overview {
  padding: 0 clamp(20px, 2vw, 30px) 22px;
}
.process-overview > h3 {
  margin: 0;
  padding: 20px 0 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.process-overview .experience-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.process-overview .experience-stat {
  min-height: 92px;
  padding: 17px 12px;
}
.process-overview .experience-stat strong {
  font-size: clamp(25px, 2vw, 34px);
}
.process-overview .experience-stat span {
  margin-top: 8px;
  font-size: 10px;
}

@media (max-width: 1180px) {
  .process-main {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .process-main .process-tools {
    border-top: 0;
  }
}

@media (max-width: 720px) {
  .portfolio-intro {
    gap: 22px;
    padding: 22px 18px;
  }
  .portfolio-intro-topline {
    align-items: center;
    margin: 0;
  }
  .portfolio-intro-topline h1 {
    font-size: clamp(34px, 11vw, 46px);
  }
  .portfolio-intro-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .portfolio-intro-actions .button:first-child {
    grid-column: 1 / -1;
  }

  .process-workflow .workflow-list li {
    min-height: 62px;
    padding-left: 31px;
  }
  .process-overview {
    padding: 0 17px 18px;
  }
  .process-overview .experience-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .process-overview .experience-stat {
    min-height: 82px;
    padding: 14px 6px;
  }
  .process-overview .experience-stat strong {
    font-size: 25px;
  }
  .process-overview .experience-stat span {
    font-size: 9px;
  }
}

@media (max-width: 430px) {
  .portfolio-intro-topline {
    display: flex;
    align-items: flex-start;
  }
  .portfolio-intro-actions {
    grid-template-columns: 1fr;
  }
  .portfolio-intro-actions .button:first-child {
    grid-column: auto;
  }
  .process-overview .experience-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* v30 — single-row professional credits loop carousel */
.game-credits-carousel {
  position: relative;
  min-width: 0;
}

.game-credits-viewport {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.game-credits-viewport::-webkit-scrollbar {
  display: none;
}

.game-credits-track {
  display: flex;
  align-items: stretch;
  gap: 14px;
  width: 100%;
  min-width: 0;
}
.game-credits-track > .game-credit-card-link {
  flex: 0 0 calc((100% - 42px) / 4);
  width: auto;
  min-width: 0;
}
.game-credits-track .game-credit-card {
  height: 100%;
}

.game-credits-arrow {
  position: absolute;
  top: 50%;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(7, 11, 16, 0.88);
  color: #f6f7f8;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.34);
  font: inherit;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.94);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
  backdrop-filter: blur(10px);
}
.game-credits-arrow-prev {
  left: 10px;
}
.game-credits-arrow-next {
  right: 10px;
}
.game-credits-carousel.is-overflowing:hover .game-credits-arrow,
.game-credits-carousel.is-overflowing:focus-within .game-credits-arrow {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}
.game-credits-arrow:hover,
.game-credits-arrow:focus-visible {
  border-color: rgba(179, 106, 255, 0.65);
  background: rgba(20, 13, 28, 0.94);
  outline: none;
}

@media (max-width: 1180px) {
  .game-credits-track > .game-credit-card-link {
    flex-basis: calc((100% - 28px) / 3);
  }
}

@media (max-width: 900px) {
  .game-credits-track > .game-credit-card-link {
    flex-basis: calc((100% - 14px) / 2);
  }
}

@media (max-width: 720px) {
  .game-credits-viewport {
    width: calc(100% + 12px);
    margin-right: -12px;
    padding-right: 12px;
  }
  .game-credits-track {
    gap: 11px;
  }
  .game-credits-track > .game-credit-card-link {
    flex-basis: min(78vw, 290px);
    scroll-snap-align: none;
  }
  .game-credits-arrow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-credits-arrow {
    transition: none;
  }
}

/* v31 — genuinely continuous professional credits carousel + external controls */
@media (min-width: 721px) {
  .game-credits-carousel {
    padding-inline: 62px;
  }

  .game-credits-viewport {
    overflow: hidden;
    touch-action: pan-y;
  }

  .game-credits-track {
    width: max-content;
    min-width: 0;
    will-change: transform;
    backface-visibility: hidden;
  }

  .game-credits-track > .game-credit-card-link {
    flex: 0 0 var(--game-credit-card-width, 320px);
    width: var(--game-credit-card-width, 320px);
    min-width: 0;
  }

  .game-credits-arrow {
    top: 50%;
    width: 50px;
    height: 58px;
    border-radius: 13px;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(10, 15, 21, 0.96);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.34);
    transform: translateY(-50%);
  }

  .game-credits-arrow-prev {
    left: 2px;
  }
  .game-credits-arrow-next {
    right: 2px;
  }

  .game-credits-arrow svg {
    display: block;
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .game-credits-carousel.is-overflowing:hover .game-credits-arrow,
  .game-credits-carousel.is-overflowing:focus-within .game-credits-arrow {
    transform: translateY(-50%);
  }
}

@media (max-width: 720px) {
  .game-credits-carousel {
    padding-inline: 0;
  }
  .game-credits-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    touch-action: pan-x pan-y;
  }
  .game-credits-track {
    width: max-content;
    transform: none !important;
  }
  .game-credits-track > .game-credit-card-link {
    flex: 0 0 min(78vw, 290px);
    width: min(78vw, 290px);
  }
}

/* v32 — merge the empty intro into Selected Work and keep professional credits full-width. */
.portfolio-selected-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(22px, 3vw, 48px);
  margin-bottom: 15px;
}
.portfolio-selected-header > .portfolio-section-heading {
  display: block;
  margin: 0;
}
.portfolio-selected-header > .portfolio-section-heading > p {
  max-width: 620px;
  margin: 8px 0 0;
  text-align: left;
}
.portfolio-selected-utility {
  display: grid;
  justify-items: end;
  gap: 11px;
}
.portfolio-selected-utility .portfolio-availability {
  justify-content: flex-end;
  text-align: right;
}
.portfolio-selected-utility .portfolio-intro-actions {
  justify-content: flex-end;
  margin: 0;
}

@media (min-width: 721px) {
  /* The cards use the entire content width. Controls sit in the free outer gutters. */
  .game-credits-carousel {
    overflow: visible;
    padding-inline: 0;
  }
  .game-credits-viewport {
    width: 100%;
    overflow: hidden;
  }
  .game-credits-carousel.is-overflowing .game-credits-viewport {
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0,
      #000 28px,
      #000 calc(100% - 28px),
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      transparent 0,
      #000 28px,
      #000 calc(100% - 28px),
      transparent 100%
    );
  }
  .game-credits-arrow-prev {
    left: -62px;
  }
  .game-credits-arrow-next {
    right: -62px;
  }
}

@media (max-width: 1320px) and (min-width: 721px) {
  .game-credits-arrow {
    width: 46px;
    height: 54px;
  }
  .game-credits-arrow-prev {
    left: -52px;
  }
  .game-credits-arrow-next {
    right: -52px;
  }
}

@media (max-width: 900px) {
  .portfolio-selected-header {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 14px;
  }
  .portfolio-selected-utility {
    justify-items: start;
  }
  .portfolio-selected-utility .portfolio-availability {
    justify-content: flex-start;
    text-align: left;
  }
  .portfolio-selected-utility .portfolio-intro-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .portfolio-selected-header {
    margin-bottom: 13px;
  }
  .portfolio-selected-utility {
    width: 100%;
  }
  .portfolio-selected-utility .portfolio-intro-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .portfolio-selected-utility .portfolio-intro-actions .button:first-child {
    grid-column: 1 / -1;
  }
  .game-credits-carousel.is-overflowing .game-credits-viewport {
    -webkit-mask-image: linear-gradient(
      to right,
      #000 0,
      #000 calc(100% - 18px),
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      #000 0,
      #000 calc(100% - 18px),
      transparent 100%
    );
  }
}

@media (max-width: 430px) {
  .portfolio-selected-utility .portfolio-intro-actions {
    grid-template-columns: 1fr;
  }
  .portfolio-selected-utility .portfolio-intro-actions .button:first-child {
    grid-column: auto;
  }
}

/* v33 — coherent portfolio landing layout.
   Selected work is the actual page hero, professional credits follow as a single-row carousel,
   and every section shares one content rhythm instead of looking like separate experiments. */
body[data-slug="portfolio"] .portfolio-content {
  width: min(100%, 1680px) !important;
  max-width: 1680px !important;
  margin-inline: auto !important;
  padding-inline: clamp(18px, 2.1vw, 40px) !important;
}

body[data-slug="portfolio"] .portfolio-section {
  margin-top: clamp(42px, 4vw, 68px);
}

/* Selected work = page hero. Header and project live inside one module. */
body[data-slug="portfolio"] .portfolio-selected-section {
  margin-top: 0;
}

.portfolio-selected-shell {
  /* The hero already owns its border/radius. Keep this structural wrapper invisible
     so the Portfolio header does not look like a card nested inside another card. */
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.portfolio-selected-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 0 0 clamp(15px, 1.5vw, 22px);
  padding: 2px 2px 0;
}

.portfolio-selected-title {
  min-width: 0;
}

.portfolio-section-kicker {
  display: block;
  margin-bottom: 5px;
  color: #aa62ed;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portfolio-selected-title h1 {
  margin: 0;
  color: #f4f5f7;
  font-size: clamp(30px, 2.45vw, 42px);
  line-height: 1;
  letter-spacing: -0.042em;
}

.portfolio-selected-utility {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.portfolio-selected-utility .portfolio-availability {
  flex: 0 0 auto;
  justify-content: flex-end;
  white-space: nowrap;
}

.portfolio-selected-utility .portfolio-intro-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
}

.portfolio-selected-utility .portfolio-intro-actions .button {
  min-height: 38px;
  padding: 0 14px;
  white-space: nowrap;
}

.portfolio-selected-shell .featured-project,
.portfolio-selected-shell .featured-stage {
  min-height: clamp(440px, 37vw, 650px);
}

.portfolio-selected-shell .featured-project {
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.12);
}

.portfolio-selected-shell .featured-copy {
  width: min(520px, 44%);
  min-height: clamp(440px, 37vw, 650px);
  padding: clamp(30px, 3.2vw, 52px);
}

.portfolio-selected-shell .featured-copy h2 {
  max-width: 480px;
  font-size: clamp(42px, 4vw, 70px);
}

.portfolio-selected-shell .featured-copy p {
  max-width: 430px;
}

/* Professional credits: no outer card, exactly one row, controls live in the outer gutters. */
.game-credits-section {
  margin: clamp(42px, 4vw, 68px) 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.game-credits-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 18px;
}

.game-credits-heading > div {
  gap: 5px;
}

.game-credits-heading span {
  color: #aa62ed;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.game-credits-heading h2 {
  font-size: clamp(28px, 2.35vw, 40px);
  letter-spacing: -0.04em;
}

.game-credits-heading p {
  max-width: 520px;
  color: #89919b;
  font-size: 11.5px;
  line-height: 1.55;
}

.game-credits-carousel {
  position: relative;
  overflow: visible;
  padding-inline: 0;
}

.game-credits-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 11px;
  touch-action: pan-y;
}

.game-credits-track {
  gap: 14px;
  width: max-content;
  min-width: 0;
  align-items: stretch;
  will-change: transform;
}

.game-credits-track > .game-credit-card-link {
  flex: 0 0 var(--game-credit-card-width, 320px);
  width: var(--game-credit-card-width, 320px);
}

.game-credit-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 11px;
  background: rgba(11, 17, 23, 0.78);
}

.game-credit-cover {
  aspect-ratio: 16 / 9;
  background: #0b1015;
}

.game-credit-body {
  min-height: 124px;
  gap: 6px;
  padding: 14px 14px 15px;
}

.game-credit-body h3 {
  font-size: 14px;
}

.game-credit-description {
  -webkit-line-clamp: 2;
}

/* Soft edge treatment hides the hard clipping that is unavoidable in a continuously moving loop. */
.game-credits-carousel.is-overflowing::before,
.game-credits-carousel.is-overflowing::after {
  content: "";
  position: absolute;
  z-index: 6;
  top: 0;
  bottom: 0;
  width: 30px;
  pointer-events: none;
}

.game-credits-carousel.is-overflowing::before {
  left: 0;
  background: linear-gradient(
    90deg,
    #080d12 0%,
    rgba(8, 13, 18, 0.82) 34%,
    transparent 100%
  );
}

.game-credits-carousel.is-overflowing::after {
  right: 0;
  background: linear-gradient(
    270deg,
    #080d12 0%,
    rgba(8, 13, 18, 0.82) 34%,
    transparent 100%
  );
}

.game-credits-arrow {
  top: 50%;
  z-index: 10;
  width: 52px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  background: rgba(10, 15, 21, 0.96);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
}

.game-credits-arrow-prev {
  left: -64px;
}
.game-credits-arrow-next {
  right: -64px;
}

.game-credits-arrow svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.game-credits-carousel.is-overflowing:hover .game-credits-arrow,
.game-credits-carousel.is-overflowing:focus-within .game-credits-arrow {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%);
}

.game-credits-arrow:hover,
.game-credits-arrow:focus-visible {
  border-color: rgba(179, 106, 255, 0.62);
  background: rgba(24, 16, 32, 0.98);
}

/* Keep the rest of the page on the same grid and visual density. */
.portfolio-section-heading {
  margin-bottom: 17px;
}

.portfolio-section-heading h2 {
  font-size: clamp(28px, 2.35vw, 40px);
}

.portfolio-all-work .project-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.process-panel,
.capability-card,
.portfolio-final-cta {
  border-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 1500px) and (min-width: 721px) {
  .game-credits-arrow-prev {
    left: -55px;
  }
  .game-credits-arrow-next {
    right: -55px;
  }
  .game-credits-arrow {
    width: 46px;
    height: 54px;
  }
}

@media (max-width: 1500px) and (min-width: 721px) {
  .portfolio-selected-header {
    align-items: flex-start;
  }

  .portfolio-selected-utility {
    display: grid;
    justify-items: end;
    gap: 9px;
  }

  .game-credits-carousel {
    padding-inline: 52px;
  }

  .game-credits-arrow-prev {
    left: 0;
  }
  .game-credits-arrow-next {
    right: 0;
  }

  .game-credits-carousel.is-overflowing::before {
    left: 52px;
  }
  .game-credits-carousel.is-overflowing::after {
    right: 52px;
  }
}

@media (max-width: 900px) {
  .portfolio-selected-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .portfolio-selected-utility {
    justify-items: start;
  }

  .portfolio-selected-utility .portfolio-availability {
    justify-content: flex-start;
  }

  .portfolio-selected-utility .portfolio-intro-actions {
    justify-content: flex-start;
  }

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

@media (max-width: 720px) {
  body[data-slug="portfolio"] .portfolio-content {
    padding-inline: 12px !important;
  }

  body[data-slug="portfolio"] .portfolio-section,
  .game-credits-section {
    margin-top: 34px;
  }

  .portfolio-selected-section {
    margin-top: 0 !important;
  }

  .portfolio-selected-shell {
    padding: 0;
    border-radius: 0;
  }

  .portfolio-selected-header {
    margin-bottom: 13px;
    padding: 2px;
  }

  .portfolio-selected-title h1 {
    font-size: 31px;
  }

  .portfolio-selected-utility {
    width: 100%;
  }

  .portfolio-selected-utility .portfolio-intro-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .portfolio-selected-utility .portfolio-intro-actions .button:first-child {
    grid-column: 1 / -1;
  }

  .portfolio-selected-shell .featured-project,
  .portfolio-selected-shell .featured-stage {
    min-height: 430px;
  }

  .portfolio-selected-shell .featured-copy {
    width: 100%;
    min-height: 430px;
    padding: 24px 20px 74px;
  }

  .portfolio-selected-shell .featured-copy h2 {
    font-size: 35px;
  }

  .game-credits-heading {
    display: grid;
    gap: 8px;
    align-items: start;
  }

  .game-credits-heading p {
    max-width: none;
    text-align: left;
  }

  .game-credits-carousel {
    padding-inline: 0;
  }

  .game-credits-viewport {
    width: calc(100% + 12px);
    margin-right: -12px;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 0;
    padding-right: 12px;
    touch-action: pan-x pan-y;
  }

  .game-credits-track {
    gap: 11px;
    transform: none !important;
  }

  .game-credits-track > .game-credit-card-link {
    flex: 0 0 min(82vw, 310px);
    width: min(82vw, 310px);
  }

  .game-credits-carousel.is-overflowing::before,
  .game-credits-carousel.is-overflowing::after,
  .game-credits-arrow {
    display: none;
  }

  .portfolio-all-work .project-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .portfolio-selected-utility .portfolio-intro-actions {
    grid-template-columns: 1fr;
  }

  .portfolio-selected-utility .portfolio-intro-actions .button:first-child {
    grid-column: auto;
  }
}

/* v37 — portfolio hero: left-weighted content, compact height, unobstructed artwork. */
body[data-slug="portfolio"] .portfolio-landing-hero {
  position: relative;
  min-height: clamp(470px, 31vw, 560px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background: #0a0f14;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
  isolation: isolate;
}

body[data-slug="portfolio"] .portfolio-landing-hero .featured-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
}

body[data-slug="portfolio"] .portfolio-landing-hero .featured-media,
body[data-slug="portfolio"] .portfolio-landing-hero .featured-media img,
body[data-slug="portfolio"] .portfolio-landing-hero .featured-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

body[data-slug="portfolio"] .portfolio-landing-hero .featured-media img,
body[data-slug="portfolio"] .portfolio-landing-hero .featured-media video {
  object-fit: cover;
}

body[data-slug="portfolio"] .portfolio-landing-hero .featured-stage::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(4, 7, 10, 0.94) 0%,
      rgba(4, 7, 10, 0.85) 22%,
      rgba(4, 7, 10, 0.6) 40%,
      rgba(4, 7, 10, 0.24) 61%,
      rgba(4, 7, 10, 0.08) 82%,
      rgba(4, 7, 10, 0.1) 100%
    ),
    linear-gradient(
      0deg,
      rgba(4, 7, 10, 0.7) 0%,
      rgba(4, 7, 10, 0.24) 29%,
      rgba(4, 7, 10, 0.08) 64%,
      rgba(4, 7, 10, 0.18) 100%
    );
}

body[data-slug="portfolio"] .portfolio-hero-content {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: stretch;
  width: 100%;
  min-height: clamp(470px, 31vw, 560px);
  padding: clamp(40px, 4vw, 64px) clamp(36px, 4vw, 72px)
    clamp(34px, 3.4vw, 54px) clamp(54px, 7.5vw, 148px);
  color: #fff;
  pointer-events: none;
}

body[data-slug="portfolio"] .portfolio-hero-content::before {
  content: none;
}

body[data-slug="portfolio"] .portfolio-hero-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  align-self: center;
  justify-self: start;
  width: min(650px, 52%);
  margin: 0;
  padding: 0;
}

body[data-slug="portfolio"] .portfolio-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 17px;
  color: rgba(224, 199, 250, 0.78);
  font-size: 10px;
  font-weight: 760;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.58);
}

body[data-slug="portfolio"] .portfolio-hero-kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: rgba(181, 92, 255, 0.85);
  box-shadow: 0 0 10px rgba(181, 92, 255, 0.42);
}

body[data-slug="portfolio"] .portfolio-hero-content h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(78px, 7vw, 128px);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.065em;
  text-shadow: 0 8px 38px rgba(0, 0, 0, 0.6);
}

body[data-slug="portfolio"] .portfolio-hero-lede {
  max-width: 560px;
  margin: clamp(20px, 1.8vw, 28px) 0 0;
  color: rgba(239, 242, 246, 0.8);
  font-size: clamp(15px, 1vw, 17px);
  font-weight: 440;
  line-height: 1.58;
  text-wrap: pretty;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.74);
}

body[data-slug="portfolio"] .portfolio-hero-disciplines {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: clamp(18px, 1.6vw, 24px);
}

body[data-slug="portfolio"] .portfolio-hero-disciplines span {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(8, 12, 17, 0.28);
  color: rgba(241, 244, 247, 0.7);
  font-size: 10px;
  font-weight: 570;
  line-height: 1;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

body[data-slug="portfolio"] .portfolio-hero-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}

body[data-slug="portfolio"] .portfolio-hero-content .portfolio-availability {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: #79e8ba;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.72);
  pointer-events: auto;
}

body[data-slug="portfolio"] .portfolio-hero-content .portfolio-availability i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #58e7a2;
  box-shadow:
    0 0 0 5px rgba(88, 231, 162, 0.11),
    0 0 16px rgba(88, 231, 162, 0.55);
}

body[data-slug="portfolio"] .portfolio-hero-content .portfolio-intro-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  pointer-events: auto;
}

body[data-slug="portfolio"]
  .portfolio-hero-content
  .portfolio-intro-actions
  .button {
  min-height: 45px;
  padding-inline: 18px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(8, 12, 17, 0.54);
  color: #f4f5f7;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body[data-slug="portfolio"]
  .portfolio-hero-content
  .portfolio-intro-actions
  .button.primary {
  border-color: rgba(202, 136, 255, 0.6);
  background: linear-gradient(135deg, #9132e5, #6921b4);
  box-shadow: 0 12px 30px rgba(105, 33, 180, 0.24);
}

body[data-slug="portfolio"] .portfolio-landing-hero .featured-controls,
body[data-slug="portfolio"] .portfolio-landing-hero .featured-copy {
  display: none !important;
}

body[data-slug="portfolio"] .portfolio-landing-hero.no-project-background {
  background:
    radial-gradient(
      circle at 76% 28%,
      rgba(138, 63, 214, 0.22),
      transparent 34%
    ),
    linear-gradient(145deg, #0d1319, #080d12);
}

body[data-slug="portfolio"]
  .portfolio-landing-hero.no-project-background
  .portfolio-hero-main {
  width: min(650px, 58%);
}

@media (max-width: 1100px) {
  body[data-slug="portfolio"] .portfolio-hero-content {
    padding-left: clamp(44px, 6vw, 72px);
  }

  body[data-slug="portfolio"] .portfolio-hero-main {
    width: min(650px, 67%);
  }

  body[data-slug="portfolio"] .portfolio-hero-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  body[data-slug="portfolio"] .portfolio-hero-content .portfolio-intro-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  body[data-slug="portfolio"] .portfolio-landing-hero,
  body[data-slug="portfolio"] .portfolio-hero-content {
    min-height: 520px;
  }

  body[data-slug="portfolio"] .portfolio-landing-hero {
    border-radius: 14px;
  }

  body[data-slug="portfolio"] .portfolio-landing-hero .featured-stage::before {
    background:
      linear-gradient(
        0deg,
        rgba(4, 7, 10, 0.96) 0%,
        rgba(4, 7, 10, 0.82) 43%,
        rgba(4, 7, 10, 0.3) 73%,
        rgba(4, 7, 10, 0.18) 100%
      ),
      linear-gradient(90deg, rgba(4, 7, 10, 0.62), rgba(4, 7, 10, 0.08));
  }

  body[data-slug="portfolio"] .portfolio-hero-content {
    grid-template-rows: minmax(0, 1fr) auto;
    padding: 28px 22px 22px;
  }

  body[data-slug="portfolio"] .portfolio-hero-main,
  body[data-slug="portfolio"]
    .portfolio-landing-hero.no-project-background
    .portfolio-hero-main {
    justify-content: flex-end;
    width: 100%;
    padding: 90px 0 26px;
  }

  body[data-slug="portfolio"] .portfolio-hero-kicker {
    margin-bottom: 14px;
    font-size: 9px;
  }

  body[data-slug="portfolio"] .portfolio-hero-content h1 {
    font-size: clamp(62px, 18vw, 86px);
  }

  body[data-slug="portfolio"] .portfolio-hero-lede {
    max-width: 100%;
    margin-top: 17px;
    font-size: 14px;
    line-height: 1.52;
  }

  body[data-slug="portfolio"] .portfolio-hero-disciplines {
    gap: 6px;
    margin-top: 17px;
  }

  body[data-slug="portfolio"] .portfolio-hero-disciplines span {
    min-height: 28px;
    padding: 0 10px;
    font-size: 9px;
  }

  body[data-slug="portfolio"] .portfolio-hero-footer {
    gap: 13px;
  }

  body[data-slug="portfolio"] .portfolio-hero-content .portfolio-availability {
    white-space: normal;
    font-size: 11px;
  }

  body[data-slug="portfolio"] .portfolio-hero-content .portfolio-intro-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  body[data-slug="portfolio"]
    .portfolio-hero-content
    .portfolio-intro-actions
    .button {
    min-height: 44px;
    padding-inline: 12px;
  }

  body[data-slug="portfolio"]
    .portfolio-hero-content
    .portfolio-intro-actions
    .button:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 430px) {
  body[data-slug="portfolio"] .portfolio-hero-content .portfolio-intro-actions {
    grid-template-columns: 1fr;
  }

  body[data-slug="portfolio"]
    .portfolio-hero-content
    .portfolio-intro-actions
    .button:first-child {
    grid-column: auto;
  }
}

/* v39 — mobile interaction/layout corrections. */
.category-share-button[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  /* Touch browsers can leave :hover stuck after a tap. The desktop lift then
     moved a credit card above an overflow-hidden viewport and clipped its top. */
  body[data-slug="portfolio"]
    .game-credit-card-link[href]:hover
    .game-credit-card,
  body[data-slug="portfolio"]
    .game-credit-card-link[href]:active
    .game-credit-card {
    transform: none !important;
  }

  body[data-slug="portfolio"] .game-credits-viewport {
    padding-top: 2px !important;
    margin-top: -2px !important;
  }

  body[data-slug="portfolio"] .game-credit-cover img {
    object-position: center top !important;
  }

  /* Detail-page controls use the same centered mobile button geometry. */
  body[data-slug="portfolio"] .detail-page .detail-back {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 44px !important;
    padding: 0 16px !important;
    line-height: 1.2 !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  body[data-slug="portfolio"] .detail-page .detail-header-actions .button,
  body[data-slug="portfolio"] .detail-page .detail-asset-button,
  body[data-slug="portfolio"] .detail-page .detail-external-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.6rem !important;
    min-height: 46px !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }
}

/* v40 — mobile professional-credits carousel: symmetric soft edge fade. */
@media (max-width: 720px) {
  body[data-slug="portfolio"]
    .game-credits-carousel.is-overflowing
    .game-credits-viewport {
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0,
      #000 18px,
      #000 calc(100% - 18px),
      transparent 100%
    ) !important;
    mask-image: linear-gradient(
      to right,
      transparent 0,
      #000 18px,
      #000 calc(100% - 18px),
      transparent 100%
    ) !important;
  }
}

/* v41 — edge-to-edge fullscreen + mobile swipe. */
.render-lightbox,
.render-lightbox:fullscreen,
.render-lightbox:-webkit-full-screen {
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
@media (max-width: 760px), (pointer: coarse) {
  .render-lightbox-frame,
  .render-lightbox-panzoom {
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
  }
  .render-lightbox::before {
    inset: -8%;
    filter: blur(28px) brightness(0.28) saturate(0.88);
  }
}

/* v42 — true edge-to-edge lightbox. The real backdrop element avoids black
   gutters when the image aspect ratio does not match the screen. */
.render-lightbox,
.render-lightbox:fullscreen,
.render-lightbox:-webkit-full-screen {
  position: fixed !important;
  top: -2px !important;
  right: -2px !important;
  bottom: -2px !important;
  left: -2px !important;
  inset: -2px !important;
  width: calc(100vw + 4px) !important;
  height: calc(100vh + 4px) !important;
  height: calc(100dvh + 4px) !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #05070a !important;
}
.render-lightbox::backdrop {
  margin: 0 !important;
  background: #05070a !important;
}
.render-lightbox::before {
  display: none !important;
}
.render-lightbox-backdrop {
  position: absolute;
  z-index: 0;
  inset: -48px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: blur(30px) brightness(0.34) saturate(0.9);
  transform: scale(1.08);
  opacity: 1;
  pointer-events: none;
}
.render-lightbox-frame,
.render-lightbox-panzoom {
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
.render-lightbox-frame {
  z-index: 1;
}

/* v43 — the foreground render is always fully visible. The fullscreen
   surface still fills the display, but any aspect-ratio remainder is painted
   by the blurred backdrop instead of enlarging/cropping the real render. */
.render-lightbox-panzoom > img {
  min-width: 0 !important;
  min-height: 0 !important;
  object-fit: contain !important;
}

/* Mobile/tablet: same contain behaviour; the blurred copy fills any
   unavoidable aspect-ratio remainder so no black strip can appear. */
@media (max-width: 760px), (pointer: coarse) {
  .render-lightbox,
  .render-lightbox:fullscreen,
  .render-lightbox:-webkit-full-screen {
    top: -3px !important;
    right: -3px !important;
    bottom: -3px !important;
    left: -3px !important;
    inset: -3px !important;
    width: calc(100vw + 6px) !important;
    height: calc(100dvh + 6px) !important;
  }
  .render-lightbox-backdrop {
    inset: -56px;
    filter: blur(26px) brightness(0.3) saturate(0.92);
    transform: scale(1.12);
  }
}

/* v44 — exact fullscreen bounds + visible aspect-ratio fill.
   The foreground render is NEVER cropped. Any space caused by a different
   screen aspect ratio is filled by a cover copy of the same render, so it no
   longer reads as a black frame. */
.render-lightbox,
.render-lightbox:fullscreen,
.render-lightbox:-webkit-full-screen {
  box-sizing: border-box !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  inset: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  max-width: none !important;
  max-height: none !important;
  background: #080b0f !important;
}

/* In normal fixed mode use viewport units. In native fullscreen the browser
   owns the element's box, so 100% is safer than vh/dvh and avoids Chromium's
   occasional browser-UI-sized gutters. */
.render-lightbox:not(:fullscreen) {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
}
.render-lightbox:fullscreen,
.render-lightbox:-webkit-full-screen {
  width: 100% !important;
  height: 100% !important;
}

.render-lightbox::backdrop {
  background: #080b0f !important;
}

.render-lightbox-backdrop {
  display: block !important;
  position: absolute !important;
  z-index: 0 !important;
  /* Oversize ONLY the backdrop, never the fit surface. This prevents blur
     sampling from exposing a hard edge while keeping the real image exact. */
  inset: -6vmax !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background-position: 50% 50% !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  filter: blur(clamp(18px, 2.2vmax, 42px)) brightness(0.68) saturate(1.02) !important;
  transform: scale(1.04) !important;
  transform-origin: center !important;
  opacity: 1 !important;
}

.render-lightbox-frame,
.render-lightbox-panzoom {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  overflow: hidden !important;
}

.render-lightbox-panzoom > img {
  display: block !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  object-fit: contain !important;
  object-position: 50% 50% !important;
}

/* On phones keep the backdrop recognizable instead of nearly black. This is
   what visually removes the old top/side "frame" while the actual render
   remains completely visible for swipe/zoom. */
@media (max-width: 760px), (pointer: coarse) {
  .render-lightbox-backdrop {
    inset: -8vmax !important;
    filter: blur(clamp(14px, 4.5vw, 28px)) brightness(0.62) saturate(1.04) !important;
    transform: scale(1.06) !important;
  }
}

/* v45 — clean fullscreen render surface.
   - The foreground render is strict contain: never cropped or stretched.
   - The fullscreen element/frame itself is never scaled, translated or padded.
   - Aspect-ratio remainder is filled by a bright cover copy of the same render,
     so there is no black/blue hard "frame" around the contained image. */
.render-lightbox,
.render-lightbox:fullscreen,
.render-lightbox:-webkit-full-screen {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
  background: #000 !important;
}
.render-lightbox:not(:fullscreen):not(:-webkit-full-screen) {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
}
.render-lightbox::backdrop {
  margin: 0 !important;
  padding: 0 !important;
  background: #000 !important;
}
.render-lightbox::before {
  display: none !important;
}

.render-lightbox-backdrop {
  position: absolute !important;
  z-index: 0 !important;
  inset: -14px !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  /* Keep the fill recognizable. Heavy blur/darkening was what made the
     aspect-ratio remainder look like a separate blue/black border. */
  filter: blur(8px) brightness(0.82) saturate(0.98) !important;
  transform: scale(1.025) !important;
  transform-origin: 50% 50% !important;
  opacity: 1 !important;
  pointer-events: none !important;
}

.render-lightbox-frame,
.render-lightbox.is-open .render-lightbox-frame,
.render-lightbox-panzoom {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  transform: none !important;
  filter: none !important;
  overflow: hidden !important;
}
.render-lightbox-frame {
  z-index: 2 !important;
}

.render-lightbox-panzoom > img {
  display: block !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  object-fit: contain !important;
  object-position: 50% 50% !important;
}

/* A soft vignette hides the join between the contained foreground and its
   cover copy without masking/cropping any part of the real render. */
.render-lightbox::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 64%,
    rgba(0, 0, 0, 0.1) 100%
  );
}
.render-lightbox-toolbar {
  z-index: 10 !important;
}

@media (max-width: 760px), (pointer: coarse) {
  .render-lightbox,
  .render-lightbox:fullscreen,
  .render-lightbox:-webkit-full-screen,
  .render-lightbox-frame,
  .render-lightbox.is-open .render-lightbox-frame,
  .render-lightbox-panzoom {
    transform: none !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }
  .render-lightbox:not(:fullscreen):not(:-webkit-full-screen) {
    width: 100vw !important;
    height: 100dvh !important;
  }
  .render-lightbox-backdrop {
    inset: -10px !important;
    filter: blur(6px) brightness(0.84) saturate(1) !important;
    transform: scale(1.02) !important;
  }
}

/* v46 — remove the last visible "side stripe" on near-matching desktop
   aspect ratios. JS uses a tiny non-cropping fill only when the mismatch is
   <=2.5%; larger mismatches stay contain. */
.render-lightbox-backdrop {
  filter: blur(3px) brightness(0.94) saturate(1) !important;
  transform: scale(1.012) !important;
}
.render-lightbox.render-lightbox-near-aspect .render-lightbox-backdrop {
  opacity: 0 !important;
}
@media (max-width: 760px), (pointer: coarse) {
  .render-lightbox-backdrop {
    filter: blur(3px) brightness(0.92) saturate(1) !important;
    transform: scale(1.012) !important;
  }
}

/* v47: YouTube embeds on portfolio project pages should use the same visual scale as renders. */
.detail-page .detail-media--youtube {
  width: min(100%, 1400px);
  max-width: 100%;
  margin-inline: auto;
  overflow: hidden;
  border: 0;
  border-radius: 11px;
  background: #090d11;
}
.detail-page .detail-media--youtube iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
}
@media (max-width: 760px) {
  .detail-page .detail-media--youtube {
    width: 100%;
    border-radius: 9px;
  }
}

/* v42 — professional credits: reachable desktop arrow hit-zones + manual-only infinite mobile loop. */
@media (min-width: 721px) {
  /* The arrows live outside the carousel bounds. Keep their invisible hit areas
     interactive so entering that gutter can reveal the control itself. */
  body[data-slug="portfolio"]
    .game-credits-carousel.is-overflowing
    .game-credits-arrow {
    pointer-events: auto;
  }

  body[data-slug="portfolio"]
    .game-credits-carousel.is-overflowing
    .game-credits-arrow:hover,
  body[data-slug="portfolio"]
    .game-credits-carousel.is-overflowing
    .game-credits-arrow:focus-visible {
    opacity: 1;
    transform: translateY(-50%);
  }
}

@media (max-width: 720px) {
  /* Mobile remains user-driven (no autoplay/arrows). JS duplicates one sequence
     on each side and silently recenters scrollLeft to make swiping cyclic. */
  body[data-slug="portfolio"] .game-credits-track {
    width: max-content;
    transform: none !important;
  }
}

/* 2026-08-15 v49 — Portfolio defers navigation geometry to site-sidebar.css.
   Portfolio.css is injected from the page body after the shared stylesheet, so
   these final rules deliberately mirror the global contract and prevent older
   v19/v22/v24 rules above from changing the left navigation. */
@media (min-width: 801px) {
  body[data-slug="portfolio"] {
    --portfolio-shell-sidebar: var(--av-sidebar-width, 280px) !important;
  }

  body[data-slug="portfolio"] #quartz-root.page > #quartz-body {
    grid-template:
      "grid-sidebar-left grid-header"
      "grid-sidebar-left grid-center"
      "grid-sidebar-left grid-footer" / var(--av-sidebar-width, 280px) minmax(
        0,
        1fr
      ) !important;
  }

  html
    body[data-slug="portfolio"]
    #quartz-root.page
    > #quartz-body
    > .sidebar.left {
    width: var(--av-sidebar-width, 280px) !important;
    min-width: var(--av-sidebar-width, 280px) !important;
    max-width: var(--av-sidebar-width, 280px) !important;
    margin: 0 !important;
    padding: 6rem var(--av-sidebar-pad-x, 1rem) 6.35rem !important;
    gap: 1.15rem !important;
    box-sizing: border-box !important;
  }

  html
    body[data-slug="portfolio"]
    #quartz-root.page
    > #quartz-body
    > .sidebar.left
    > .page-title,
  html
    body[data-slug="portfolio"]
    #quartz-root.page
    > #quartz-body
    > .sidebar.left
    > .flex-component,
  html
    body[data-slug="portfolio"]
    #quartz-root.page
    > #quartz-body
    > .sidebar.left
    > .explorer {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  html
    body[data-slug="portfolio"]
    #quartz-root.page
    > #quartz-body
    > .sidebar.left
    > .page-title {
    margin: 0 !important;
    padding: 0 !important;
  }

  html
    body[data-slug="portfolio"]
    #quartz-root.page
    > #quartz-body
    > .sidebar.left
    > .page-title
    a {
    color: var(--av-sidebar-strong, #f4f5f7) !important;
  }

  html
    body[data-slug="portfolio"]
    #quartz-root.page
    > #quartz-body
    > .sidebar.left
    .search,
  html
    body[data-slug="portfolio"]
    #quartz-root.page
    > #quartz-body
    > .sidebar.left
    .search
    > .search-button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  html
    body[data-slug="portfolio"]
    #quartz-root.page
    > #quartz-body
    > .sidebar.left
    .av-sidebar-legal {
    position: absolute !important;
    right: var(--av-sidebar-pad-x, 1rem) !important;
    bottom: 5.1rem !important;
    left: var(--av-sidebar-pad-x, 1rem) !important;
    display: flex !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 0.08rem 0.3rem !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.59rem !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
  }

  html
    body[data-slug="portfolio"]
    #quartz-root.page
    > #quartz-body
    > .sidebar.left
    .av-sidebar-socials {
    position: absolute !important;
    right: 0 !important;
    bottom: 2.2rem !important;
    left: 0 !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html
    body[data-slug="portfolio"]
    #quartz-root.page
    > #quartz-body
    > .sidebar.left
    .av-sidebar-copyright {
    position: absolute !important;
    right: 0 !important;
    bottom: 0.58rem !important;
    left: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 0.7rem !important;
    box-sizing: border-box !important;
    text-align: center !important;
    white-space: nowrap !important;
  }
}

/* 2026-08-17 — Portfolio archive cards always keep the same 16:9 cover frame.
   Non-16:9 images/videos fill it with center cropping instead of changing the
   height of the card after their intrinsic dimensions become available. */
.portfolio-all-work .project-card-media {
  aspect-ratio: 16 / 9 !important;
  line-height: 0 !important;
  background: transparent !important;
}

.portfolio-all-work .project-card-media[data-av-image-state="loaded"] {
  background: transparent !important;
}

.portfolio-all-work .project-card-media > img,
.portfolio-all-work .project-card-media > video {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center !important;
  vertical-align: top !important;
}


/* 2026-08-17 v50 — comparison videos + final mobile fullscreen surface. */
.portfolio-comparison-viewport video {
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  background:#070b0f;
}
.portfolio-comparison-layer > video {
  position:absolute;
  inset:0;
}
.render-lightbox {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  width: 100dvw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
:fullscreen .render-lightbox,
:-webkit-full-screen .render-lightbox,
.render-lightbox:fullscreen,
.render-lightbox:-webkit-full-screen {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}
@media (max-width: 800px), (pointer: coarse) {
  .render-lightbox-toolbar {
    top: max(8px, env(safe-area-inset-top)) !important;
    right: max(8px, env(safe-area-inset-right)) !important;
    left: max(8px, env(safe-area-inset-left)) !important;
  }
  body.render-lightbox-open #quartz-root { visibility: hidden; }
  body.render-lightbox-open .render-lightbox { visibility: visible; }
}
