/* Portfolio archive: editorial presentation and restrained interaction layer. */

body.portfolio-page {
  --portfolio-gap: clamp(2.5rem, 5vw, 6rem);
  --portfolio-frame: color-mix(in srgb, var(--ink) 14%, transparent);
  --portfolio-panel: color-mix(in srgb, var(--surface) 82%, var(--bg));
}

body.portfolio-page .portfolio-archive-hero,
body.portfolio-page section.paper.portfolio-archive-hero:first-of-type {
  min-height: auto !important;
  padding: clamp(4.5rem, 8vw, 8.5rem) 0 clamp(3.5rem, 6vw, 6.5rem) !important;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

body.portfolio-page .portfolio-hero-shell {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2rem clamp(1rem, 2vw, 2.25rem) !important;
  max-width: none !important;
  align-items: end;
  position: relative;
  isolation: isolate;
  width: 100%;
  min-width: 0;
}

body.portfolio-page .portfolio-hero-shell::before {
  content: "";
  position: absolute;
  inset: -24% -10% -32% 46%;
  z-index: -1;
  border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
  border-radius: 50%;
  transform: rotate(-9deg);
  pointer-events: none;
}

body.portfolio-page .portfolio-hero-copy {
  grid-column: 1 / span 8 !important;
  width: auto;
  min-width: 0;
}

body.portfolio-page .portfolio-hero-shell .eyebrow {
  display: inline-flex;
  margin-bottom: clamp(1.25rem, 2vw, 2rem);
}

body.portfolio-page .portfolio-hero-shell .h-display,
body.portfolio-page section.paper.portfolio-archive-hero:first-of-type .h-display {
  max-width: 10.8ch !important;
  margin: 0 !important;
  font-size: clamp(3.4rem, 6.25vw, 7.1rem) !important;
  line-height: 0.9 !important;
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: normal;
}

body.portfolio-page .portfolio-hero-aside {
  grid-column: 9 / -1 !important;
  min-width: 0;
  padding-bottom: 0.55rem;
}

body.portfolio-page .portfolio-hero-lead {
  max-width: 39ch !important;
  margin: 0 !important;
  font-size: clamp(1.02rem, 1.25vw, 1.28rem) !important;
  line-height: 1.55 !important;
}

body.portfolio-page .portfolio-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.4rem;
  margin-top: 1.75rem;
}

body.portfolio-page .portfolio-hero-actions a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.28rem;
  transition: opacity 200ms ease-out, gap 200ms ease-out;
}

body.portfolio-page .portfolio-hero-actions a:hover {
  gap: 0.8rem;
  opacity: 0.68;
}

body.portfolio-page .portfolio-hero-stats {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0 !important;
  margin-top: clamp(2.25rem, 5vw, 5rem) !important;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

body.portfolio-page .portfolio-hero-stats .hero-stat {
  min-height: 8.4rem;
  padding: 1.4rem clamp(1rem, 2vw, 2rem) 1.2rem;
  border-right: 1px solid var(--line);
}

body.portfolio-page .portfolio-hero-stats .hero-stat:first-child {
  padding-left: 0;
}

body.portfolio-page .portfolio-hero-stats .hero-stat:last-child {
  border-right: 0;
}

body.portfolio-page .portfolio-hero-stats .bignum {
  font-size: clamp(2.2rem, 4vw, 4.25rem) !important;
  line-height: 0.95;
}

body.portfolio-page .portfolio-hero-stats .hero-stat-lbl {
  margin-top: 0.85rem;
}

body.portfolio-page .pf-filter-bar {
  position: sticky;
  top: var(--nav-h, 72px);
  z-index: 38;
  background: color-mix(in srgb, var(--bg) 91%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body.portfolio-page .pf-filter-shell {
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

body.portfolio-page .pf-filter-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  overflow-x: auto;
  scrollbar-width: none;
}

body.portfolio-page .pf-filter-row::-webkit-scrollbar {
  display: none;
}

body.portfolio-page .pf-filter-label,
body.portfolio-page .pf-filter-count {
  flex: 0 0 auto;
  font-family: var(--font-sans);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

body.portfolio-page .pf-filter-label {
  margin-right: 0.25rem;
}

body.portfolio-page .pf-filter-count {
  margin-left: auto;
  letter-spacing: 0.08em;
}

body.portfolio-page .pf-filter-divider {
  width: 1px;
  height: 1.5rem;
  margin: 0 0.25rem;
  flex: 0 0 auto;
  background: var(--line);
}

body.portfolio-page .filter-group {
  display: flex;
  gap: 0.35rem;
  flex: 0 0 auto;
}

body.portfolio-page .filter-btn {
  min-height: 2.35rem;
  padding: 0.48rem 0.82rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color 200ms ease-out, background-color 200ms ease-out, border-color 200ms ease-out;
}

body.portfolio-page .filter-btn:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 35%, transparent);
}

body.portfolio-page .filter-btn.active {
  color: var(--bg);
  background: var(--ink);
  border-color: var(--ink);
}

body.portfolio-page .portfolio-work-section {
  padding: clamp(4rem, 7vw, 7.5rem) 0 clamp(5rem, 9vw, 10rem) !important;
  border-top: 0 !important;
}

body.portfolio-page .portfolio-archive-intro {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 6.5rem);
}

body.portfolio-page .portfolio-archive-intro .eyebrow {
  grid-column: 1 / span 3;
  align-self: start;
}

body.portfolio-page .portfolio-archive-intro h2 {
  grid-column: 4 / span 6;
  margin: 0;
  font-size: clamp(2.35rem, 4vw, 4.9rem);
  line-height: 0.98;
  text-wrap: balance;
}

body.portfolio-page .portfolio-archive-intro p {
  grid-column: 10 / -1;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.6;
}

body.portfolio-page #workGrid.work-grid {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: var(--portfolio-gap) clamp(1.25rem, 2.2vw, 2.5rem) !important;
  align-items: start;
}

body.portfolio-page #workGrid > .work-card,
body.portfolio-page #workGrid > .work-card:nth-child(n) {
  grid-column: span 6 !important;
  min-width: 0;
  margin: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.portfolio-page #workGrid > .work-card[data-layout="wide"] {
  grid-column: span 7 !important;
}

body.portfolio-page #workGrid > .work-card[data-layout="tall"] {
  grid-column: span 5 !important;
}

body.portfolio-page #workGrid > .work-card[data-layout="feature"] {
  grid-column: 1 / -1 !important;
}

body.portfolio-page .work-card-img-link {
  display: block;
  position: relative;
  padding: clamp(0.45rem, 0.8vw, 0.75rem);
  overflow: hidden;
  border: 1px solid var(--portfolio-frame);
  border-radius: 4px;
  background: var(--portfolio-panel);
  perspective: 1200px;
  transform-style: preserve-3d;
  transition: border-color 200ms ease-out, transform 200ms ease-out;
}

body.portfolio-page .work-card-img-link:hover {
  border-color: color-mix(in srgb, var(--ink) 34%, transparent);
}

body.portfolio-page .work-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  min-height: 0 !important;
  overflow: hidden;
  border-radius: 2px;
  background: color-mix(in srgb, var(--surface) 86%, var(--bg));
  transform: rotateX(var(--portfolio-tilt-y, 0deg)) rotateY(var(--portfolio-tilt-x, 0deg));
  transition: transform 200ms ease-out;
}

body.portfolio-page .work-card[data-layout="tall"] .work-card-img {
  aspect-ratio: 4 / 5;
}

body.portfolio-page .work-card[data-layout="feature"] .work-card-img {
  aspect-ratio: 2 / 1;
}

body.portfolio-page .work-card-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: none !important;
  transform: scale(1);
  backface-visibility: hidden;
  image-rendering: auto;
  transition: transform 200ms ease-out;
}

body.portfolio-page .work-card-img-link:hover .work-card-img img {
  transform: scale(1.012);
}

body.portfolio-page .work-card-badge {
  position: absolute;
  top: clamp(0.9rem, 1.4vw, 1.35rem);
  left: clamp(0.9rem, 1.4vw, 1.35rem);
  z-index: 2;
  padding: 0.42rem 0.7rem;
  border-radius: 2px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-sans);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.portfolio-page .work-card-img-link::after {
  content: attr(data-card-number);
  position: absolute;
  inset: auto;
  right: clamp(0.9rem, 1.4vw, 1.35rem);
  top: clamp(0.9rem, 1.4vw, 1.35rem);
  z-index: 2;
  padding: 0.38rem 0.58rem;
  border: 1px solid color-mix(in srgb, var(--bg) 45%, transparent);
  border-radius: 2px;
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  color: var(--bg);
  opacity: 1;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}

body.portfolio-page .work-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 1rem;
  padding: 1.15rem 0 0 !important;
  border: 0 !important;
}

