.editorial-projects {
  display: grid;
  gap: 20px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.home-projects {
  --editorial-muted: var(--meadow-body-ink);
  --editorial-line: #ffffff26;
  --editorial-panel: #202026;
  margin-top: 24px;
}

.intro-light .home-projects {
  --editorial-line: #d7b9b6;
  --editorial-panel: #f1e6e3;
}

.home-projects h2 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  color: var(--editorial-muted);
  font-size: 14px;
  font-weight: 500;
}

.editorial-project {
  display: grid;
  grid-template: "media title" auto "media summary" auto / 48px minmax(0,1fr);
  column-gap: 13px;
  align-content: center;
  min-height: 52px;
  border-radius: 8px;
}

.editorial-project h3 {
  grid-area: title;
  align-self: end;
  margin: 0;
  font-size: 15px;
  font-weight: 550;
}

.editorial-project:is(:hover,:focus-visible) h3 { text-decoration: underline; text-underline-offset: 3px; }

.editorial-project p {
  grid-area: summary;
  align-self: start;
  margin: 2px 0 0;
  color: var(--editorial-muted);
  font-size: 14px;
  line-height: 1.55;
}

.editorial-project-media {
  grid-area: media;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--editorial-line);
  border-radius: 11px;
  background: var(--editorial-panel);
  color: var(--editorial-muted);
}

