/* Post grid — Instagram 3 across, newest top-left */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
}

.post-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  background: var(--bg-elevated);
  border-radius: 2px;
  cursor: pointer;
}

.post-tile__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.post-tile:hover .post-tile__media {
  transform: scale(1.04);
  filter: brightness(1.08);
}

.post-tile__video-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  color: #fff;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
  pointer-events: none;
}

.post-tile__video-icon svg { width: 100%; height: 100%; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(var(--music-bar-height) + 16px);
  background: rgba(5, 5, 8, 0.92);
  backdrop-filter: blur(12px);
}

.lightbox.is-open { display: flex; }

.lightbox__dialog {
  width: 100%;
  max-width: 520px;
  max-height: calc(100dvh - var(--music-bar-height) - 48px);
  overflow: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}

.lightbox__media-wrap {
  position: relative;
  background: #000;
  aspect-ratio: 1 / 1;
  max-height: 70dvh;
}

.lightbox__media-wrap img,
.lightbox__media-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 70dvh;
}

.lightbox__controls {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.lightbox__controls button {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 500;
}

.lightbox__controls button:hover {
  border-color: var(--accent-primary);
  color: var(--accent-glow);
}

.lightbox__caption {
  padding: 16px 18px 20px;
  font-size: 0.9375rem;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.lightbox__caption:empty { display: none; }

.lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__close:hover { background: var(--accent-primary); }

@media (min-width: 1200px) {
  .site-wrapper {
    max-width: 935px;
  }
}

@media (max-width: 480px) {
  .post-grid { gap: 3px; }
}
