.pf-section {
  --pf-paper: #f3f0e7;
  --pf-ink: #171919;
  --pf-muted: #57534d;
  --pf-line: #c9c3b7;
  --pf-accent: #a53420;
  --pf-signal: #f04426;
  --pf-edge: clamp(20px, 4.2vw, 64px);
  --pf-gutter: clamp(24px, 4vw, 56px);
  padding-block: clamp(44px, 6vw, 88px);
  background: var(--pf-paper);
  color: var(--pf-ink);
  font-family: Golos, sans-serif;
}

.pf-section [hidden] { display: none !important; }
.pf-section :where(h1, h2, h3, p) { margin: 0; }
.pf-section :where(a, button) { color: inherit; }
.pf-section a { text-decoration: none; }
.pf-section :where(a, button):focus-visible { outline: 3px solid var(--pf-accent); outline-offset: 4px; }
.pf-section :where(svg) {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pf-wrap { width: min(1440px, calc(100% - 2 * var(--pf-edge))); margin-inline: auto; }
.pf-header {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: end;
  gap: 16px var(--pf-gutter);
  margin-bottom: clamp(24px, 4vw, 48px);
}
.pf-header :is(h1, h2) {
  font-size: clamp(36px, 5.6vw, 80px);
  font-weight: 540;
  line-height: .99;
  letter-spacing: -.055em;
}
.pf-header > p { max-width: 39ch; color: var(--pf-muted); font-size: 16px; line-height: 1.55; }

.pf-casebook { display: grid; grid-template-columns: minmax(224px, .39fr) minmax(0, 1fr); gap: var(--pf-gutter); }
.pf-picker { align-self: start; border-block-start: 1px solid var(--pf-line); }
.pf-choice {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 4px 12px;
  min-height: 68px;
  padding: 12px 12px 12px 16px;
  border-block-end: 1px solid var(--pf-line);
}
.pf-choice-number { grid-row: span 2; color: var(--pf-muted); font-size: 12px; line-height: 24px; font-variant-numeric: tabular-nums; }
.pf-choice strong { font-size: 18px; font-weight: 550; line-height: 24px; overflow-wrap: anywhere; }
.pf-choice-action { color: var(--pf-muted); font-size: 13px; line-height: 1.4; }
.pf-choice[aria-selected="true"] { background: var(--pf-ink); color: var(--pf-paper); border-color: var(--pf-ink); }
.pf-choice[aria-selected="true"]::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--pf-signal); content: ""; }
.pf-choice[aria-selected="true"] :is(.pf-choice-number, .pf-choice-action) { color: #d7d1c5; }
.pf-case-panels { display: grid; min-width: 0; gap: 36px; }
.pf-home .pf-project-link { gap: 20px; }
.pf-home .pf-caption { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 24px; }
.pf-home .pf-description { grid-column: 2; grid-row: 1 / 3; align-self: start; }
.pf-home .pf-domain { grid-column: 2; grid-row: 3; }
.pf-footer { display: flex; justify-content: flex-end; margin-top: 24px; }
.pf-all {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  min-height: 44px;
  padding-inline: 12px;
  border: 1px solid var(--pf-line);
  font-size: 15px;
  font-weight: 550;
}
.pf-all svg { color: var(--pf-accent); }

.pf-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 12px;
  margin-bottom: 28px;
  border-block: 1px solid var(--pf-line);
}
.pf-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-filters button {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--pf-line);
  border-radius: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.pf-filters button[aria-pressed="true"] { border-color: var(--pf-ink); background: var(--pf-ink); color: var(--pf-paper); }
