.projects-page main {
  overflow: hidden;
}

body.project-modal-open {
  overflow: hidden;
}

.projects-page h1,
.projects-page h2,
.projects-page p {
  margin-top: 0;
}

.projects-page .desktop-nav a.is-current,
.projects-page .desktop-nav a[aria-current="page"] {
  color: var(--theme-primary);
}

.projects-hero {
  min-height: 680px;
  position: relative;
  padding: 30px 0 70px;
  isolation: isolate;
  background:
    radial-gradient(circle at 4% 9%, rgba(var(--theme-primary-rgb), .11), transparent 28%),
    radial-gradient(circle at 92% 88%, rgba(var(--theme-primary-rgb), .07), transparent 27%),
    var(--gradient-section-reverse);
}

.projects-orbit {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(var(--theme-primary-rgb), .1);
  border-radius: 50%;
  pointer-events: none;
}

.projects-orbit.orbit-one {
  width: 390px;
  height: 390px;
  top: -230px;
  right: -115px;
  box-shadow: 0 0 0 48px rgba(var(--theme-primary-rgb), .018), 0 0 0 96px rgba(var(--theme-primary-rgb), .012);
}

.projects-orbit.orbit-two {
  width: 265px;
  height: 265px;
  left: -155px;
  bottom: -120px;
  box-shadow: 0 0 0 38px rgba(var(--theme-primary-rgb), .02);
}

.projects-breadcrumb {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 35px;
  color: var(--theme-muted);
  font-size: .71rem;
  font-weight: 750;
}

.projects-breadcrumb strong {
  color: var(--theme-primary);
}

.projects-hero-grid {
  display: grid;
  grid-template-columns: .86fr 1.14fr;
  align-items: center;
  gap: clamp(50px, 7vw, 100px);
}

.projects-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--theme-primary);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .16em;
}

.projects-eyebrow::before {
  content: "";
  width: 30px;
  height: 2px;
  background: var(--theme-primary);
}

.projects-hero-copy h1 {
  max-width: 570px;
  margin: 18px 0 21px;
  color: var(--theme-text);
  font-family: var(--font-display);
  font-size: clamp(3rem, 4.8vw, 4.9rem);
  line-height: .99;
  letter-spacing: -.057em;
  text-wrap: balance;
}

.projects-hero-copy > p {
  max-width: 540px;
  margin-bottom: 28px;
  color: var(--theme-muted);
  font-size: .96rem;
  line-height: 1.72;
}

.projects-hero-copy > a {
  min-height: 53px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 23px;
  color: var(--white);
  background: var(--gradient-brand);
  border-radius: var(--theme-radius);
  box-shadow: 0 16px 34px rgba(var(--theme-primary-rgb), .2);
  font-size: .8rem;
  font-weight: 900;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.projects-hero-copy > a:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(var(--theme-primary-rgb), .26);
}

.projects-hero-copy > a svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.projects-stats {
  max-width: 540px;
  margin-top: 34px;
  padding-top: 23px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--theme-line);
}

.projects-stats > div {
  min-width: 0;
  padding: 0 18px;
  display: grid;
  gap: 5px;
  border-right: 1px solid var(--theme-line);
}

.projects-stats > div:first-child { padding-left: 0; }
.projects-stats > div:last-child { border-right: 0; }
.projects-stats strong { color: var(--theme-primary); font-size: 1.55rem; font-weight: 900; line-height: 1; }
.projects-stats span { color: var(--theme-muted); font-size: .61rem; font-weight: 750; line-height: 1.3; }

.projects-featured {
  min-height: 510px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(var(--theme-primary-rgb), .14);
  border-radius: calc(var(--theme-radius) + 10px);
  box-shadow: 0 30px 70px rgba(var(--theme-secondary-rgb), .17);
}

.projects-featured::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(var(--theme-primary-rgb), .82));
  pointer-events: none;
}

.projects-featured > img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: block;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2,.7,.2,1);
}

.projects-featured:hover > img { transform: scale(1.035); }

