/* One continuous portfolio grid, with titles revealed on each project image. */
.work-container { padding-top: 1.25rem; }
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.work-grid-item { min-width: 0; }
.work-project {
  position: relative;
  display: block;
  isolation: isolate;
  aspect-ratio: 389 / 510;
  overflow: hidden;
  background: var(--project-color);
  color: var(--project-ink);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.work-project-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.work-project video.work-project-image { pointer-events: none; }
.work-project[href="/rubinetterie-design-competition"] .work-project-image {
  filter: grayscale(1) contrast(1.28);
}
.work-project--diagram { background: #fff; }
.work-project--diagram .work-project-image { object-fit: contain; padding: 1rem; }
.work-project[href="/gp2s"] { background: #fff; }
/* Keep the complete rotating console visible with a small buffer. */
.work-project[href="/gp2s"] .work-project-image {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4%;
}
.work-project[href="/pro-pods"] .work-project-image {
  transform: scale(1.85);
  transform-origin: center bottom;
}
.work-project-overlay {
  position: absolute;
  inset: 0;
  background: var(--project-color);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}
.work-project-name {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  color: var(--project-ink);
  font-family: Montserrat, sans-serif;
  font-size: clamp(1.125rem, 1.7vw, 1.625rem);
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 2px 14px rgb(0 0 0 / 38%);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}
.work-project--dark-text .work-project-name {
  text-shadow: 0 1px 12px rgb(255 255 255 / 45%);
}
.work-project:focus-visible {
  outline: 3px solid #ff007a;
  outline-offset: 5px;
}
.work-project:focus-visible .work-project-overlay { opacity: .55; }
.work-project:focus-visible .work-project-name { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .work-project:hover .work-project-overlay { opacity: .55; }
  .work-project:hover .work-project-name { opacity: 1; }
}
/* Mobile and touch galleries show unobstructed project images. */
@media (max-width: 600px), (hover: none), (pointer: coarse) {
  .work-project-overlay,
  .work-project-name { display: none; }
}
@media (max-width: 991px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
  .work-project-name { font-size: 1.375rem; }
}
@media (max-width: 600px) {
  .work-grid { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .work-container { padding-top: 1.25rem; }
  .work-project-name { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .work-project-overlay, .work-project-name { transition: none; }
}
