:root{
  --shell:1120px;
  --article:820px;
  --text:#171717;
  --muted:#666;
  --line:#e7e7e7;
  --bg:#fff;
  --dark:#050b0e;
  --panel:#050b0e;
  --cool:#a5b8c3;
  --accent-dark:#b60000;
  --accent:#c30000;
  --accent-bright:#c60000;
  --accent-rgb:195,0,0;
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:Helvetica,Arial,sans-serif;
  font-size:17px;
  line-height:28px;
}

img{
  max-width:100%;
  height:auto;
}

a{color:inherit}

button,input,textarea,select{font:inherit}

.site-shell{
  width:min(calc(100% - 40px),var(--shell));
  margin-inline:auto;
}

/* Header */
.site-header{
  background:#fff;
  border-bottom:1px solid var(--line);
  position:relative;
  z-index:100;
}

.header-inner{
  min-height:100px;
  padding-top:28px;
  padding-bottom:18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
}

.site-brand{
  display:flex;
  align-items:center;
  min-width:0;
}

.site-brand .custom-logo-link,
.wb1-brand-link{
  display:inline-flex;
  align-items:center;
  text-decoration:none;
}

.site-brand .custom-logo,
.wb1-brand-logo{
  display:block;
  width:300px;
  height:auto;
  max-width:58vw;
  max-height:none;
  object-fit:contain;
}

.wb1-menu-button{
  display:inline-flex;
  align-items:center;
  gap:10px;
  border:1px solid #d8d8d8;
  background:#fff;
  color:#171717;
  border-radius:10px;
  padding:10px 13px;
  font-weight:700;
  cursor:pointer;
  transition:background-color .22s ease,color .22s ease,border-color .22s ease,transform .22s ease;
}

.wb1-menu-button:hover,
.wb1-menu-button:focus-visible{
  background:var(--accent);
  color:#fff;
  border-color:var(--accent);
  outline:none;
}

.wb1-menu-button:active{
  transform:translateY(1px);
}

.wb1-menu-icon{
  width:20px;
  display:grid;
  gap:4px;
}

.wb1-menu-icon span{
  display:block;
  height:2px;
  background:currentColor;
  border-radius:2px;
}

/* Main content */
.site-main{min-height:65vh}

.content-shell{padding:64px 0}
.home-shell{padding:54px 0 72px}

.article-shell,
.project-shell{
  width:min(calc(100% - 40px),var(--article));
  padding:64px 0;
}

.entry-header{margin-bottom:28px}

h1,h2,h3,h4,h5,h6{
  margin:0 0 14px;
  font-weight:700;
  letter-spacing:-.01em;
}

h1{font-size:36px;line-height:44px}
h2{font-size:26px;line-height:36px;margin-top:42px}
h3{font-size:21px;line-height:30px;margin-top:30px}
h4{font-size:18px;line-height:28px}
h5{font-size:16px;line-height:26px}
h6{font-size:15px;line-height:24px}

p{margin:0 0 20px}

.dek{
  font-size:19px;
  line-height:30px;
  color:var(--muted);
  max-width:720px;
}

.hero-media{margin:0 0 38px}

.hero-media img{
  display:block;
  width:100%;
}

.entry-content ul,
.entry-content ol{
  padding-left:24px;
  margin:0 0 24px;
}

.home-content > * + h2,
.home-content > * + h3{
  margin-top:46px;
}

.home-content hr{
  border:0;
  border-top:1px solid var(--line);
  margin:44px 0;
}

.project-copy{
  margin-bottom:34px;
}

.project-copy > :first-child{
  margin-top:0;
}

/* Cards and archives */
.card-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:28px;
}

.card{
  border-top:1px solid var(--line);
  padding-top:20px;
  margin-bottom:30px;
}

.card h2{margin-top:14px}
.card a{text-decoration:none}

/* Portfolio / project cards */
.wb1-portfolio-grid{
  display:grid;
  gap:18px;
  margin:36px 0 48px;
}

.wb1-portfolio-grid.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.wb1-portfolio-grid.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.wb1-portfolio-grid.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}

.wb1-project-card{margin:0}

.wb1-project-link{
  display:block;
  text-decoration:none;
}

.wb1-project-media{
  position:relative;
  display:block;
  overflow:hidden;
  border-radius:4px;
  background:var(--dark);
}

