/* Worth a thousand words - Unsplash-clean: white, airy, images own all color */

:root {
  --paper: #FFFFFF;
  --ink: #111111;
  --muted: #767676;
  --faint: #A8A8A8;
  --hairline: #ECECEC;
  --wash: #F7F7F7;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: "Inter", sans-serif; }

/* header */
.bar {
  max-width: 1320px; margin: 0 auto;
  padding: 26px 24px 10px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap;
}
.mark { font-family: "Space Grotesk", "Inter", sans-serif; font-weight: 500; font-size: 19px; letter-spacing: -0.01em; color: var(--ink); }
.tagline { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.counts { font-size: 13px; color: var(--muted); white-space: nowrap; }
.count-num { font-family: "Space Grotesk", sans-serif; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.counts a { color: var(--ink); border-bottom: 1px solid var(--hairline); }
.counts a:hover { text-decoration: none; border-bottom-color: var(--ink); }

/* format tabs + filters toggle */
.tabs-bar {
  max-width: 1320px; margin: 0 auto;
  padding: 6px 24px 0;
  display: flex; align-items: center; gap: 4px;
  border-bottom: 1px solid var(--hairline);
}
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.tabs::-webkit-scrollbar { display: none; }

.tab {
  font: 500 14px "Inter", sans-serif;
  color: var(--muted);
  background: none; border: none; cursor: pointer;
  padding: 10px 12px 12px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 150ms ease-out;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); }

.filters-toggle {
  font: 500 13px "Inter", sans-serif;
  color: var(--muted);
  background: none; border: 1px solid var(--hairline); border-radius: 999px;
  padding: 6px 14px; cursor: pointer;
  white-space: nowrap;
  transition: all 150ms ease-out;
}
.filters-toggle:hover, .filters-toggle.open { color: var(--ink); border-color: var(--ink); }

/* expandable secondary filters */
.filters {
  max-width: 1320px; margin: 0 auto;
  padding: 14px 24px 6px;
  display: grid; gap: 8px;
  border-bottom: 1px solid var(--hairline);
}
.filters[hidden] { display: none; }
.filter-row { display: flex; align-items: baseline; gap: 12px; }
.filter-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--faint); min-width: 42px;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: 400 13px "Inter", sans-serif;
  padding: 4px 12px;
  border: 1px solid var(--hairline); border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  transition: all 140ms ease-out;
}
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* justified wall */
main { max-width: 1320px; margin: 0 auto; padding: 24px 24px 96px; }

.row { display: flex; gap: 20px; margin-bottom: 20px; }

.tile {
  position: relative;
  cursor: zoom-in;
  overflow: hidden;
  flex: none;
  background: var(--wash);
}
.tile.enter { opacity: 0; transition: opacity 500ms ease-out; }
.tile.shown { opacity: 1; }
.tile img { display: block; width: 100%; height: 100%; object-fit: cover; }

.tile .wash {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 42%);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 3px;
  padding: 16px;
  opacity: 0;
  transition: opacity 220ms ease-out;
}
.tile:hover .wash, .tile:focus-visible .wash { opacity: 1; }
.wash-take { font: 500 13.5px/1.45 "Inter", sans-serif; color: #FFFFFF; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.wash-meta { font: 400 11.5px "Inter", sans-serif; color: rgba(255, 255, 255, 0.75); }

.empty { text-align: center; color: var(--muted); padding: 80px 0; }

/* footer */
.foot {
  border-top: 1px solid var(--hairline);
  max-width: 1320px; margin: 0 auto;
  padding: 36px 24px 72px;
  color: var(--muted); font-size: 13.5px;
  display: grid; gap: 6px;
}
.foot strong { color: var(--ink); font-weight: 500; }
.foot a { border-bottom: 1px solid var(--hairline); }
.foot a:hover { text-decoration: none; border-bottom-color: var(--ink); }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.98);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 32px 88px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.lightbox[hidden] { display: none; }

.lb-body {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: 40px; align-items: start;
  max-width: 1200px; width: 100%;
  margin: auto 0;
}
.lb-card { min-width: 0; }
@media (max-width: 1000px) {
  .lightbox { padding: 32px 72px; }
  .lb-body { grid-template-columns: minmax(0, 1fr) minmax(260px, 0.85fr); gap: 24px; }
}
@media (max-width: 800px) {
  .lightbox { display: block; padding: 72px 16px 28px; }
  .lb-body { grid-template-columns: 1fr; align-items: start; margin: 0 auto; }
  .lb-card { min-width: 0; }
}

.lb-figure { background: var(--wash); position: sticky; top: 32px; align-self: start; }
.lb-figure img { display: block; width: 100%; height: auto; max-height: calc(100vh - 64px); object-fit: contain; }
@media (max-width: 800px) {
  .lb-figure { position: static; }
  .lb-figure img { max-height: none; }
}

.lb-card .kicker {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--faint); font-weight: 500;
}
.lb-card h2 { font-family: "Space Grotesk", "Inter", sans-serif; font-size: 24px; font-weight: 500; line-height: 1.25; margin-top: 8px; }
.lb-takeaway { margin-top: 14px; font-size: 15.5px; font-weight: 400; color: var(--ink); line-height: 1.55; }
.lb-concept {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.lb-concept::before {
  content: "Key concept: ";
  color: var(--ink);
  font-weight: 500;
}

.lb-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.lb-meta span {
  font: 400 12px "Inter", sans-serif;
  padding: 3px 11px;
  border: 1px solid var(--hairline); border-radius: 999px;
  color: var(--muted);
}

.lb-recipe { margin-top: 22px; background: var(--wash); padding: 16px; border-radius: 4px; }
.recipe-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); }
.lb-prompt { font-family: "JetBrains Mono", monospace; font-size: 12px; line-height: 1.6; margin-top: 8px; color: var(--ink); word-break: break-word; }

.copy-btn {
  margin-top: 14px;
  font: 500 13px "Inter", sans-serif;
  background: var(--ink); color: var(--paper);
  border: none; border-radius: 4px;
  padding: 9px 18px; cursor: pointer;
  transition: opacity 140ms ease-out, transform 120ms ease-out;
}
.copy-btn:hover { opacity: 0.85; }
.copy-btn:active { transform: scale(0.97); }
.copy-btn.copied { background: #2E7D32; }

.lb-close, .lb-nav {
  background: var(--paper); border: 1px solid var(--hairline); border-radius: 999px;
  color: var(--muted); font-size: 18px; cursor: pointer;
  width: 42px; height: 42px; flex: none;
  transition: all 140ms ease-out;
}
.lb-close { position: fixed; top: 22px; right: 22px; }
.lb-nav { position: fixed; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 22px; }
.lb-next { right: 22px; }
.lb-close:hover, .lb-nav:hover { color: var(--ink); border-color: var(--ink); }
@media (max-width: 800px) {
  .lb-close { top: 16px; right: 16px; }
  .lb-nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tile.enter { opacity: 1; transition: none; }
  html { scroll-behavior: auto; }
}
