/* PORTFOLIO page only (loaded after style.css and pages.css) */
.work { padding: 50px 0 90px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 36px; }
.filter {
  background: none; border: 0; border-bottom: 1px solid transparent; padding: 6px 0; cursor: pointer;
  color: var(--text-muted); font: inherit; font-size: 0.92rem; transition: 0.2s;
}
.filter:hover { color: var(--text); }
.filter[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--blue-400); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tile[hidden] { display: none; }
.tile-btn {
  display: block; width: 100%; padding: 0; cursor: zoom-in; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--navy-800);
  aspect-ratio: 16 / 10;
}
.tile-btn img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.tile-btn:hover img { transform: scale(1.04); }
.tile figcaption { margin-top: 12px; font-size: 0.92rem; color: var(--text-muted); }

.lightbox {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  width: 100%; height: 100%; max-width: none; max-height: none; border: 0;
  align-items: center; justify-content: center; gap: 14px; padding: 24px;
  background: rgba(3, 7, 18, 0.94);
}
.lightbox:not([open]) { display: none; }
.lightbox img { max-width: min(1100px, 88vw); max-height: 76vh; border-radius: var(--radius); }
.lb-cap { color: var(--text-muted); font-size: 0.9rem; }
.lb-close, .lb-nav {
  position: absolute; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid rgba(213, 219, 232, 0.35); border-radius: 50%; background: rgba(5, 11, 28, 0.6); color: #d5dbe8;
}
.lb-close:hover, .lb-nav:hover { border-color: var(--blue-300); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; } .lb-next { right: 20px; top: 50%; }
.lightbox svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
}
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
