/* ===== PANEL — a page shown in a card over whatever page you're on ===== */
/* Used for projects (Design page) and About (every page). See js/panel.js */
.panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
  background: rgba(244, 244, 241, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.panel-overlay[hidden] { display: none; }
.panel-overlay.open { opacity: 1; }

.panel-card {
  position: relative;
  width: min(1100px, 100%);
  height: 100%;
  max-height: 100%; /* js/panel.js shrinks it to fit shorter pages */
  overflow: hidden;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.18);
  transform: translateY(40px) scale(0.98);
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.panel-overlay.open .panel-card { transform: none; }

/* Narrower card, e.g. About */
.panel-card.panel-narrow { width: min(720px, 100%); }

.panel-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.panel-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  background: rgba(26, 26, 26, 0.06);
  color: #1a1a1a;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.3s ease;
}

.panel-close:hover { background: rgba(26, 26, 26, 0.12); }

/* No page scrolling underneath while a panel is open */
html.panel-open { overflow: hidden; }

@media (max-width: 640px) {
  .panel-overlay { padding: 0.75rem; }
  .panel-card { border-radius: 16px; }
  .panel-close { background: rgba(255, 255, 255, 0.85); }
}