.featured-project-copy {
  position: absolute;
  z-index: 2;
  right: 26px;
  bottom: 25px;
  left: 26px;
  display: grid;
  gap: 6px;
  color: var(--white);
}

.featured-project-copy span { color: rgba(255,255,255,.72); font-size: .61rem; font-weight: 900; letter-spacing: .14em; }
.featured-project-copy strong { max-width: 440px; font-size: 1.42rem; font-weight: 900; line-height: 1.15; }
.featured-project-copy small { color: rgba(255,255,255,.8); font-size: .69rem; }

.featured-project-number {
  position: absolute;
  z-index: 2;
  top: 22px;
  right: 24px;
  color: rgba(255,255,255,.82);
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.projects-gallery-section {
  position: relative;
  padding: 92px 0 105px;
  background:
    linear-gradient(rgba(var(--theme-primary-rgb), .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--theme-primary-rgb), .025) 1px, transparent 1px),
    var(--theme-background);
  background-size: 54px 54px;
}

.projects-gallery-heading {
  max-width: 700px;
  margin: 0 auto 31px;
  text-align: center;
}

.projects-gallery-heading .section-kicker { justify-content: center; }
.projects-gallery-heading h2 { margin: 0 0 14px; color: var(--theme-text); font-size: clamp(2.35rem, 4vw, 3.65rem); line-height: 1.04; letter-spacing: -.05em; }
.projects-gallery-heading p { margin-bottom: 0; color: var(--theme-muted); font-size: .91rem; line-height: 1.7; }

.project-filters {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 38px;
  padding: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  background: var(--theme-soft);
  border: 1px solid var(--theme-line);
  border-radius: 99px;
  scrollbar-width: none;
}

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

.project-filter {
  min-height: 40px;
  flex: 0 0 auto;
  padding: 0 17px;
  border: 0;
  border-radius: 99px;
  color: var(--theme-muted);
  background: transparent;
  font-size: .71rem;
  font-weight: 850;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}

.project-filter:hover { color: var(--theme-primary); }
.project-filter.is-active { color: var(--white); background: var(--gradient-brand); box-shadow: 0 8px 20px rgba(var(--theme-primary-rgb), .2); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 18px;
}

.projects-gallery-card {
  width: 100%;
  min-height: 320px;
  grid-column: span 4;
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(var(--theme-primary-rgb), .12);
  border-radius: calc(var(--theme-radius) + 5px);
  color: var(--white);
  background: var(--theme-surface-strong);
  box-shadow: var(--shadow-soft);
  text-align: left;
  cursor: pointer;
  isolation: isolate;
  animation: project-card-in .45s both;
}

.projects-gallery-card:nth-child(1),
.projects-gallery-card:nth-child(6),
.projects-gallery-card:nth-child(9) { grid-column: span 8; }

.projects-grid[data-count="1"] .projects-gallery-card { grid-column: span 12; }
.projects-grid[data-count="2"] .projects-gallery-card,
.projects-grid[data-count="4"] .projects-gallery-card { grid-column: span 6; }
.projects-grid[data-count="3"] .projects-gallery-card { grid-column: span 4; }

.projects-gallery-card::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(180deg, transparent 34%, rgba(var(--theme-primary-rgb), .9));
}

.projects-gallery-card img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: block;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2,.7,.2,1), filter .4s ease;
}

.projects-gallery-card:hover img { transform: scale(1.045); filter: saturate(1.06); }

.project-card-copy {
  position: absolute;
  z-index: 2;
  right: 22px;
  bottom: 21px;
  left: 22px;
  display: grid;
  gap: 5px;
}

