.projects-page { background: #f6f5f0; }
.projects-hero { padding: 170px 0 115px; }
.projects-hero .back-link {
  display: inline-flex;
  margin-bottom: 75px;
  color: #aaa;
  font-size: 13px;
}
.projects-hero h1 {
  max-width: 1100px;
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(4rem, 8.5vw, 9rem);
  line-height: .91;
  letter-spacing: -.075em;
}
.projects-hero-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 430px));
  gap: 60px;
  margin-top: 60px;
  padding-top: 28px;
  border-top: 1px solid var(--dark-line);
}
.projects-hero-copy p { margin: 0; color: #aaa; font-size: 15px; line-height: 1.65; }

.projects-gallery-section { padding: 100px 0 130px; }
.gallery-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  align-items: end;
  margin-bottom: 60px;
}
.gallery-toolbar h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2.8rem, 5vw, 5.4rem);
  line-height: 1;
  letter-spacing: -.06em;
}
.project-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.filter-button {
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #555;
  background: transparent;
  font: 600 12px/1 "DM Sans", sans-serif;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.filter-button span { margin-left: 5px; color: #8a8a8a; }
.filter-button.active,
.filter-button:hover { border-color: #111; color: #fff; background: #111; }

.projects-grid { columns: 3 310px; column-gap: 24px; }
.gallery-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 24px;
  padding: 0;
  break-inside: avoid;
  overflow: hidden;
  border: 1px solid rgba(17,17,17,.1);
  border-radius: 18px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  cursor: zoom-in;
  box-shadow: 0 8px 30px rgba(17,17,17,.04);
  transition: transform .25s, box-shadow .25s;
}
.gallery-card:hover { transform: translateY(-4px); box-shadow: 0 18px 45px rgba(17,17,17,.1); }
.gallery-card[hidden] { display: none; }
.gallery-image { display: block; width: 100%; background: #ecebe7; }
.gallery-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.gallery-card-info { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; padding: 18px; border-top: 1px solid var(--line); }
.gallery-card-info strong { font-size: 15px; }
.gallery-card-info small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }

.projects-cta { padding: 125px 0; }
.projects-cta h2 {
  max-width: 1000px;
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(3.6rem, 7vw, 7.6rem);
  line-height: .94;
  letter-spacing: -.07em;
}
.projects-cta > .container > p:not(.eyebrow) { max-width: 520px; margin: 38px 0; color: #aaa; font-size: 17px; line-height: 1.6; }
.projects-cta-actions { display: flex; align-items: center; gap: 28px; }
.project-footer { margin-top: 0; }
.project-footer a { color: #aaa; }

.project-viewer {
  width: min(1180px, calc(100% - 40px));
  height: calc(100dvh - 40px);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  color: #fff;
  background: #151515;
  box-shadow: 0 30px 100px rgba(0,0,0,.45);
}
.project-viewer::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(8px); }
.viewer-toolbar {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: center;
  min-height: 82px;
  padding: 16px 20px 16px 26px;
  border-bottom: 1px solid var(--dark-line);
  background: rgba(21,21,21,.96);
}
.viewer-toolbar span { color: #777; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.viewer-toolbar h2 { margin: 4px 0 0; font-size: 18px; }
.viewer-close { padding: 11px 15px; border: 1px solid var(--dark-line); border-radius: 999px; color: #fff; background: transparent; font: 600 12px/1 "DM Sans", sans-serif; cursor: pointer; }
.viewer-image-wrap { height: calc(100% - 82px); overflow-y: auto; background: #2a2a2a; }
.viewer-image-wrap img { display: block; width: min(100%, 1100px); height: auto; margin: 0 auto; }

@media (max-width: 760px) {
  .projects-hero { padding: 135px 0 85px; }
  .projects-hero .back-link { margin-bottom: 50px; }
  .projects-hero h1 { font-size: 14vw; }
  .projects-hero-copy { grid-template-columns: 1fr; gap: 18px; margin-top: 40px; }
  .projects-gallery-section { padding: 75px 0 90px; }
  .gallery-toolbar { align-items: flex-start; flex-direction: column; margin-bottom: 40px; }
  .project-filters { justify-content: flex-start; }
  .projects-grid { columns: 2 230px; column-gap: 16px; }
  .gallery-card { margin-bottom: 16px; }
  .projects-cta-actions { align-items: stretch; flex-direction: column; }
}

@media (max-width: 480px) {
  .projects-grid { columns: 1; }
  .project-viewer { width: calc(100% - 16px); height: calc(100dvh - 16px); border-radius: 16px; }
  .viewer-toolbar { padding: 14px; }
}
