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

:root, html, body { color-scheme: only light; forced-color-adjust: none; }

html, body {
  background: #f3efe0 !important;
  color: #111 !important;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  -webkit-font-smoothing: antialiased;
}

header {
  position: static;
  padding: 1rem 1.5rem;
  background: rgba(250, 250, 247, 0.9);
  border-bottom: 1px solid #e4e4dd;
  display: flex;
  align-items: center;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
}

/* One deep-orange slider panel that *contains* the collection tags.
   The whole panel grows/shrinks; collapsed it's just the header strip. */
.tags-slider {
  flex: 0 0 100%;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(165deg, #c4621f, #ab4f17);
  box-shadow: 0 4px 18px rgba(150, 70, 22, 0.22);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.tags-slider-head {
  width: 100%;
  border: none;
  cursor: pointer;
  background: transparent;
  color: #fff3e6;
  font: inherit;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.1rem;
}

.tags-slider-title {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.tags-slider-toggle {
  font-size: 1.4rem;
  line-height: 1;
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 244, 230, 0.16);
  transition: background 0.15s ease;
}

.tags-slider-head:hover .tags-slider-toggle { background: rgba(255, 244, 230, 0.28); }

/* Fast slide: panel body collapses via 0fr→1fr grid rows. */
.tags-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.16s cubic-bezier(0.4, 0, 0.2, 1);
}

.tags-slider.open .tags-body { grid-template-rows: 1fr; }

.tags-body > .tabs {
  overflow: hidden;
  min-height: 0;
  padding: 0 1.1rem;
}

.tags-slider.open .tags-body > .tabs { padding: 0.2rem 1.1rem 0.9rem; }

/* Tag chips live inside the orange, so give them warm-on-warm contrast. */
.tags-slider .tabs button {
  background: rgba(255, 244, 230, 0.14);
  border: 1px solid rgba(255, 244, 230, 0.22);
  color: #fff3e6;
}

.tags-slider .tabs button:hover {
  background: rgba(255, 244, 230, 0.26);
  border-color: rgba(255, 244, 230, 0.5);
  color: #fff;
}

.tags-slider .tabs button.active {
  background: #fff3e6;
  border-color: #fff3e6;
  color: #a8480f;
}

@media (prefers-reduced-motion: reduce) {
  .tags-body { transition-duration: 0.001s; }
}

h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111;
}

nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

nav button {
  background: #fff;
  border: 1px solid #ccc;
  color: #222;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

nav button:hover {
  border-color: #111;
  color: #000;
}

nav button.active {
  background: #111;
  color: #fff;
  border-color: #111;
}

.board {
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  font-size: 0.85rem;
}

.sort label {
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  margin-right: 0.25rem;
}

.sort button {
  background: #fff;
  border: 1px solid #ccc;
  color: #222;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sort button:hover { border-color: #111; }
.sort button.active {
  background: #111;
  color: #fff;
  border-color: #111;
}

.count {
  color: #888;
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

figure {
  margin: 0;
  background: #f1f0ea;
  border: 1px solid #e4e4dd;
  border-radius: 6px;
  overflow: hidden;
  cursor: zoom-in;
  transition: box-shadow 0.2s ease;
  position: relative;
  width: 100%;
}

figure:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: blur-in 280ms ease-out;
}

@keyframes blur-in {
  0%   { filter: blur(10px); opacity: 0; }
  100% { filter: none;       opacity: 1; }
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 2rem;
}

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

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.75rem;
  font-family: inherit;
}

@media (max-width: 600px) {
  .board { padding: 0.75rem; gap: 0.5rem; }
  .col { gap: 0.5rem; }
  header { padding: 1rem; gap: 1rem; }
}