.wb1-project-card img{
  display:block;
  width:100%;
  aspect-ratio:3/2;
  object-fit:cover;
  transform:scale(1);
  transition:transform .28s ease;
}

.wb1-project-overlay{
  position:absolute;
  inset:0;
  z-index:2;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:16px;
  padding:22px;
  text-align:center;
  color:#fff;
  background:linear-gradient(135deg,rgba(182,0,0,.84) 0%,rgba(195,0,0,.82) 52%,rgba(198,0,0,.78) 100%);
  opacity:0;
  visibility:hidden;
  transition:opacity .28s ease,visibility .28s ease;
}

.wb1-project-overlay-title{
  max-width:92%;
  font-size:19px;
  line-height:26px;
  font-weight:800;
  letter-spacing:-.01em;
  text-shadow:0 1px 1px rgba(0,0,0,.12);
}

.wb1-project-cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:38px;
  padding:8px 14px;
  background:#fff;
  color:#171717;
  border:1px solid rgba(255,255,255,.9);
  border-radius:8px;
  box-shadow:0 8px 20px rgba(0,0,0,.12);
  font-size:13px;
  line-height:18px;
  font-weight:800;
  letter-spacing:.01em;
  transition:transform .2s ease,box-shadow .2s ease;
}

.wb1-project-link:hover .wb1-project-overlay,
.wb1-project-link:focus-visible .wb1-project-overlay,
.wb1-project-card.is-scroll-active .wb1-project-overlay{
  opacity:1;
  visibility:visible;
}

.wb1-project-link:hover img,
.wb1-project-link:focus-visible img,
.wb1-project-card.is-scroll-active img{
  transform:scale(1.025);
}

.wb1-project-link:hover .wb1-project-cta,
.wb1-project-link:focus-visible .wb1-project-cta{
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(0,0,0,.18);
}

.wb1-project-link:focus-visible{
  outline:3px solid var(--accent);
  outline-offset:3px;
}

.wb1-project-card h3{
  font-size:17px;
  line-height:24px;
  margin:10px 0 0;
}

.wb1-project-card p{
  font-size:15px;
  line-height:24px;
  color:var(--muted);
  margin:8px 0 0;
}

.wb1-pagination ul{
  display:flex;
  gap:8px;
  list-style:none;
  padding:0;
  margin:24px 0 0;
}

.wb1-pagination a,
.wb1-pagination span{
  display:block;
  padding:8px 11px;
  border:1px solid var(--line);
  text-decoration:none;
}

.wb1-legacy-button a{
  display:inline-block;
  padding:11px 16px;
  border:1px solid #222;
  text-decoration:none;
  font-weight:700;
}

/* Single-project gallery */
.wb1-project-gallery{
  margin:38px 0 16px;
}

.wb1-project-gallery-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.wb1-gallery-thumb{
  display:block;
  width:100%;
  border:0;
  padding:0;
  background:none;
  cursor:zoom-in;
}

.wb1-gallery-thumb img{
  display:block;
  width:100%;
  height:auto;
}

.wb1-lightbox[hidden]{display:none!important}

.wb1-lightbox{
  position:fixed;
  inset:0;
  z-index:100000;
  background:rgba(0,0,0,.94);
  display:grid;
  grid-template-columns:72px minmax(0,1fr) 72px;
  grid-template-rows:1fr auto;
  align-items:center;
}

.wb1-lightbox-stage{
  margin:0;
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:28px 0 12px;
}

.wb1-lightbox-stage img{
  display:block;
  max-width:min(1200px,100%);
  max-height:calc(100vh - 120px);
  width:auto;
  height:auto;
  object-fit:contain;
}

.wb1-lightbox-stage figcaption{
  color:#fff;
  font-size:14px;
  line-height:20px;
  margin-top:10px;
}

.wb1-lightbox-prev,
.wb1-lightbox-next,
.wb1-lightbox-close{
  border:0;
  background:rgba(0,0,0,.2);
  color:#fff;
  cursor:pointer;
}

.wb1-lightbox-prev,
.wb1-lightbox-next{
  font-size:52px;
  line-height:1;
  height:100%;
}

.wb1-lightbox-close{
  position:absolute;
  right:18px;
  top:14px;
  width:44px;
  height:44px;
  z-index:2;
  font-size:38px;
  line-height:1;
}

.wb1-lightbox-dots{
  grid-column:1/-1;
  display:flex;
  justify-content:center;
  gap:7px;
  padding:0 16px 18px;
}

