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

body {
  background: #0a0a0a;
  color: #ddd;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.4;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  flex-shrink: 0;
  z-index: 10;
  background: #0a0a0a;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

#search {
  background: #1a1a1a;
  border: 1px solid #333;
  color: #ddd;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.9rem;
  width: 200px;
  max-width: 40%;
}

#search::placeholder {
  color: #666;
}

#search:focus {
  outline: none;
  border-color: #888;
}

/* Gallery */
#gallery {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
}

figure {
  position: relative;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  cursor: pointer;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.4s ease;
  scroll-snap-align: start;
}

figure.loaded {
  opacity: 1;
}

figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1rem 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

figcaption .artist {
  font-weight: 600;
}

figcaption .location,
figcaption .date {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 2rem;
  padding: 0.5rem;
  z-index: 101;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: #fff;
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
  font-size: 2.5rem;
}

.lightbox-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
}

.lightbox-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
}

.lightbox-caption {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

/* Footer */
footer {
  flex-shrink: 0;
  text-align: center;
  padding: 0.5rem 1rem;
  color: #555;
  font-size: 0.75rem;
}

/* Imprint page — override body layout */
body:has(.imprint-page) {
  height: auto;
  overflow: auto;
  display: block;
}

.imprint-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1rem;
  text-align: center;
}

.imprint-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin-bottom: 1.5rem;
  border: 2px solid #333;
}

.imprint-page h2 {
  margin-bottom: 1rem;
}

.imprint-page h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.3rem;
  font-size: 1rem;
  color: #ccc;
}

.imprint-page p {
  margin-top: 0.5rem;
  color: #aaa;
  line-height: 1.6;
}

.imprint-page a {
  color: #aaa;
  text-decoration: none;
}

.imprint-page a:hover {
  color: #fff;
}

.privacy-page {
  text-align: left;
}

header a {
  color: inherit;
  text-decoration: none;
}

footer a {
  color: #777;
  text-decoration: none;
}

footer a:hover {
  color: #aaa;
}