body.portfolio-page .work-card-meta {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.portfolio-page .work-card-name {
  grid-column: 1;
  margin: 0.25rem 0 0 !important;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.7vw, 3.25rem) !important;
  font-weight: 400;
  line-height: 1;
}

body.portfolio-page .work-card-tag {
  grid-column: 1;
  max-width: 46ch;
  margin: 0.25rem 0 0 !important;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 1.1vw, 1.12rem) !important;
  line-height: 1.45 !important;
}

body.portfolio-page .work-card-actions {
  grid-column: 2;
  grid-row: 2 / span 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.55rem;
  min-width: max-content;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

body.portfolio-page .work-card-cs,
body.portfolio-page .work-card-live {
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.69rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: opacity 200ms ease-out;
}

body.portfolio-page .work-card-cs:hover,
body.portfolio-page .work-card-live:hover {
  opacity: 0.58;
}

body.portfolio-page .work-card-designed {
  position: relative;
  display: grid;
  align-content: end;
  width: 100%;
  height: 100%;
  padding: clamp(1.5rem, 4vw, 4rem);
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px) 0 0 / 10% 100%,
    linear-gradient(color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px) 0 0 / 100% 14%,
    color-mix(in srgb, var(--surface) 88%, var(--bg));
}

body.portfolio-page .work-card-designed::before {
  content: attr(data-initials);
  position: absolute;
  right: -0.04em;
  top: -0.2em;
  color: color-mix(in srgb, var(--ink) 7%, transparent);
  font-family: var(--font-display);
  font-size: clamp(8rem, 19vw, 22rem);
  line-height: 1;
  pointer-events: none;
}

body.portfolio-page .work-card-designed-kicker,
body.portfolio-page .work-card-designed-meta {
  position: relative;
  z-index: 1;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.portfolio-page .work-card-designed-name {
  position: relative;
  z-index: 1;
  max-width: 11ch;
  margin-top: 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 7.5rem);
  line-height: 0.88;
}

body.portfolio-page .work-card-designed-place {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin: 1.3rem 0 1.8rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 999px;
  font-family: var(--font-serif);
  font-size: 0.9rem;
}

html.portfolio-motion-ready body.portfolio-page .work-card:not(.portfolio-card-visible) {
  opacity: 0;
  transform: translateY(28px);
}

html.portfolio-motion-ready body.portfolio-page .work-card {
  transition: opacity 200ms ease-out, transform 200ms ease-out;
}

html.portfolio-motion-ready body.portfolio-page .work-card.portfolio-card-visible {
  opacity: 1;
  transform: translateY(0);
}

body.portfolio-page #pagination {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-top: clamp(4rem, 8vw, 8rem) !important;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  body.portfolio-page .portfolio-hero-copy {
    grid-column: 1 / span 8;
  }

  body.portfolio-page .portfolio-hero-aside {
    grid-column: 9 / -1;
  }

  body.portfolio-page .portfolio-archive-intro .eyebrow {
    grid-column: 1 / span 3;
  }

  body.portfolio-page .portfolio-archive-intro h2 {
    grid-column: 4 / span 6;
  }

  body.portfolio-page .portfolio-archive-intro p {
    grid-column: 10 / -1;
  }
}

@media (max-width: 760px) {
  body.portfolio-page .portfolio-archive-hero,
  body.portfolio-page section.paper.portfolio-archive-hero:first-of-type {
    padding: 3.25rem 0 3.5rem !important;
  }

  body.portfolio-page .portfolio-hero-copy,
  body.portfolio-page .portfolio-hero-aside {
    grid-column: 1 / -1;
  }

  body.portfolio-page .portfolio-hero-shell .h-display,
  body.portfolio-page section.paper.portfolio-archive-hero:first-of-type .h-display {
    max-width: 11ch !important;
    font-size: clamp(3.2rem, 15vw, 5.5rem) !important;
  }

  body.portfolio-page .portfolio-hero-aside {
    margin-top: 1rem;
    padding: 0;
  }

  body.portfolio-page .portfolio-hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    margin-top: 1.75rem !important;
  }

  body.portfolio-page .portfolio-hero-stats .hero-stat {
    min-height: 6.75rem;
    padding: 1rem 0.8rem;
  }

  body.portfolio-page .portfolio-hero-stats .hero-stat:first-child {
    padding-left: 0;
  }

  body.portfolio-page .portfolio-hero-stats .bignum {
    font-size: clamp(1.55rem, 8vw, 2.3rem) !important;
  }

  body.portfolio-page .portfolio-hero-stats .hero-stat-lbl {
    font-size: 0.52rem;
    letter-spacing: 0.12em;
  }

  body.portfolio-page .pf-filter-bar {
    position: static !important;
  }

  body.portfolio-page .pf-filter-count {
    display: none;
  }

  body.portfolio-page .portfolio-archive-intro .eyebrow,
  body.portfolio-page .portfolio-archive-intro h2,
  body.portfolio-page .portfolio-archive-intro p {
    grid-column: 1 / -1;
  }

  body.portfolio-page .portfolio-archive-intro h2 {
    margin-top: 0.5rem;
  }

  body.portfolio-page .portfolio-archive-intro p {
    max-width: 39ch;
  }

  body.portfolio-page #workGrid.work-grid {
    grid-template-columns: 1fr !important;
    gap: 4.5rem !important;
  }

  body.portfolio-page #workGrid > .work-card,
  body.portfolio-page #workGrid > .work-card:nth-child(n),
  body.portfolio-page #workGrid > .work-card[data-layout="wide"],
  body.portfolio-page #workGrid > .work-card[data-layout="tall"],
  body.portfolio-page #workGrid > .work-card[data-layout="feature"] {
    display: block;
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }

  body.portfolio-page .work-card-img,
  body.portfolio-page .work-card[data-layout="tall"] .work-card-img,
  body.portfolio-page .work-card[data-layout="feature"] .work-card-img {
    aspect-ratio: 4 / 3;
  }

  body.portfolio-page .work-card-body {
    grid-template-columns: minmax(0, 1fr);
  }

  body.portfolio-page .work-card-actions {
    grid-column: 1;
    grid-row: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    margin-top: 0.75rem !important;
    padding-top: 0.8rem !important;
    border-top: 1px solid var(--line) !important;
  }

  body.portfolio-page .work-card-live {
    display: none;
  }

  body.portfolio-page .essay-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.portfolio-motion-ready body.portfolio-page .work-card,
  html.portfolio-motion-ready body.portfolio-page .work-card:not(.portfolio-card-visible),
  body.portfolio-page .work-card-img,
  body.portfolio-page .work-card-img img {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Compact archive hero: keep real portfolio work inside the first viewport. */
body.portfolio-page .portfolio-archive-hero,
body.portfolio-page section.paper.portfolio-archive-hero:first-of-type {
  min-height: 0 !important;
  padding: clamp(1.35rem, 2.2vw, 2.4rem) 0 clamp(1rem, 1.7vw, 1.65rem) !important;
}

body.portfolio-page .portfolio-hero-shell::before {
  inset: -34% -8% -46% 56%;
  opacity: 0.55;
}

body.portfolio-page .portfolio-hero-shell .eyebrow {
  margin-bottom: clamp(0.65rem, 1.2vw, 1rem) !important;
}

body.portfolio-page .portfolio-hero-shell .h-display,
body.portfolio-page section.paper.portfolio-archive-hero:first-of-type .h-display {
  max-width: 13.2ch !important;
  font-size: clamp(3rem, 4.25vw, 5.15rem) !important;
  line-height: 0.9 !important;
}

body.portfolio-page .portfolio-hero-lead {
  max-width: 34ch !important;
  font-size: clamp(0.98rem, 1.08vw, 1.14rem) !important;
  line-height: 1.46 !important;
}

body.portfolio-page .portfolio-hero-actions {
  gap: 0.55rem 1.15rem !important;
  margin-top: 1rem !important;
}

body.portfolio-page .portfolio-hero-actions a {
  min-height: 2rem;
}

body.portfolio-page .portfolio-hero-stats {
  margin-top: clamp(1rem, 1.7vw, 1.5rem) !important;
}

body.portfolio-page .portfolio-hero-stats .hero-stat {
  min-height: 5.6rem !important;
  padding: 0.85rem clamp(0.85rem, 1.4vw, 1.4rem) 0.78rem !important;
}

body.portfolio-page .portfolio-hero-stats .bignum {
  font-size: clamp(1.75rem, 2.8vw, 3.2rem) !important;
}

body.portfolio-page .portfolio-hero-stats .hero-stat-lbl {
  margin-top: 0.42rem !important;
}

body.portfolio-page .pf-filter-shell {
  padding-top: 0.58rem !important;
  padding-bottom: 0.58rem !important;
}

body.portfolio-page .portfolio-work-section {
  padding-top: clamp(2.15rem, 4vw, 3.6rem) !important;
}

body.portfolio-page .portfolio-archive-intro {
  display: none !important;
  margin-bottom: 0 !important;
}

@media (min-width: 1100px) {
  body.portfolio-page .portfolio-hero-shell {
    grid-template-columns: minmax(0, 5.4fr) minmax(260px, 2.4fr) minmax(280px, 2.7fr) !important;
    gap: clamp(1.15rem, 2vw, 2rem) clamp(1.6rem, 3vw, 3rem) !important;
    align-items: end !important;
  }

  body.portfolio-page .portfolio-hero-copy {
    grid-column: 1 !important;
  }

  body.portfolio-page .portfolio-hero-aside {
    grid-column: 2 !important;
    padding-bottom: 0.2rem !important;
  }

  body.portfolio-page .portfolio-hero-stats {
    grid-column: 3 !important;
    align-self: stretch;
    grid-template-columns: 1fr !important;
    border: 1px solid var(--line);
  }

  body.portfolio-page .portfolio-hero-stats .hero-stat {
    display: grid;
    grid-template-columns: minmax(6rem, 0.6fr) minmax(0, 1fr);
    align-items: end;
    gap: 0.8rem;
    border-right: 0 !important;
    border-bottom: 1px solid var(--line);
  }

  body.portfolio-page .portfolio-hero-stats .hero-stat:first-child {
    padding-left: clamp(0.85rem, 1.4vw, 1.4rem) !important;
  }

  body.portfolio-page .portfolio-hero-stats .hero-stat:last-child {
    border-bottom: 0;
  }

  body.portfolio-page .portfolio-hero-stats .hero-stat-lbl {
    margin-top: 0 !important;
  }
}

@media (min-width: 760px) and (max-width: 1099px) {
  body.portfolio-page .portfolio-hero-shell {
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.85fr) !important;
    gap: 1.15rem clamp(1.5rem, 4vw, 3rem) !important;
  }

  body.portfolio-page .portfolio-hero-copy {
    grid-column: 1 !important;
  }

  body.portfolio-page .portfolio-hero-aside {
    grid-column: 2 !important;
    padding-bottom: 0 !important;
  }

  body.portfolio-page .portfolio-hero-stats {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 760px) {
  body.portfolio-page .portfolio-archive-hero,
  body.portfolio-page section.paper.portfolio-archive-hero:first-of-type {
    padding: 1.6rem 0 1.15rem !important;
  }

  body.portfolio-page .portfolio-hero-shell {
    display: block !important;
    gap: 0.9rem !important;
  }

  body.portfolio-page .portfolio-hero-copy,
  body.portfolio-page .portfolio-hero-aside,
  body.portfolio-page .portfolio-hero-stats {
    grid-column: auto !important;
    width: 100% !important;
  }

  body.portfolio-page .portfolio-hero-shell::before {
    display: none;
  }

  body.portfolio-page .portfolio-hero-shell .h-display,
  body.portfolio-page section.paper.portfolio-archive-hero:first-of-type .h-display {
    max-width: 10.8ch !important;
    font-size: clamp(2.55rem, 11.8vw, 3.35rem) !important;
    line-height: 0.92 !important;
  }

  body.portfolio-page .portfolio-hero-aside {
    margin-top: 0.9rem !important;
  }

  body.portfolio-page .portfolio-hero-lead {
    max-width: 34ch !important;
    font-size: 0.92rem !important;
    line-height: 1.42 !important;
  }

  body.portfolio-page .portfolio-hero-actions {
    margin-top: 0.75rem !important;
  }

  body.portfolio-page .portfolio-hero-stats {
    margin-top: 0.95rem !important;
  }

  body.portfolio-page .portfolio-hero-stats .hero-stat {
    min-height: 4.35rem !important;
    padding: 0.64rem 0.58rem !important;
  }

  body.portfolio-page .portfolio-hero-stats .bignum {
    font-size: clamp(1.35rem, 6.6vw, 1.85rem) !important;
  }

  body.portfolio-page .pf-filter-shell {
    padding-top: 0.52rem !important;
    padding-bottom: 0.52rem !important;
  }

  body.portfolio-page .portfolio-work-section {
    padding-top: 1.25rem !important;
  }
}

/* 2026-08 archive reset: compact, screenshot-first cards instead of billboard tiles. */
body.portfolio-page #workGrid.work-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(1.45rem, 2.15vw, 2.35rem) clamp(1rem, 1.65vw, 1.75rem) !important;
  align-items: start !important;
}

