body {
  font-family: system-ui, sans-serif;
  margin: 0;
  /* background: #f7f7f7; */
  background: black
}

header {
  text-align: left;
  line-height: 0.5;
  padding: 1em;
  /* background: white; */
  background: black;
  color: white;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 10;
}

.album {
  padding: 0.5rem;
  column-count: 6;
  column-width: 220px;
  column-gap: 0.5rem;
}

.album-item {
  display: inline-block;
  width: 100%;
  margin: 0 0 0.5rem;
  break-inside: avoid;
  position: relative
}

.album-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.album-item figcaption {
  /* font-size: 0.85rem;
  padding: 0.25rem 0.5rem;
  text-align: center;
  color: #444; */
  position: absolute; /* Positions the caption relative to the figure */
  bottom: 0;          /* Places it at the bottom of the image */
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7); /* Adds a semi-transparent background */
  color: white;       /* Ensures text is readable */
  padding: 10px;      /* Adds some space around the text */
  text-align: center; /* Centers the caption text */
  margin: 0;
  display: none
}

.album-item:hover figcaption {
  display: block;
}


@media (max-width: 600px) {
  .album {
    gap: 0.25rem;
    padding: 0.25rem;
    column-width: 140px;
  }

  .album-item figcaption {
    font-size: 0.75rem;
  }
}

#sentinel {
  min-height: 1px;
}

/* Lightbox styles */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.lightbox.hidden {
  display: none;
}

#lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

#lightbox-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: stretch;
  color: #eee;
}

.lightbox-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-meta {
  width: 320px;
  background: #111;
  border-left: 1px solid #222;
  padding: 1rem;
  overflow-y: auto;
}

.meta-toggle {
  display: none;
}

@media (max-width: 768px) {
  .lightbox-content {
    flex-direction: column;
  }

  .lightbox-meta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1001;
  }

  .lightbox-meta.open {
    transform: translateY(0);
  }

  .meta-toggle {
    display: block;
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 1002;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.75);
    color: #ccc;
    border: none;
  }
}

.meta-label {
  color: #888;
  font-size: 0.85rem;
}

.meta-row {
  margin: 0.5rem 0;
}

.meta-section {
  margin-top: 1rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-list li {
  background: #222;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* .lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  transition: opacity 0.2s ease;
}

.lightbox.hidden {
  opacity: 0;
  pointer-events: none;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  text-align: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
}

.lightbox-content p {
  color: white;
  margin-top: 0.5em;
}
*/
#lightbox-close {
  position: absolute;
  top: -10px;
  right: -10px;
  background: #fff;
  border: none;
  font-size: 2rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  line-height: 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease;
}
img[loading="lazy"].loaded {
  opacity: 1;
}
