@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/figtree-latin.woff2") format("woff2");
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: #424242;
  font-family: "Figtree", "Helvetica Neue", Arial, sans-serif;
  font-size: 20px;
  line-height: 1.25em;
  -webkit-font-smoothing: antialiased;
}

a { color: #111; text-decoration: none; }
a:hover { color: #444; }

h1, h2, h3 { color: #222; margin: 1em 0 .5em; line-height: 1.2em; }
h1 { font-size: 1.8em; font-weight: 700; letter-spacing: 1px; }
h2 { font-size: 1.8em; font-weight: 400; letter-spacing: 0; }
h3 { font-size: 1.9em; font-weight: 400; letter-spacing: 2px; }
p { margin: 0 0 1em; }
ul, ol { margin: 1em 0; padding: 0 0 0 40px; }
img { border: 0; }
:focus-visible { outline: 2px solid #60a5dd; outline-offset: 2px; }
#page:focus { outline: none; }
.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 2000;
  padding: 8px 12px;
  background: #000;
  color: #fff;
  font-size: 16px;
}
.skip-link:focus { top: 8px; color: #fff; }
.text-align-center { text-align: center; }

#canvas {
  max-width: 1100px;
  margin: 0 auto;
  padding: 50px;
}

/* Header */
#header { margin-bottom: 35px; display: flex; justify-content: space-between; align-items: flex-start; }
.logo {
  margin: 0;
  font-size: 50px;
  font-weight: 400;
  letter-spacing: 2px;
  line-height: 1.2em;
  text-transform: uppercase;
}
.logo a, .logo a:hover { color: #000; }
.logo-subtitle {
  margin-top: .7em;
  color: #7a7a7a;
  font-size: 15px;
  letter-spacing: 1px;
  line-height: .9em;
}
#topNav ul, #mobileNav ul { list-style: none; margin: 0; padding: 0; }
#topNav ul { display: flex; gap: 25px; }
#topNav a {
  display: inline-block;
  padding: 13px 0;
  color: #7e7c7c;
  font-size: 17px;
  letter-spacing: 1px;
  line-height: 34px;
}
#topNav .active > a, #topNav a:hover { color: #000; }
.page-divider { border-bottom: 1px solid #ddd; }

#mobileNav { display: none; }
#mobileMenuLink { display: none; }

/* Content */
#page { padding: 50px 0; }
#page::after { content: ""; display: table; clear: both; }
.block { padding: 17px 0; }
#page > .block:first-child { padding-top: 0; }
.text > :first-child { margin-top: 0; }
.text > :last-child { margin-bottom: 0; }
.text a { color: #111; }
.rule hr { border: 0; height: 1px; background: #bbb; margin: 20px 0; }
.spacer { padding: 0; }

.image { margin: 0 auto; }
.image img { display: block; width: 100%; height: auto; }

.gallery {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), 1fr);
  gap: var(--gap, 4px);
  padding-bottom: calc(17px + var(--gap, 4px));
}
.gallery a { position: relative; display: block; aspect-ratio: 1; overflow: hidden; cursor: pointer; }
.gallery img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Home thumbnails */
#projectThumbs { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 30px; row-gap: 31px; }
.project { display: block; }
.project-image { position: relative; aspect-ratio: 1; overflow: hidden; background: #d4d4d4; margin-bottom: 9.4px; }
.project-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .14s ease-out; }
.project:hover .project-image img { opacity: .75; }
.project-title {
  color: #3d3d3d;
  font-size: 18px;
  letter-spacing: 2px;
  line-height: 1.5em;
  text-align: center;
}

/* Footer */
#footer { margin-top: 25px; }
#footer .block { padding: 17px 0; }
#footer .social { padding-top: 0; text-align: center; line-height: 0; }
#footer .social a { display: inline-block; color: #000; }
#footer .social svg { fill: currentColor; }
#footer .social a:hover { opacity: .8; }
#footer p { margin: 0; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, .95);
  opacity: 0;
  transition: opacity .3s ease-out;
  touch-action: pan-y pinch-zoom;
}
.lightbox.open { opacity: 1; }
.lightbox[hidden] { display: none; }
.lightbox-img {
  position: absolute;
  top: 2%; left: 2%;
  width: 96%; height: 96%;
  object-fit: contain;
  cursor: pointer;
  transition: opacity .2s ease-out;
}
.lightbox button {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: none;
  color: #ccc;
  cursor: pointer;
}
.lightbox button:hover, .lightbox button:focus-visible { color: #fff; }
.lightbox button svg { stroke: currentColor; fill: none; stroke-width: 2; }
.lightbox-close { top: 17px; right: 17px; width: 24px; height: 24px; }
.lightbox-prev, .lightbox-next { top: 50%; width: 44px; height: 44px; margin-top: -22px; opacity: 0; transition: opacity .2s; }
.lightbox-prev { left: 17px; }
.lightbox-next { right: 17px; }
.lightbox:hover .lightbox-prev, .lightbox:hover .lightbox-next,
.lightbox button:focus-visible { opacity: 1; }
body.lightbox-open { overflow: hidden; }

/* Phones and small tablets */
@media only screen and (max-width: 750px) {
  #canvas { padding: 0 20px 20px; }
  #header { display: block; margin-bottom: 30px; text-align: center; }
  #topNav { display: none; }
  .logo { font-size: 46px; letter-spacing: 0; }
  .logo-subtitle { text-align: center; }

  #mobileMenuLink {
    display: block;
    width: 100%;
    margin: 0 0 25px;
    padding: 15px 0;
    border: 0;
    border-bottom: 1px solid #ddd;
    background: none;
    color: #7e7c7c;
    font: inherit;
    font-size: 16px;
    letter-spacing: 1px;
    line-height: 1.6em;
    text-align: center;
    cursor: pointer;
  }
  #mobileNav {
    display: block;
    height: 0;
    overflow: hidden;
    transition: height .3s ease-out;
  }
  #mobileNav ul { margin: 15px 0 0; padding: 0 0 1em; border-bottom: 1px solid #ddd; }
  #mobileNav li { text-align: center; }
  #mobileNav a {
    color: rgba(126, 124, 124, .7);
    font-size: 16px;
    letter-spacing: 1px;
    line-height: 2.5em;
  }
  #mobileNav .active a, #mobileNav a:hover { color: #7e7c7c; }

  #projectThumbs { grid-template-columns: repeat(2, 1fr); column-gap: 3%; row-gap: 0; }
  .project { margin-bottom: 3%; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .lightbox-prev, .lightbox-next { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox, .lightbox-img, #mobileNav, .project-image img { transition: none; }
}