.project-card-copy > span { color: rgba(255,255,255,.72); font-size: .58rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.project-card-copy strong { font-size: 1.08rem; font-weight: 900; line-height: 1.2; }
.project-card-copy small { color: rgba(255,255,255,.8); font-size: .64rem; }

.project-card-expand {
  width: 39px;
  height: 39px;
  position: absolute;
  z-index: 3;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: rgba(var(--theme-primary-rgb), .55);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.project-card-expand svg { width: 18px; height: 18px; }
.project-card-expand svg,
.lightbox-close svg,
.lightbox-controls svg,
.projects-cta-inner > a svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.projects-gallery-card[hidden] { display: none; }

.projects-empty {
  margin: 28px 0 0;
  color: var(--theme-muted);
  text-align: center;
}

@keyframes project-card-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.projects-cta {
  position: relative;
  overflow: hidden;
  padding: 62px 0;
  color: var(--white);
  background: var(--gradient-brand);
}

.projects-cta::before {
  content: "";
  width: 320px;
  height: 320px;
  position: absolute;
  right: -90px;
  top: -190px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(255,255,255,.025), 0 0 0 90px rgba(255,255,255,.016);
}

.projects-cta-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 45px;
}

.projects-cta-inner > div > span { color: rgba(255,255,255,.68); font-size: .64rem; font-weight: 900; letter-spacing: .15em; }
.projects-cta-inner h2 { max-width: 700px; margin: 8px 0 10px; color: var(--white); font-size: clamp(2rem, 3.3vw, 3.15rem); line-height: 1.05; letter-spacing: -.045em; }
.projects-cta-inner p { margin-bottom: 0; color: rgba(255,255,255,.76); font-size: .83rem; }
.projects-cta-inner > a { min-width: 190px; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 0 20px; color: var(--theme-primary); background: var(--white); border-radius: var(--theme-radius); font-size: .78rem; font-weight: 900; text-decoration: none; box-shadow: 0 16px 34px rgba(var(--theme-secondary-rgb), .2); }
.projects-cta-inner > a svg { width: 18px; height: 18px; }

.project-lightbox {
  width: min(1080px, calc(100% - 48px));
  max-width: none;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: calc(var(--theme-radius) + 8px);
  color: var(--theme-text);
  background: var(--theme-background);
  box-shadow: 0 38px 90px rgba(0,0,0,.34);
}

.project-lightbox[open] {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(270px, .65fr);
}

.project-lightbox::backdrop { background: rgba(2,12,30,.82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lightbox-media { min-height: 570px; overflow: hidden; border-radius: inherit; }
.lightbox-media img { width: 100%; height: 100%; display: block; object-fit: cover; }
.lightbox-copy { align-self: center; padding: 38px 32px 80px; }
.lightbox-copy > span { color: var(--theme-primary); font-size: .62rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.lightbox-copy h2 { margin: 11px 0 14px; font-size: clamp(1.7rem, 2.8vw, 2.55rem); line-height: 1.05; letter-spacing: -.04em; }
.lightbox-copy p { color: var(--theme-muted); font-size: .82rem; line-height: 1.7; }
.lightbox-copy small { color: var(--theme-primary); font-size: .68rem; font-weight: 800; }
.lightbox-close { width: 43px; height: 43px; position: absolute; z-index: 3; top: -53px; right: 0; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; color: var(--white); background: rgba(255,255,255,.1); cursor: pointer; }
.lightbox-close svg { width: 21px; height: 21px; }
.lightbox-controls { position: absolute; right: 30px; bottom: 25px; display: flex; align-items: center; gap: 12px; }
.lightbox-controls button { width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid var(--theme-line); border-radius: 50%; color: var(--theme-primary); background: var(--theme-pale); cursor: pointer; }
.lightbox-controls button svg { width: 18px; height: 18px; }
.lightbox-controls span { min-width: 38px; color: var(--theme-muted); text-align: center; font-size: .64rem; font-weight: 800; }

@media (max-width: 980px) {
  .projects-hero { min-height: 0; }
  .projects-hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .projects-hero-copy { max-width: 720px; }
  .projects-hero-copy h1 { max-width: 700px; }
  .projects-featured { min-height: 520px; }
  .projects-gallery-card { grid-column: span 6; }
  .projects-gallery-card:nth-child(1),
  .projects-gallery-card:nth-child(6),
  .projects-gallery-card:nth-child(9),
  .projects-grid[data-count="1"] .projects-gallery-card,
  .projects-grid[data-count="2"] .projects-gallery-card,
  .projects-grid[data-count="3"] .projects-gallery-card,
  .projects-grid[data-count="4"] .projects-gallery-card { grid-column: span 6; }
  .projects-grid[data-count="1"] .projects-gallery-card,
  .projects-grid[data-count="3"] .projects-gallery-card:last-child,
  .projects-grid[data-count="9"] .projects-gallery-card:last-child { grid-column: span 12; }
  .project-lightbox[open] { grid-template-columns: 1fr; max-height: calc(100svh - 90px); overflow-y: auto; }
  .lightbox-media { min-height: min(58vw, 510px); border-radius: calc(var(--theme-radius) + 8px) calc(var(--theme-radius) + 8px) 0 0; }
  .lightbox-copy { padding: 28px 25px 82px; }
}

@media (max-width: 620px) {
  .projects-hero { padding: 14px 0 46px; }
  .projects-breadcrumb { margin-bottom: 23px; font-size: .66rem; }
  .projects-hero-grid { gap: 32px; }
  .projects-eyebrow { font-size: .66rem; }
  .projects-hero-copy h1 { margin: 14px 0 17px; font-size: clamp(2.5rem, 12vw, 3.25rem); line-height: 1.01; }
  .projects-hero-copy > p { margin-bottom: 22px; font-size: .87rem; line-height: 1.68; }
  .projects-hero-copy > a { width: 100%; }
  .projects-stats { margin-top: 25px; padding-top: 18px; }
  .projects-stats > div { padding: 0 9px; text-align: center; }
  .projects-stats strong { font-size: 1.3rem; }
  .projects-stats span { font-size: .56rem; }
  .projects-featured { min-height: 105vw; max-height: 470px; margin-inline: -16px; border-radius: 0; }
  .featured-project-copy { right: 18px; bottom: 18px; left: 18px; }
  .featured-project-copy strong { font-size: 1.15rem; }
  .projects-gallery-section { padding: 58px 0 68px; background-size: 42px 42px; }
  .projects-gallery-heading { margin-bottom: 24px; text-align: left; }
  .projects-gallery-heading .section-kicker { justify-content: flex-start; }
  .projects-gallery-heading h2 { font-size: clamp(2.2rem, 10.8vw, 2.8rem); }
  .projects-gallery-heading p { font-size: .84rem; }
  .project-filters {
    width: 100%;
    margin: 0 0 27px;
    padding: 7px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    overflow: visible;
    border-radius: 15px;
    background: rgba(var(--theme-primary-rgb), .055);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  }
  .project-filter {
    width: 100%;
    min-height: 43px;
    padding: 0 9px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: rgba(255,255,255,.72);
    font-size: .68rem;
  }
  .project-filter.is-active {
    border-color: rgba(255,255,255,.24);
    background: var(--gradient-brand);
  }
  .projects-grid { grid-template-columns: 1fr; gap: 13px; }
  .projects-gallery-card,
  .projects-gallery-card:nth-child(1),
  .projects-gallery-card:nth-child(6),
  .projects-gallery-card:nth-child(9),
  .projects-grid[data-count] .projects-gallery-card,
  .projects-grid[data-count] .projects-gallery-card:last-child { min-height: 92vw; max-height: 430px; grid-column: 1; }
  .project-card-copy { right: 18px; bottom: 17px; left: 18px; }
  .projects-cta { padding: 49px 0; }
  .projects-cta-inner { display: grid; gap: 25px; }
  .projects-cta-inner h2 { font-size: clamp(2.1rem, 10vw, 2.7rem); }
  .projects-cta-inner > a { width: 100%; }
  .project-lightbox { width: calc(100% - 24px); }
  .lightbox-media { min-height: 72vw; }
  .lightbox-copy { padding: 23px 20px 76px; }
  .lightbox-controls { right: 18px; bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .projects-gallery-card { animation: none; }
  .projects-gallery-card img,
  .projects-featured > img { transition: none; }
}
