:root{
  --bg:#ffffff;
  --text:#111111;
  --muted:#aab4c0;
  --line:rgba(255,255,255,.12);
  --max: 1360px;
  --pad: 16px;
  --gap: 14px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: 'Cormorant Garamond', serif;
  background: var(--bg);
  color: var(--text);
}

body.portfolio-page{
  overflow-x: hidden;
}

a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}

.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* Top bar */
.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 50px 0;
  gap: 14px;
}

.brand{
  font-weight: 300;
  letter-spacing: .40em;
  text-transform: uppercase;
  font-size: 25px;
}

.links{
  display:flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items:center;
}

.links a{
  font-size: 14px;
  letter-spacing: .30em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 300;
}

.links a:hover,
.links a.active{
  color: var(--text);
  background: rgba(255,255,255,.07);
}

/* Home layout */
.home{
  padding: 22px 0 50px;
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* was 5 → now 3 */
  gap: 18px;
}

/* Tiles */
.tile{
  position: relative;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

/* Image */
.tile img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: opacity 0.1s ease;
}

/* Label (hidden by default) */
.label{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  color: black;
  font-size: clamp(16px, 2vw, 28px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;

  opacity: 0;
  transition: opacity 0.1s ease;

  z-index: 2; /* ADD THIS */
}

/* HOVER EFFECT */
.tile:hover img{
  opacity: 0.8;
}

.tile:hover .label{
  opacity: 1;
}
.tile::after{
  content: "";
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: opacity 0.1s ease;
  z-index: 1; /* ADD THIS */
}

.tile:hover::after{
  opacity: 0.6; /* controls how white it gets */
}

/* Sizes */
.tile--full{ grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.tile--half{ grid-column: span 6; aspect-ratio: 4 / 3; }
.tile--third{ grid-column: span 4; aspect-ratio: 1 / 1; }

/* Footer */
.footer{
  grid-column: 1 / -1;
  padding: 24px 0 0;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
  margin-top: 10px;
}

/* Responsive */
@media (max-width: 900px){
  .home{
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px){
  .home{
    grid-template-columns: 1fr;
  }
}/* Subnav under the top bar */
.subnav{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0 18px;
  border-top: 1px solid rgba(0,0,0,.08);
}

.subnav a{
  display: inline-block;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(0,0,0,.55);
  padding: 6px 10px;
  border-radius: 999px;
  transform: translateY(0);
  transition: transform .18s ease, background .18s ease, color .18s ease;
}

.subnav a:hover,
.subnav a.active{
  color: rgba(0,0,0,.9);
  background: rgba(0,0,0,.04);
  transform: translateY(-2px);
}

.subnav a:focus-visible{
  outline: 2px solid rgba(0,0,0,.35);
  outline-offset: 3px;
}

/* Location page layout */
.page{
  padding: 22px 0 50px;
}

.page-banner{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 18px;
}

.page-banner img{
  width: 100%;
  height: auto;
  display: block;
}

.commissions-page .page{
  padding-top: 22px;
}

.gallery--commissions{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.gallery--commissions img{
  width: 100%;
  aspect-ratio: 4 / 5;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  cursor: pointer;
}

/* Clean “Squarespace-ish” grid */
.gallery{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.gallery img{
  width: 100%;
  height: auto;
  display:block;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 900px){
  .gallery{ grid-template-columns: repeat(2, 1fr); }

  .gallery--commissions{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px){
  .gallery{ grid-template-columns: 1fr; }

  .gallery--commissions{
    grid-template-columns: 1fr;
  }
}

/* Film splash tiles use a wider landscape ratio */
.home--film .tile{
  aspect-ratio: 3 / 2;
}

.home--film .label{
  font-size: clamp(14px, 1.6vw, 22px);
  text-align: center;
  white-space: nowrap;
  padding: 0 16px;
}

body.lightbox-open{
  overflow: hidden;
}

.lightbox{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 22px;
  background: rgba(0,0,0,.86);
  z-index: 2000;
}

.lightbox.is-open{
  display: flex;
}

.lightbox__stage{
  max-width: min(92vw, 1600px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lightbox__image{
  max-width: 100%;
  max-height: calc(92vh - 46px);
  width: auto;
  height: auto;
  border: calc(7.5px * var(--lb-border-scale, 1)) solid #fff;
  box-shadow: 0 14px 36px rgba(0,0,0,.45);
  cursor: pointer;
}

.lightbox__count{
  color: rgba(255,255,255,.8);
  letter-spacing: .08em;
  font-size: 12px;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next{
  border: 0;
  background: transparent;
  color: #fff;
  width: 28px;
  height: 64px;
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  opacity: .55;
  padding: 0;
}

.lightbox__close{
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 28px;
  width: 36px;
  height: 36px;
  opacity: .8;
}

.lightbox__prev:hover,
.lightbox__next:hover,
.lightbox__close:hover{
  opacity: 1;
}

@media (max-width: 700px){
  .lightbox{
    padding: 12px;
    gap: 10px;
  }

  .lightbox__prev,
  .lightbox__next{
    width: 24px;
    height: 52px;
    font-size: 28px;
  }
}

.portfolio-intro{
  margin: 10px 0 24px;
}

.about-me-block{
  width: min(100%, calc(50% - 48px));
  margin-left: 0;
  margin-right: auto;
}

.portfolio-hero{
  position: relative;
  width: 100vw;
  aspect-ratio: 16 / 9;
  margin: 34px 0 0;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 72px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background-image: linear-gradient(rgba(0,0,0,.34), rgba(0,0,0,.34)), url("../img/portfolio/covers/01.jpg");
  background-position: center 58%;
  background-size: cover;
  background-repeat: no-repeat;
  overflow: hidden;
}

.portfolio-intro h2{
  margin: 0 0 14px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 24px;
  color: rgba(0,0,0,.55);
}

.portfolio-page .portfolio-intro h1{
  margin: 0 0 8px;
  font-weight: 400;
  letter-spacing: .05em;
  color: #000 !important;
}

.portfolio-intro p{
  margin: 0 0 14px;
  color: rgba(0,0,0,.65);
  width: 100%;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.portfolio-page .portfolio-hero h1{
  margin: 0 0 22px;
  font-size: clamp(36px, 5.5vw, 72px);
  line-height: .95;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #fff !important;
}

.portfolio-hero p{
  color: rgba(255,255,255,.92);
  max-width: 620px;
}

.portfolio-section{
  border-top: 1px solid rgba(0,0,0,.08);
  padding: 52px 0;
}

.portfolio-intro + .portfolio-section{
  border-top: 0;
}

.portfolio-section h2{
  margin: 28px 0 28px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 42px;
  text-align: center;
  color: rgba(0,0,0,.55);
}

.technical-section{
  padding-bottom: 70px;
}

.technical-intro{
  width: min(100%, 600px);
  margin: 0 0 34px;
  padding-top: 26px;
}

.technical-intro p{
  margin: 0;
  max-width: none;
  margin-left: 0;
  margin-right: auto;
  color: rgba(0,0,0,.78);
}

.technical-layout{
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 44px;
  align-items: start;
}

.technical-layout figure{
  margin: 0;
}

.technical-layout img{
  width: 100%;
  display: block;
}

.technical-main{
  align-self: end;
  margin-top: -34px;
}

.technical-side{
  display: grid;
  gap: 36px;
  align-content: start;
}

.technical-side__bottom{
  display: block;
}

.technical-side__bottom-single img{
  width: 100%;
  display: block;
}

.portfolio-section h3{
  margin: 14px 0 6px;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: .08em;
  color: rgba(0,0,0,.55);
}

.portfolio-section h4{
  margin: 12px 0 8px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(0,0,0,.72);
}

.portfolio-section p{
  margin: 0 0 8px;
  color: rgba(0,0,0,.7);
  width: 100%;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.educational-copy{
  color: rgba(0,0,0,.65);
  margin-bottom: 14px;
  margin-left: 0;
  margin-right: auto;
  max-width: none;
}

.electrical-copy{
  color: rgba(0,0,0,.65);
  margin-bottom: 14px;
  margin-left: 0;
  margin-right: auto;
  max-width: none;
}

.electrical-list{
  margin: 0 0 14px 18px;
  padding: 0;
  color: rgba(0,0,0,.65);
}

.electrical-list li{
  margin-bottom: 8px;
}

.educational-block{
  width: min(100%, calc(50% - 48px));
  margin: 42px 0 30px;
}

.electrical-block{
  width: min(100%, calc(50% - 48px));
  margin: 42px 0 30px;
}

.electrical-feature{
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 32px;
  align-items: start;
  margin: 42px 0 30px;
}

.electrical-feature-image{
  width: 100%;
  max-width: 520px;
  display: block;
  margin-top: 58px;
  margin-left: 18px;
}

.electrical-feature .electrical-block{
  width: 100%;
  margin: 0;
}

.gallery--ennell{
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.gallery--ennell img{
  width: 100%;
  height: 420px;
  object-fit: contain;
  background: #ffffff;
}

.educational-block h3,
.educational-block p{
  margin-left: 0;
  margin-right: 0;
}

.electrical-block h3,
.electrical-block p{
  margin-left: 0;
  margin-right: 0;
}

.educational-block h3{
  margin-bottom: 14px;
}

.portfolio-page .portfolio-intro a,
.portfolio-page .portfolio-section a{
  color: rgba(0,0,0,.55);
  font-size: 1.08em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
  letter-spacing: .08em;
}

.portfolio-page .portfolio-intro a:hover,
.portfolio-page .portfolio-section a:hover{
  color: rgba(0,0,0,.72);
}

.gallery--oppermann{
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.gallery--oppermann .oppermann-strip{
  width: 100%;
  aspect-ratio: 10 / 1.2;
  object-fit: cover;
  object-position: center;
}

.gallery--oppermann .oppermann-strip--right{
  width: 72%;
  aspect-ratio: auto;
  object-fit: contain;
  justify-self: end;
  margin-right: -18px;
}

.gallery--oppermann .oppermann-row{
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, .75fr);
  gap: 28px;
  align-items: center;
}

.educational-rows{
  margin: 0 0 44px;
}

.educational-row-block{
  margin-bottom: 26px;
}

.educational-row-block h4{
  width: min(100%, calc(50% - 48px));
  margin: 0 0 14px;
  margin-left: 0;
  margin-right: auto;
}

.gallery--educational-row{
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 220px;
  grid-template-columns: none;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  padding-bottom: 6px;
  scrollbar-width: auto;
  scrollbar-color: rgba(150,150,150,.9) transparent;
}

.gallery--educational-row::-webkit-scrollbar{
  height: 1px;
}

.gallery--educational-row::-webkit-scrollbar-track{
  background: transparent;
}

.gallery--educational-row::-webkit-scrollbar-thumb{
  background: rgba(150,150,150,.9);
  border-radius: 999px;
}

.educational-card{
  position: relative;
  margin: 0;
}

.gallery--educational-row img{
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.educational-card figcaption{
  position: absolute;
  left: 0;
  bottom: 0;
  color: rgba(0,0,0,.72);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.2;
  font-weight: 500;
  padding: 6px 10px;
  background: rgba(255,255,255,.5);
  backdrop-filter: blur(6px);
}

.educational-feature-grid{
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.05fr) minmax(180px, .7fr);
  gap: 28px;
  align-items: start;
  margin: 90px 0 72px;
}

.educational-feature-column{
  display: grid;
  gap: 18px;
}

.educational-feature-column:not(.educational-feature-column--cta){
  justify-items: center;
}

.portfolio-section .educational-feature-title{
  margin: 0;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: .08em;
  color: rgba(0,0,0,.55);
  text-align: center;
}

.educational-feature-card{
  margin: 0;
  width: 92%;
}

.educational-feature-card img{
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #f5f2eb;
}

.educational-feature-card--photo img{
  height: 260px;
  object-fit: cover;
  object-position: center;
}

.educational-feature-column--cta{
  align-content: start;
  justify-items: center;
  padding-top: 8px;
  gap: 18px;
}

.educational-feature-link{
  margin: 0;
  text-align: center;
}

.educational-feature-link a{
  display: inline-block;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(0,0,0,.9);
  transition: opacity .18s ease;
}

.educational-feature-link a:hover{
  opacity: .6;
}

.educational-qr-card{
  width: 100%;
  max-width: 160px;
  display: grid;
  place-items: center;
  margin-top: 172px;
}

.educational-qr-card img{
  width: min(100%, 160px);
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}


@media (max-width: 900px){
  .educational-feature-grid{
    grid-template-columns: 1fr;
  }

  .educational-feature-column--cta{
    justify-items: start;
    padding-top: 0;
  }

  .educational-feature-card--photo img{
    height: 220px;
  }
}

.gallery--oppermann .oppermann-feature{
  width: 100%;
  justify-self: stretch;
}

.gallery--oppermann .oppermann-feature--left{
  margin-left: -14px;
  justify-self: stretch;
}

.housing-copy h3,
.housing-copy p{
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.housing-copy h3{
  margin-bottom: 16px;
}

.gallery--oppermann .housing-copy{
  padding-top: 0;
}

.gallery--housing-placeholders{
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 10px;
  margin-bottom: 52px;
}

.gallery--housing-placeholders img{
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.gallery--housing-placeholders .housing-image--middle{
  width: 102%;
  object-fit: contain;
  justify-self: start;
  margin-left: -52px;
}

.gallery--housing-placeholders .housing-image--left{
  width: 82%;
  justify-self: start;
}

.gallery--housing-placeholders .housing-image--right{
  width: 124%;
  justify-self: start;
  margin-left: -20px;
}

.gallery--placeholders{
  margin-bottom: 8px;
}

.gallery--onebutton{
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
}

.onebutton-image{
  width: 100%;
  display: block;
}

.onebutton-image--hero{
  width: 100%;
}

.gallery--onebutton .onebutton-image--small{
  width: 68% !important;
  justify-self: center;
}

.gallery--onebutton .onebutton-image--tiny{
  width: 75% !important;
  justify-self: center;
}

.gallery--onebutton .onebutton-image--lower{
  margin-top: 72px;
}

.placeholder-box{
  aspect-ratio: 4 / 3;
  border: 1px dashed rgba(0,0,0,.28);
  background: linear-gradient(135deg, rgba(0,0,0,.02), rgba(0,0,0,.06));
  color: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.awards-callout{
  text-align: center;
  padding: 10px 0 4px;
}

.awards-callout h3{
  margin-bottom: 4px;
  font-size: 28px;
}

.awards-callout h4{
  margin-top: 0;
}

.awards-list{
  margin: 22px 0 24px 18px;
  text-align: left;
  color: rgba(0,0,0,.7);
}

.awards-brief{
  margin-top: 24px;
  text-align: left;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.portfolio-section .awards-link{
  margin: 110px 0 28px;
  display: flex;
  justify-content: center;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.portfolio-section .college-link{
  margin: 110px 0 28px;
  display: flex;
  justify-content: center;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.awards-link a,
.college-link a{
  display: inline-block;
  padding: 10px 18px;
  border: 0;
  background: rgba(0,0,0,.08);
  color: rgba(0,0,0,.72);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 12px;
}

.awards-link a:hover,
.college-link a:hover{
  background: rgba(0,0,0,.14);
}

.social-links{
  margin-top: 72px;
  display: flex;
  gap: 18px;
  justify-content: center;
}

.social-links a{
  color: rgba(0,0,0,.68);
  text-decoration: none;
  font-size: 26px;
  line-height: 1;
}

.social-links a:hover{
  color: rgba(0,0,0,.9);
}

.social-links svg{
  width: 26px;
  height: 26px;
  fill: currentColor;
  display: block;
}

.back-to-top{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.92);
  color: rgba(0,0,0,.78);
  padding: 10px 16px;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease, background .18s ease, color .18s ease;
  backdrop-filter: blur(10px);
}

.back-to-top.is-visible{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover{
  background: rgba(0,0,0,.08);
  color: rgba(0,0,0,.92);
}

.back-to-top:focus-visible{
  outline: 2px solid rgba(0,0,0,.35);
  outline-offset: 3px;
}

.portfolio-page .gallery img{
  cursor: default;
}

.gallery--residential-pair{
  grid-template-columns: repeat(2, 1fr);
  margin-top: 0;
  align-items: start;
}

.residential-feature-block{
  display: grid;
  justify-self: start;
}

.gallery--residential-pair .residential-feature-block .residential-feature{
  width: 150%;
}

.residential-side-column{
  display: grid;
  gap: 24px;
  align-content: start;
}

.gallery--residential-dwelling{
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, .8fr);
  align-items: start;
  gap: 18px;
}

.gallery--residential-dwelling .residential-feature{
  grid-column: auto;
  width: 100%;
  justify-self: stretch;
}

.residential-dwelling-plans{
  display: grid;
  gap: 18px;
  align-content: start;
}

.residential-dwelling-plan-ground-wrap{
  width: 92%;
  overflow: clip;
  justify-self: center;
  align-self: start;
  margin-top: -36px;
}

.residential-dwelling-plans img{
  display: block;
}

.residential-dwelling-plan-ground{
  width: 200% !important;
  max-width: none !important;
  height: auto !important;
  object-fit: fill;
  object-position: left top;
}

.residential-dwelling-secondary{
  grid-column: 1 / -1;
  width: min(100%, 960px);
  justify-self: center;
  display: block;
  margin-top: 18px;
}

.gallery--residential-pair .residential-small{
  width: 62%;
  justify-self: center;
  margin-left: -36px;
  margin-top: -18px;
}

.residential-drawing-pair{
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(180px, .9fr);
  gap: 18px;
  align-items: start;
  margin-top: -72px;
}

.residential-drawing-stack{
  display: grid;
  gap: 18px;
  align-content: start;
  justify-self: end;
  width: 100%;
}

.gallery--residential-pair .residential-drawing{
  width: 100%;
  display: block;
}

.gallery--residential-pair .residential-drawing--section{
  width: 124%;
  justify-self: start;
}

.gallery--residential-pair .residential-drawing--detail{
  width: 100%;
  justify-self: start;
}

.gallery--residential-pair .residential-drawing--detail-large{
  width: 108%;
}

.residential-heading{
  margin-top: 0;
}

.residential-divider{
  border: 0;
  border-top: 1px solid rgba(0,0,0,.08);
  margin: 56px 0 52px;
}

.residential-subsection-heading{
  margin-top: 0;
}

.portfolio-section .residential-copy{
  margin: 52px 0 22px;
  color: rgba(0,0,0,.65);
  margin-left: 0;
  margin-right: auto;
  max-width: none;
  text-align: left;
}

.residential-inline-image{
  width: 48%;
  justify-self: end;
  margin-top: 94px;
}

.bim-block{
  width: min(100%, calc(50% - 48px));
  margin: 42px 0 30px;
  justify-self: start;
}

.bim-block h3{
  margin-left: 0;
  margin-right: 0;
}

.bim-copy{
  color: rgba(0,0,0,.65);
  margin-bottom: 14px;
  margin-left: 0;
  margin-right: auto;
  max-width: none;
  text-align: left;
}

.portfolio-section .bim-more-link{
  margin: 56px 0 0 !important;
  max-width: none;
  width: 100%;
  text-align: center;
}

.bim-more-link a{
  display: inline-block;
  padding: 10px 18px;
  border: 0;
  background: rgba(0,0,0,.08);
  color: rgba(0,0,0,.72);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 12px;
  text-decoration: none;
}

.bim-more-link a:hover{
  background: rgba(0,0,0,.14);
}

.bim-footer{
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  gap: 56px;
  align-items: start;
  margin-top: 42px;
}

.bim-footer .bim-block{
  width: 100%;
  margin: 0;
}

.bim-footer-image{
  width: 100%;
  max-width: 980px;
  display: block;
  justify-self: end;
  margin-top: 52px;
}

.bim-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  align-items: start;
}

.bim-panel{
  display: grid;
  grid-template-rows: auto 240px auto;
  gap: 18px;
  align-content: start;
}

.portfolio-section .bim-panel h3{
  margin: 0;
  font-size: clamp(11px, 1vw, 15px);
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(0,0,0,.58);
  line-height: 1.24;
  text-align: center;
  min-height: 1.8em;
}

.bim-panel img{
  width: 100%;
  display: block;
}

.bim-panel > img{
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.portfolio-section .bim-panel p{
  margin: 0;
  max-width: none;
  color: rgba(0,0,0,.78);
  line-height: 1.72;
  text-align: left;
}

.bim-panel--clash p{
  font-size: inherit;
  line-height: 1.72;
  margin-top: 0;
}

.bim-clash-images{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  height: 240px;
}

.bim-clash-images img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 900px){
  .about-me-block{
    width: 100%;
    margin-left: 0;
  }

  .gallery--oppermann .oppermann-row{
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .gallery--oppermann .oppermann-strip--right,
  .gallery--oppermann .oppermann-feature--left{
    width: 100%;
    justify-self: stretch;
  }

  .gallery--housing-placeholders{
    grid-template-columns: 1fr;
  }

  .bim-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bim-footer{
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .technical-layout{
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .gallery--residential-dwelling{
    grid-template-columns: 1fr;
  }

  .gallery--onebutton{
    grid-template-columns: 1fr;
  }

  .electrical-feature{
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 520px){
  .bim-grid{
    grid-template-columns: 1fr;
  }

  .technical-side__bottom{
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .back-to-top{
    right: 12px;
    bottom: 12px;
    padding: 9px 13px;
    font-size: 11px;
  }
}
