@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fdfcff;
  --ink: #211936;
  --muted: #6b647a;
  --violet: #7045ff;
  --orange: #ff6b35;
  --pink: #f9499e;
  --teal: #087f78;
  --line: #e8e3ef;
  --wash: #f2eefb;
  --font: "Bricolage Grotesque", "Segoe UI", sans-serif;
  color-scheme: light;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: 16px;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button { border: 0; }
a, button, input, select { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 5px;
}
[hidden] { display: none !important; }
::selection { background: #e1d6ff; color: var(--ink); }
.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;
}
.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 10;
  padding: 12px 18px;
  background: white;
  border: 1px solid var(--violet);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.page { max-width: 1600px; margin: auto; padding: 0 56px; }
.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 20px;
  padding: 18px 0 12px;
}
.identity-heading { grid-row: 1; grid-column: 1; min-width: 0; margin: 0; font: inherit; }
.identity {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 650;
  text-decoration: none;
  letter-spacing: -.045em;
  white-space: nowrap;
}
.identity svg { flex-shrink: 0; width: 30px; height: 30px; }
.collection { scroll-margin-top: 12px; }
.controls, .filter-top { display: contents; }
.type-filters {
  grid-row: 2;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 0 160px 0 0;
  margin: 0;
  min-width: 0;
}
.type-filters label { position: relative; cursor: pointer; }
.type-filters input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.type-filters span {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: .9375rem;
  font-weight: 550;
  color: var(--muted);
  border-radius: 8px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.type-filters small {
  font-size: .75rem;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  min-width: 18px;
  text-align: center;
  padding: 2px 4px;
  border-radius: 4px;
  background: #ece8f1;
  color: #665c79;
}
.type-filters input:checked + span { background: var(--violet); color: white; }
.type-filters input:checked + span small { background: #ffffff26; color: white; }
.type-filters input:focus-visible + span { outline: 3px solid var(--violet); outline-offset: 3px; }
.type-filters label:hover input:not(:checked) + span { background: var(--wash); }
.type-article input:checked + span { background: #bd3c16; }
.type-deck input:checked + span { background: #7045ff; }
.type-link input:checked + span { background: var(--teal); }
.search {
  grid-row: 1;
  grid-column: 2;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  width: clamp(104px, 24vw, 300px);
  max-width: 100%;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.search input { width: 100%; min-width: 0; border: 0; background: transparent; font-size: .875rem; }
.search input::placeholder { color: var(--muted); }
.search input:focus-visible { outline: 0; }
.search:focus-within { outline: 2px solid var(--violet); outline-offset: 2px; }
.search svg { flex-shrink: 0; }
.filter-options { grid-row: 2; grid-column: 2; position: relative; justify-self: end; z-index: 5; }
.filter-options summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  font-size: .875rem;
  list-style: none;
  cursor: pointer;
}
.filter-options summary::-webkit-details-marker { display: none; }
.filter-options summary:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.filter-options[open] summary { border-color: #c7b6ff; color: #6031db; }
.filter-options-count { color: white; background: var(--violet); padding: 1px 5px; border-radius: 4px; font-size: .75rem; }
.filter-bottom {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(360px, calc(100vw - 36px));
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 35px #21193618;
}
.select-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.sort-filter { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.select-filters label { flex-direction: column; align-items: stretch; }
.filter-bottom label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .875rem; }
.filter-bottom select {
  appearance: none;
  border: 0;
  border-radius: 0;
  padding: 8px 24px 8px 0;
  max-width: 190px;
  color: var(--ink);
  font-size: .875rem;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%236b647a' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  background-size: 16px;
}
#clear-filters {
  padding: 8px 0;
  background: transparent;
  color: #6031db;
  font-size: .875rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.result-count { margin: 0 0 12px; color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.work { min-width: 0; }
.work-link { display: block; height: 100%; text-decoration: none; border-radius: 12px; }
.work-cover {
  position: relative;
  aspect-ratio: 8 / 5;
  overflow: hidden;
  border-radius: 12px;
  background: #e5ddff;
  isolation: isolate;
}
.work-type-deck .work-cover { background: #d6c2ff; }
.work-type-link .work-cover { background: #b1ece4; }
.work-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.work-link:hover .work-cover img { transform: scale(1.025); }
.featured, .destination {
  position: absolute;
  top: 18px;
  padding: 7px 11px;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 550;
}
.featured { left: 18px; background: #f8ee69; color: #4d4305; }
.destination { right: 18px; }
.work-info { padding: 19px 2px 0; }
.work-meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); font-size: .8125rem; }
.kind { background: #ffebe2; color: #a9320c; padding: 5px 9px; border-radius: 5px; font-weight: 600; }
.kind-deck { background: #eee6ff; color: #6031c3; }
.kind-link { background: #ddf3ed; color: #096d5d; }
.work h3 { margin: 13px 0 9px; font-size: clamp(1.35rem, 2vw, 1.8rem); font-weight: 600; line-height: 1.2; letter-spacing: -.035em; overflow-wrap: anywhere; }
.work-link:hover h3 { color: #6031db; }
.work p { color: var(--muted); font-size: 1rem; line-height: 1.65; margin: 0; max-width: 65ch; }
.work-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; color: var(--muted); font-size: .8125rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.tags li { padding: 4px 8px; background: var(--wash); color: #6a5d80; border-radius: 4px; }
.reading-meta { white-space: nowrap; }

.empty-note { text-align: center; padding: 38px 20px 16px; }
.empty-note h3 { font-size: 1.35rem; font-weight: 600; margin: 0 0 9px; letter-spacing: -.025em; }
.empty-note p { color: var(--muted); font-size: 1rem; line-height: 1.7; margin: 0 auto; max-width: 50ch; }
.empty-clear { padding: 12px 19px; margin-top: 20px; border-radius: 7px; background: var(--violet); color: white; font-size: .875rem; }
.noscript-note { color: var(--muted); line-height: 1.7; }
footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid var(--line); padding: 27px 0 30px; margin-top: 64px; color: var(--muted); font-size: .875rem; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.preview-banner { padding: 12px 24px; background: #f8ee69; color: #4d4305; text-align: center; font-size: .875rem; }

@media (max-width: 1120px) {
  .page { padding: 0 32px; }
}
@media (max-width: 760px) {
  .page { padding: 0 22px; }
  .masthead { padding: 14px 0 10px; gap: 10px 12px; }
  .identity { font-size: 1rem; gap: 8px; }
  .identity svg { width: 24px; height: 24px; }
  .search { gap: 6px; padding: 9px 8px; }
  .search svg { width: 16px; height: 16px; }
  .type-filters { gap: 4px; padding-right: 44px; }
  .type-filters span { gap: 0; padding: 9px 6px; font-size: .875rem; }
  .type-filters small { display: none; }
  .filter-options summary { padding: 9px; }
  .filter-options-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .filter-options-count { position: absolute; top: -5px; right: -5px; }
  .result-count { margin: 0 0 10px; }
  .gallery { grid-template-columns: 1fr; gap: 32px; }
  .work-cover { border-radius: 9px; }
  .work h3 { font-size: 1.55rem; }
  .work-info { padding-top: 15px; }
  .featured, .destination { top: 13px; padding: 6px 9px; }
  .featured { left: 13px; }
  .destination { right: 13px; }
  .empty-note { padding: 30px 12px 4px; }
  footer { margin-top: 44px; font-size: .8125rem; gap: 18px; }
}
@media (max-width: 440px) {
  .page { padding: 0 18px; }
  .select-filters { gap: 18px; }
  .filter-bottom select { max-width: 147px; }
  .work h3 { font-size: 1.45rem; }
  footer { align-items: flex-start; flex-direction: column; gap: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
