.grid-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0.625rem;
  padding-right: 0.625rem;
}

.grid-x {
  display: flex;
  flex-flow: row wrap;
}

.cell {
  flex: 0 0 100%;
  max-width: 100%;
  min-height: 0;
  min-width: 0;
}

.cell.auto {
  flex: 1 1 0;
}

.cell.small-1 {
  flex: 0 0 8.3333333333%;
  max-width: 8.3333333333%;
}

.cell.small-3 {
  flex: 0 0 25%;
  max-width: 25%;
}

.menu {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-flow: row wrap;
  align-items: center;
}

.menu > li {
  margin: 0;
}

.menu > li > a {
  display: block;
  padding: 0.7rem 1rem;
  line-height: 1;
  text-decoration: none;
  color: #2f3e52;
}

.site-shell {
  padding-top: 0.75rem;
  padding-bottom: 1.5rem;
}

.site-header-row {
  justify-content: center;
  margin-bottom: 2rem;
}

.site-title-row,
.site-nav-row {
  justify-content: center;
}

.site-title {
  margin: 0.4rem 0 0.2rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.1;
}

.site-nav-row {
  margin-bottom: 0.25rem;
}

.menu > li > a {
  padding: 0.55rem 0.85rem;
  border-radius: 6px;
}

.menu > li > a:hover {
  background: rgba(47, 62, 82, 0.08);
  color: #1f2a38;
}

.menu > li > a.is-active {
  background: rgba(53, 104, 169, 0.14);
  color: #234f86;
  font-weight: 600;
}

.portrait-image {
  width: 240px;
  max-width: 100%;
  height: auto;
}

.thw {
  width: clamp(130px, 16vw, 170px);
  height: clamp(130px, 16vw, 170px);
}

@media (max-width: 700px) {
  .site-header-row {
    margin-bottom: 1.4rem;
  }

  .menu {
    justify-content: center;
  }

  .menu > li > a {
    padding: 0.5rem 0.7rem;
  }
}

#gallery-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

#gallery-overlay.is-open {
  display: flex;
}

#gallery-image {
  max-width: 90vw;
  max-height: 90vh;
}

#gallery-close,
#gallery-prev,
#gallery-next {
  position: absolute;
  border: 0;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
}

#gallery-close {
  top: 16px;
  right: 16px;
  font-size: 2rem;
  line-height: 1;
  width: 40px;
  height: 40px;
}

#gallery-prev,
#gallery-next {
  top: 50%;
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
  font-size: 2.2rem;
  width: 44px;
  height: 64px;
}

#gallery-prev { left: 16px; }
#gallery-next { right: 16px; }
