/* ─── PROJECT MODAL ─── */
.proj-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11,15,26,.65);
  z-index: 800;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 20px;
}
.proj-overlay.on { display: flex; }
.proj-modal {
  background: var(--white);
  border-radius: var(--r-2xl);
  width: 100%;
  max-width: 740px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 100px rgba(11,15,26,.28);
  animation: mIn .3s cubic-bezier(.4,0,.2,1);
}
@keyframes mIn {
  from { opacity: 0; transform: scale(.93) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-head { padding: 30px 30px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-head h2 { font-family: 'Playfair Display', sans-serif; font-size: 22px; font-weight: 800; flex: 1; line-height: 1.3; }
.modal-x {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-2);
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
  transition: var(--t);
  display: flex; align-items: center; justify-content: center;
  color: var(--body);
}
.modal-x:hover { background: var(--bg-3); color: var(--ink); }
.modal-body   { padding: 24px 30px 32px; }
.modal-banner { height: 200px; border-radius: var(--r-xl); display: flex; align-items: center; justify-content: center; font-size: 64px; margin-bottom: 24px; }
.modal-mets   { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 22px; }
.modal-met    { text-align: center; background: var(--teal-lt); border-radius: var(--r-lg); padding: 18px; }
.modal-met-v  { font-family: 'Playfair Display', sans-serif; font-size: 28px; font-weight: 800; color: var(--teal); }
.modal-met-k  { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 500; }
.modal-tags   { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.modal-sec    { margin-bottom: 20px; }
.modal-sec h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 9px; }
.modal-sec p  { font-size: 14.5px; color: var(--body); line-height: 1.82; }

/* ─── BLOG POST READER MODAL ─── */
.blog-post-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(11,15,26,.7);
  z-index: 850;
  align-items: flex-start;
  justify-content: center;
  backdrop-filter: blur(6px);
  padding: 40px 20px;
  overflow-y: auto;
}
.blog-post-overlay.on { display: flex; }
.blog-post-modal {
  background: var(--white);
  border-radius: var(--r-2xl);
  width: 100%;
  max-width: 740px;
  box-shadow: 0 32px 100px rgba(11,15,26,.28);
  animation: mIn .3s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
  margin: auto;
}
.bp-head      { padding: 28px 32px; border-bottom: 1px solid var(--bg-2); }
.bp-close     { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.bp-close button { width: 34px; height: 34px; border-radius: 50%; background: var(--bg-2); border: none; cursor: pointer; font-size: 17px; transition: var(--t); }
.bp-close button:hover { background: var(--bg-3); }
.bp-cover     { width: 100%; height: 260px; object-fit: cover; }
.bp-cover-ph  { width: 100%; height: 260px; background: linear-gradient(135deg,var(--teal-lt),var(--bg-2)); display: flex; align-items: center; justify-content: center; font-size: 72px; }
.bp-meta      { display: flex; gap: 12px; align-items: center; margin: 24px 32px 12px; flex-wrap: wrap; }
.bp-title     { font-family: 'Playfair Display', sans-serif; font-size: 28px; font-weight: 800; line-height: 1.3; margin: 0 32px 24px; color: var(--ink); }
.bp-content   { padding: 0 32px 40px; font-size: 15px; color: var(--body); line-height: 1.9; }
.bp-content h2 { font-family: 'Playfair Display', sans-serif; font-size: 22px; font-weight: 800; margin: 28px 0 12px; color: var(--ink); }
.bp-content h3 { font-size: 18px; font-weight: 700; margin: 22px 0 10px; color: var(--ink); }
.bp-content p  { margin-bottom: 18px; }
.bp-content ul, .bp-content ol { padding-left: 24px; margin-bottom: 18px; }
.bp-content li { margin-bottom: 6px; }
.bp-content blockquote { border-left: 4px solid var(--teal); padding: 12px 20px; background: var(--teal-lt); border-radius: 0 var(--r-md) var(--r-md) 0; margin: 22px 0; font-style: italic; color: var(--ink-3); }
.bp-content strong { color: var(--ink); font-weight: 700; }
.bp-content code { font-family: 'JetBrains Mono', monospace; background: var(--bg-2); padding: 2px 7px; border-radius: 5px; font-size: 13px; }
.bp-content img { border-radius: var(--r-lg); max-width: 100%; margin: 16px 0; }

@media (max-width: 960px) {
  .modal-mets { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .modal-mets { grid-template-columns: 1fr; }
}
