
@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,100;0,600;0,900;1,600&display=swap');

:root {
  --bg-color: #000;
  --fg-color: #fff;
  --muted-color: #ccc;
  --disabled-color: #444;
}
html.light-mode {
  --bg-color: #fff;
  --fg-color: #111;
  --muted-color: #555;
  --disabled-color: #bbb;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--bg-color);
  color: var(--fg-color);
  font-family: 'Archivo', sans-serif;
  min-height: 100%;
  transition: background 0.15s ease, color 0.15s ease;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bg-mode-label {
  font-size: 13px;
  color: var(--fg-color);
  opacity: 0.75;
  min-width: 32px;
  text-align: right;
}
.brand {
  font-style: italic;
  font-weight: 600;
  font-size: 22px;
  color: var(--fg-color);
  text-decoration: none;
}
.bg-toggle {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--fg-color);
  background: transparent;
  position: relative;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.bg-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fg-color);
  transition: transform 0.15s ease;
}
.bg-toggle.on .bg-toggle-knob {
  transform: translateX(18px);
}

.nav-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  min-height: 70vh;
  padding: 40px;
}
.nav-link {
  font-weight: 900;
  font-size: clamp(28px, 5vw, 44px);
  color: #E8F63A;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.nav-link:visited { color: #E8F63A; }

.stub-page, .gallery-title-page {
  text-align: center;
  padding: 80px 24px;
}
.stub-page h1, .gallery-title-page h1 {
  font-weight: 900;
  font-size: clamp(28px, 6vw, 48px);
  color: #E8F63A;
  margin-bottom: 12px;
}
.stub-page p, .gallery-title-page p {
  color: #ccc;
  font-weight: 100;
}

/* Single-view polaroid page */
.viewer-page { min-height: 100vh; }
.viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 24px;
  min-height: 75vh;
}
.polaroid-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}
.polaroid-image {
  width: min(4.9in, 92vw);
  aspect-ratio: 3.5 / 4.2;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(0,0,0,0.6));
}
.viewer-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.caption-toggle {
  border: 1px solid var(--fg-color);
  background: transparent;
  color: var(--fg-color);
  border-radius: 999px;
  padding: 6px 16px;
  font-family: 'Archivo', sans-serif;
  font-size: 13px;
  cursor: pointer;
}
.return-grid {
  color: #E8F63A;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  font-size: 14px;
  font-weight: 600;
}
.caption {
  font-size: 14px;
  color: var(--muted-color);
  display: none;
  text-align: center;
  max-width: 480px;
}
.caption.visible { display: block; }
.prevnext {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}
.prevnext a { color: #E8F63A; text-decoration: none; }
.prevnext .disabled { color: var(--disabled-color); }

/* Grid page */
.grid-page { max-width: 1100px; margin: 0 auto; padding: 20px 24px 60px; }
.grid-page h1 {
  font-weight: 900;
  font-size: clamp(28px, 6vw, 44px);
  color: #E8F63A;
  text-align: center;
  margin-bottom: 32px;
}
.grid-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}
.grid-list img {
  width: 100%;
  aspect-ratio: 3.5 / 4.2;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}