body.portfolio-page #workGrid > .work-card,
body.portfolio-page #workGrid > .work-card:nth-child(n),
body.portfolio-page #workGrid > .work-card[data-layout],
body.portfolio-page #workGrid > .work-card[data-layout="wide"],
body.portfolio-page #workGrid > .work-card[data-layout="tall"],
body.portfolio-page #workGrid > .work-card[data-layout="feature"] {
  grid-column: span 1 !important;
  width: 100% !important;
  overflow: visible !important;
}

body.portfolio-page .work-card-img-link {
  padding: 0.42rem !important;
  border-radius: 8px !important;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--surface) 90%, var(--bg)),
      color-mix(in srgb, var(--bg) 94%, var(--surface))
    ) !important;
  box-shadow: 0 18px 42px color-mix(in srgb, var(--ink) 8%, transparent) !important;
}

html[data-theme="dark"] body.portfolio-page .work-card-img-link {
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--surface) 82%, #ffffff 4%),
      color-mix(in srgb, var(--bg) 86%, var(--surface))
    ) !important;
  box-shadow: 0 18px 46px color-mix(in srgb, #000 44%, transparent) !important;
}

body.portfolio-page .work-card-img,
body.portfolio-page .work-card[data-layout="tall"] .work-card-img,
body.portfolio-page .work-card[data-layout="feature"] .work-card-img {
  aspect-ratio: 16 / 10 !important;
  max-height: 330px !important;
  min-height: 0 !important;
  border-radius: 5px !important;
  background: color-mix(in srgb, var(--surface) 92%, var(--bg)) !important;
}

body.portfolio-page .work-card-img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: top center !important;
  transform: translate3d(0, 0, 0) scale(1) !important;
  backface-visibility: hidden !important;
  image-rendering: auto !important;
}

body.portfolio-page .work-card-img-link:hover .work-card-img img {
  transform: translate3d(0, 0, 0) scale(1.012) !important;
}

body.portfolio-page .work-card-body {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0.5rem !important;
  padding-top: 0.9rem !important;
}

body.portfolio-page .work-card-name {
  font-size: clamp(1.52rem, 1.65vw, 2.12rem) !important;
  line-height: 1.02 !important;
  max-width: 11.5ch !important;
}

body.portfolio-page .work-card-tag {
  max-width: 34ch !important;
  font-size: clamp(0.9rem, 0.92vw, 1rem) !important;
  line-height: 1.42 !important;
}

body.portfolio-page .work-card-actions {
  grid-column: 1 !important;
  grid-row: auto !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.85rem !important;
  margin-top: 0.35rem !important;
}

body.portfolio-page .work-card-live {
  max-width: 52% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.portfolio-page .work-card-designed {
  min-height: 100% !important;
  align-content: center !important;
  justify-items: start !important;
  padding: clamp(1.1rem, 2vw, 1.8rem) !important;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 88%, transparent), color-mix(in srgb, var(--accent) 14%, var(--bg))) !important;
}

body.portfolio-page .work-card-designed::before {
  font-size: clamp(5.6rem, 9vw, 11rem) !important;
  opacity: 0.08 !important;
}

body.portfolio-page .work-card-designed-name {
  max-width: 12ch !important;
  font-size: clamp(1.75rem, 2.45vw, 3rem) !important;
  line-height: 0.94 !important;
}

body.portfolio-page .work-card-designed-place {
  font-size: 0.86rem !important;
}

@media (max-width: 1180px) {
  body.portfolio-page #workGrid.work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 720px) {
  body.portfolio-page #workGrid.work-grid {
    grid-template-columns: 1fr !important;
    gap: 2.35rem !important;
  }

  body.portfolio-page .work-card-img,
  body.portfolio-page .work-card[data-layout="tall"] .work-card-img,
  body.portfolio-page .work-card[data-layout="feature"] .work-card-img {
    aspect-ratio: 4 / 3 !important;
    max-height: none !important;
  }

  body.portfolio-page .work-card-body {
    padding-top: 0.8rem !important;
  }

  body.portfolio-page .work-card-name {
    max-width: 13ch !important;
  }

  body.portfolio-page .work-card-actions {
    align-items: flex-end !important;
  }
}

/* Portfolio archive hero final guard: keep the intro compact and prevent any
   generic visual-hero transform from colliding with the archive layout. */
body.portfolio-page .portfolio-archive-hero,
body.portfolio-page section.paper.portfolio-archive-hero:first-of-type {
  min-height: 0 !important;
  padding: clamp(1.45rem, 2.2vw, 2.6rem) 0 clamp(1.15rem, 1.8vw, 1.8rem) !important;
  overflow: hidden !important;
}

