.work-library { padding: clamp(5rem, 9vw, 8rem) 0; background: var(--white); }
.work-library-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.work-library-heading h1 { max-width: 820px; margin-bottom: 0; color: var(--ocean); font-size: clamp(3.2rem, 6vw, 6rem); font-weight: 520; }
.work-library-heading p { margin-bottom: 0; color: var(--muted); font-size: 0.86rem; }
.work-filters { margin-bottom: 2.5rem; display: flex; gap: 0.65rem; flex-wrap: wrap; }
.work-filters button { padding: 0.65rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ocean); cursor: pointer; font-size: 0.84rem; font-weight: 650; }
.work-filters button[aria-pressed="true"] { border-color: var(--green); background: var(--green); color: var(--white); }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.project-card { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--paper); }
.project-card[hidden] { display: none; }
.project-card figure { position: relative; margin: 0; height: 245px; overflow: hidden; background: var(--stone); }
.project-card figure img { width: 100%; height: 100%; object-fit: cover; }
.project-card figure.work-image-contained { background: #8700d1; }
.project-card figure.work-image-contained img { object-fit: contain; }
#provincial-policy-recommendations figure img { object-position: 50% 48%; }
#group-therapy-curriculum figure img { object-position: 50% 46%; }
#practical-guidance figure img { object-position: 50% 50%; }
.work-image-blurred img { filter: blur(3.2px) saturate(0.82); transform: scale(1.025); }
.project-card-copy { flex: 1; padding: 1.6rem; display: flex; flex-direction: column; }
.project-service { margin-bottom: 1rem; color: var(--green); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.project-card h3 { margin-bottom: 1rem; color: var(--ocean); font-size: clamp(1.35rem, 2vw, 1.75rem); font-weight: 540; }
.project-card-copy > p:not(.project-service) { color: #46443f; font-size: 0.92rem; }
.project-card button { margin-top: auto; padding: 1rem 0 0; display: flex; justify-content: space-between; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ocean); font-weight: 650; text-align: left; cursor: pointer; }

.work-dialog { width: min(980px, calc(100vw - 32px)); max-height: calc(100svh - 32px); padding: 0; border: 0; color: var(--ink); background: var(--paper); box-shadow: 0 25px 80px rgba(3,29,41,0.36); }
.work-dialog::backdrop { background: rgba(3,29,41,0.72); backdrop-filter: blur(5px); }
.work-dialog-inner { position: relative; display: grid; grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr); }
.work-dialog figure { margin: 0; min-height: 100%; background: var(--stone); }
.work-dialog figure img { width: 100%; height: 100%; min-height: 560px; object-fit: cover; }
.work-dialog figure.work-image-contained { display: grid; place-items: center; background: #8700d1; }
.work-dialog figure.work-image-contained img { object-fit: contain; }
.dialog-copy { padding: clamp(2rem, 5vw, 4rem); overflow: auto; }
.dialog-copy h2 { margin-bottom: 1.5rem; color: var(--ocean); font-size: clamp(2rem, 3.5vw, 3.25rem); font-weight: 540; }
.dialog-copy [data-dialog-body] p { color: #3f3d38; }
.dialog-actions { margin-top: 2rem; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.dialog-close { position: absolute; z-index: 2; top: 0.8rem; right: 0.8rem; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--ocean); font-size: 1.6rem; line-height: 1; cursor: pointer; }

@media (max-width: 980px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) {
  .work-library { padding-top: 3.75rem; }
  .work-library-heading h1 { font-size: clamp(3rem, 14vw, 4.7rem); }
  .work-library-heading { align-items: flex-start; flex-direction: column; gap: 0.6rem; }
  .work-grid { grid-template-columns: 1fr; }
  .project-card figure { height: 260px; }
  .work-dialog-inner { grid-template-columns: 1fr; }
  .work-dialog figure { min-height: 220px; max-height: 270px; }
  .work-dialog figure img { min-height: 220px; }
  .dialog-copy { padding: 2rem 1.25rem; }
}
