/* A continuous gallery. Every tile keeps its image's natural proportions. */
.works-page #container {
  max-width: 1800px;
}

.works-page .works-header {
  min-height: 104px;
  padding: 24px 112px 24px 28px;
  justify-content: space-between;
  gap: 24px;
}

.works-header a {
  color: #333;
  text-decoration: none;
}

.works-home {
  font-size: 14px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.works-home span {
  margin-left: 10px;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.works-header .works-nav {
  display: flex;
  gap: 26px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-shadow: none;
}

.works-header .works-nav a {
  padding: 0;
  border: 0;
  background: none;
  white-space: nowrap;
}

.works-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

.works-page .works-main {
  margin: 0 12px 64px;
}

.works-gallery {
  --gallery-gap: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: var(--gallery-gap);
  align-items: flex-start;
}

.work-tile {
  position: relative;
  min-width: 0;
  flex: var(--ratio) 1 calc(240px * var(--ratio));
}

.work-tile figure {
  position: relative;
  display: block;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  background: #eee;
  isolation: isolate;
}

.work-tile img {
  display: block;
  width: 100%;
  height: auto;
}

.work-tile figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 34px 14px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  color: #fff;
  font-size: 11px;
  font-weight: normal;
  letter-spacing: 0.025em;
  line-height: 1.6;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
  pointer-events: none;
}

.work-tile:hover {
  opacity: 0.9;
}

.work-tile:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -5px;
  box-shadow: inset 0 0 0 7px #222;
}

.works-header a:focus-visible {
  outline: 1px solid #333;
  outline-offset: 5px;
}

.works-page #menubar_hdr {
  border: 0;
}

@media (max-width: 780px) {
  .works-page .works-header {
    min-height: 96px;
    padding: 22px 12px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 32px;
  }

  .works-header .works-nav {
    gap: clamp(6px, 2vw, 14px);
    font-size: clamp(10px, 2.82vw, 11px);
  }

  .works-page #menubar_hdr {
    right: 12px;
    top: 20px;
  }
}

@media (max-width: 700px) {
  .works-page .works-main {
    margin: 0 6px 40px;
  }

  .works-gallery {
    --gallery-gap: 3px;
  }

  .work-tile figcaption {
    padding: 28px 9px 8px;
    font-size: 10px;
    line-height: 1.55;
  }

}

@media (prefers-reduced-motion: reduce) {
  .works-page a {
    transition: none;
  }
}
