/* The route owns the left gutter. Only the mount and its descendants are styled. */
.pv {
  --pv-metal-ink: #17191c;
  --pv-metal-muted: #41494f;
  --pv-metal-base: linear-gradient(125deg, #e3e5e6, #a6adb2 52%, #f7f8f8);
  --pv-metal-sheen: linear-gradient(115deg, transparent 30%, #ffffff30 43%, transparent 57%);
  box-sizing: border-box;
  width: calc(100% - 8%);
  max-width: 1200px;
  margin: 0 0 0 8%;
  color: var(--ink);
  font-family: "Instrument Sans", sans-serif;
  font-size: 19px;
  line-height: 1.55;
}

:root[data-theme="dark"] .pv {
  --pv-metal-ink: #f0f2f4;
  --pv-metal-muted: #d7dce0;
  --pv-metal-base: linear-gradient(125deg, #2a2e33, #5d646b 52%, #1a1d20);
  --pv-metal-sheen: linear-gradient(115deg, transparent 30%, #ffffff12 43%, transparent 57%);
}

.pv *, .pv *::before, .pv *::after { box-sizing: border-box; }
.pv .pv-card { min-width: 0; margin: 0; }
.pv .pv-title, .pv .pv-metal-title {
  margin: 0;
  font-stretch: condensed;
  font-variation-settings: "wdth" 85;
  font-weight: 600;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}
.pv .pv-title { font-size: 21px; line-height: 1.18; }
.pv .pv-media {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--steel);
  border-radius: 1px;
  background: var(--mist);
}
.pv .pv-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.pv .pv-metal {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(22px, 2.8vw, 38px);
  color: var(--pv-metal-ink);
  background-image: var(--pv-metal-sheen),
    repeating-linear-gradient(0deg, #ffffff09 0 1px, #00000005 1px 2px, transparent 2px 4px),
    var(--pv-metal-base);
}
.pv .pv-metal-title {
  display: block;
  max-width: 17ch;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.04;
}
.pv .pv-metal-copy { margin-top: auto; max-width: 42ch; }
.pv .pv-caption { padding-top: 17px; }
.pv .pv-status {
  margin: 7px 0 0;
  color: var(--steel-text, var(--steel));
  font-size: 16px;
  line-height: 1.4;
}
.pv .pv-description { margin: 12px 0 0; max-width: 48ch; }
.pv .pv-metal-copy .pv-description { margin-top: 0; }
.pv .pv-metal .pv-status { color: var(--pv-metal-muted); }
.pv .pv-link {
  display: inline-block;
  margin-top: 16px;
  color: inherit;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.pv .pv-link:hover { text-decoration: underline; }
.pv .pv-card { position: relative; }
.pv .pv-link::after { content: ""; position: absolute; inset: 0; }
.pv .pv-card:focus-within .pv-media { border-color: var(--ink); }
.pv :focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
@media (hover: hover) {
  .pv .pv-card:hover .pv-media { border-color: var(--ink); }
}

/* Siatka: screenshot scale stays consistent; steel projects are complete tiles. */
.pv.pv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 24px; }
.pv.pv-grid .pv-media { aspect-ratio: 16 / 10; }
.pv.pv-grid .pv-caption { margin-top: 20px; border-top: 1px solid var(--steel); }
.pv.pv-grid .pv-card-text .pv-caption { padding-top: 12px; }
.pv.pv-grid .pv-card-text .pv-caption .pv-status { margin-top: 0; }

/* Bento, 7 items. Spans are columns x rows, positions explicitly close the board.
   Desktop: [4x2, 2x2, 2x1, 3x1, 2x1, 3x1, 2x1].
   Rows 1–2: items 1+2 (4+2=6); row 3: items 3+5+7 (2+2+2=6);
   row 4: items 4+6 (3+3=6). Area: 8+4+2+3+2+3+2 = 24 = 6x4.
   Tablet: [4x2, 2x2, 2x1, 2x1, 2x1, 2x1, 4x1].
   Rows 1–2: item 1; rows 3–4: item 2 beside items 3+4;
   row 5: items 5+6; row 6: item 7. Area: 8+4+2+2+2+2+4 = 24 = 4x6.
   Mobile: all 1x1, natural source order. */
.pv.pv-bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-flow: row dense;
  grid-auto-rows: minmax(360px, auto);
  gap: 24px;
}
.pv.pv-bento .pv-card {
  display: flex;
  flex-direction: column;
  grid-column: span 2;
  min-height: 0;
}
.pv.pv-bento .pv-card[data-project-index="1"] { grid-area: 1 / 1 / span 2 / span 4; }
.pv.pv-bento .pv-card[data-project-index="2"] { grid-area: 1 / 5 / span 2 / span 2; }
.pv.pv-bento .pv-card[data-project-index="3"] { grid-area: 3 / 1 / span 1 / span 2; }
.pv.pv-bento .pv-card[data-project-index="4"] { grid-area: 4 / 1 / span 1 / span 3; }
.pv.pv-bento .pv-card[data-project-index="5"] { grid-area: 3 / 3 / span 1 / span 2; }
.pv.pv-bento .pv-card[data-project-index="6"] { grid-area: 4 / 4 / span 1 / span 3; }
.pv.pv-bento .pv-card[data-project-index="7"] { grid-area: 3 / 5 / span 1 / span 2; }
.pv.pv-bento .pv-media { flex: 1 1 0; min-height: 170px; }
.pv.pv-bento .pv-image { position: absolute; inset: 0; }
.pv.pv-bento .pv-caption {
  flex: 0 0 auto;
  padding: 18px 18px 20px;
  border: 1px solid var(--steel);
  border-top: 0;
  background: var(--bg);
}
.pv.pv-bento .pv-description { font-size: 17px; line-height: 1.45; }
.pv.pv-bento .pv-card-text .pv-media { padding: 28px; }
.pv.pv-bento .pv-card-text .pv-description { font-size: 19px; line-height: 1.55; }

/* Pas: focus padding keeps outlines visible within the scrolling viewport. */
.pv.pv-strip { max-width: none; }
.pv.pv-strip .pv-row {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 6px;
  scrollbar-width: none;
  padding: 6px 6px 24px;
}
.pv.pv-strip .pv-row::-webkit-scrollbar { display: none; }
.pv.pv-strip .pv-card {
  flex: 0 0 420px;
  padding-top: 18px;
  border-top: 1px solid var(--steel);
  scroll-snap-align: start;
}
.pv.pv-strip .pv-media { aspect-ratio: 4 / 3; }
.pv.pv-strip .pv-metal { justify-content: flex-start; }
.pv.pv-strip .pv-link { text-decoration: underline; }
.pv.pv-strip .pv-link:hover { text-decoration-thickness: 2px; }
.pv.pv-strip .pv-progress { height: 2px; margin: 8px 6px 0; background: var(--mist); }
.pv.pv-strip .pv-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--steel);
  transform: scaleX(0);
  transform-origin: left center;
}

@media (min-width: 761px) and (max-width: 1100px) {
  .pv.pv-bento img { object-position: left top; }
  .pv.pv-bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pv.pv-bento .pv-card[data-project-index="1"] { grid-area: 1 / 1 / span 2 / span 4; }
  .pv.pv-bento .pv-card[data-project-index="2"] { grid-area: 3 / 1 / span 2 / span 2; }
  .pv.pv-bento .pv-card[data-project-index="3"] { grid-area: 3 / 3 / span 1 / span 2; }
  .pv.pv-bento .pv-card[data-project-index="4"] { grid-area: 4 / 3 / span 1 / span 2; }
  .pv.pv-bento .pv-card[data-project-index="5"] { grid-area: 5 / 1 / span 1 / span 2; }
  .pv.pv-bento .pv-card[data-project-index="6"] { grid-area: 5 / 3 / span 1 / span 2; }
  .pv.pv-bento .pv-card[data-project-index="7"] { grid-area: 6 / 1 / span 1 / span 4; }
}

@media (max-width: 760px) {
  .pv { width: calc(100% - 129px); margin-left: 57px; font-size: 17px; } /* clears the 72px right gutter the route uses on mobile */
  .pv .pv-title { font-size: 21px; }
  .pv .pv-metal { padding: 22px; gap: 20px; }
  .pv .pv-metal-title { font-size: clamp(28px, 6vw, 38px); }
  .pv .pv-description { font-size: 17px; }
  .pv.pv-grid { grid-template-columns: minmax(0, 1fr); row-gap: 40px; }
  .pv.pv-grid .pv-card-text .pv-media { min-height: 290px; aspect-ratio: auto; }
  .pv.pv-bento { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; gap: 24px; }
  .pv.pv-bento .pv-card[data-project-index] { grid-area: auto / auto / span 1 / span 1; }
  .pv.pv-bento .pv-media { flex: none; aspect-ratio: 16 / 10; }
  .pv.pv-bento .pv-card-text .pv-media { min-height: 330px; padding: 24px; }
  .pv.pv-bento .pv-card-text .pv-description { font-size: 17px; }
  .pv.pv-strip { width: calc(100% - 129px); }
  .pv.pv-strip .pv-row { gap: 18px; padding-right: 16px; }
  .pv.pv-strip .pv-card { flex-basis: 88%; }
  .pv.pv-strip .pv-progress { margin-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .pv, .pv *, .pv *::before, .pv *::after {
    animation: none;
    transition: none;
    scroll-behavior: auto;
  }
}