body.portfolio-page .portfolio-archive-hero.lofts-visual-hero > .container,
body.portfolio-page .portfolio-archive-hero > .container {
  display: block !important;
}

body.portfolio-page .portfolio-archive-hero .lofts-hero-stage,
body.portfolio-page .portfolio-archive-hero .lofts-visual-hero__after {
  display: none !important;
}

body.portfolio-page .portfolio-hero-shell,
body.portfolio-page .portfolio-archive-hero.lofts-visual-hero .portfolio-hero-shell,
body.portfolio-page .portfolio-archive-hero .portfolio-hero-shell.lofts-visual-hero__copy {
  display: grid !important;
  grid-template-columns: minmax(0, 0.66fr) minmax(18rem, 0.34fr) !important;
  grid-template-areas:
    "copy aside"
    "stats stats" !important;
  gap: clamp(0.85rem, 1.3vw, 1.25rem) clamp(2rem, 4.6vw, 5.25rem) !important;
  align-items: end !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

body.portfolio-page .portfolio-hero-shell::before {
  inset: -18% -7% -32% 58% !important;
  opacity: 0.32 !important;
  transform: rotate(-7deg) !important;
}

body.portfolio-page .portfolio-hero-copy {
  grid-area: copy !important;
  grid-column: auto !important;
  min-width: 0 !important;
}

body.portfolio-page .portfolio-hero-aside {
  grid-area: aside !important;
  grid-column: auto !important;
  max-width: 34rem !important;
  min-width: 0 !important;
  padding: 0 !important;
}

body.portfolio-page .portfolio-hero-stats {
  grid-area: stats !important;
  grid-column: auto !important;
  align-self: auto !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0 !important;
  margin-top: clamp(0.4rem, 0.9vw, 0.8rem) !important;
  border: 1px solid var(--line) !important;
  background: color-mix(in srgb, var(--surface) 72%, transparent) !important;
}

body.portfolio-page .portfolio-hero-stats .hero-stat {
  display: grid !important;
  grid-template-columns: max-content minmax(0, 1fr) !important;
  align-items: end !important;
  gap: 0.75rem !important;
  min-height: clamp(4.55rem, 5.25vw, 5.8rem) !important;
  padding: 0.82rem clamp(0.85rem, 1.25vw, 1.15rem) !important;
  border-right: 1px solid var(--line) !important;
  border-bottom: 0 !important;
}

body.portfolio-page .portfolio-hero-stats .hero-stat:first-child {
  padding-left: clamp(0.85rem, 1.25vw, 1.15rem) !important;
}

body.portfolio-page .portfolio-hero-stats .hero-stat:last-child {
  border-right: 0 !important;
}

body.portfolio-page .portfolio-hero-stats .bignum {
  font-size: clamp(1.85rem, 3.1vw, 3.55rem) !important;
  line-height: 0.9 !important;
  white-space: nowrap !important;
}

body.portfolio-page .portfolio-hero-stats .hero-stat-lbl {
  margin: 0 !important;
  max-width: 11ch !important;
}

body.portfolio-page .portfolio-hero-shell .eyebrow {
  margin-bottom: clamp(0.48rem, 0.8vw, 0.85rem) !important;
}

body.portfolio-page .portfolio-hero-shell .h-display,
body.portfolio-page section.paper.portfolio-archive-hero:first-of-type .h-display {
  max-width: 9ch !important;
  font-size: clamp(3rem, 4.25vw, 5.6rem) !important;
  line-height: 0.9 !important;
  letter-spacing: 0 !important;
}

body.portfolio-page .portfolio-hero-lead {
  max-width: 42ch !important;
  font-size: clamp(0.98rem, 1.02vw, 1.12rem) !important;
  line-height: 1.46 !important;
}

body.portfolio-page .portfolio-hero-actions {
  margin-top: 0.92rem !important;
}

body.portfolio-page .pf-filter-bar {
  top: var(--nav-h, 72px) !important;
}

@media (max-width: 1080px) {
  body.portfolio-page .portfolio-hero-shell,
  body.portfolio-page .portfolio-archive-hero.lofts-visual-hero .portfolio-hero-shell,
  body.portfolio-page .portfolio-archive-hero .portfolio-hero-shell.lofts-visual-hero__copy {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "copy"
      "aside"
      "stats" !important;
    gap: 0.85rem !important;
  }

  body.portfolio-page .portfolio-hero-shell::before {
    display: none !important;
  }

  body.portfolio-page .portfolio-hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-self: auto !important;
  }

  body.portfolio-page .portfolio-hero-stats .hero-stat {
    grid-template-columns: 1fr !important;
    gap: 0.28rem !important;
    min-height: 4.55rem !important;
    border-bottom: 0 !important;
    border-right: 1px solid var(--line) !important;
  }

  body.portfolio-page .portfolio-hero-stats .hero-stat:last-child {
    border-right: 0 !important;
  }
}

@media (max-width: 720px) {
  body.portfolio-page .portfolio-archive-hero,
  body.portfolio-page section.paper.portfolio-archive-hero:first-of-type {
    padding-top: 1.15rem !important;
  }

  body.portfolio-page .portfolio-hero-shell .h-display,
  body.portfolio-page section.paper.portfolio-archive-hero:first-of-type .h-display {
    max-width: 8.6ch !important;
    font-size: clamp(2.45rem, 10.5vw, 3.25rem) !important;
  }

  body.portfolio-page .portfolio-hero-lead {
    max-width: 34ch !important;
    font-size: 0.94rem !important;
  }

  body.portfolio-page .portfolio-hero-stats {
    grid-template-columns: 1fr !important;
  }

  body.portfolio-page .portfolio-hero-stats .hero-stat {
    grid-template-columns: max-content minmax(0, 1fr) !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
  }

  body.portfolio-page .portfolio-hero-stats .hero-stat:last-child {
    border-bottom: 0 !important;
  }
}

@media (max-width: 880px) {
  body.portfolio-page .nav-inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-inline: clamp(0.75rem, 4vw, 1rem) !important;
    column-gap: 0.5rem !important;
    overflow: visible !important;
  }

  body.portfolio-page .nav-logo {
    grid-column: 1 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  body.portfolio-page .theme-toggle {
    grid-column: 2 !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
  }

  body.portfolio-page .menu-btn {
    grid-column: 3 !important;
    display: inline-flex !important;
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
  }
}

@media (max-width: 420px) {
  body.portfolio-page .nav-logo .dot {
    margin-left: 0.3rem !important;
    letter-spacing: 0.28em !important;
  }

  body.portfolio-page .theme-opt {
    width: 32px !important;
    height: 32px !important;
  }

  body.portfolio-page .menu-btn {
    flex-basis: 42px !important;
    width: 42px !important;
    height: 42px !important;
  }
}

@media (max-width: 880px) {
  body.portfolio-page .nav-bar .nav-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.75rem !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding-inline: clamp(0.85rem, 4vw, 1rem) !important;
    overflow: visible !important;
  }

  body.portfolio-page .nav-bar .nav-logo {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    margin-right: auto !important;
  }

  body.portfolio-page .nav-bar .theme-toggle {
    display: none !important;
  }

  body.portfolio-page .nav-bar .menu-btn {
    display: inline-flex !important;
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    margin-left: auto !important;
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 5 !important;
  }
}

/* 2026-08 QA hardening: compact archive hero and clean sticky filters */
body.portfolio-page .portfolio-archive-hero,
body.portfolio-page section.paper.portfolio-archive-hero:first-of-type {
  min-height: 0 !important;
  padding: clamp(1.6rem, 3.2vw, 2.75rem) 0 clamp(0.8rem, 1.6vw, 1.2rem) !important;
  overflow: clip !important;
  border-bottom: 1px solid var(--line);
}

body.portfolio-page .portfolio-archive-hero .lofts-hero-stage,
body.portfolio-page .portfolio-archive-hero .lofts-visual-hero__after {
  display: none !important;
}

body.portfolio-page .portfolio-hero-shell {
  display: grid !important;
  grid-template-columns: minmax(24rem, 0.43fr) minmax(16rem, 0.27fr) minmax(17rem, 0.3fr) !important;
  grid-template-areas: "copy aside stats" !important;
  align-items: center !important;
  gap: clamp(1.25rem, 3vw, 3.2rem) !important;
  min-height: 0 !important;
  position: relative !important;
}

body.portfolio-page .portfolio-hero-shell::before {
  display: none !important;
}

body.portfolio-page .portfolio-hero-copy {
  grid-area: copy !important;
  min-width: 0;
}

body.portfolio-page .portfolio-hero-aside {
  grid-area: aside !important;
  align-self: center !important;
  max-width: 34ch !important;
  position: relative !important;
  z-index: 2 !important;
}

