body.page-template-portfolio-page{
  --page-max: 1160px;
  --gap: clamp(16px,2.4vw,28px);
  background:#151515; color:#fff;
}
body.page-template-portfolio-page .site-main,
body.page-template-portfolio-page .site-content,
body.page-template-portfolio-page .content-area{
  padding:0 !important; margin:0 !important; background:transparent !important; border:0 !important;
}
body.page-template-portfolio-page .site-main > .ast-container,
body.page-template-portfolio-page .site-content > .ast-container{ padding:0 !important; margin:0 !important; background:transparent !important; border:0 !important; }
body.page-template-portfolio-page .ast-container:empty{ display:none !important; }
body.page-template-portfolio-page .entry-header,
body.page-template-portfolio-page .ast-breadcrumbs-wrapper,
body.page-template-portfolio-page .ast-archive-description,
body.page-template-portfolio-page .after-footer-widget-area{ display:none !important; }
body.page-template-portfolio-page .site-footer{ margin-top:0 !important; }
.folio-hero{
  position:relative; isolation:isolate;
  display:grid;               
  place-items:center;         
  min-height:58svh;
  padding:clamp(88px,12vh,160px) 16px clamp(56px,10vh,120px);
  background-image:var(--hero-bg);
  background-size:cover; background-position:center;
}
.folio-hero::before{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.66) 60%, rgba(0,0,0,.72) 100%);
  z-index:0;
}
.folio-hero__inner{ position:relative; z-index:1; max-width:var(--page-max); margin:0 auto; text-align:center; }
.folio-hero__title{
  margin:0 0 12px; font-weight:900; line-height:1.05; letter-spacing:.2px;
  font-size:clamp(32px,6vw,56px); color:#fff; text-shadow:0 6px 18px rgba(0,0,0,.55);
}
.folio-hero__lead{ margin:0 auto; max-width:860px; font-size:clamp(14px,2vw,18px); opacity:.96; }
.folio{ background:#1f1f1f; color:#fff; }
.folio-inner{ padding:16px clamp(0px,3.5vw,48px) 56px; max-width:none; }
.folio-title{
  margin:0 0 28px; color:#fff; font-weight:900; line-height:1.05; letter-spacing:.2px;
  font-size:clamp(28px,5vw,56px);
}
.folio-grid{
  display:grid; grid-template-columns:repeat(3, minmax(0,1fr));
  gap:clamp(14px,2.2vw,24px);
  margin:0; padding:0; list-style:none;
}
.folio-grid > li{ margin:0; padding:0; list-style:none; }
.folio-card{
  position:relative; display:block; overflow:hidden;
  aspect-ratio:1 / 1;
  border-radius:20px;
  background:#111 center/cover no-repeat;
  background-image:var(--card-bg);
  box-shadow:0 14px 34px rgba(0,0,0,.35);
}
.folio-card::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(0,0,0,.06) 20%, rgba(0,0,0,.65) 100%);
}
.folio-card__data{
  position:absolute; left:16px; right:16px; bottom:16px; z-index:2;
  display:flex; align-items:flex-end;
}
.folio-card__title{ font-weight:900; font-size:clamp(18px,2.2vw,28px); line-height:1.15; color:#fff; }
@media (max-width:1100px){
  .folio-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); }
}
@media (max-width:620px){
  .folio-grid{ grid-template-columns:1fr; }
  .folio-inner{ padding:44px 16px; }
}
@media (max-width:960px){
  body.page-template-portfolio-page .site-header .main-nav .menu{
    position:fixed !important;
    inset:72px 0 0 0 !important;
    width:100% !important;
    height:calc(100vh - 72px) !important;
    background:rgba(0,0,0,.96) !important;
    display:none !important;
    flex-direction:column !important;
    overflow-y:auto !important;
    -webkit-overflow-scrolling:touch !important;
    z-index:2147483647 !important;
  }
  #nav-toggle:checked ~ .main-nav .menu{ display:flex !important; }
  body.menu-open{ overflow:hidden !important; height:100vh !important; }
  body.page-template-portfolio-page .site-header{ z-index:2147483648 !important; }
}