/* Instagram page: your posts as a grid in the site's own style (data from /api/instagram). */

html, body {
  height: auto;
  overflow: auto;
}

/* Fixed nav floats over photos while scrolling: invert against whatever is behind it. */
.nav { mix-blend-mode: difference; }
.nav a { color: #fff; }

.insta {
  padding: 64px 18px 120px;
}

.insta-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
@media (min-width: 700px) { .insta-grid { grid-template-columns: repeat(4, 1fr); } }

/* 3:4 portrait tiles, like the Instagram grid; photos are centre-cropped to fit */
.insta-post {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--rule);
}
.insta-post img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s ease;
}
.insta-post img.insta-fit {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
}
.insta-post:hover img { opacity: 0.85; }
.insta-post:focus-visible { outline: 2px solid var(--fg); outline-offset: -2px; }

/* badge for videos and multi-photo posts */
.insta-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.4));
  pointer-events: none;
}

.insta-link {
  margin-top: 40px;
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.insta-link a { color: var(--fg-dim); text-decoration: none; transition: color 0.2s ease; }
.insta-link a:hover { color: var(--fg); }

.insta-note {
  min-height: 1.4em;
  margin-top: 16px;
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
}