body.portfolio-page .portfolio-hero-stats {
  grid-area: stats !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  width: 100% !important;
  max-width: 22rem !important;
  margin: 0 !important;
  border: 1px solid var(--line) !important;
  background: color-mix(in srgb, var(--paper) 90%, transparent) !important;
}

body.portfolio-page .portfolio-hero-stats .hero-stat {
  min-height: 0 !important;
  padding: clamp(0.8rem, 1.25vw, 1.15rem) !important;
  border-right: 0 !important;
  border-bottom: 1px solid var(--line) !important;
}

body.portfolio-page .portfolio-hero-stats .hero-stat:last-child {
  border-bottom: 0 !important;
}

body.portfolio-page .portfolio-hero-shell .eyebrow {
  position: relative !important;
  transform: none !important;
  margin: 0 0 0.8rem !important;
}

body.portfolio-page .portfolio-hero-shell .h-display {
  max-width: 12ch !important;
  margin: 0 !important;
  font-size: clamp(3rem, 4.8vw, 5.4rem) !important;
  line-height: 0.94 !important;
}

body.portfolio-page .portfolio-hero-lead {
  max-width: 34ch !important;
  margin: 0 0 1.15rem !important;
  font-size: clamp(0.96rem, 1.08vw, 1.16rem) !important;
  line-height: 1.55 !important;
}

body.portfolio-page .portfolio-filter,
body.portfolio-page .pf-filter-bar {
  z-index: 20;
}

body.portfolio-page .filter-row,
body.portfolio-page .pf-filter-row {
  min-height: auto;
  gap: 0.55rem;
  align-items: center;
  padding-block: 0.65rem;
}

body.portfolio-page .filter-btn,
body.portfolio-page .pf-filter-btn {
  min-height: 38px;
  padding: 0 1rem;
}

@media (max-width: 1180px) {
  body.portfolio-page .portfolio-hero-shell {
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.36fr) !important;
    grid-template-areas: "copy stats" "aside stats" !important;
    align-items: end !important;
  }
}

@media (max-width: 880px) {
  body.portfolio-page .nav-bar .nav-links,
  body.portfolio-page .nav-bar .nav-actions {
    display: none !important;
  }

  body.portfolio-page .nav-bar .theme-toggle {
    display: flex !important;
  }

  body.portfolio-page .nav-bar .menu-btn {
    display: inline-flex !important;
  }
}

@media (max-width: 780px) {
  body.portfolio-page .portfolio-archive-hero,
  body.portfolio-page section.paper.portfolio-archive-hero:first-of-type {
    padding-top: 1rem !important;
  }

  body.portfolio-page .portfolio-hero-shell {
    grid-template-columns: 1fr !important;
    grid-template-areas: "copy" "aside" "stats" !important;
    gap: 1rem !important;
  }

  body.portfolio-page .portfolio-hero-shell .h-display {
    max-width: 10ch !important;
    font-size: clamp(2.55rem, 12vw, 3.65rem) !important;
  }

  body.portfolio-page .portfolio-hero-stats {
    max-width: none !important;
  }
}

/* 2026-08 final QA pass: keep the archive premium, compact, and non-overlapping */
body.portfolio-page .portfolio-archive-hero,
body.portfolio-page section.paper.portfolio-archive-hero:first-of-type {
  min-height: auto !important;
  padding: clamp(2rem, 3.8vw, 3.25rem) 0 clamp(1rem, 2vw, 1.6rem) !important;
  overflow: hidden !important;
  border-bottom: 1px solid var(--line) !important;
}

body.portfolio-page .portfolio-archive-hero .lofts-visual-hero,
body.portfolio-page .portfolio-archive-hero .lofts-hero-stage,
body.portfolio-page .portfolio-archive-hero .lofts-visual-hero__after,
body.portfolio-page .portfolio-archive-hero .hero-device-stack,
body.portfolio-page .portfolio-archive-hero .work-pile {
  display: none !important;
}

body.portfolio-page .portfolio-hero-shell {
  display: grid !important;
  grid-template-columns: minmax(0, 0.94fr) minmax(17rem, 0.42fr) !important;
  grid-template-areas:
    "copy aside"
    "stats stats" !important;
  gap: clamp(1rem, 2.5vw, 2.6rem) clamp(1.5rem, 5vw, 5rem) !important;
  align-items: end !important;
  min-height: auto !important;
  max-width: min(100% - clamp(2rem, 5vw, 6rem), 1500px) !important;
  margin-inline: auto !important;
  padding: 0 !important;
}

body.portfolio-page .portfolio-hero-copy {
  grid-area: copy !important;
  max-width: 64rem !important;
  min-width: 0 !important;
  position: relative !important;
  z-index: 2 !important;
}

body.portfolio-page .portfolio-hero-aside {
  grid-area: aside !important;
  max-width: 30rem !important;
  min-width: 0 !important;
  position: relative !important;
  z-index: 2 !important;
  align-self: end !important;
}

body.portfolio-page .portfolio-hero-stats {
  grid-area: stats !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  max-width: 60rem !important;
  width: 100% !important;
  margin: 0 !important;
  border: 1px solid var(--line) !important;
  background: color-mix(in srgb, var(--paper) 93%, transparent) !important;
}

body.portfolio-page .portfolio-hero-stats .hero-stat {
  min-height: 0 !important;
  padding: clamp(0.85rem, 1.3vw, 1.15rem) !important;
  border-right: 1px solid var(--line) !important;
  border-bottom: 0 !important;
  display: grid !important;
  grid-template-columns: max-content minmax(0, 1fr) !important;
  gap: 0.75rem !important;
  align-items: end !important;
}

body.portfolio-page .portfolio-hero-stats .hero-stat:last-child {
  border-right: 0 !important;
}

body.portfolio-page .portfolio-hero-stats .bignum {
  font-size: clamp(2rem, 3vw, 3.1rem) !important;
  line-height: 0.9 !important;
}

body.portfolio-page .portfolio-hero-stats .hero-stat-lbl {
  font-size: 0.66rem !important;
  line-height: 1.2 !important;
  letter-spacing: 0.16em !important;
}

body.portfolio-page .portfolio-hero-shell .eyebrow {
  position: relative !important;
  z-index: 3 !important;
  margin: 0 0 0.8rem !important;
  transform: none !important;
}

body.portfolio-page .portfolio-hero-shell .h-display {
  max-width: 12.5ch !important;
  margin: 0 !important;
  font-size: clamp(3.4rem, 5.5vw, 6.4rem) !important;
  line-height: 0.92 !important;
  letter-spacing: -0.018em !important;
  text-wrap: balance !important;
}

body.portfolio-page .portfolio-hero-lead {
  max-width: 30rem !important;
  margin: 0 0 1rem !important;
  font-size: clamp(1rem, 1.15vw, 1.18rem) !important;
  line-height: 1.55 !important;
}

body.portfolio-page .portfolio-hero-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.6rem 1rem !important;
}

body.portfolio-page .pf-filter-bar {
  position: sticky !important;
  top: var(--nav-height, 72px) !important;
  z-index: 30 !important;
  background: color-mix(in srgb, var(--paper) 96%, transparent) !important;
  backdrop-filter: blur(12px) !important;
  border-top: 1px solid var(--line) !important;
  border-bottom: 1px solid var(--line) !important;
}

body.portfolio-page .pf-filter-shell {
  padding-block: 0.55rem !important;
}

body.portfolio-page .pf-filter-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  gap: 0.5rem !important;
  align-items: center !important;
  padding: 0 !important;
  scrollbar-width: none !important;
}

body.portfolio-page .pf-filter-row::-webkit-scrollbar {
  display: none !important;
}

body.portfolio-page .pf-filter-btn,
body.portfolio-page .filter-btn {
  min-height: 36px !important;
  padding: 0 0.95rem !important;
  font-size: 0.7rem !important;
  white-space: nowrap !important;
}

body.portfolio-page #workGrid.work-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(1rem, 2.3vw, 1.7rem) !important;
  align-items: start !important;
}

body.portfolio-page #workGrid > .work-card,
body.portfolio-page #workGrid > .work-card:nth-child(n),
body.portfolio-page #workGrid > .work-card[data-layout="wide"],
body.portfolio-page #workGrid > .work-card[data-layout="tall"],
body.portfolio-page #workGrid > .work-card[data-layout="feature"] {
  grid-column: auto !important;
  grid-row: auto !important;
  width: 100% !important;
  max-width: none !important;
  transform: none !important;
}

body.portfolio-page .work-card-img {
  aspect-ratio: 16 / 10 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
}

body.portfolio-page .work-card-img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: top center !important;
  filter: none !important;
  transform: none !important;
}

body.portfolio-page .work-card-img-link:hover .work-card-img img {
  transform: scale(1.015) !important;
}

body.portfolio-page .work-card-body {
  padding: clamp(0.95rem, 1.4vw, 1.35rem) !important;
}

