/* Menace Portfolio v55.1
   Rebuilt as a standalone, Safari-safe portfolio module.
   v55.1 locks all portfolio tiles to identical dimensions per breakpoint. */

.portfolio-page {
  min-height: 100vh;
  color: var(--paper);
  background:
    radial-gradient(circle at 16% -4%, rgba(200,136,42,.16), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(238,233,223,.07), transparent 26%),
    linear-gradient(180deg, #07110d 0%, #08110d 28%, #050807 100%);}

.portfolio-page,
.portfolio-page * {
  box-sizing: border-box;}

.portfolio-page button,
.portfolio-page a {
  -webkit-tap-highlight-color: transparent;}

.portfolio-page .wrap,
.portfolio-page .portfolio-hero-inner {
  width: min(1180px, calc(100% - 28px));
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;}

/* HERO */
.portfolio-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(92px, 12vw, 150px) 0 clamp(38px, 7vw, 86px);
  background:
    linear-gradient(90deg, rgba(238,233,223,.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(238,233,223,.026) 1px, transparent 1px),
    radial-gradient(circle at 78% 0%, rgba(200,136,42,.13), transparent 32%);
  background-size: 58px 58px, 58px 58px, auto;
  border-bottom: 1px solid rgba(236,230,216,.10);}

.portfolio-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5,8,7,.02), rgba(5,8,7,.42));
  opacity: 1;}

.portfolio-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  gap: clamp(24px, 5vw, 70px);
  align-items: flex-end;}

.portfolio-hero-copy {
  flex: 1 1 54%;
  min-width: 0;}

.portfolio-hero-copy h1 {
  margin: 12px 0 8px;
  font-family: var(--fd);
  font-size: clamp(86px, 16vw, 210px);
  line-height: .76;
  letter-spacing: -.035em;}

.portfolio-hero-copy p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.45;}

.portfolio-hero-copy .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;}

.portfolio-hero-card {
  flex: 0 0 40%;
  min-width: 320px;}

.portfolio-hero-feature {
  position: relative;
  overflow: hidden;
  min-height: clamp(360px, 44vw, 580px);
  color: var(--paper);
  background: #0b1711;
  border: 1px solid rgba(236,230,216,.16);
  box-shadow: 10px 10px 0 #000;}

.portfolio-hero-feature > img {
  display: block;
  width: 100%;
  height: clamp(360px, 44vw, 580px);
  object-fit: cover;}

.portfolio-hero-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4,8,6,0) 24%, rgba(4,8,6,.86));}

.portfolio-hero-feature-overlay {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 1;}

.portfolio-card-label,
.portfolio-hero-feature small,
.portfolio-hero-feature p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  line-height: 1.2;
  text-transform: uppercase;}

.portfolio-hero-feature strong {
  display: block;
  margin-top: 8px;
  font-family: var(--fd);
  font-size: clamp(48px, 6vw, 86px);
  line-height: .82;}

.portfolio-hero-feature > .portfolio-card-label,
.portfolio-hero-feature > strong,
.portfolio-hero-feature > small,
.portfolio-hero-feature > p,
.portfolio-hero-feature > .portfolio-card-line {
  position: relative;
  z-index: 1;
  display: block;
  margin: 22px;}

.portfolio-card-line {
  width: 72px;
  height: 3px;
  background: var(--gold);}

/* STRIP */
.portfolio-strip {
  overflow: hidden;
  min-height: 48px;
  color: #080c09;
  background: var(--gold);
  border-block: 1px solid #000;}

.portfolio-strip .marquee {
  display: flex;
  width: max-content;
  animation: menacePortfolioMarquee 24s linear infinite;}

.portfolio-strip .marquee span {
  flex: 0 0 auto;
  padding: 13px 0 10px;
  font-family: var(--fd);
  font-size: clamp(28px, 4vw, 54px);
  line-height: .75;
  letter-spacing: .03em;
  white-space: nowrap;}

@keyframes menacePortfolioMarquee {
  from { transform: translate3d(0,0,0); }
  to { transform: translate3d(-50%,0,0); }
}

/* FILTERS */
.portfolio-filter-row {
  position: sticky;
  top: var(--nav-height, 74px);
  z-index: 20;
  padding: 12px 0;
  background: rgba(7,17,13,.96);
  border-top: 1px solid rgba(200,136,42,.10);
  border-bottom: 1px solid rgba(236,230,216,.12);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);}

