* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #151515;
  color: #eee;
  font-family: system-ui, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

h1 {
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
}

/* ---------- landing ---------- */

.search {
  width: 100%;
  padding: 0.7rem 0.9rem;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  color: #eee;
  background: #222;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
}

.search::placeholder {
  color: #888;
}

.people {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.person {
  display: block;
  text-decoration: none;
}

.person img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.person span {
  display: block;
  margin-top: 0.4rem;
  font-weight: 600;
}

.person small {
  color: #999;
}

.person:hover img {
  opacity: 0.85;
}

.empty {
  display: none;
  color: #999;
  padding: 2rem 0;
}

.empty.show {
  display: block;
}

/* ---------- album ---------- */

.back {
  display: inline-block;
  margin-bottom: 1rem;
  color: #999;
  text-decoration: none;
}

.back:hover {
  color: #fff;
}

.photos {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
}

@media (max-width: 560px) {
  .photos {
    grid-template-columns: repeat(3, 1fr);
  }
}

.photo {
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: block;
  width: 100%;
}

.photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.photo:hover img {
  opacity: 0.85;
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  padding: 1rem;
}

.lightbox.open {
  display: flex;
}

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

.lb-controls {
  position: fixed;
  bottom: 1.25rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.lb-btn {
  font-size: 1rem;
  color: #eee;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.lb-btn:hover {
  background: #3a3a3a;
}

.lb-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
}