.wb1-lightbox-dots button{
  width:8px;
  height:8px;
  border:0;
  border-radius:50%;
  padding:0;
  background:#777;
}

.wb1-lightbox-dots button[aria-current="true"]{
  background:#fff;
}

body.wb1-lightbox-open{overflow:hidden}

/* Mega menu */
.wb1-menu-panel[hidden]{display:none!important}

.wb1-menu-panel{
  position:fixed;
  inset:0;
  z-index:200000;
  display:grid;
  place-items:center;
  padding:24px;
}

.wb1-menu-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.68);
  backdrop-filter:blur(4px);
}

.wb1-menu-dialog{
  position:relative;
  width:min(1080px,100%);
  max-height:min(820px,calc(100vh - 48px));
  overflow:auto;
  background:var(--panel);
  color:#fff;
  border-radius:20px;
  padding:34px;
  box-shadow:0 30px 80px rgba(0,0,0,.38);
}

.wb1-menu-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  padding-bottom:24px;
  border-bottom:1px solid #353535;
}

.wb1-menu-kicker{
  display:block;
  color:#aaa;
  font-size:13px;
  line-height:20px;
  text-transform:uppercase;
  letter-spacing:.12em;
  margin-bottom:3px;
}

.wb1-menu-top h2{
  margin:0;
  color:#fff;
  font-size:34px;
  line-height:40px;
}

.wb1-menu-close{
  border:0;
  background:#2a2a2a;
  color:#fff;
  width:46px;
  height:46px;
  border-radius:50%;
  font-size:32px;
  line-height:1;
  cursor:pointer;
}

.wb1-menu-groups{
  display:grid;
  grid-template-columns:1.25fr 1fr 1fr 1fr;
  gap:34px;
  padding:32px 0;
}

