/* Shared project preview, independent of home animation and list styles. */
.project-modal[hidden], .project-modal [hidden] { display: none !important; }
.project-modal { position: fixed; inset: 0; z-index: 20000; }
.project-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); animation: project-backdrop-in .25s ease; }
.project-modal-dialog { position: absolute; inset: 0; pointer-events: none; }
.project-modal-panel {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw; height: 90vh; height: 90dvh;
  overflow: hidden;
  border-radius: 10px;
  background: #f6f5f4;
  box-shadow: 0 30px 60px rgba(0,0,0,.2);
  pointer-events: auto;
  animation: project-panel-in .3s ease;
}
.project-modal-frame { display: block; width: 100%; height: 100%; border: 0; }
.project-modal-close {
  position: absolute; top: 40px; right: 30px;
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #215c38; color: #f6f5f4; font-size: 20px;
  cursor: pointer; pointer-events: auto; z-index: 2;
  transition: transform .3s ease, background-color .3s ease;
}
.project-modal-close:hover { transform: rotate(90deg); background: #37ff00; color: #215c38; }
.project-modal-close:focus { outline: none; }
.project-modal.is-keyboard .project-modal-close:focus { outline: 2px solid #f6f5f4; outline-offset: 4px; }
.project-modal-status { position: absolute; inset: 0; z-index: 1; background: #f6f5f4; padding: 60px 30px; line-height: 1.6; }
.project-modal-status a { display: inline-block; margin-top: 20px; }
@keyframes project-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes project-panel-in { from { opacity: 0; transform: translate(-50%,-48%) scale(.98); } to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }
@media (max-width: 768px) {
  .project-modal-panel { width: 100%; height: calc(100dvh - 96px); top: 96px; left: 0; transform: none; border-radius: 10px 10px 0 0; animation: project-backdrop-in .25s ease; }
  .project-modal-close { top: 40px; right: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .project-modal-panel, .project-modal-backdrop { animation: none; }
  .project-modal-close { transition: none; }
}