.portfolio-filter-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;}

.portfolio-filter-row .wrap:not(.portfolio-filter-label) {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-top: 8px;
  padding-bottom: 4px;
  scrollbar-width: thin;}

.portfolio-chip {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 10px 14px 8px;
  color: var(--paper);
  background: rgba(236,230,216,.06);
  border: 1px solid rgba(236,230,216,.18);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;}

.portfolio-chip:hover,
.portfolio-chip.is-active,
.portfolio-chip[aria-pressed="true"] {
  color: #080c09;
  background: var(--gold);
  border-color: var(--gold);}

/* GALLERY */
.portfolio-gallery-section {
  padding: clamp(42px, 7vw, 86px) 0;
  background: linear-gradient(180deg, rgba(7,17,13,0), rgba(0,0,0,.22) 100%);}

.portfolio-section-head {
  display: flex;
  gap: clamp(16px, 4vw, 48px);
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;}

.portfolio-section-head .sec-title {
  margin-bottom: 0;}

.portfolio-section-head p {
  width: min(380px, 100%);
  margin: 0;
  color: var(--muted);
  line-height: 1.45;}

.portfolio-mosaic {
  display: block;
  width: 100%;
  margin: 0 -8px;
  padding: 0;
  font-size: 0;}

.portfolio-tile {
  display: inline-block;
  width: 25%;
  margin: 0;
  padding: 8px;
  vertical-align: top;
  font-size: 16px;
  opacity: 1;
  visibility: visible;}

.portfolio-tile.is-filtered-out {
  display: none;}

.portfolio-tile-button {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  height: 320px;
  min-height: 320px;
  margin: 0;
  padding: 0;
  color: inherit;
  background: #0d1b14;
  border: 1px solid rgba(236,230,216,.14);
  border-radius: 0;
  box-shadow: 0 0 0 #000;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  text-align: left;}


.portfolio-tile-button > img,
.portfolio-placeholder {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  opacity: 1;
  visibility: visible;}

.portfolio-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  background: linear-gradient(135deg, rgba(200,136,42,.18), rgba(236,230,216,.04));
  font-family: var(--fd);
  font-size: 44px;}

.portfolio-tile-button::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5,8,7,0) 34%, rgba(5,8,7,.9));}

.portfolio-tile-button:hover,
.portfolio-tile-button:focus-visible {
  border-color: rgba(200,136,42,.62);
  box-shadow: 8px 8px 0 #000;}

.portfolio-tile-button:hover > img,
.portfolio-tile-button:focus-visible > img {
  filter: contrast(1.06);}

.portfolio-tile-overlay {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  min-height: 0;
  padding: 12px 14px;
  color: var(--paper);
  background: rgba(6,14,10,.72);
  border: 1px solid rgba(236,230,216,.12);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);}

.portfolio-tile-overlay span,
.portfolio-tile-overlay small,
.portfolio-tile-overlay em {
  display: inline-flex;
  color: var(--paper);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
  line-height: 1;
  text-transform: uppercase;}

.portfolio-tile-overlay span {
  color: var(--gold);}

.portfolio-tile-overlay h3 {
  max-width: 100%;
  margin: 7px 0 4px;
  font-family: var(--fd);
  font-size: clamp(30px, 3vw, 48px);
  line-height: .82;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;}

.portfolio-tile-overlay small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;}

.portfolio-tile-overlay em {
  margin-top: 10px;
  padding: 7px 10px 5px;
  background: rgba(7,17,13,.5);
  border: 1px solid rgba(236,230,216,.24);
  font-style: normal;}

.portfolio-no-results {
  margin-top: 20px;
  padding: 28px;
  color: var(--paper);
  background: rgba(236,230,216,.06);
  border: 1px solid rgba(236,230,216,.14);}