body.portfolio-page .work-card-meta {
  font-size: 0.68rem !important;
  letter-spacing: 0.11em !important;
  white-space: normal !important;
}

body.portfolio-page .work-card-name {
  font-size: clamp(1.55rem, 2.25vw, 2.45rem) !important;
  line-height: 1.03 !important;
  max-width: 12ch !important;
  margin: 0.45rem 0 !important;
  text-wrap: balance !important;
}

body.portfolio-page .work-card-tag {
  font-size: 0.95rem !important;
  line-height: 1.45 !important;
  max-width: 34ch !important;
}

body.portfolio-page .work-card-actions {
  gap: 0.75rem !important;
}

body.portfolio-page .work-card-designed {
  aspect-ratio: 16 / 10 !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  padding: clamp(1.1rem, 2vw, 1.8rem) !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(210, 176, 126, 0.28)),
    repeating-linear-gradient(0deg, rgba(25, 20, 16, 0.055) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(25, 20, 16, 0.05) 0 1px, transparent 1px 28px) !important;
}

body.portfolio-page .work-card-designed-name {
  font-size: clamp(1.9rem, 3vw, 3.15rem) !important;
  line-height: 0.96 !important;
  max-width: 10ch !important;
}

body.portfolio-page .work-card-designed-kicker,
body.portfolio-page .work-card-designed-meta {
  font-size: 0.66rem !important;
  letter-spacing: 0.12em !important;
}

@media (max-width: 1180px) {
  body.portfolio-page .portfolio-hero-shell {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "copy"
      "aside"
      "stats" !important;
  }

  body.portfolio-page #workGrid.work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  body.portfolio-page .portfolio-archive-hero {
    padding-top: 1.25rem !important;
  }

  body.portfolio-page .portfolio-hero-shell {
    max-width: calc(100% - 2rem) !important;
    gap: 1rem !important;
  }

  body.portfolio-page .portfolio-hero-shell .h-display {
    font-size: clamp(2.6rem, 12vw, 4rem) !important;
    max-width: 9.5ch !important;
  }

  body.portfolio-page .portfolio-hero-aside {
    max-width: none !important;
  }

  body.portfolio-page .portfolio-hero-stats {
    grid-template-columns: 1fr !important;
  }

  body.portfolio-page .portfolio-hero-stats .hero-stat {
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
  }

  body.portfolio-page .portfolio-hero-stats .hero-stat:last-child {
    border-bottom: 0 !important;
  }

  body.portfolio-page #workGrid.work-grid {
    grid-template-columns: 1fr !important;
  }

  body.portfolio-page .pf-filter-bar {
    top: var(--nav-height, 70px) !important;
  }
}

/* 2026-08-22 portfolio archive rescue: compact, readable, no collisions. */
body.portfolio-page main#main-content {
  overflow: clip;
}

body.portfolio-page section.paper.portfolio-archive-hero,
body.portfolio-page .portfolio-archive-hero {
  min-height: 0 !important;
  padding: clamp(2.35rem, 3.8vw, 4rem) 0 clamp(1.15rem, 2.2vw, 2rem) !important;
  overflow: hidden !important;
}

body.portfolio-page .portfolio-archive-hero > .container {
  width: 100% !important;
  max-width: none !important;
  padding-inline: clamp(1rem, 3vw, 2.4rem) !important;
}

body.portfolio-page .portfolio-hero-shell {
  width: min(1520px, 100%) !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(25rem, 0.72fr) minmax(18rem, 0.36fr) minmax(14rem, 0.28fr) !important;
  grid-template-areas: "copy aside stats" !important;
  align-items: center !important;
  gap: clamp(1.25rem, 3vw, 3rem) !important;
  min-height: 0 !important;
}

body.portfolio-page .portfolio-hero-copy,
body.portfolio-page .portfolio-hero-aside,
body.portfolio-page .portfolio-hero-stats {
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  float: none !important;
  min-width: 0 !important;
  z-index: 2 !important;
}

body.portfolio-page .portfolio-hero-copy { grid-area: copy !important; }

body.portfolio-page .portfolio-hero-aside {
  grid-area: aside !important;
  max-width: 25rem !important;
  align-self: center !important;
}

body.portfolio-page .portfolio-hero-stats {
  grid-area: stats !important;
  width: 100% !important;
  max-width: 16.5rem !important;
  margin: 0 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  border: 1px solid var(--line) !important;
  background: color-mix(in srgb, var(--paper) 92%, white 8%) !important;
}

body.portfolio-page .portfolio-hero-shell .eyebrow {
  display: inline-flex !important;
  width: fit-content !important;
  margin: 0 0 0.8rem !important;
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  white-space: normal !important;
}

body.portfolio-page .portfolio-hero-shell .h-display {
  max-width: 8.9ch !important;
  margin: 0 !important;
  font-size: clamp(3.2rem, 5.05vw, 5.85rem) !important;
  line-height: 0.94 !important;
  letter-spacing: 0 !important;
}

body.portfolio-page .portfolio-hero-lead {
  max-width: 24rem !important;
  margin: 0 0 1rem !important;
  font-size: clamp(0.98rem, 1vw, 1.08rem) !important;
  line-height: 1.48 !important;
}

body.portfolio-page .portfolio-hero-actions {
  display: grid !important;
  gap: 0.55rem !important;
}

body.portfolio-page .portfolio-hero-stats .hero-stat {
  min-height: 6.3rem !important;
  padding: 1rem !important;
  grid-template-columns: 1fr !important;
  border-right: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  align-content: center !important;
}

body.portfolio-page .portfolio-hero-stats .hero-stat:last-child {
  border-bottom: 0 !important;
}

body.portfolio-page .portfolio-hero-stats .bignum {
  font-size: clamp(2.35rem, 3vw, 3.1rem) !important;
  line-height: 0.88 !important;
}

body.portfolio-page .portfolio-hero-stats .hero-stat-lbl {
  font-size: 0.62rem !important;
  letter-spacing: 0.13em !important;
  line-height: 1.25 !important;
}

body.portfolio-page .pf-filter-bar {
  top: var(--nav-height, var(--nav-h, 76px)) !important;
  z-index: 50 !important;
  margin-top: 0 !important;
  box-shadow: 0 12px 28px rgba(28, 22, 16, 0.06) !important;
}

body.portfolio-page .pf-filter-shell {
  padding-block: 0.55rem !important;
}

body.portfolio-page .portfolio-work-section {
  padding-top: clamp(1.4rem, 2.6vw, 2.3rem) !important;
}

body.portfolio-page #workGrid.work-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(1rem, 1.7vw, 1.45rem) !important;
}

body.portfolio-page #workGrid > .work-card {
  overflow: hidden !important;
  border-radius: 8px !important;
  min-width: 0 !important;
  box-shadow: 0 18px 38px rgba(33, 27, 20, 0.07) !important;
}

body.portfolio-page .work-card-img,
body.portfolio-page .work-card-designed {
  aspect-ratio: 16 / 9 !important;
  max-height: 330px !important;
  min-height: 0 !important;
}

body.portfolio-page .work-card-img img {
  image-rendering: auto !important;
  object-fit: cover !important;
  object-position: top center !important;
}

body.portfolio-page .work-card-body {
  padding: clamp(0.95rem, 1.25vw, 1.2rem) !important;
}

body.portfolio-page .work-card-name {
  font-size: clamp(1.35rem, 1.6vw, 1.9rem) !important;
  max-width: 18ch !important;
  line-height: 1.04 !important;
}

body.portfolio-page .work-card-tag {
  font-size: 0.92rem !important;
  max-width: 36ch !important;
}

