.projects-page { background: #eeeae1; }
.portfolio-header { position: fixed; }
.portfolio-header .main-nav .active { color: var(--lime); }

.portfolio-hero { min-height: 820px; padding: 155px 0 95px; overflow: hidden; background: var(--ink); color: white; }
.portfolio-hero-grid { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 70px; min-height: 570px; }
.portfolio-hero-copy { position: relative; z-index: 2; }
.portfolio-hero h1 { margin-bottom: 27px; font-size: clamp(50px, 6.2vw, 82px); line-height: 1.01; letter-spacing: -4.2px; }
.portfolio-hero h1 em { color: var(--lime); font-style: normal; }
.portfolio-hero-copy > p:not(.eyebrow) { max-width: 570px; margin: 0; color: rgba(255,255,255,.65); font-size: 17px; }
.portfolio-stats { display: flex; margin-top: 46px; border-top: 1px solid rgba(255,255,255,.15); border-bottom: 1px solid rgba(255,255,255,.15); }
.portfolio-stats div { min-width: 130px; padding: 20px 24px 20px 0; }
.portfolio-stats div + div { padding-left: 24px; border-left: 1px solid rgba(255,255,255,.15); }
.portfolio-stats strong { display: block; color: var(--lime); font: 700 25px "Manrope", sans-serif; }
.portfolio-stats span { display: block; max-width: 105px; color: rgba(255,255,255,.45); font-size: 10px; line-height: 1.3; text-transform: uppercase; letter-spacing: .7px; }
.journal-jump { display: inline-flex; align-items: center; gap: 12px; margin-top: 31px; font-size: 13px; font-weight: 700; }
.journal-jump span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; color: var(--lime); }