.pf-count { flex: 0 0 auto; color: var(--pf-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.pf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px var(--pf-gutter); }
.pf-project { min-width: 0; scroll-margin-top: 16px; }
.pf-project:focus-visible { outline: 2px solid var(--pf-accent); outline-offset: 6px; }
.pf-project-link { display: grid; align-content: start; gap: 16px; height: 100%; }
.pf-visual { min-width: 0; border: 1px solid var(--pf-ink); background: #e8e2d7; }
.pf-frame {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  padding: 4px 12px;
  background: var(--pf-ink);
  color: var(--pf-paper);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.pf-frame span:last-child { overflow-wrap: anywhere; }
.pf-image { aspect-ratio: 1440 / 1000; overflow: hidden; }
.pf-image > img { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; }
.pf-caption { display: grid; align-content: start; gap: 4px; }
.pf-sector { color: var(--pf-muted); font-size: 13px; line-height: 1.5; }
.pf-caption :is(h2, h3) {
  margin: 0;
  font-family: Golos, sans-serif;
  font-size: clamp(25px, 2.7vw, 40px);
  font-weight: 560;
  line-height: 1.06;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.pf-action { margin: 4px 0; font-weight: 540; line-height: 1.35; }
.pf-description { max-width: 46ch; color: var(--pf-muted); font-size: 15px; line-height: 1.55; }
.pf-domain { display: inline-flex; align-items: center; justify-self: start; gap: 8px; min-height: 44px; color: var(--pf-accent); font-size: 14px; font-weight: 550; }
.pf-domain svg { transition: transform .2s cubic-bezier(.2,.7,.25,1); }
.pf-note { margin-top: 20px; color: var(--pf-muted); font-size: 13px; }

.pf-other { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--pf-line); }
.pf-other h2 { margin-bottom: 12px; font-size: clamp(27px, 3vw, 39px); font-weight: 540; line-height: 1.15; letter-spacing: -.03em; }
.pf-other-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--pf-gutter); }
.pf-other-links > a { display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: 12px; min-height: 60px; padding-block: 12px; border-bottom: 1px solid var(--pf-line); }
.pf-other-links strong { font-size: 16px; font-weight: 550; line-height: 1.4; overflow-wrap: anywhere; }
.pf-other-links span { color: var(--pf-muted); font-size: 13px; overflow-wrap: anywhere; }
.pf-other-links svg { color: var(--pf-accent); }

@media (hover:hover) {
  .pf-choice:not([aria-selected="true"]):hover, .pf-filters button:not([aria-pressed="true"]):hover, .pf-all:hover { background: #e8e2d7; }
  .pf-project-link:hover .pf-domain, .pf-other-links > a:hover strong { text-decoration: underline; text-underline-offset: 4px; }
  .pf-project-link:hover .pf-domain svg { transform: translate(2px,-2px); }
}
@media (min-width:900px) {
  .pf-page .pf-project:nth-child(1 of :not([hidden])) { grid-column: 1 / -1; }
  .pf-page .pf-project:nth-child(1 of :not([hidden])) > .pf-project-link { grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); align-items: center; gap: var(--pf-gutter); }
  .pf-page .pf-project:nth-child(1 of :not([hidden])) :is(h2, h3) { font-size: clamp(30px, 4vw, 58px); }
}
@media (max-width:900px) {
  .pf-home .pf-caption { grid-template-columns: minmax(0, 1fr); }
  .pf-home .pf-description, .pf-home .pf-domain { grid-column: auto; grid-row: auto; }
  .pf-other-links > a { grid-template-columns: minmax(0, 1fr) 18px; row-gap: 4px; }
  .pf-other-links strong, .pf-other-links span { grid-column: 1; }
  .pf-other-links svg { grid-column: 2; grid-row: 1 / 3; }
}
@media (max-width:760px) {
  .pf-header, .pf-casebook, .pf-grid, .pf-other-links { grid-template-columns: minmax(0, 1fr); }
  .pf-header { gap: 12px; }
  .pf-header :is(h1, h2) { font-size: clamp(36px, 8.5vw, 58px); }
  .pf-casebook { gap: 16px; }
  .pf-picker { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; border: 0; }
  .pf-choice { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; gap: 4px; min-height: 84px; padding: 8px; border: 1px solid var(--pf-line); }
  .pf-choice strong { font-size: 14px; line-height: 1.2; }
  .pf-choice-number { grid-row: auto; font-size: 11px; line-height: 1.2; }
  .pf-choice-action { font-size: 11px; line-height: 1.3; }
  .pf-choice[aria-selected="true"]::before { inset: 0 0 auto; width: auto; height: 2px; }
  .pf-home .pf-project-link, .pf-project-link { gap: 12px; }
  .pf-tools { align-items: flex-start; flex-direction: column; }
  .pf-filters button { padding-inline: 8px; }
  .pf-grid { row-gap: 28px; }
  .pf-footer { justify-content: flex-start; margin-top: 16px; }
  .pf-other { margin-top: 28px; padding-top: 20px; }
}
@media (prefers-reduced-motion: no-preference) {
  html[data-pf-transition] #portfolio-gallery { view-transition-name: portfolio-results; }
  html[data-pf-transition]::view-transition-group(portfolio-results),
  html[data-pf-transition]::view-transition-old(root),
  html[data-pf-transition]::view-transition-new(root) { animation: none; }
  html[data-pf-transition]::view-transition-old(portfolio-results) { animation: none; opacity: 0; }
  html[data-pf-transition]::view-transition-new(portfolio-results) { animation: pf-results-in .24s cubic-bezier(.2,.7,.25,1) both; }
  @keyframes pf-results-in { from { opacity: .65; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .pf-domain svg { transition: none; }
}
@media print {
  .pf-section { background: #fff; padding: 20px 0; }
  .pf-wrap { width: 100%; }
  .pf-picker, .pf-tools, .pf-footer { display: none !important; }
  .pf-casebook, .pf-grid { display: block; }
  .pf-project { break-inside: avoid; margin-bottom: 24px; }
}
