.projects-page {
  overflow: clip;
}

.projects-shell {
  width: min(calc(100% - 56px), 1240px);
  margin: 0 auto;
}

.projects-hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(540px, 68svh, 720px);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--deep-graphite);
  color: var(--white);
}

.projects-hero-media,
.projects-hero-media img,
.projects-hero-overlay {
  position: absolute;
  inset: 0;
}

.projects-hero-media {
  z-index: -2;
  margin: 0;
}

.projects-hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
}

.projects-hero-overlay {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(17, 19, 22, 0.12) 0%, rgba(17, 19, 22, 0.28) 42%, rgba(17, 19, 22, 0.88) 100%),
    linear-gradient(90deg, rgba(17, 19, 22, 0.7) 0%, rgba(17, 19, 22, 0.12) 72%);
}

.projects-hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: end;
  padding: clamp(92px, 11vw, 150px) 0 clamp(54px, 6vw, 76px);
}

.projects-hero-copy {
  max-width: 800px;
}

.projects-hero-kicker {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 820;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.projects-hero-copy h1 {
  max-width: 790px;
  margin: 0;
  color: var(--white);
  font-size: clamp(44px, 5.3vw, 72px);
  font-weight: 820;
  line-height: 0.99;
  letter-spacing: -0.035em;
}

.projects-hero-copy > p:not(.projects-hero-kicker) {
  max-width: 650px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 18px;
  font-weight: 470;
  line-height: 1.65;
}

.projects-hero-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-top: 30px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--sarica-red);
  color: var(--white);
  font-size: 14px;
  font-weight: 800;
}

.projects-hero-link svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

.projects-hero-link:hover svg,
.projects-hero-link:focus-visible svg {
  transform: translateY(3px);
}

.projects-hero-caption {
  display: grid;
  gap: 5px;
  min-width: 138px;
  padding: 16px 18px 15px;
  border-top: 3px solid var(--sarica-red);
  background: rgba(22, 24, 27, 0.72);
  backdrop-filter: blur(10px);
}

.projects-hero-caption span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
  text-transform: uppercase;
}

.projects-hero-caption strong {
  color: var(--white);
  font-size: 16px;
  font-weight: 790;
  line-height: 1.1;
}

.projects-catalog {
  scroll-margin-top: var(--header-height);
  padding: clamp(42px, 5vw, 64px) 0 clamp(86px, 9vw, 126px);
  background: var(--warm-white);
}

.projects-section-heading h2 {
  margin: 0;
  color: var(--deep-graphite);
  font-size: clamp(34px, 4vw, 50px);
  font-weight: 810;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.projects-filter-bar {
  position: sticky;
  top: calc(var(--header-height) + 12px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 28px;
  margin-top: 0;
  padding: 10px;
  border: 1px solid rgba(216, 221, 227, 0.92);
  border-radius: 10px;
  background: rgba(250, 250, 248, 0.92);
  box-shadow: 0 14px 34px rgba(32, 35, 39, 0.07);
  backdrop-filter: blur(14px);
}

.projects-filters {
  display: flex;
  align-items: center;
  gap: 5px;
}

.projects-filter {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--steel-gray);
  font-size: 13px;
  font-weight: 760;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.projects-filter:hover,
.projects-filter:focus-visible,
.projects-filter.is-active {
  background: var(--deep-graphite);
  color: var(--white);
}

.projects-featured,
.projects-archive {
  scroll-margin-top: calc(var(--header-height) + 92px);
}

.projects-featured {
  padding-top: clamp(64px, 7vw, 92px);
}

.projects-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.projects-section-heading h2 {
  font-size: clamp(30px, 3.2vw, 42px);
}

.projects-featured-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.featured-project-card {
  display: block;
  color: inherit;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border-gray);
  border-radius: 9px;
  background: var(--white);
  box-shadow: 0 18px 46px rgba(32, 35, 39, 0.07);
}

.featured-project-media {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  background: var(--soft-concrete);
}

.featured-project-media img,
.project-archive-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 520ms ease;
}

.featured-project-card:hover .featured-project-media img,
.featured-project-card:focus-visible .featured-project-media img,
.project-archive-card:hover .project-archive-media img,
.project-archive-card:focus-visible .project-archive-media img {
  transform: scale(1.035);
}

.featured-project-media figcaption,
.project-archive-media figcaption {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 8px 10px;
  border-radius: 4px;
  background: var(--sarica-red);
  color: var(--white);
  font-size: 10px;
  font-weight: 820;
  line-height: 1;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.featured-project-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: 25px 26px 27px;
}

.featured-project-copy p {
  margin: 0 0 8px;
  color: var(--sarica-red);
  font-size: 11px;
  font-weight: 810;
  line-height: 1;
  text-transform: uppercase;
}

