:root {
  --ink: #14110e;
  --paper: #f3ecdf;
  --red: #e23b2f;
  --gold: #f0b429;
  --pine: #1f6b4a;
  --cobalt: #2046d4;
  --cream: #f7f3ea;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Bricolage Grotesque", "Arial Narrow", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% -10%, rgba(224, 59, 47, 0.08), transparent 32%),
    var(--paper);
  color: var(--ink);
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--cream);
  padding: 0.6rem 0.8rem;
  z-index: 20;
}

.skip:focus { top: 1rem; }

.stripes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 0.7rem;
}

.stripes span:nth-child(1) { background: var(--red); }
.stripes span:nth-child(2) { background: var(--gold); }
.stripes span:nth-child(3) { background: var(--pine); }
.stripes span:nth-child(4) { background: var(--cobalt); }

.hero, main, .about, footer {
  width: min(1180px, calc(100% - 2.4rem));
  margin-inline: auto;
}

.topnav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 1.2rem;
  font-weight: 700;
}

.topnav-links {
  display: flex;
  gap: 1.2rem;
}

.topnav a { text-decoration: none; }

.topnav a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

.brand { letter-spacing: -0.03em; }

.eyebrow {
  margin: 2.2rem 0 0;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1 {
  margin: 0.15rem 0 0;
  font-size: clamp(5.2rem, 16vw, 11.5rem);
  line-height: 0.78;
  letter-spacing: -0.06em;
  font-weight: 800;
}

.role-band {
  margin: 1rem 0 0;
  background: var(--cobalt);
  color: var(--cream);
  display: inline-block;
  padding: 0.35rem 0.7rem 0.45rem;
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

.lede {
  font-family: var(--serif);
  font-size: 1.35rem;
  max-width: 36rem;
  margin: 1.2rem 0 0;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  font-weight: 700;
  margin: 1rem 0 0;
}

.contact a { text-underline-offset: 0.18em; }

.section-label {
  width: min(1180px, calc(100% - 2.4rem));
  margin: 0 auto 0.7rem;
}

.section-label h2,
.work-head h2,
.about h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
}

main { padding-top: 2.4rem; }

.work-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

.section-kicker {
  margin: 0 0 0.3rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--red);
}

.count {
  margin: 0;
  font-weight: 800;
  font-size: 1.1rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.1rem 0 1.3rem;
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  padding: 0.55rem 0;
}

.filter {
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}

.filter.is-on {
  background: var(--ink);
  color: var(--cream);
}

.wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.4rem 0.9rem;
}

.card {
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.card:focus-visible,
.filter:focus-visible,
.close:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 3px;
}

.frame {
  aspect-ratio: 2 / 3;
  background: var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  overflow: hidden;
  transition: transform 160ms ease;
}

.card:hover .frame { transform: translate(-3px, -3px); }

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fallback {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.75rem;
  background: var(--accent, var(--cobalt));
  color: var(--cream);
}

.detail-layout .fallback {
  aspect-ratio: 2 / 3;
  height: auto;
  max-width: 240px;
  box-shadow: 5px 5px 0 var(--ink);
}

.fallback .stamp {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 2px solid currentColor;
  padding: 0.15rem 0.35rem;
}

.fallback strong {
  font-size: clamp(1.35rem, 1.6vw, 1.9rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.card-title {
  margin: 0.55rem 0 0;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-size: 1.02rem;
}

.card-meta {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
}

.card-meta span + span::before {
  content: " · ";
}

.about {
  padding: 4.5rem 0 2rem;
}

.about-intro {
  max-width: 42rem;
}

.about-intro h2 { margin-bottom: 0.8rem; }

.about-intro p,
.skill p {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.45;
}

.aside { color: #3a332c; }

.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.skill {
  padding: 1.1rem 1rem 1.2rem;
  min-height: 16rem;
}

.skill h3 {
  margin: 0 0 0.6rem;
  font-size: 1.8rem;
  letter-spacing: -0.04em;
}

.skill-red { background: var(--red); color: var(--cream); }
.skill-gold { background: var(--gold); color: var(--ink); }
.skill-pine { background: var(--pine); color: var(--cream); }

footer {
  padding: 2.5rem 0 3rem;
  border-top: 4px solid var(--ink);
  margin-top: 3rem;
}

.credit-line {
  margin: 0.8rem 0 0;
  font-size: 0.9rem;
}

dialog {
  width: min(980px, calc(100% - 1.5rem));
  max-height: calc(100% - 1.5rem);
  overflow: auto;
  border: 3px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  padding: 1.2rem;
  box-shadow: 10px 10px 0 var(--ink);
}

dialog::backdrop { background: rgba(20, 17, 14, 0.62); }

.close {
  position: sticky;
  top: 0;
  float: right;
  border: 2px solid var(--ink);
  background: var(--red);
  color: var(--cream);
  font: inherit;
  font-weight: 800;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  z-index: 2;
}

.detail-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.2rem;
  clear: both;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  box-shadow: 5px 5px 0 var(--ink);
  background: var(--ink);
}

.detail-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.3rem);
  letter-spacing: -0.045em;
  line-height: 0.92;
}