body.portfolio-page .work-card-designed {
  color: var(--ink) !important;
  background:
    radial-gradient(circle at 14% 14%, rgba(180, 65, 42, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(221, 192, 150, 0.36)),
    repeating-linear-gradient(0deg, rgba(35, 27, 19, 0.052) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, rgba(35, 27, 19, 0.048) 0 1px, transparent 1px 26px) !important;
}

body.portfolio-page .work-card-designed-name {
  font-size: clamp(1.9rem, 2.7vw, 3rem) !important;
  max-width: 12ch !important;
}

body.portfolio-page .work-card-designed-kicker,
body.portfolio-page .work-card-designed-meta {
  color: rgba(35, 29, 22, 0.72) !important;
}

@media (max-width: 1180px) {
  body.portfolio-page .portfolio-hero-shell {
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 0.36fr) !important;
    grid-template-areas: "copy stats" "aside aside" !important;
    align-items: end !important;
  }

  body.portfolio-page .portfolio-hero-stats {
    max-width: 18rem !important;
  }

  body.portfolio-page #workGrid.work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  body.portfolio-page .portfolio-archive-hero {
    padding-top: 1.3rem !important;
  }

  body.portfolio-page .portfolio-hero-shell {
    grid-template-columns: 1fr !important;
    grid-template-areas: "copy" "aside" "stats" !important;
    gap: 1rem !important;
    max-width: 100% !important;
  }

  body.portfolio-page .portfolio-hero-shell .h-display {
    max-width: 8.4ch !important;
    font-size: clamp(2.55rem, 11vw, 3.55rem) !important;
    line-height: 0.96 !important;
  }

  body.portfolio-page .portfolio-hero-aside,
  body.portfolio-page .portfolio-hero-lead {
    max-width: none !important;
  }

  body.portfolio-page .portfolio-hero-stats {
    max-width: none !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.portfolio-page .portfolio-hero-stats .hero-stat {
    min-height: 5rem !important;
    border-bottom: 0 !important;
    border-right: 1px solid var(--line) !important;
    padding: 0.75rem !important;
  }

  body.portfolio-page .portfolio-hero-stats .hero-stat:last-child {
    border-right: 0 !important;
  }

  body.portfolio-page .portfolio-hero-stats .bignum {
    font-size: clamp(1.8rem, 8vw, 2.35rem) !important;
  }

  body.portfolio-page #workGrid.work-grid {
    grid-template-columns: 1fr !important;
  }

  body.portfolio-page .pf-filter-bar {
    top: var(--nav-height, var(--nav-h, 70px)) !important;
  }
}

@media (max-width: 420px) {
  body.portfolio-page .portfolio-hero-stats {
    grid-template-columns: 1fr !important;
  }

  body.portfolio-page .portfolio-hero-stats .hero-stat {
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    min-height: 4.6rem !important;
  }
}

/* 2026-08-22 final portfolio archive QA lock. */
body.portfolio-page .portfolio-archive-hero {
  min-height: 0 !important;
  padding: clamp(1.35rem, 2.4vw, 2.7rem) 0 clamp(0.8rem, 1.4vw, 1.25rem) !important;
  overflow: hidden !important;
}

body.portfolio-page .portfolio-archive-hero > .container {
  width: 100% !important;
  max-width: none !important;
  padding-inline: clamp(1rem, 3vw, 2.2rem) !important;
}

body.portfolio-page .portfolio-hero-shell {
  display: grid !important;
  width: min(1500px, 100%) !important;
  margin: 0 auto !important;
  grid-template-columns: minmax(0, 0.42fr) minmax(17rem, 0.34fr) minmax(12.5rem, 0.24fr) !important;
  grid-template-areas: "copy aside stats" !important;
  gap: clamp(1rem, 2vw, 2.1rem) !important;
  align-items: end !important;
  min-height: 0 !important;
}

body.portfolio-page .portfolio-hero-copy {
  grid-area: copy !important;
  min-width: 0 !important;
}

body.portfolio-page .portfolio-hero-aside {
  grid-area: aside !important;
  min-width: 0 !important;
  align-self: end !important;
  max-width: 24rem !important;
}

body.portfolio-page .portfolio-hero-stats {
  grid-area: stats !important;
  align-self: stretch !important;
  max-width: 14.5rem !important;
  min-width: 0 !important;
}

body.portfolio-page .portfolio-hero-shell .h-display {
  font-size: clamp(2.55rem, 3.55vw, 4.25rem) !important;
  line-height: 1 !important;
  max-width: 9.2ch !important;
  letter-spacing: -0.01em !important;
  margin: 0 !important;
  text-wrap: balance;
}

body.portfolio-page .portfolio-hero-shell .eyebrow {
  position: relative !important;
  display: inline-flex !important;
  width: fit-content !important;
  margin: 0 0 0.7rem !important;
  inset: auto !important;
  transform: none !important;
  white-space: normal !important;
}

body.portfolio-page .portfolio-hero-lead {
  font-size: clamp(0.96rem, 0.95vw, 1.08rem) !important;
  line-height: 1.48 !important;
  max-width: 24rem !important;
  margin: 0 0 1.1rem !important;
}

body.portfolio-page .portfolio-hero-actions {
  display: grid !important;
  gap: 0.55rem !important;
}

body.portfolio-page .portfolio-hero-actions a {
  min-height: 2.4rem !important;
  display: inline-flex !important;
  align-items: center !important;
}

body.portfolio-page .portfolio-hero-stats .hero-stat {
  min-height: 4.85rem !important;
  padding: 0.72rem 0.85rem !important;
}

body.portfolio-page .portfolio-hero-stats .bignum {
  font-size: clamp(1.75rem, 2.15vw, 2.55rem) !important;
  line-height: 1 !important;
}

body.portfolio-page .portfolio-hero-stats .hero-stat-lbl {
  font-size: 0.66rem !important;
  line-height: 1.15 !important;
  letter-spacing: 0.11em !important;
}

body.portfolio-page .pf-filter-bar {
  top: var(--nav-height, var(--nav-h, 76px)) !important;
  z-index: 90 !important;
  margin-top: 0 !important;
  background: color-mix(in srgb, var(--paper, #f4f0e9) 96%, white 4%) !important;
  border-top: 1px solid var(--line, #d7cec2) !important;
  border-bottom: 1px solid var(--line, #d7cec2) !important;
  box-shadow: 0 12px 28px rgba(28, 22, 16, 0.06) !important;
  backdrop-filter: blur(16px) !important;
}

body.portfolio-page #workGrid > .work-card:has(a[href="/portfolio/americangulf.html"]) { order: -240; }
body.portfolio-page #workGrid > .work-card:has(a[href="/portfolio/americanreinsurance.html"]) { order: -230; }
body.portfolio-page #workGrid > .work-card:has(a[href="/portfolio/coap-online.html"]) { order: -220; }
body.portfolio-page #workGrid > .work-card:has(a[href="/portfolio/coach-carolin.html"]) { order: -210; }
body.portfolio-page #workGrid > .work-card:has(a[href="/portfolio/discova.html"]) { order: -200; }
body.portfolio-page #workGrid > .work-card:has(a[href="/portfolio/saludcap.html"]) { order: -190; }
body.portfolio-page #workGrid > .work-card:has(a[href="/portfolio/joshifresco.html"]) { order: -180; }
body.portfolio-page #workGrid > .work-card:has(a[href="/portfolio/jamaicancoffeeclub.html"]) { order: -170; }
body.portfolio-page #workGrid > .work-card:has(a[href="/portfolio/mercanto.html"]) { order: -160; }

body.portfolio-page #workGrid {
  align-items: start !important;
}

body.portfolio-page #workGrid > .work-card {
  display: grid !important;
  grid-template-rows: auto 1fr !important;
}

body.portfolio-page .work-card-img,
body.portfolio-page .work-card-designed {
  aspect-ratio: 16 / 10 !important;
  max-height: 285px !important;
}

body.portfolio-page .work-card-body {
  min-height: 10.25rem !important;
  padding: clamp(1rem, 1.4vw, 1.35rem) !important;
}

body.portfolio-page .work-card-name {
  font-size: clamp(1.55rem, 1.8vw, 2.1rem) !important;
  line-height: 1.04 !important;
}

body.portfolio-page .work-card-tag {
  font-size: clamp(0.93rem, 0.9vw, 1rem) !important;
  line-height: 1.45 !important;
}

body.portfolio-page .work-card-designed {
  min-height: 230px !important;
  display: grid !important;
  place-items: center !important;
}

body.portfolio-page .work-card-designed-name {
  font-size: clamp(1.8rem, 2.5vw, 3rem) !important;
  max-width: 11ch !important;
  line-height: 0.98 !important;
}

body.portfolio-page .work-card-live--archived {
  opacity: 0.66 !important;
  pointer-events: none !important;
  text-decoration: none !important;
}

@media (max-width: 1120px) {
  body.portfolio-page .portfolio-hero-shell {
    grid-template-columns: minmax(0, 1fr) minmax(13rem, 0.34fr) !important;
    grid-template-areas: "copy stats" "aside aside" !important;
  }

  body.portfolio-page .portfolio-hero-stats {
    max-width: 18rem !important;
  }
}

@media (max-width: 760px) {
  body.portfolio-page .portfolio-archive-hero {
    padding-top: 1.1rem !important;
  }

  body.portfolio-page .portfolio-hero-shell {
    grid-template-columns: 1fr !important;
    grid-template-areas: "copy" "aside" "stats" !important;
    gap: 1rem !important;
  }

  body.portfolio-page .portfolio-hero-shell .h-display {
    font-size: clamp(2.25rem, 10vw, 3.05rem) !important;
    line-height: 1.02 !important;
    max-width: 10ch !important;
  }

  body.portfolio-page .portfolio-hero-aside,
  body.portfolio-page .portfolio-hero-lead {
    max-width: none !important;
  }

  body.portfolio-page .portfolio-hero-stats {
    max-width: none !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.portfolio-page .portfolio-hero-stats .hero-stat {
    min-height: 4.4rem !important;
    padding: 0.65rem !important;
  }

  body.portfolio-page .pf-filter-bar {
    top: var(--nav-height, var(--nav-h, 72px)) !important;
    overflow-x: auto !important;
    padding: 0.55rem var(--gutter, 1rem) !important;
  }

  body.portfolio-page .filter-row {
    flex-wrap: nowrap !important;
    min-width: max-content !important;
  }
}

@media (max-width: 420px) {
  body.portfolio-page .portfolio-hero-stats {
    grid-template-columns: 1fr !important;
  }
}

/* 2026-08-29 portfolio archive repair: compact proof-led hero and true pagination. */
body.portfolio-page #workGrid > .work-card[hidden] {
  display: none !important;
}

body.portfolio-page .portfolio-archive-hero,
body.portfolio-page section.paper.portfolio-archive-hero:first-of-type {
  padding: clamp(1.65rem, 2.7vw, 2.75rem) 0 clamp(1.45rem, 2.4vw, 2.35rem) !important;
  background:
    radial-gradient(circle at 82% 12%, rgba(98, 78, 222, 0.15), transparent 34%),
    radial-gradient(circle at 66% 88%, rgba(23, 212, 195, 0.18), transparent 38%),
    #fff !important;
}

body.portfolio-page .portfolio-archive-hero::after {
  display: none !important;
}

body.portfolio-page .portfolio-hero-shell {
  width: min(1280px, 100%) !important;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1.18fr) !important;
  grid-template-areas:
    "copy feature"
    "aside feature"
    "stats feature" !important;
  grid-template-rows: auto auto auto !important;
  gap: clamp(1rem, 2vw, 1.65rem) clamp(2rem, 4vw, 4.5rem) !important;
  align-items: start !important;
}

body.portfolio-page .portfolio-hero-copy {
  align-self: end !important;
}

body.portfolio-page .portfolio-hero-shell .h-display,
body.portfolio-page section.paper.portfolio-archive-hero:first-of-type .h-display {
  max-width: 10.6ch !important;
  font-size: clamp(2.85rem, 4.5vw, 4.65rem) !important;
  line-height: 0.98 !important;
  letter-spacing: -0.035em !important;
}

body.portfolio-page .portfolio-hero-aside {
  max-width: 35rem !important;
  align-self: start !important;
}

body.portfolio-page .portfolio-hero-lead {
  max-width: 54ch !important;
  margin-bottom: 0.8rem !important;
  font-size: clamp(0.9rem, 1vw, 1rem) !important;
  line-height: 1.6 !important;
}

body.portfolio-page .portfolio-hero-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.7rem 1.2rem !important;
}