.portfolio-no-results h3 {
  margin: 0 0 8px;
  font-family: var(--fd);
  font-size: clamp(42px, 6vw, 72px);
  line-height: .85;}

.portfolio-empty {
  display: block;
  padding: clamp(28px, 5vw, 56px);
  color: var(--paper);
  background: rgba(236,230,216,.055);
  border: 1px solid rgba(200,136,42,.22);
  box-shadow: 8px 8px 0 #000;
  font-size: 16px;}

.portfolio-empty h2 {
  margin: 10px 0 8px;
  font-family: var(--fd);
  font-size: clamp(48px, 7vw, 92px);
  line-height: .82;}

.portfolio-empty p {
  max-width: 720px;
  color: var(--muted);}

/* BOOK + SEO */
.portfolio-book-panel {
  padding: 0 0 clamp(42px, 7vw, 84px);
  background: #050807;}

.portfolio-book-card,
.portfolio-seo-card {
  display: flex;
  gap: clamp(22px, 5vw, 54px);
  align-items: flex-end;
  justify-content: space-between;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid #000;
  box-shadow: 10px 10px 0 #000;}

.portfolio-book-card {
  color: #090908;
  background:
    radial-gradient(circle at 85% 12%, rgba(255,255,255,.34), transparent 24%),
    linear-gradient(135deg, var(--gold), #e1bb77);}

.portfolio-book-card .sec-kicker,
.portfolio-book-card p {
  color: #1b201a;}

.portfolio-book-card h2,
.portfolio-seo-card h2 {
  margin: 12px 0 10px;
  font-family: var(--fd);
  line-height: .78;}

.portfolio-book-card h2 {
  max-width: 760px;
  font-size: clamp(58px, 9vw, 128px);}

.portfolio-book-card p {
  max-width: 620px;
  margin: 0;
  font-weight: 700;
  line-height: 1.5;}

.portfolio-book-card .btn {
  color: var(--paper);
  background: #07110d;
  border-color: #07110d;
  white-space: nowrap;}

.portfolio-seo-section {
  padding: 0 0 clamp(52px, 8vw, 96px);
  background: #050807;}

.portfolio-seo-card {
  align-items: center;
  color: var(--paper);
  background: linear-gradient(135deg, rgba(236,230,216,.065), rgba(236,230,216,.025));
  border-color: rgba(236,230,216,.13);}

.portfolio-seo-card > div {
  flex: 1 1 auto;}

.portfolio-seo-card h2 {
  max-width: 620px;
  font-size: clamp(54px, 8vw, 112px);}

.portfolio-seo-card p {
  width: min(420px, 100%);
  margin: 0;
  color: var(--muted);
  line-height: 1.55;}

/* MODAL */
.portfolio-modal[hidden] {
  display: none;}

.portfolio-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;}

.portfolio-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2,4,3,.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);}

.portfolio-modal-panel {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(1080px, 100%);
  max-height: 90vh;
  overflow: auto;
  color: var(--paper);
  background: #07110d;
  border: 1px solid rgba(236,230,216,.18);
  box-shadow: 12px 12px 0 #000;}

.portfolio-modal-image {
  flex: 1 1 55%;
  min-height: min(70vh, 680px);
  background: #111;}

.portfolio-modal-image > img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;}

.portfolio-modal-copy {
  flex: 1 1 45%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  min-width: 280px;
  padding: clamp(24px, 5vw, 52px);}

.portfolio-modal-copy span,
.portfolio-modal-copy small {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;}

.portfolio-modal-copy h2 {
  margin: 0;
  font-family: var(--fd);
  font-size: clamp(54px, 8vw, 116px);
  line-height: .78;}

.portfolio-modal-copy p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;}

.portfolio-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 44px;
  height: 44px;
  color: #080c09;
  background: var(--gold);
  border: 1px solid #000;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;}

.portfolio-modal-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 58px;
  transform: translateY(-50%);
  color: #080c09;
  background: var(--gold);
  border: 1px solid #000;
  cursor: pointer;
  font-size: 42px;
  font-weight: 900;
  line-height: .8;}

.portfolio-modal-nav[hidden] {
  display: none;}

.portfolio-modal-prev {
  left: 12px;}

.portfolio-modal-next {
  right: 12px;}

body.has-portfolio-modal,
html.has-portfolio-modal {
  overflow: hidden;}

.portfolio-chip:focus-visible,
.portfolio-tile-button:focus-visible,
.portfolio-modal-close:focus-visible,
.portfolio-modal-nav:focus-visible,
.portfolio-modal-copy .btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;}

@media (max-width: 980px) {
  .portfolio-hero-inner,
  .portfolio-section-head,
  .portfolio-book-card,
  .portfolio-seo-card,
  .portfolio-modal-panel {
    display: block;
  }

  .portfolio-hero-card {
    min-width: 0;
    margin-top: 28px;
  }

  .portfolio-section-head p {
    margin-top: 12px;
  }

  .portfolio-tile {
    width: 33.333333%;
  }

  .portfolio-book-card .btn,
  .portfolio-seo-card .btn {
    margin-top: 20px;
  }
}

@media (max-width: 700px) {
  .portfolio-page .wrap,
  .portfolio-page .portfolio-hero-inner {
    width: min(100% - 20px, 1180px);
  }

  .portfolio-filter-row {
    top: var(--nav-height, 62px);
  }

  .portfolio-filter-label {
    display: block;
  }

  .portfolio-filter-label small {
    display: none;
  }

  .portfolio-mosaic {
    margin: 0 -5px;
  }

  .portfolio-tile {
    width: 50%;
    padding: 5px;
  }

  .portfolio-tile-button {
    height: 220px;
    min-height: 220px;
  }

  .portfolio-tile-overlay {
    left: 8px;
    right: auto;
    bottom: 8px;
    width: auto;
    max-width: calc(100% - 16px);
    min-height: 0;
    padding: 8px 9px 7px;
    background: rgba(6,14,10,.78);
  }

  .portfolio-tile-overlay span,
  .portfolio-tile-overlay small {
    font-size: 9px;
    letter-spacing: .1em;
  }

  .portfolio-tile-overlay h3 {
    margin: 4px 0 2px;
    font-size: 24px;
    line-height: .86;
    -webkit-line-clamp: 1;
  }

  .portfolio-tile-overlay em {
    display: none;
  }

  .portfolio-hero-feature,
  .portfolio-hero-feature > img {
    min-height: 340px;
    height: 340px;
  }

  .portfolio-strip {
    min-height: 38px;
  }

  .portfolio-strip .marquee span {
    padding: 10px 0 8px;
    font-size: 32px;
  }

  .portfolio-modal {
    align-items: flex-start;
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
    overflow: auto;
  }

  .portfolio-modal-panel {
    width: 100%;
    max-height: none;
    overflow: visible;
    box-shadow: 7px 7px 0 #000;
  }

  .portfolio-modal-close {
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    z-index: 10002;
    width: 46px;
    height: 46px;
  }

  .portfolio-modal-nav {
    position: fixed;
    top: 50%;
    z-index: 10001;
    width: 42px;
    height: 54px;
    font-size: 38px;
  }

  .portfolio-modal-prev {
    left: max(8px, env(safe-area-inset-left));
  }

  .portfolio-modal-next {
    right: max(8px, env(safe-area-inset-right));
  }

  .portfolio-modal-image {
    min-height: 330px;
  }

  .portfolio-modal-copy h2 {
    font-size: clamp(38px, 14vw, 62px);
  }
}

@media (max-width: 420px) {
  .portfolio-tile {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-strip .marquee {
    animation: none;
  }
}

/* Portfolio modal socials */
.portfolio-modal-socials,
.portfolio-modal-copy .portfolio-modal-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -2px;}
.portfolio-modal-socials[hidden] { display: none; }
.portfolio-modal-socials a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 9px 11px 8px;
  color: var(--paper);
  border: 1px solid rgba(238,233,223,.18);
  background: rgba(238,233,223,.055);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
  line-height: 1;
  text-transform: uppercase;}
.portfolio-modal-socials a:hover,
.portfolio-modal-socials a:focus-visible {
  color: var(--gold);
  border-color: rgba(200,136,42,.5);}