.featured-project-copy h3 {
  margin: 0;
  color: var(--deep-graphite);
  font-size: clamp(24px, 2.4vw, 31px);
  font-weight: 810;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.featured-project-copy dl {
  display: flex;
  gap: 25px;
  margin: 0;
}

.featured-project-copy dl div {
  display: grid;
  gap: 5px;
}

.featured-project-copy dt {
  color: var(--steel-gray);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.featured-project-copy dd {
  margin: 0;
  color: var(--deep-graphite);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.25;
  white-space: nowrap;
}

.projects-archive {
  padding-top: clamp(42px, 5vw, 64px);
}

.projects-archive-heading {
  padding-top: 28px;
  border-top: 1px solid var(--border-gray);
}

.projects-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px 20px;
}

.project-archive-card {
  display: block;
  color: inherit;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(216, 221, 227, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.project-archive-card:hover,
.project-archive-card:focus-visible {
  border-color: rgba(111, 119, 130, 0.46);
  box-shadow: 0 18px 42px rgba(32, 35, 39, 0.08);
  transform: translateY(-3px);
}

.project-archive-media {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  background: var(--soft-concrete);
}

.project-archive-media img {
  object-position: center 42%;
}

.project-archive-media figcaption {
  top: auto;
  bottom: 13px;
  left: 13px;
  background: rgba(27, 30, 34, 0.82);
  backdrop-filter: blur(8px);
}

.project-archive-copy {
  padding: 20px 21px 23px;
}

.project-archive-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 13px;
  color: var(--steel-gray);
  font-size: 10px;
  font-weight: 780;
  line-height: 1;
  text-transform: uppercase;
}

.project-archive-eyebrow span:first-child {
  color: var(--sarica-red);
}

.project-archive-copy h3 {
  min-height: 2.35em;
  margin: 0;
  color: var(--deep-graphite);
  font-size: 20px;
  font-weight: 790;
  line-height: 1.17;
  letter-spacing: -0.018em;
}

.project-archive-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(216, 221, 227, 0.9);
  color: var(--steel-gray);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.project-archive-meta span + span {
  position: relative;
  padding-left: 14px;
}

.project-archive-meta span + span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--sarica-red);
  transform: translateY(-50%);
}

.projects-load-more {
  display: flex;
  justify-content: center;
  margin-top: 46px;
}

.projects-load-more button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid var(--deep-graphite);
  border-radius: 6px;
  background: transparent;
  color: var(--deep-graphite);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.projects-load-more button:hover,
.projects-load-more button:focus-visible {
  background: var(--deep-graphite);
  color: var(--white);
}

.projects-load-more svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.projects-metrics {
  background: var(--deep-graphite);
  color: var(--white);
}

.projects-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-right: 1px solid rgba(255, 255, 255, 0.13);
  border-left: 1px solid rgba(255, 255, 255, 0.13);
}

.projects-metrics-grid > div {
  display: grid;
  align-content: center;
  gap: 13px;
  min-height: 190px;
  padding: 36px 38px;
  border-right: 1px solid rgba(255, 255, 255, 0.13);
}

.projects-metrics-grid > div:last-child {
  border-right: 0;
}

.projects-metrics strong {
  color: var(--white);
  font-size: clamp(32px, 3.7vw, 48px);
  font-weight: 830;
  line-height: 1;
}

.projects-metrics span {
  max-width: 290px;
  padding-top: 12px;
  border-top: 3px solid var(--sarica-red);
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.projects-cta {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 1080px) {
  .projects-hero-content {
    gap: 32px;
  }

  .featured-project-copy {
    grid-template-columns: 1fr;
  }

  .featured-project-copy dl {
    justify-content: space-between;
  }

  .projects-archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .projects-shell {
    width: min(calc(100% - 28px), 620px);
  }

  .projects-hero {
    min-height: min(680px, calc(100svh - var(--header-height)));
  }

  .projects-hero-content {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 130px 0 42px;
  }

  .projects-hero-caption {
    justify-self: start;
  }

  .projects-hero-copy h1 {
    font-size: 46px;
  }

  .projects-filter-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }

  .projects-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .projects-filter {
    justify-content: center;
    padding: 0 10px;
  }

  .projects-featured-grid {
    grid-template-columns: 1fr;
  }

  .featured-project-copy {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .projects-metrics-grid > div {
    min-height: 168px;
    padding: 30px 24px;
  }
}

@media (max-width: 640px) {
  .projects-hero {
    min-height: 610px;
  }

  .projects-hero-media img {
    object-position: center center;
  }

  .projects-hero-content {
    padding: 108px 0 34px;
  }

  .projects-hero-copy h1 {
    font-size: 37px;
  }

  .projects-hero-copy > p:not(.projects-hero-kicker) {
    margin-top: 19px;
    font-size: 16px;
    line-height: 1.55;
  }

  .projects-hero-link {
    margin-top: 24px;
  }

  .projects-section-heading h2 {
    font-size: 31px;
  }

  .projects-filter-bar {
    top: calc(var(--header-height) + 7px);
    padding: 7px;
  }

  .projects-filters {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .projects-filters::-webkit-scrollbar {
    display: none;
  }

  .projects-filter {
    flex: 0 0 auto;
    min-height: 41px;
  }

  .projects-section-heading {
    align-items: start;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 23px;
  }

  .featured-project-copy {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .featured-project-copy dl {
    justify-content: flex-start;
  }

  .projects-archive-grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .project-archive-copy h3 {
    min-height: 0;
  }

  .projects-metrics-grid {
    grid-template-columns: 1fr;
  }

  .projects-metrics-grid > div {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  }

  .projects-metrics-grid > div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 420px) {
  .projects-shell {
    width: min(calc(100% - 24px), 380px);
  }

  .projects-hero-copy h1 {
    font-size: 33px;
  }

  .projects-hero-caption {
    padding: 13px 15px;
  }

  .featured-project-media {
    aspect-ratio: 4 / 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .projects-hero-link svg,
  .featured-project-media img,
  .project-archive-card,
  .project-archive-media img {
    transition: none;
  }

  .featured-project-card:hover .featured-project-media img,
  .project-archive-card:hover,
  .project-archive-card:hover .project-archive-media img {
    transform: none;
  }
}