.portfolio-stack { position: relative; min-height: 590px; }
.stack-photo { position: absolute; margin: 0; padding: 10px 10px 18px; border: 1px solid #d4d0c5; background: #f7f4ed; color: var(--ink); box-shadow: 12px 15px 0 rgba(0,0,0,.24); }
.stack-photo img { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(.88) contrast(1.03); }
.stack-photo figcaption { display: flex; justify-content: space-between; align-items: center; padding: 12px 4px 0; font: 700 11px "Manrope", sans-serif; text-transform: uppercase; letter-spacing: 1px; }
.stack-photo figcaption span { color: #8c918e; }
.stack-main { width: min(470px, 82%); height: 440px; right: 8px; top: 10px; transform: rotate(2.2deg); }
.stack-secondary { width: 255px; height: 350px; left: 0; bottom: 0; transform: rotate(-4deg); }
.stack-stamp { position: absolute; right: 5px; bottom: 15px; width: 145px; height: 145px; display: flex; flex-direction: column; justify-content: center; align-items: center; border: 2px solid var(--lime); border-radius: 50%; color: var(--lime); text-align: center; transform: rotate(8deg); }
.stack-stamp span, .stack-stamp small { font-size: 8px; letter-spacing: 1.4px; text-transform: uppercase; }
.stack-stamp strong { margin: 5px 0; font: 800 21px/1 "Manrope", sans-serif; }

.journal-intro { padding: 115px 0 75px; background: #f9f7f1; scroll-margin-top: 68px; }
.journal-heading { display: grid; grid-template-columns: 1.3fr .7fr; gap: 90px; align-items: end; }
.journal-heading h2 { max-width: 760px; margin: 0; font-size: clamp(42px, 5vw, 67px); line-height: 1.06; letter-spacing: -3px; }
.journal-heading h2 em { color: var(--green); font-style: normal; }
.journal-heading > p { max-width: 390px; margin: 0 0 8px; color: var(--muted); }

.gallery-section { padding-bottom: 120px; background: #eeeae1; }
.filter-shell { position: sticky; top: 68px; z-index: 30; margin-bottom: 55px; border-top: 1px solid #d4cfc4; border-bottom: 1px solid #d4cfc4; background: rgba(238,234,225,.98); }
.filter-bar { min-height: 78px; display: flex; justify-content: space-between; align-items: center; gap: 25px; }
.filter-buttons { display: flex; align-items: center; gap: 7px; }
.filter-button { padding: 10px 13px; border: 1px solid transparent; background: transparent; color: #68716f; font-size: 12px; font-weight: 700; cursor: pointer; }
.filter-button span { margin-left: 4px; color: #9a9f9c; font-size: 9px; }
.filter-button:hover { color: var(--ink); }
.filter-button.active { border-color: var(--ink); background: var(--ink); color: white; }
.filter-button.active span { color: var(--lime); }
.visible-count { margin: 0; color: #848b87; font-size: 11px; white-space: nowrap; }
.visible-count strong { color: var(--ink); }

.gallery-grid { columns: 4 250px; column-gap: 23px; }
.gallery-card { --tilt: 0deg; width: 100%; display: inline-block; break-inside: avoid; margin: 0 0 27px; padding: 9px 9px 15px; border: 1px solid #d1cbc0; background: #fbf9f3; box-shadow: 5px 7px 0 rgba(30,36,39,.08); transform: rotate(var(--tilt)); transition: transform .22s ease, box-shadow .22s ease; }
.gallery-card:hover { z-index: 2; box-shadow: 8px 11px 0 rgba(30,36,39,.13); transform: rotate(0) translateY(-4px); }
.gallery-card[hidden] { display: none; }
.gallery-open { width: 100%; display: block; padding: 0; border: 0; background: #d7d8d3; cursor: zoom-in; }
.gallery-open img { width: 100%; height: auto; display: block; filter: saturate(.9) contrast(1.02); }
.gallery-caption { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; padding: 13px 3px 1px; }
.gallery-caption span { color: var(--green); font-size: 9px; font-weight: 700; letter-spacing: 1.25px; text-transform: uppercase; }
.gallery-caption strong { grid-column: 1; font: 700 12px "Manrope", sans-serif; }
.gallery-caption small { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: #9a9e9a; font: 700 10px "Manrope", sans-serif; }

.portfolio-cta { padding: 85px 0; background: var(--ink); color: white; }
.portfolio-cta-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 80px; align-items: center; }
.portfolio-cta h2 { margin: 0; font-size: clamp(37px, 4.5vw, 58px); line-height: 1.07; letter-spacing: -2.5px; }
.portfolio-cta-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 19px; }
.cta-whatsapp { display: inline-flex; gap: 8px; color: rgba(255,255,255,.7); font-size: 13px; font-weight: 700; }
.cta-whatsapp span { color: var(--lime); }

.lightbox[hidden] { display: none; }
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-columns: 80px minmax(0, 1fr) 80px; align-items: center; padding: 32px; background: rgba(8,13,16,.96); color: white; }
.lightbox-figure { height: calc(100vh - 64px); margin: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; }
.lightbox-image { max-width: 100%; max-height: 100%; align-self: center; object-fit: contain; }
.lightbox-figure figcaption { width: min(100%, 900px); display: grid; grid-template-columns: 1fr auto; gap: 2px 20px; padding-top: 17px; }
.lightbox-category { color: var(--lime); font-size: 9px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; }
.lightbox-title { grid-column: 1; font: 700 14px "Manrope", sans-serif; }
.lightbox-counter { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: rgba(255,255,255,.5); }
.lightbox-close, .lightbox-nav { border: 0; background: transparent; color: white; cursor: pointer; }
.lightbox-close { position: absolute; right: 28px; top: 19px; width: 44px; height: 44px; font-size: 32px; font-weight: 300; }
.lightbox-nav { width: 52px; height: 52px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; font-size: 21px; }
.lightbox-nav:hover { border-color: var(--lime); color: var(--lime); }
.portfolio-footer { border-top: 1px solid rgba(255,255,255,.05); }

@media (max-width: 1000px) {
  .portfolio-hero-grid { grid-template-columns: 1fr; }
  .portfolio-hero-copy { max-width: 730px; }
  .portfolio-stack { width: min(650px, 100%); margin: 0 auto; }
  .journal-heading { gap: 40px; }
  .gallery-grid { columns: 3 220px; }
}

@media (max-width: 760px) {
  .portfolio-header { position: fixed; }
  .portfolio-hero { min-height: auto; padding: 125px 0 75px; }
  .portfolio-hero-grid { gap: 52px; }
  .portfolio-hero h1 { font-size: clamp(45px, 13vw, 64px); letter-spacing: -3px; }
  .portfolio-stats div { min-width: 0; flex: 1; padding-right: 10px; }
  .portfolio-stats div + div { padding-left: 12px; }
  .portfolio-stats strong { font-size: 21px; }
  .portfolio-stack { min-height: 470px; }
  .stack-main { width: 78%; height: 360px; right: 0; }
  .stack-secondary { width: 45%; height: 285px; left: 0; bottom: 0; }
  .stack-stamp { width: 105px; height: 105px; right: 0; bottom: 5px; }
  .stack-stamp strong { font-size: 16px; }
  .journal-intro { padding: 80px 0 55px; }
  .journal-heading { grid-template-columns: 1fr; gap: 25px; }
  .journal-heading h2 { font-size: clamp(38px, 11vw, 52px); letter-spacing: -2.2px; }
  .filter-shell { top: 63px; overflow-x: auto; margin-bottom: 34px; }
  .filter-bar { width: max-content; min-width: 100%; padding-inline: 16px; }
  .filter-buttons { gap: 4px; }
  .visible-count { display: none; }
  .gallery-grid { columns: 2; column-gap: 12px; }
  .gallery-card { margin-bottom: 17px; padding: 6px 6px 11px; box-shadow: 3px 4px 0 rgba(30,36,39,.08); transform: none; }
  .gallery-caption { padding-top: 9px; }
  .gallery-caption strong { font-size: 10px; }
  .gallery-caption span { font-size: 7px; }
  .gallery-caption small { font-size: 8px; }
  .portfolio-cta-grid { grid-template-columns: 1fr; gap: 35px; }
  .lightbox { grid-template-columns: 45px minmax(0, 1fr) 45px; padding: 55px 8px 18px; }
  .lightbox-figure { height: calc(100vh - 74px); }
  .lightbox-nav { width: 38px; height: 38px; font-size: 17px; }
  .lightbox-close { right: 8px; top: 4px; }
}

@media (max-width: 420px) {
  .portfolio-stats span { font-size: 8px; }
  .portfolio-stack { min-height: 420px; }
  .stack-main { height: 325px; }
  .stack-secondary { width: 47%; height: 250px; }
  .stack-photo { padding: 6px 6px 12px; }
  .stack-photo figcaption { padding-top: 8px; font-size: 8px; }
  .gallery-grid { column-gap: 9px; }
  .gallery-card { margin-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-card { transition: none; }
}
