html:has(.project-case-modal[open]) { overflow: hidden; }
.project-case-modal {
  --case-bg: #101813;
  --case-panel: #1b2a22;
  --case-text: #eff6ec;
  --case-muted: #c2d0c6;
  --case-line: #53695b;
  --case-accent: #b6f74f;
  --case-glow: #3b6039;
  position: fixed;
  inset: 0;
  width: min(1160px, calc(100% - 44px));
  max-width: none;
  max-height: calc(100dvh - 44px);
  margin: auto;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--case-text);
  background: var(--case-bg);
  border: 1px solid var(--case-line);
  border-radius: 1.15rem;
  box-shadow: 0 25px 100px #020503b3;
  scrollbar-color: #748879 var(--case-bg);
}
.project-case-modal[data-project="meyer"] { --case-glow:#534372; --case-accent:#e3defd; }
.project-case-modal[data-project="gold"] { --case-glow:#5c4728; --case-accent:#ffe2a4; }
.project-case-modal::backdrop { background:#08110dd9; backdrop-filter:blur(7px); }
.project-case-modal[open] { animation:case-open .28s cubic-bezier(.2,.8,.3,1) both; }
@keyframes case-open {
  from { opacity:0; transform:translateY(12px) scale(.988); }
  to { opacity:1; transform:translateY(0) scale(1); }
}
.project-case-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 57px;
  padding: .35rem clamp(.85rem, 3vw, 1.5rem);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:1rem;
  background:#101813f5;
  border-bottom:1px solid var(--case-line);
}
.project-case-bar form { margin:0; }
.project-case-brand { display:inline-flex; align-items:center; gap:.55rem; font-weight:700; }
.project-case-close {
  width:44px; height:44px; display:grid; place-items:center;
  padding:0; border:1px solid var(--case-line); border-radius:50%;
  background:#203229; color:var(--case-text); font-size:1.75rem; line-height:1; cursor:pointer;
}
.project-case-close:hover { background:var(--case-accent); color:#152111; }
.project-case-intro {
  display:grid;
  grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
  align-items:center;
  gap:clamp(1rem,4vw,3.25rem);
  padding:clamp(1.15rem,5vw,3.85rem);
  background:radial-gradient(ellipse at 85% 94%,var(--case-glow),transparent 67%), #1b2720;
  border-bottom:1px solid var(--case-line);
}
.project-case-intro :is(h2,p) { overflow-wrap:anywhere; }
.project-case-intro h2 {
  font-size:clamp(1.8rem,4.4vw,4.2rem); line-height:1.05; color:var(--case-text); margin-bottom:.7rem;
}
.project-case-intro p,.project-case-details p,.project-case-details dd { color:var(--case-muted); }
.project-case-intro p:is(.eyebrow,.project-case-heading) { color:var(--case-text); }
.project-case-intro .eyebrow { color:var(--case-accent); }
.project-case-heading { font-weight:700; font-size:clamp(1.05rem,2vw,1.35rem); }
.project-case-screen { margin:0; min-width:0; overflow:hidden; border:1px solid #97aa9a; border-radius:.7rem; box-shadow:0 18px 45px #070d08a0; }
.project-case-screen img { display:block; width:100%; height:auto; }
.studio-edition .project-case-modal .work-button-dark { background:var(--case-accent); color:#152111; border-color:var(--case-accent); }
.studio-edition .project-case-modal .work-button:hover { background:#f6f8f4; color:#152111; border-color:#f6f8f4; }
.project-case-modal :focus-visible { outline:3px solid var(--case-accent); outline-offset:3px; }
.project-case-details { padding:clamp(1.15rem,5vw,3.85rem); }
.project-case-details h2 { font-size:clamp(1.2rem,2.6vw,2rem); margin:1.55rem 0 .7rem; color:var(--case-text); }
.project-case-details h2:first-child { margin-top:0; }
.project-case-details :is(.feature-grid > div,.case-stack > div,.scope) { background:var(--case-panel); color:var(--case-text); border-color:var(--case-line); border-radius:.5rem; }
.project-case-details .feature-grid h3 { font:700 1rem var(--font-body); letter-spacing:-.015em; }
.project-case-details .case-photo { margin-inline:0; }
.project-case-details .case-photo figcaption { color:var(--case-muted); }
.project-case-permalink { color:var(--case-accent); text-decoration:underline; text-underline-offset:.2em; display:inline-block; padding:.75rem 0 .25rem; }
@media (max-width:720px) {
  .project-case-modal { width:calc(100% - 18px); max-height:calc(100dvh - 18px); border-radius:.8rem; }
  .project-case-intro { grid-template-columns:minmax(0,1fr); }
  .project-case-details :is(.feature-grid,.case-stack) { grid-template-columns:minmax(0,1fr); }
}
@media (prefers-reduced-motion:reduce) {
  .project-case-modal[open] { animation:none; }
}
