.projects-hero {
  position: relative;
  min-height: 280px;
  color: #fff;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.projects-hero__bg {
  position: absolute;
  inset: 0;
}

.projects-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.projects-hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(12, 12, 11, 0.78) 0%, rgba(12, 12, 11, 0.42) 48%, rgba(12, 12, 11, 0.28) 100%),
    linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent 55%);
}

.projects-hero__inner {
  position: relative;
  z-index: 1;
  padding: 28px 0 40px;
  width: min(var(--container), calc(100% - (var(--gutter) * 2)));
}

.projects-hero .breadcrumbs--hero {
  margin: 0 0 18px;
  padding: 0;
}

.projects-hero h1 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 500;
  line-height: 1.1;
  color: #fff;
}

.projects-hero p {
  margin: 0;
  max-width: 560px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
}

.projects-gallery {
  padding-top: 28px;
  background: #fff;
}

.projects-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

.projects-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.projects-filter {
  height: 40px;
  padding: 0 14px;
  border: 1px solid #E0E0E0;
  background: #FAFAF8;
  color: #555;
  font-size: 13px;
}

.projects-filter.is-active {
  background: #1C1C1A;
  border-color: #1C1C1A;
  color: #fff;
}

.projects-count {
  margin: 0 0 16px;
  color: #6F6E69;
  font-size: 14px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-tile {
  position: relative;
  display: block;
  overflow: hidden;
  background: #EDEBE4;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  aspect-ratio: 4 / 5;
}

.project-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}

.project-tile:hover img {
  transform: scale(1.04);
}

.project-tile-overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 48px 16px 16px;
  background: linear-gradient(180deg, transparent 0%, rgba(28, 28, 26, 0.82) 100%);
  color: #F7F6F2;
}

.project-tile-overlay strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 4px;
}

.project-tile-overlay span {
  font-size: 13px;
  opacity: 0.82;
}

.project-tile-overlay strong:empty,
.project-tile-overlay span:empty {
  display: none;
}

.projects-empty {
  margin: 40px 0;
  color: #6F6E69;
}

.projects-grid.is-loading {
  opacity: 0.45;
  pointer-events: none;
}

.projects-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(12, 12, 11, 0.9);
  display: grid;
  place-items: center;
  padding: 48px 72px;
}

.projects-lightbox[hidden] {
  display: none !important;
}

.projects-lightbox figure {
  margin: 0;
  max-width: min(980px, 100%);
  width: 100%;
}

.projects-lightbox img {
  width: 100%;
  max-height: min(72vh, 820px);
  object-fit: contain;
  background: #111;
}

.projects-lightbox figcaption {
  margin-top: 14px;
  color: #F7F6F2;
  display: grid;
  gap: 4px;
}

.projects-lightbox figcaption strong {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
}

.projects-lightbox figcaption span {
  color: rgba(247, 246, 242, 0.7);
  font-size: 14px;
}

.projects-lightbox-close,
.projects-lightbox-nav {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 44px;
  height: 44px;
  font-size: 28px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.projects-lightbox-close {
  top: 18px;
  right: 18px;
}

.projects-lightbox-nav.prev { left: 18px; }
.projects-lightbox-nav.next { right: 18px; }

@media (max-width: 1100px) {
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .projects-hero { min-height: 240px; }
  .projects-hero__inner { padding: 20px 0 28px; }
  .projects-grid { grid-template-columns: 1fr; }
  .projects-lightbox { padding: 56px 16px 24px; }
  .projects-lightbox-nav { display: none; }
}
