.projects-physics {
  height: 320svh;
  position: relative;
  background: var(--paper);
}

.projects-physics-pin {
  height: 100svh;
  position: sticky;
  top: 0;
  overflow: hidden;
  background: var(--paper);
}

.projects-physics-world {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  touch-action: pan-y;
}

.projects-physics-body {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  user-select: none;
  will-change: transform;
}
.projects-physics-world:not(.is-ready) .projects-physics-body { opacity: 0; }

.projects-physics.is-live .projects-physics-body { cursor: grab; }
.projects-physics.is-live .projects-physics-body:active { cursor: grabbing; }
.projects-physics-body.is-dragging { z-index: 30; cursor: grabbing; }

.projects-physics-title {
  width: max-content;
  margin: 0;
  color: var(--ink);
  font-size: var(--heading-section);
  line-height: .94;
  font-weight: 520;
  letter-spacing: -.065em;
  text-align: center;
  white-space: nowrap;
}

.projects-shape {
  --shape-shadow: 0 20px 46px rgba(20, 20, 20, .11);
  box-shadow: var(--shape-shadow);
  outline: 1px solid rgba(20, 20, 20, .07);
  outline-offset: -1px;
  transition: box-shadow .18s ease;
}
.projects-shape.is-dragging { --shape-shadow: 0 30px 70px rgba(20, 20, 20, .18); }

.projects-shape-blue { width: clamp(210px, 22vw, 330px); aspect-ratio: 1.58; border-radius: 34px; background: #3978f6; }
.projects-shape-yellow { width: clamp(145px, 15vw, 225px); aspect-ratio: 1; border-radius: 50%; background: #ffd84d; }
.projects-shape-coral { width: clamp(200px, 21vw, 315px); aspect-ratio: 2.08; border-radius: 999px; background: #ff745e; }
.projects-shape-violet { width: clamp(170px, 18vw, 264px); aspect-ratio: 1; border-radius: 40px; background: #8b6df6; }
.projects-shape-green { width: clamp(180px, 19vw, 285px); aspect-ratio: 1; border-radius: 50%; background: #65d779; }
.projects-shape-cyan { width: clamp(145px, 15vw, 220px); aspect-ratio: .72; border-radius: 110px; background: #5fd9e8; }
.projects-shape-pink { width: clamp(155px, 16vw, 238px); aspect-ratio: 1; border-radius: 42px; background: #ff91c7; }
.projects-placeholder-shape,
.projects-placeholder-shape.is-dragging {
  --shape-shadow: none;
  background: transparent;
  outline-color: rgba(20, 20, 20, .24);
}
.projects-project-card {
  width: clamp(105px, 11vw, 160px);
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: #2e2e2e;
  cursor: pointer;
}
.projects-project-card-square { border-radius: 18px; }
.projects-project-card img,
.project-focus-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
}
.projects-project-card:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }
.projects-project-card.is-focus-source { opacity: 0; pointer-events: none; }

.project-focus {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overscroll-behavior: contain;
  touch-action: none;
  pointer-events: none;
}
.project-focus-backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: rgba(16, 16, 16, .62);
  opacity: 0;
  transition: opacity .36s ease;
  pointer-events: none;
  cursor: default;
}
.project-focus.is-open .project-focus-backdrop { opacity: 1; pointer-events: auto; }
.project-focus-close {
  width: 48px;
  height: 48px;
  position: absolute;
  top: max(20px, env(safe-area-inset-top));
  right: max(20px, env(safe-area-inset-right));
  z-index: 2;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  color: #fff;
  background: rgba(20, 20, 20, .5);
  backdrop-filter: blur(12px);
  opacity: 0;
  cursor: pointer;
  pointer-events: none;
}
.project-focus.is-open .project-focus-close { opacity: 1; pointer-events: auto; }
.project-focus-close svg { width: 24px; height: 24px; }
.project-focus-content {
  width: min(440px, calc(100vw - 44px));
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  margin: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.project-focus-content:focus { outline: none; }
.project-focus-media {
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  display: block;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: #2e2e2e;
  box-shadow: 0 32px 90px rgba(20, 20, 20, .22);
  transform-origin: center;
  pointer-events: auto;
  cursor: zoom-out;
}
.project-focus.is-square .project-focus-media { border-radius: 24px; }
.project-focus-media:focus-visible { outline: 3px solid var(--ink); outline-offset: 6px; }
.project-focus figcaption {
  margin-top: 22px;
  text-align: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .32s ease .18s, transform .48s cubic-bezier(.22, 1, .36, 1) .12s;
}
.project-focus.is-open figcaption { opacity: 1; transform: translateY(0); }
.project-focus figcaption h3 {
  margin: 0 0 7px;
  color: #fff;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1;
  font-weight: 560;
  letter-spacing: -.05em;
}
.project-focus figcaption p {
  max-width: 520px;
  margin: 0 auto;
  color: rgba(255, 255, 255, .72);
  font-size: clamp(13px, 1.3vw, 16px);
  line-height: 1.45;
}
.project-focus-action {
  min-height: 48px;
  margin: 20px auto 0;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  pointer-events: auto;
  transition: transform .2s ease, background-color .2s ease;
}
.project-focus-action:hover { background: #f0f0ed; transform: translateY(-2px); }
.project-focus-action:active { transform: scale(.98); }
.project-focus-action:focus-visible { outline: 3px solid rgba(255, 255, 255, .48); outline-offset: 4px; }
.project-focus-action svg { width: 18px; height: 18px; flex: 0 0 auto; }

@media (max-width: 720px) {
  .projects-physics { height: 305svh; }
  .projects-physics-title {
    width: calc(100vw - 44px);
    font-size: var(--heading-section);
    line-height: .92;
    white-space: normal;
    text-wrap: balance;
  }
  .projects-physics-body { pointer-events: none; cursor: default !important; }
  .projects-project-card { pointer-events: auto; cursor: pointer !important; touch-action: manipulation; }
  .projects-shape-blue { width: 180px; }
  .projects-shape-yellow { width: 120px; }
  .projects-shape-coral { width: 170px; }
  .projects-shape-violet { width: 142px; }
  .projects-shape-green { width: 154px; }
  .projects-shape-cyan { width: 120px; }
  .projects-shape-pink { width: 136px; }
  .projects-project-card { width: 88px; }
  .project-focus-content { width: min(360px, calc(100vw - 38px)); }
  .project-focus figcaption { margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .projects-physics { height: 100svh; }
  .projects-physics-body { cursor: default !important; }
  .project-focus figcaption,
  .project-focus-backdrop { transition: none; }
}