.editorial-project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editorial-project-media.is-paired { background: #d6e4de; }
[data-view="list"] .editorial-project-media.is-paired img:not([hidden]) ~ img { display: none; }
[data-view="list"] .editorial-project-media.is-paired img { object-position: 50% 66%; }

.editorial-projects[data-view="grid"] {
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 24px 14px;
}
[data-view="grid"] .editorial-project { grid-template: "media" "title" "summary" / minmax(0,1fr); }
[data-view="grid"] .editorial-project h3 { margin-top: 7px; }
[data-view="grid"] .editorial-project-media { aspect-ratio: 16/10; border-radius: 8px; }
[data-view="grid"] .editorial-project-media img { object-fit: contain; }
[data-view="grid"] .editorial-project-media.is-paired img { width: 34%; height: 91%; }

@media (max-width: 420px) {
  .editorial-projects[data-view="grid"] { grid-template-columns: minmax(0,1fr); }
}

.project-index-page {
  margin: 0;
  min-height: 100dvh;
  background: #08080a;
  color: #f0f0f2;
  font: 15px/1.5 Geist, Arial, sans-serif;
}

.intro-light .project-index-page {
  background: #fffaf6;
  color: #2f1a26;
}

.project-index-page .meadow-backdrop {
  position: fixed;
  inset: 0;
}

.project-index-page .night-hero {
  height: 100%;
  min-height: 0;
}

.meadow-projects-view {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: auto;
  scrollbar-width: thin;
}

:root[data-meadow-view="work"] .meadow-projects-view { display: block; }
.meadow-projects-view .project-index-shell { color: #f0f0f2; }
.intro-light .meadow-projects-view .project-index-shell { color: #2f1a26; }

.project-index-shell {
  --editorial-muted: #bdbdbd;
  --editorial-line: #ffffff26;
  --editorial-panel: #202026;
  width: min(640px, calc(100% - 40px));
  margin-inline: auto;
  padding-block: clamp(24px, 6vw, 64px);
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
  position: relative;
}

.intro-light .project-index-shell {
  --editorial-muted: #68515e;
  --editorial-line: #d7b9b6;
  --editorial-panel: #f1e6e3;
}

.project-index-back,
.project-index-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
}

.project-index-more {
  justify-content: center;
  width: max-content;
  margin: 8px auto 0;
  display: flex;
  padding-inline: 13px;
  border: 1px solid var(--editorial-line);
  border-radius: 8px;
  background: var(--editorial-panel);
  font-size: 13px;
}

.project-index-back:hover,
.project-index-more:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-index-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-index-shell .project-index-heading { margin-top: clamp(56px, 11vh, 96px); }
.project-index-shell .side-project-list { margin-top: 14px; }
.project-index-shell [data-project-mark] img {
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.project-index-shell [data-project-mark="boh-new"] { position: relative; }
.project-index-shell [data-project-mark="boh-new"] img {
  position: absolute;
  left: calc(50% - 13px);
  width: 174px;
  height: auto;
  max-width: none;
  clip-path: inset(0 calc(100% - 26px) 0 0);
}
.project-index-shell[data-project-view="grid"] .side-project-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}
.project-index-shell[data-project-view="grid"] .side-project-item {
  flex-direction: column;
  align-items: flex-start;
  padding: 16px 18px;
}
.project-index-shell[data-project-view="grid"] .side-project-icon { flex-basis: 40px; width: 40px; }
.project-index-shell[data-project-view="grid"] .cwa-landmark { height: 100px; margin-inline: 10px; }
.project-case-study-link {
  flex: 0 0 auto;
  align-self: center;
  margin-left: auto;
  color: var(--editorial-muted);
  font-size: 12px;
  white-space: nowrap;
}
.project-index-shell .project-thumbnails {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: start;
  gap: clamp(8px, 1.6vw, 12px);
  width: min(260px, 68%);
  height: auto;
  margin: 0 auto 12px;
}
.project-index-shell .project-thumbnail {
  overflow: hidden;
  border-radius: 6px;
}
.project-index-shell .project-thumbnail img {
  display: block;
  width: 100%;
  height: auto;
}
.project-index-shell[data-project-view="grid"] .project-thumbnails { height: auto; margin-inline: auto; }
@media (max-width: 520px) {
  .project-index-shell[data-project-view="grid"] .side-project-list { grid-template-columns: minmax(0, 1fr); }
  .project-index-shell .side-project-item { flex-wrap: wrap; gap: 8px 12px; }
  .project-index-shell .project-case-study-link { flex: 0 1 calc(100% - 52px); margin-left: 52px; }
}
.project-index-shell[data-project-view="grid"] .project-case-study-link {
  flex: 0 0 auto;
  align-self: flex-start;
  margin: 0;
}
@media (hover: none), (pointer: coarse) {
  .project-index-shell[data-project-view="grid"] .side-project-copy { padding-right: 24px; }
}
.project-index-shell .side-project-copy { text-shadow: 0 1px 5px #000, 0 0 10px #000; }
.intro-light .project-index-shell .side-project-copy { text-shadow: 0 1px 5px #fffaf6, 0 0 10px #fffaf6; }
.project-index-heading :is(h1,h2) { margin: 0; }
.project-view-controls { display: flex; gap: 2px; }

.project-view-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--editorial-muted);
  cursor: pointer;
}

.project-view-controls button:is([aria-pressed="true"],:hover) {
  background: var(--editorial-panel);
  color: inherit;
}

[data-project-index-list] :focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
[data-project-index-list] .editorial-project {
  padding: 5px 8px;
  color: inherit;
  text-decoration: none;
}

.project-index-card .editorial-project h2 {
  grid-area: title;
  align-self: end;
  margin: 0;
  font-size: 16px;
  font-weight: 550;
}

.project-index-card .editorial-project-media .project-index-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.intro-light .project-index-icon {
  filter: sepia(.75) saturate(1.9) hue-rotate(310deg) invert(1) hue-rotate(180deg);
}

.project-index-card .cwa-landmark { margin: 4px 8px 10px; }
.project-index-card:not([data-open="true"]) .cwa-landmark { margin-block: 0; }
.project-index-card .cwa-landmark > img { filter: grayscale(1); }
.project-index-card .cwa-landmark-color {
  mask-image: radial-gradient(circle 125px at var(--landmark-x, 50%) var(--landmark-y, 50%), #000, transparent);
}
.project-index-card .cwa-landmark-color img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  mask-image: radial-gradient(circle, #000 1px, transparent 1.25px);
  mask-size: 4px 4px;
}
.project-index-card .cwa-landmark img { object-position: center; }

[data-project-index-list] .editorial-projects[data-view="grid"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

[data-project-index-list] [data-view="grid"] .editorial-project {
  grid-template: "media" "title" "summary" / minmax(0, 1fr);
  align-content: start;
}

.project-index-card .editorial-project-media { aspect-ratio: 1; }
[data-project-index-list] [data-view="grid"] .editorial-project-media { width: 44px; margin-bottom: 6px; }

@media (hover: none), (pointer: coarse) {
  .project-index-card .editorial-project { padding-right: 68px; }
  .project-index-card .cwa-preview-toggle {
    right: 2px;
    top: 5px;
    min-height: 44px;
    color: var(--editorial-muted);
    font-family: inherit;
  }
  [data-project-index-list] [data-view="grid"] .editorial-project { padding-right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .project-index-card .cwa-landmark-color { mask-image: none; }
}

