/* Portfolio footer standard R02. All seven project pages use the same geometry.
   Keeps each project's existing background / final image untouched. */
.portfolio-unified-footer {
  --uf-height: 128px;
  --uf-bottom: 38px;
  --uf-edge: clamp(24px, 6.85vw, 110px);
  position: relative !important;
  box-sizing: border-box !important;
  display: block !important;
  height: var(--uf-height) !important;
  min-height: var(--uf-height) !important;
  padding: 0 !important;
  border-top-width: 1px !important;
  border-top-style: solid !important;
  border-bottom: 0 !important;
  /* Background and text colors remain inherited from the individual project. */
}
.portfolio-unified-footer .uf-row {
  box-sizing: border-box !important;
  position: absolute !important;
  left: var(--uf-edge) !important;
  right: var(--uf-edge) !important;
  bottom: var(--uf-bottom) !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-direction: row !important;
  direction: ltr !important;
  gap: 20px !important;
}
.portfolio-unified-footer .uf-title,
.portfolio-unified-footer .uf-next {
  display: inline-flex !important;
  position: static !important;
  inset: auto !important;
  align-items: center !important;
  justify-content: flex-start !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
  font-style: normal !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  line-height: 1.2 !important;
  direction: ltr !important;
  color: inherit !important;
  cursor: pointer;
}
.portfolio-unified-footer .uf-title {
  flex: 0 1 auto !important;
  max-width: 56% !important;
  text-align: left !important;
  font-family: 'Instrument Serif', Georgia, serif !important;
  font-size: 24.5px !important;
}
.portfolio-unified-footer .uf-next {
  flex: 0 0 auto !important;
  margin-left: auto !important;
  gap: 10px !important;
  text-align: right !important;
  white-space: nowrap !important;
  font-family: 'IBM Plex Sans', Arial, sans-serif !important;
  font-size: 20px !important;
}
.portfolio-unified-footer .uf-arrow {
  display: inline-block !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
  font: 400 28px/1 Arial, sans-serif !important;
  color: var(--uf-arrow-color, currentColor) !important;
  transform: none;
  transition: transform .2s ease;
  text-shadow: none;
}
.portfolio-unified-footer .uf-title:hover,
.portfolio-unified-footer .uf-next:hover {opacity: .72;}
.portfolio-unified-footer .uf-next:hover .uf-arrow {transform:translate(2px,-2px);}
.portfolio-unified-footer .uf-title:focus-visible,
.portfolio-unified-footer .uf-next:focus-visible {outline:1px solid currentColor;outline-offset:6px;}

/* The language control in each project updates html[lang], except Light Shelter
   which updates body[data-site-lang]. These rules cover both mechanisms. */
.portfolio-unified-footer .uf-title-en,
.portfolio-unified-footer .uf-next-en {display:inline !important;}
.portfolio-unified-footer .uf-title-he,
.portfolio-unified-footer .uf-next-he {display:none !important;}
html[lang="he"] .portfolio-unified-footer .uf-title-en,
html[lang="he"] .portfolio-unified-footer .uf-next-en,
body[data-site-lang="he"] .portfolio-unified-footer .uf-title-en,
body[data-site-lang="he"] .portfolio-unified-footer .uf-next-en {display:none !important;}
html[lang="he"] .portfolio-unified-footer .uf-title-he,
html[lang="he"] .portfolio-unified-footer .uf-next-he,
body[data-site-lang="he"] .portfolio-unified-footer .uf-title-he,
body[data-site-lang="he"] .portfolio-unified-footer .uf-next-he {display:inline !important;}
html[lang="he"] .portfolio-unified-footer .uf-title,
body[data-site-lang="he"] .portfolio-unified-footer .uf-title {
  font-family: 'Bona Nova', Georgia, serif !important;
}
/* Explicit typefaces on the language spans. Some pages (notably Florentin)
   set [lang] font-family on descendants, which otherwise overrides inherited serif. */