.detail-role {
  display: inline-block;
  margin: 0.7rem 0 0;
  background: var(--red);
  color: var(--cream);
  font-weight: 800;
  padding: 0.2rem 0.45rem;
}

.facts {
  margin: 1rem 0 0;
  display: grid;
  gap: 0.35rem;
}

.facts div {
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  gap: 0.6rem;
}

.facts dt {
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 0.15rem;
}

.facts dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.05rem;
}

.detail-stills {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.detail-stills img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  background: var(--ink);
}

@media (max-width: 800px) {
  .skills { grid-template-columns: 1fr; }
  .skill { min-height: 0; }
  .wall { grid-template-columns: repeat(2, 1fr); }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-poster { max-width: 220px; }
  .detail-stills { grid-template-columns: 1fr; }
  .facts div { grid-template-columns: 1fr; gap: 0.1rem; }
  dialog {
    width: 100%;
    max-height: 100%;
    height: 100%;
    margin: 0;
    border-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .frame { transition: none; }
}

.picker-page {
  padding-bottom: 3rem;
}

.picker-bar,
.strip-editor,
.picker-filters,
.picker-alert,
.production {
  width: min(1180px, calc(100% - 2.4rem));
  margin-inline: auto;
}

.picker-bar {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-end;
  padding-top: 1.2rem;
}

.picker-bar h1 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  margin-top: 0.4rem;
}

.picker-bar p,
.picker-note {
  font-family: var(--serif);
  max-width: 40rem;
}

.picker-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.picker-actions button,
.photo-actions button,
.picker-alert button {
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  font: inherit;
  font-weight: 700;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}

.picker-actions button { background: var(--red); }

#save-status {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.strip-editor { margin-top: 1.6rem; }

.all-features-title {
  margin: 1.4rem 0 0.3rem;
  font-size: 1.6rem;
  letter-spacing: -0.04em;
}

a.strip-pick {
  text-decoration: none;
  color: var(--cream);
  display: block;
}

a.strip-pick span {
  display: block;
  padding: 0.45rem 0.6rem 0.6rem;
  font-weight: 800;
}

.strip-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 28vw);
  gap: 0.7rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
}

.strip-pick {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
}

.strip-pick img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.strip-pick figcaption {
  padding: 0.45rem 0.6rem 0;
  font-weight: 800;
}

.picker-filters { margin-top: 1.4rem; }

.picker-alert {
  margin-top: 0.4rem;
  padding: 0.7rem 0.8rem;
  background: var(--gold);
  font-weight: 700;
}

.production {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 3px solid var(--ink);
}

.production-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
}

.production h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
}

.production-head p { margin: 0.2rem 0 0; font-weight: 700; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.photo-tile {
  margin: 0;
  background: var(--cream);
  border: 3px solid transparent;
  box-shadow: 4px 4px 0 var(--ink);
}

.photo-tile.is-poster { border-color: var(--cobalt); }
.photo-tile.is-feature { border-color: var(--red); }
.photo-tile.is-second { border-color: var(--gold); }

.photo-tile img {
  width: 100%;
  object-fit: cover;
  background: var(--ink);
}

.photo-tile figcaption {
  min-height: 2.4rem;
  padding: 0.35rem 0.45rem 0;
  font-size: 0.78rem;
  font-weight: 700;
}

.shared-flag { color: var(--red); display: block; }
.photo-role { display: block; }

.photo-actions {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.4rem;
}

.photo-actions button {
  background: transparent;
  color: var(--ink);
  padding: 0.3rem 0.4rem;
}

.is-feature .photo-actions [data-feature],
.is-second .photo-actions [data-feature] {
  background: var(--red);
  color: var(--cream);
}

.is-poster .photo-actions [data-poster] {
  background: var(--cobalt);
  color: var(--cream);
}

@media (max-width: 800px) {
  .picker-bar,
  .production-head { flex-direction: column; align-items: flex-start; }
  .picker-actions { align-items: flex-start; }
  #save-status { text-align: left; }
}