body.portfolio-page .portfolio-hero-actions a {
  min-height: 2.75rem !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: var(--rb-violet, #624ede) !important;
  text-underline-offset: 0.25rem !important;
}

body.portfolio-page .portfolio-hero-stats {
  width: 100% !important;
  max-width: 35rem !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-self: end !important;
  border-top: 1px solid var(--rb-line, #e3e8f2) !important;
}

body.portfolio-page .portfolio-hero-stats .hero-stat {
  min-height: 4.25rem !important;
  padding: 0.75rem 0.85rem 0.25rem 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body.portfolio-page .portfolio-hero-stats .bignum {
  font-size: clamp(1.5rem, 2.1vw, 2rem) !important;
  color: var(--rb-ink, #202a4a) !important;
}

body.portfolio-page .portfolio-hero-stats .hero-stat-lbl {
  font-size: 0.59rem !important;
  letter-spacing: 0.09em !important;
  color: var(--rb-muted, #65708a) !important;
}

body.portfolio-page .portfolio-hero-feature {
  grid-area: feature !important;
  min-width: 0 !important;
  align-self: stretch !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  overflow: hidden !important;
  border-radius: 16px !important;
  background: #fff !important;
  color: var(--rb-ink, #202a4a) !important;
  text-decoration: none !important;
  box-shadow: 0 22px 58px rgba(48, 59, 100, 0.16) !important;
  transition: transform 280ms cubic-bezier(.16, 1, .3, 1), box-shadow 280ms cubic-bezier(.16, 1, .3, 1) !important;
}

body.portfolio-page .portfolio-hero-feature:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 28px 68px rgba(48, 59, 100, 0.2) !important;
}

body.portfolio-page .portfolio-hero-feature:focus-visible {
  outline: 3px solid rgba(98, 78, 222, 0.58) !important;
  outline-offset: 5px !important;
}

body.portfolio-page .portfolio-hero-feature__frame {
  position: relative !important;
  min-height: 0 !important;
  overflow: hidden !important;
  aspect-ratio: 16 / 9.35 !important;
  background: #eef3f9 !important;
}

body.portfolio-page .portfolio-hero-feature__frame img {
  position: absolute !important;
  inset: 30px 0 0 !important;
  width: 100% !important;
  height: calc(100% - 30px) !important;
  object-fit: cover !important;
  object-position: top center !important;
  transition: transform 560ms cubic-bezier(.16, 1, .3, 1) !important;
}

body.portfolio-page .portfolio-hero-feature:hover img {
  transform: scale(1.025) !important;
}

body.portfolio-page .portfolio-hero-feature__chrome {
  position: absolute !important;
  z-index: 2 !important;
  inset: 0 0 auto !important;
  height: 30px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 0 12px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid var(--rb-line, #e3e8f2) !important;
}

body.portfolio-page .portfolio-hero-feature__chrome i {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: rgba(80, 92, 124, 0.22) !important;
}

body.portfolio-page .portfolio-hero-feature__chrome i:first-child {
  background: var(--rb-violet, #624ede) !important;
}

body.portfolio-page .portfolio-hero-feature__chrome i:last-child {
  background: var(--rb-aqua, #17d4c3) !important;
}

body.portfolio-page .portfolio-hero-feature__caption {
  min-height: 69px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1.25rem !important;
  padding: 0.85rem 1rem !important;
}

body.portfolio-page .portfolio-hero-feature__caption > span:first-child {
  display: grid !important;
  gap: 0.1rem !important;
}

body.portfolio-page .portfolio-hero-feature__caption small {
  color: var(--rb-muted, #65708a) !important;
  font-size: 0.62rem !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

body.portfolio-page .portfolio-hero-feature__caption strong {
  font-size: 0.96rem !important;
  line-height: 1.2 !important;
}

body.portfolio-page .portfolio-hero-feature__caption > span:last-child {
  color: var(--rb-muted, #65708a) !important;
  font-size: 0.7rem !important;
  white-space: nowrap !important;
}

body.portfolio-page .portfolio-hero-feature__caption b {
  margin-left: 0.45rem !important;
  color: var(--rb-aqua-dark, #087e79) !important;
  font-size: 1rem !important;
}

body.portfolio-page #all-work {
  padding-top: clamp(1.5rem, 2.5vw, 2.5rem) !important;
}

body.portfolio-page #pagination {
  margin-top: clamp(2.5rem, 4vw, 4rem) !important;
}

@media (max-width: 820px) {
  body.portfolio-page .portfolio-hero-shell {
    grid-template-columns: 1fr !important;
    grid-template-areas: "copy" "feature" "aside" "stats" !important;
    gap: 1.15rem !important;
  }

  body.portfolio-page .portfolio-hero-shell .h-display,
  body.portfolio-page section.paper.portfolio-archive-hero:first-of-type .h-display {
    max-width: 11ch !important;
    font-size: clamp(2.7rem, 9.5vw, 4.3rem) !important;
  }

  body.portfolio-page .portfolio-hero-feature {
    width: 100% !important;
  }

  body.portfolio-page .portfolio-hero-aside,
  body.portfolio-page .portfolio-hero-stats,
  body.portfolio-page .portfolio-hero-lead {
    max-width: none !important;
  }
}

@media (max-width: 600px) {
  body.portfolio-page .portfolio-archive-hero,
  body.portfolio-page section.paper.portfolio-archive-hero:first-of-type {
    padding: 1.25rem 0 1.4rem !important;
  }

  body.portfolio-page .portfolio-archive-hero > .container {
    padding-inline: 1.1rem !important;
  }

  body.portfolio-page .portfolio-hero-feature__caption {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 0.35rem !important;
  }

  body.portfolio-page .portfolio-hero-feature__caption > span:last-child {
    white-space: normal !important;
  }

  body.portfolio-page .portfolio-hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.portfolio-page .portfolio-hero-stats .hero-stat {
    min-height: 4rem !important;
    padding-right: 0.35rem !important;
  }

  body.portfolio-page .portfolio-hero-stats .bignum {
    font-size: 1.35rem !important;
  }

  body.portfolio-page .pf-filter-bar {
    padding: 0.45rem 0 !important;
  }

  body.portfolio-page .pf-filter-row {
    min-width: max-content !important;
    flex-wrap: nowrap !important;
  }
}
