:root {
  --bg: #f3efe5;
  --bg-soft: #eee8db;
  --bg-elev: #fbf8f0;
  --ink: #1a1915;
  --ink-soft: #625d52;
  --ink-faint: #968f81;
  --line: rgba(26, 25, 21, 0.13);
  --line-strong: rgba(26, 25, 21, 0.3);
  --accent: #b35637;
  --accent-deep: #8f3f26;
  --accent-soft: #e8d2c5;
  --forest: #3f5a4b;
  --card: #e6dfd1;
  --shadow: 0 24px 70px rgba(35, 30, 20, 0.16);
  --shadow-soft: 0 8px 30px rgba(35, 30, 20, 0.08);
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "DM Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --header-h: 76px;
  --pad: clamp(18px, 4vw, 64px);
  --gap: clamp(14px, 2vw, 30px);
  --radius: 2px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #12110e;
  --bg-soft: #181611;
  --bg-elev: #1c1914;
  --ink: #ece6d9;
  --ink-soft: #a9a194;
  --ink-faint: #6e685e;
  --line: rgba(236, 230, 217, 0.13);
  --line-strong: rgba(236, 230, 217, 0.32);
  --accent: #d47a58;
  --accent-deep: #e79b7d;
  --accent-soft: #3c241c;
  --forest: #7d9c8b;
  --card: #201d17;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

@supports not (scrollbar-gutter: stable) {
  html {
    overflow-y: scroll;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

body.is-locked {
  overflow: hidden;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

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

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

.page-grain {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.034;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  background-repeat: repeat;
  mix-blend-mode: multiply;
}

[data-theme="dark"] .page-grain {
  opacity: 0.052;
  mix-blend-mode: screen;
}

.page-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(70% 50% at 8% 0%, rgba(214, 164, 120, 0.13), transparent 60%),
    radial-gradient(50% 40% at 100% 12%, rgba(120, 144, 124, 0.1), transparent 60%);
}

[data-theme="dark"] .page-glow {
  background:
    radial-gradient(70% 50% at 8% 0%, rgba(148, 80, 48, 0.12), transparent 60%),
    radial-gradient(50% 40% at 100% 12%, rgba(70, 96, 80, 0.1), transparent 60%);
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--header-h);
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  justify-self: start;
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.025em;
}

.brand-dot {
  color: var(--accent);
}

.header-center {
  display: flex;
  gap: 12px;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.header-slash {
  color: var(--ink-faint);
}

.header-nav {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: clamp(16px, 2.4vw, 34px);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.header-nav a,
.header-nav button:not(.theme-toggle) {
  position: relative;
  border: 0;
  background: none;
  padding: 6px 0;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.header-nav a:hover,
.header-nav button:hover {
  color: var(--ink);
}

.header-nav a::after,
.header-nav button:not(.theme-toggle)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.header-nav a:hover::after,
.header-nav button:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.theme-toggle {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  color: var(--ink-soft);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.3s ease;
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  transform: rotate(12deg);
}

.theme-toggle .icon {
  width: 14px;
  height: 14px;
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--header-h) + clamp(52px, 8vh, 110px)) var(--pad) 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: clamp(34px, 7vh, 76px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 10.5px;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.eyebrow-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.hero-issue {
  margin: 0;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
}

.hero h1 {
  margin: 0;
  max-width: 13ch;
  font-family: var(--serif);
  font-size: clamp(4.2rem, 11.6vw, 11.5rem);
  font-weight: 400;
  line-height: 0.82;
  letter-spacing: -0.045em;
}

.hero h1 em {
  color: var(--accent);
  font-weight: 400;
}

.hero-bottom {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) 1.4fr;
  align-items: end;
  gap: clamp(30px, 6vw, 90px);
  margin-top: clamp(64px, 11vh, 130px);
}

.hero-copy {
  max-width: 460px;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(14px, 1.15vw, 16px);
  line-height: 1.7;
  font-weight: 300;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.scroll-cue {
  display: flex;
  align-items: center;
  gap: 18px;
  width: fit-content;
  margin-top: clamp(46px, 8vh, 96px);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.scroll-cue:hover {
  color: var(--ink);
}

.scroll-line {
  display: block;
  width: 64px;
  height: 1px;
  background: var(--line-strong);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateX(-100%);
  animation: scrollLine 2.6s cubic-bezier(0.7, 0, 0.3, 1) infinite;
}

@keyframes scrollLine {
  0% { transform: translateX(-100%); }
  45% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* ---------- Gallery ---------- */

.gallery-section {
  padding: clamp(48px, 8vw, 100px) var(--pad) clamp(70px, 10vw, 130px);
  position: relative;
  scroll-margin-top: calc(var(--header-h) + 18px);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(26px, 4vw, 46px);
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 3.8vw, 50px);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.section-heading h2 span {
  display: inline-block;
  margin-right: 12px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--accent);
  vertical-align: middle;
}

.section-heading p {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* Toolbar */

.toolbar {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.search-box {
  flex: 1 1 auto;
  max-width: 620px;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elev) 32%, transparent);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.search-box:focus-within {
  border-color: var(--ink-soft);
  background: var(--bg-elev);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.search-box input:focus-visible {
  outline: none;
}

.search-box .icon {
  width: 16px;
  height: 16px;
  color: var(--ink-faint);
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font-size: 13px;
  letter-spacing: 0.01em;
}

.search-box input::placeholder {
  color: var(--ink-faint);
}

.search-box input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.search-kbd {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 10px;
  color: var(--ink-faint);
}

.toolbar-btn {
  height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 12px;
  letter-spacing: 0.03em;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.toolbar-btn:hover,
.toolbar-btn.is-open {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--bg-elev) 55%, transparent);
}

.toolbar-btn .icon {
  width: 15px;
  height: 15px;
}

.filter-count {
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff7ef;
  font-size: 9px;
  line-height: 1;
}

.toolbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.select-wrap {
  position: relative;
  height: 46px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
}

.select-wrap select {
  height: 100%;
  padding: 0 38px 0 14px;
  border: 0;
  outline: 0;
  appearance: none;
  background: transparent;
  font-size: 12px;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.select-wrap .icon {
  position: absolute;
  right: 12px;
  width: 14px;
  height: 14px;
  pointer-events: none;
  color: var(--ink-faint);
}

/* Filter panel */

.filter-backdrop {
  position: fixed;
  inset: 0;
  z-index: 29;
  background: rgba(12, 11, 8, 0.3);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.filter-backdrop.is-visible {
  opacity: 1;
}

.filter-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 45;
  padding: 0 var(--pad);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  pointer-events: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s ease;
}

.filter-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-soft);
}

body.is-filter-open {
  overflow: hidden;
}

.filter-inner {
  padding: 24px 0 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.filter-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.filter-row-tags {
  align-items: start;
}

.filter-label {
  padding-top: 7px;
  font-size: 9.5px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 11px;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.filter-chip:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.filter-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.filter-chip .chip-count {
  font-size: 9px;
  opacity: 0.55;
}

.tag-cloud {
  max-height: 126px;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.tag-cloud::-webkit-scrollbar {
  width: 4px;
}

.tag-cloud::-webkit-scrollbar-thumb {
  background: var(--line-strong);
}

.tag-cloud .filter-chip {
  height: 27px;
  font-size: 10.5px;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  width: fit-content;
}

.segmented button {
  height: 30px;
  padding: 0 13px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  font-size: 10.5px;
  color: var(--ink-soft);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button:hover {
  color: var(--ink);
}

.segmented button.is-active {
  background: var(--ink);
  color: var(--bg);
}

.filter-row-end {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 16px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  width: 34px;
  height: 19px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.switch-track span {
  display: block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--ink-soft);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s ease;
}

.switch input:checked + .switch-track {
  background: var(--accent);
  border-color: var(--accent);
}

.switch input:checked + .switch-track span {
  transform: translateX(15px);
  background: #fff7ef;
}

.filter-end-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 10px;
}

.clear-btn {
  border: 0;
  background: none;
  padding: 0;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: color 0.2s ease;
}

.filter-done {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.filter-done:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff7ef;
}

.clear-btn:hover {
  color: var(--accent);
}

/* Results */

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 16px;
  min-height: 56px;
}

#resultsCount {
  margin: 0;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.active-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 25px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 10px;
  color: var(--ink-soft);
}

.active-filter:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.active-filter .icon {
  width: 10px;
  height: 10px;
}

/* Masonry */

.masonry {
  display: flex;
  align-items: flex-start;
  gap: var(--gap);
  min-height: 40vh;
}

.masonry-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.card {
  position: relative;
  opacity: 0;
  transform: translateY(18px);
  animation: cardIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-media {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border-radius: var(--radius);
  cursor: zoom-in;
  outline: none;
}

.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0, 0, 0, 0.06);
  pointer-events: none;
}

[data-theme="dark"] .card-media::after {
  border-color: rgba(255, 255, 255, 0.07);
}

.card-media img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.card-media img.is-loaded {
  opacity: 1;
}

.card-media.is-failed {
  min-height: 240px;
  display: grid;
  place-items: center;
}

.card-media.is-failed::before {
  content: "Image unavailable";
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.card-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 44px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: linear-gradient(to top, rgba(15, 14, 11, 0.74), transparent);
  color: #f7f1e5;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.card:hover .card-overlay,
.card:focus-within .card-overlay {
  opacity: 1;
  transform: translateY(0);
}

.card-overlay-cat {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.72;
}

.card-overlay-prompt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11.5px;
  line-height: 1.45;
  font-weight: 300;
}

.like-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(22, 20, 16, 0.38);
  color: rgba(255, 249, 240, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.2s ease,
    background-color 0.2s ease;
}

.card:hover .like-btn,
.card:focus-within .like-btn,
.like-btn.is-liked {
  opacity: 1;
  transform: translateY(0);
}

.like-btn:hover {
  background: rgba(22, 20, 16, 0.62);
  color: #fff9f0;
}

.like-btn .icon {
  width: 15px;
  height: 15px;
}

.like-btn.is-liked {
  color: #ffb49b;
}

.like-btn.is-liked .icon {
  fill: currentColor;
}

.like-btn .like-btn-count {
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.02em;
}

.card-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 1px 0;
}

.card-cat {
  font-size: 10.5px;
  letter-spacing: 0.015em;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-no {
  font-family: var(--serif);
  font-size: 12px;
  color: var(--ink-faint);
}

/* Empty state */

.empty-state {
  padding: clamp(70px, 12vw, 150px) 20px;
  text-align: center;
  border-top: 1px solid var(--line);
}

.empty-kicker {
  margin: 0 0 12px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.empty-state h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.empty-state > p:not(.empty-kicker) {
  margin: 0 auto 26px;
  max-width: 360px;
  font-size: 13px;
  color: var(--ink-soft);
}

.primary-btn {
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  font-size: 11px;
  letter-spacing: 0.05em;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.primary-btn:hover {
  background: transparent;
  color: var(--ink);
}

/* Load more */

.sentinel {
  height: 1px;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 48px;
}

.load-more {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  background: transparent;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.load-more:hover {
  background: var(--ink);
  color: var(--bg);
}

.load-more .icon {
  width: 15px;
  height: 15px;
  transform: rotate(90deg);
}

.end-note {
  margin: 46px 0 0;
  text-align: center;
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
  color: var(--ink-faint);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(46px, 7vw, 90px) var(--pad) 24px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(40px, 8vw, 120px);
  padding-bottom: clamp(50px, 8vw, 100px);
}

.footer-word {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(44px, 6.4vw, 86px);
  line-height: 0.9;
  letter-spacing: -0.035em;
}

.footer-word em {
  color: var(--accent);
  font-weight: 400;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-content: start;
  padding-top: 8px;
}

.footer-label {
  margin: 0 0 10px;
  font-size: 9.5px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.footer-cols p:not(.footer-label) {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.footer-bottom button {
  border: 0;
  background: none;
  padding: 0;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom button:hover {
  color: var(--accent);
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 2vw, 28px);
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 11, 8, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: fadeIn 0.35s ease;
}

.lightbox-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.62fr);
  width: min(1500px, 100%);
  height: calc(100svh - clamp(20px, 4vw, 56px));
  background: var(--bg);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: panelIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes fadeIn {
  from { opacity: 0; }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
  }
}

.lightbox-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0c0b08;
  overflow: hidden;
  min-height: 0;
}

.lightbox-media img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.lightbox-media img.is-loaded {
  opacity: 1;
}

.lightbox-loader {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-top-color: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.lightbox-loader.is-done {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(15, 14, 11, 0.35);
  color: rgba(255, 249, 240, 0.85);
  backdrop-filter: blur(8px);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(15, 14, 11, 0.7);
  color: #fff;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(15, 14, 11, 0.25);
  color: rgba(255, 249, 240, 0.82);
  backdrop-filter: blur(8px);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lightbox-arrow:hover {
  background: rgba(15, 14, 11, 0.65);
  color: #fff;
}

.lightbox-arrow.prev {
  left: 14px;
}

.lightbox-arrow.prev .icon {
  transform: rotate(180deg);
}

.lightbox-arrow.next {
  right: 14px;
}

.lightbox-info {
  padding: clamp(26px, 3vw, 44px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.lightbox-info::-webkit-scrollbar {
  width: 5px;
}

.lightbox-info::-webkit-scrollbar-thumb {
  background: var(--line-strong);
}

.lb-eyebrow {
  margin: 0 0 14px;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.lightbox-info h2 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: clamp(30px, 3.3vw, 46px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.lb-prompt {
  margin: 0 0 20px;
  font-size: 11.8px;
  line-height: 1.64;
  color: var(--ink-soft);
  font-weight: 300;
}

.lb-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.lb-meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lb-meta-item span:first-child {
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.lb-meta-item span:last-child {
  font-size: 11.5px;
  color: var(--ink-soft);
}

.lb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.lb-tag {
  height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 9.5px;
  color: var(--ink-soft);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.lb-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lb-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.like-action,
.soft-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.like-action {
  grid-column: 1 / -1;
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.like-action:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff7ef;
}

.like-action .icon {
  width: 15px;
  height: 15px;
}

.like-action.is-liked {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff7ef;
}

.like-action.is-liked .icon {
  fill: currentColor;
}

.like-count {
  font-size: 9.5px;
  opacity: 0.7;
}

.soft-action:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.lb-position {
  margin-top: auto;
  padding-top: 18px;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

/* ---------- About modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 11, 8, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeIn 0.3s ease;
}

.modal-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100svh - 40px);
  overflow-y: auto;
  padding: clamp(30px, 5vw, 58px);
  background: var(--bg);
  box-shadow: var(--shadow);
  animation: panelIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.modal-panel h2 {
  margin: 18px 0 28px;
  font-family: var(--serif);
  font-size: clamp(38px, 5.4vw, 62px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.modal-panel h2 em {
  color: var(--accent);
  font-weight: 400;
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 590px;
}

.about-body p {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-soft);
  font-weight: 300;
}

.about-body strong {
  color: var(--ink);
  font-weight: 500;
}

.about-note {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11px !important;
  color: var(--ink-faint) !important;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 30px 0;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.about-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.about-stats span {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1;
}

.about-stats small {
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.about-links a {
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.about-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 200;
  transform: translate(-50%, 16px);
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  font-size: 11px;
  letter-spacing: 0.03em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: var(--shadow-soft);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Focus */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Responsive */

@media (max-width: 1180px) {
  .hero h1 {
    font-size: clamp(4rem, 12vw, 9.5rem);
  }

  .lightbox-panel {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.66fr);
  }

  .lightbox-info {
    padding: 34px;
  }
}

@media (max-width: 960px) {
  .header-center {
    display: none;
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .hero-bottom {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-copy {
    max-width: 560px;
  }

  .hero-stats {
    max-width: 620px;
  }

  .lightbox {
    padding: 0;
  }

  .lightbox-panel {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 58svh) minmax(0, 42svh);
    width: 100%;
    height: 100svh;
  }

  .lightbox-info {
    padding: 26px 24px 34px;
  }

  .lightbox-info h2 {
    font-size: 32px;
    margin-bottom: 14px;
  }

  .lb-prompt {
    font-size: 12px;
    line-height: 1.65;
    margin-bottom: 18px;
  }

  .lb-meta {
    padding: 14px 0;
    margin-bottom: 14px;
  }

  .lb-tags {
    margin-bottom: 18px;
  }

  .lb-actions {
    margin-bottom: 14px;
  }

  .lightbox-arrow {
    width: 38px;
    height: 38px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 64px;
  }

  .site-header {
    padding: 0 18px;
  }

  .brand {
    font-size: 28px;
  }

  .header-nav {
    gap: 18px;
  }

  .header-nav a {
    display: none;
  }

  .hero {
    padding-top: calc(var(--header-h) + 64px);
    min-height: 94svh;
  }

  .hero h1 {
    font-size: clamp(3.7rem, 17vw, 7.4rem);
    line-height: 0.84;
  }

  .hero-top {
    margin-bottom: 42px;
  }

  .hero-issue {
    display: none;
  }

  .hero-bottom {
    margin-top: 52px;
  }

  .hero-stats {
    gap: 10px;
  }

  .stat-value {
    font-size: 28px;
  }

  .stat-label {
    font-size: 8.5px;
  }

  .scroll-cue {
    margin-top: 48px;
  }

  .section-heading {
    flex-direction: column;
    gap: 8px;
  }

  .section-heading p {
    display: none;
  }

  .toolbar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0;
  }

  .search-box {
    flex: 1 1 100%;
    max-width: none;
  }

  .search-kbd {
    display: none;
  }

  .toolbar-btn {
    flex: 1;
    justify-content: center;
  }

  .toolbar-right {
    margin-left: 0;
  }

  .select-wrap {
    height: 46px;
  }

  .filter-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .filter-label {
    padding-top: 0;
  }

  .tag-cloud {
    max-height: 148px;
  }

  .filter-row-end {
    flex-wrap: wrap;
    gap: 10px;
  }

  .results-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 16px 0 14px;
  }

  .active-filters {
    justify-content: flex-start;
  }

  .card-foot {
    padding-top: 6px;
  }

  .card-cat {
    font-size: 10px;
  }

  .card-overlay {
    display: none;
  }

  .like-btn {
    opacity: 1;
    transform: none;
    background: rgba(22, 20, 16, 0.32);
  }

  .footer-cols {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .lightbox-panel {
    grid-template-rows: minmax(0, 52svh) minmax(0, 48svh);
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
  }

  .lightbox-arrow.prev {
    left: 8px;
  }

  .lightbox-arrow.next {
    right: 8px;
  }

  .modal-panel {
    padding: 30px 22px;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: clamp(3.35rem, 18vw, 5.4rem);
  }

  .hero-copy {
    font-size: 13px;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
    gap: 16px 10px;
  }

  .stat:nth-child(n + 3) {
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .gallery-section {
    padding-left: 14px;
    padding-right: 14px;
  }

  .site-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .footer-cols {
    grid-template-columns: 1fr;
  }

  .lb-actions {
    grid-template-columns: 1fr 1fr;
  }

  .like-action {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
