body.shape-grid-active {
  background: #100b18;
}

body.shape-grid-active #root {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

body.shape-grid-active main,
body.shape-grid-active .works-page,
body.shape-grid-active .detail-page {
  position: relative;
  background: transparent;
}

body.shape-grid-active .works-inner,
body.shape-grid-active .detail-inner {
  position: relative;
  z-index: 2;
}

body.shape-grid-active .works-card,
body.shape-grid-active .project-card,
body.shape-grid-active .dual-block,
body.shape-grid-active .sidebar-block,
body.shape-grid-active .gallery-item,
body.shape-grid-active .detail-hero-img-wrap {
  background: rgba(5, 4, 8, 0.9);
  border-color: rgba(108, 94, 142, 0.34);
  box-shadow: 0 20px 76px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(8px);
}

body.shape-grid-active .works-card-placeholder {
  background: linear-gradient(145deg, rgba(5, 4, 8, 0.92), rgba(10, 8, 16, 0.88));
  color: rgba(242, 242, 242, 0.72);
}

.aux-tag {
  background: var(--bg-primary, #0a0a0d);
}

body.shape-grid-active .about-wrap,
body.shape-grid-active .projects,
body.shape-grid-active .contact {
  position: relative;
  z-index: 1;
  background: transparent;
}

.shape-grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 420ms ease;
  background:
    radial-gradient(circle at 34% 24%, rgba(165, 104, 255, 0.22), transparent 34rem),
    radial-gradient(circle at 72% 70%, rgba(68, 214, 44, 0.12), transparent 30rem),
    #100b18;
}

body.shape-grid-active .shape-grid-bg {
  opacity: 0.5;
}

.shape-grid-bg canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.shape-grid-bg::before,
.shape-grid-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.shape-grid-bg::before {
  background:
    linear-gradient(90deg, rgba(16, 11, 24, 0.72), transparent 14%, transparent 86%, rgba(16, 11, 24, 0.78)),
    linear-gradient(180deg, rgba(16, 11, 24, 0.18), transparent 30%, rgba(16, 11, 24, 0.52));
}

.shape-grid-bg::after {
  opacity: 0.2;
  mix-blend-mode: screen;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  background-size: 100% 4px, 180px 180px;
}

body.shape-grid-active .navbar {
  background: linear-gradient(180deg, rgba(13, 10, 18, 0.86), rgba(13, 10, 18, 0.34));
}

@media (prefers-reduced-motion: reduce) {
  .shape-grid-bg {
    transition: none;
  }
}