.portfolio-unified-footer .uf-title-en {
  font-family: 'Instrument Serif', Georgia, serif !important;
}
.portfolio-unified-footer .uf-title-he {
  font-family: 'Bona Nova', 'Noto Serif Hebrew', Georgia, serif !important;
}
/* Florentin: use the exact main-title font variables defined by that page. */
.next-project.portfolio-unified-footer .uf-title-en {
  font-family: var(--font-title-en) !important;
}
.next-project.portfolio-unified-footer .uf-title-he {
  font-family: var(--font-title-he) !important;
}
/* Staten Island's title has no Hebrew version; keep its English serif in both UI languages. */
.portfolio-footer.portfolio-unified-footer .uf-title-he,
html[lang="he"] .portfolio-footer.portfolio-unified-footer .uf-title,
body[data-site-lang="he"] .portfolio-footer.portfolio-unified-footer .uf-title {
  font-family: 'Instrument Serif', Georgia, serif !important;
}
html[lang="he"] .portfolio-unified-footer .uf-next,
body[data-site-lang="he"] .portfolio-unified-footer .uf-next {
  font-family: 'IBM Plex Sans Hebrew', Arial, sans-serif !important;
}

/* The final image in Window to Samaria is not repositioned or modified.
   Its existing divider is replaced with the same 1px rule within the overlay. */
.close-image::after {display:none !important;}
.close-image .uf-row {
  text-shadow: 0 1px 12px rgba(255,255,255,.35);
}
.close-image .portfolio-unified-footer.uf-on-image {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  background: transparent !important;
  color: #171714 !important;
  border-top-color: rgba(23,23,20,.22) !important;
  z-index: 2;
}
/* Preserve intentional project-specific treatments of the line and arrows. */
.project-footer.portfolio-unified-footer {border-top-color:rgba(255,255,255,.67) !important;}
.next-project.portfolio-unified-footer {--uf-arrow-color:var(--wine,#6f2038);}
.footer.portfolio-unified-footer {border-top-color:#cdcdcd !important;}
.portfolio-footer.portfolio-unified-footer {border-top-color:#222 !important;}
.next-project-footer.portfolio-unified-footer {
  border-top-color:#b9b6b1 !important;
  --uf-arrow-color:var(--sand-dark, #987a57);
}

@media (max-width:680px) {
  .portfolio-unified-footer {
    --uf-bottom: 24px;
    --uf-edge: 22px;
    height: auto !important;
    min-height: 0 !important;
    padding: var(--uf-bottom) var(--uf-edge) !important;
  }
  .portfolio-unified-footer .uf-row {
    position: static !important;
    inset: auto !important;
    gap: 10px !important;
  }
  .portfolio-unified-footer .uf-title {font-size:18px !important;max-width:52% !important;}
  .portfolio-unified-footer .uf-next {font-size:16px !important;gap:7px !important;}
  .portfolio-unified-footer .uf-arrow {font-size:22px !important;}
}

/* Shared project navigation: hide the floating home link while a media viewer is open. */
body:has(.viewer.open, .lightbox.open, .lightbox[aria-hidden="false"], .making-lightbox:not([hidden]), .pz-overlay.pz-active) .portfolio-home-return {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: none !important;
}

/* R02 — smaller project home-return label on mobile only. */
@media (max-width: 640px) {
  .portfolio-home-return { font-size: 11px !important; }
}

/* R02.11 — discreet cover return, replaced by the floating name after the cover. */
.portfolio-cover-home {
  position: fixed; top: 23px; right: clamp(16px,2.25vw,36px); left:auto;
  z-index: 500; display: inline-flex; align-items:center; gap:6px;
  font-family: 'IBM Plex Sans',Arial,sans-serif !important;
  font-size: 12px; line-height:1.4; font-weight:400; letter-spacing:.065em;
  color:#171717; text-decoration:none; background:none; padding:4px 0;
  direction:ltr; white-space:nowrap; transition:opacity .2s ease,visibility .2s ease;
}
.portfolio-cover-home.cover-home-light {color:#fff;text-shadow:0 1px 6px rgba(0,0,0,.45);}
.portfolio-cover-home:hover {opacity:.72;}
.portfolio-cover-home:focus-visible {outline:1px solid currentColor;outline-offset:3px;}
body.portfolio-is-scrolled .portfolio-cover-home,
body.manifesto-reading .portfolio-cover-home,
body:has(.viewer.open, .lightbox.open, .lightbox[aria-hidden="false"], .making-lightbox:not([hidden]), .pz-overlay.pz-active, .manifesto-dialog.open) .portfolio-cover-home {
  opacity:0 !important;visibility:hidden !important;pointer-events:none !important;
}
@media(max-width:640px){.portfolio-cover-home{top:17px;right:16px;font-size:11px;}}
@media(prefers-reduced-motion:reduce){.portfolio-cover-home{transition:none;}}