.wb1-menu-group h2{
  margin:0 0 14px;
  color:#999;
  font-size:15px;
  line-height:22px;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.wb1-menu-group ul{
  list-style:none;
  margin:0;
  padding:0;
}

.wb1-menu-group li{margin:0}

.wb1-menu-group a{
  display:block;
  color:#fff;
  text-decoration:none;
  font-size:17px;
  line-height:25px;
  padding:5px 0;
}

.wb1-menu-group a{
  transition:color .2s ease,transform .2s ease;
}

.wb1-menu-group a:hover,
.wb1-menu-group a:focus-visible{
  color:var(--accent);
  transform:translateX(2px);
  outline:none;
}

.wb1-menu-footer{
  display:flex;
  justify-content:flex-end;
  border-top:1px solid #353535;
  padding-top:24px;
}

.wb1-menu-quote a{
  display:inline-block;
  background:#fff;
  color:#171717;
  text-decoration:none;
  font-weight:800;
  padding:13px 18px;
  border-radius:10px;
}

body.wb1-menu-open{overflow:hidden}

/* Footer */
.site-footer{
  background:#171717;
  color:#fff;
  padding:48px 0 88px;
}

.footer-inner{
  display:flex;
  justify-content:space-between;
  gap:30px;
}

.footer-location{
  text-align:right;
  max-width:460px;
}

.footer-location-primary{
  font-weight:700;
  line-height:1.35;
}

.footer-location-secondary{
  margin-top:3px;
  color:rgba(255,255,255,.66);
  font-size:14px;
  line-height:1.45;
}

.mobile-action-bar{display:none}

@media(max-width:900px){
  .wb1-menu-groups{
    grid-template-columns:1fr 1fr;
  }
}

@media(max-width:760px){
  body{
    padding-bottom:calc(90px + env(safe-area-inset-bottom, 0px));
  }

  .site-shell{
    width:min(calc(100% - 28px),var(--shell));
  }

  .header-inner{
    min-height:82px;
    padding-top:22px;
    padding-bottom:16px;
  }

  .site-brand .custom-logo,
  .wb1-brand-logo{
    width:235px;
    height:auto;
    max-width:62vw;
  }

  .content-shell,
  .home-shell,
  .article-shell,
  .project-shell{
    padding:42px 0;
  }

  h1{font-size:34px;line-height:42px}
  h2{font-size:25px;line-height:34px;margin-top:36px}

  .card-grid,
  .wb1-portfolio-grid.cols-4,
  .wb1-portfolio-grid.cols-3,
  .wb1-portfolio-grid.cols-2{
    grid-template-columns:1fr 1fr;
  }

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

  .wb1-lightbox{
    grid-template-columns:48px minmax(0,1fr) 48px;
  }

  .wb1-lightbox-stage{
    padding-inline:6px;
  }

  .wb1-lightbox-stage img{
    max-height:calc(100vh - 150px);
  }

  .wb1-lightbox-prev,
  .wb1-lightbox-next{
    font-size:42px;
  }

  .footer-inner{
    display:grid;
  }

  .footer-location{
    text-align:left;
    max-width:none;
  }

  .site-footer{
    padding-bottom:32px;
  }

  .mobile-action-bar{
    position:fixed;
    left:50%;
    bottom:calc(10px + env(safe-area-inset-bottom, 0px));
    transform:translate3d(-50%,0,0);
    display:grid;
    grid-template-columns:repeat(3,1fr);
    width:min(calc(100% - 24px),480px);
    background:#171717;
    border-radius:12px;
    overflow:hidden;
    z-index:9999;
    box-shadow:0 8px 24px rgba(0,0,0,.24);
    backface-visibility:hidden;
    -webkit-backface-visibility:hidden;
  }

  .mobile-action-bar a{
    color:#fff;
    text-decoration:none;
    text-align:center;
    padding:12px 8px;
    font-weight:700;
    border-right:1px solid #333;
    touch-action:manipulation;
  }

  .mobile-action-bar a:last-child{
    border-right:0;
    background:var(--accent);
    color:#fff;
    font-weight:800;
    transition:background-color .2s ease,transform .2s ease;
  }

  .mobile-action-bar a:last-child:hover,
  .mobile-action-bar a:last-child:focus-visible{
    background:var(--accent-dark);
    outline:none;
  }

  .mobile-action-bar a:last-child:active{
    background:var(--accent-bright);
    transform:translateY(1px);
  }
}

@media(max-width:600px){
  .wb1-menu-panel{
    padding:0;
  }

  .wb1-menu-dialog{
    width:100%;
    height:100%;
    max-height:none;
    border-radius:0;
    padding:24px 20px 110px;
  }

  .wb1-menu-top{
    position:sticky;
    top:-24px;
    background:#171717;
    z-index:2;
    padding-top:24px;
  }

  .wb1-menu-groups{
    grid-template-columns:1fr;
    gap:28px;
    padding-top:28px;
  }

  .wb1-menu-group a{
    font-size:18px;
    line-height:28px;
    padding:6px 0;
  }

  .wb1-menu-footer{
    justify-content:stretch;
  }

  .wb1-menu-quote,
  .wb1-menu-quote a{
    display:block;
    width:100%;
    text-align:center;
  }

  .wb1-menu-button{
    padding:9px 11px;
  }
}

@media(max-width:480px){
  .wb1-portfolio-grid.cols-4,
  .wb1-portfolio-grid.cols-3,
  .wb1-portfolio-grid.cols-2{
    grid-template-columns:1fr;
  }
}

/*
 * Touch/mobile project-card behavior.
 *
 * Scrolling never activates a project. A deliberate touch activates one
 * card at a time. Safari sticky :hover is neutralized on touch devices.
 */
@media (hover:none), (pointer:coarse){
  .wb1-project-overlay{
    background:linear-gradient(135deg,rgba(182,0,0,.86) 0%,rgba(195,0,0,.84) 52%,rgba(198,0,0,.80) 100%);
  }

  .wb1-project-link:hover .wb1-project-overlay{
    opacity:0;
    visibility:hidden;
  }

  .wb1-project-link:hover img{
    transform:scale(1);
  }

  .wb1-project-link:hover .wb1-project-cta{
    transform:none;
    box-shadow:0 8px 20px rgba(0,0,0,.12);
  }

  .wb1-project-card.is-scroll-active .wb1-project-overlay,
  .wb1-project-link:focus-visible .wb1-project-overlay{
    opacity:1;
    visibility:visible;
  }

  .wb1-project-card.is-scroll-active img,
  .wb1-project-link:focus-visible img{
    transform:scale(1.025);
  }
}

@media (prefers-reduced-motion:reduce){
  .wb1-project-card img,
  .wb1-project-overlay,
  .wb1-project-cta,
  .wb1-menu-button,
  .wb1-menu-group a{
    transition:none!important;
  }

  .wb1-project-link:hover img,
  .wb1-project-link:focus-visible img,
  .wb1-project-card.is-scroll-active img{
    transform:none;
  }
}