/* Portfolio: sector sections, desktop-mockup cards and the full-page detail dialog. */
.pf-sector .sec-head { margin-bottom: 40px; }
/* PC: four cards fill the section width; tablet three, phone two. */
.pf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px 28px; }
.pf-card { position: relative; min-width: 0; }
/* No tile behind the mockup: only the desktop shows on the page background. */
.pf-tile { container-type: inline-size; }
.pf-title { margin-top: 16px; font-size: 17px; font-weight: 700; line-height: 1.4; }
.pf-open { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pf-open > span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; transition: color .2s; }
/* The title button covers the whole card, so the mockup opens the same dialog. */
.pf-open::after { content: ''; position: absolute; inset: 0; border-radius: 14px; }
.pf-open:focus-visible { outline: none; }
.pf-open:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 5px; }
.pf-card:hover .pf-open > span, .pf-open:focus-visible > span { color: var(--accent); }
.pf-tags { margin-top: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--sub); font-size: 14px; line-height: 1.5; }

/* Desktop mockup; 1cqw = 1% of the mockup width. */
.pf-mock { transition: transform .35s ease; }
.pf-card:hover .pf-mock { transform: translateY(-2.5cqw); }
.pf-mock-display { overflow: hidden; border-radius: 2.4cqw; background: #fbfbfc; box-shadow: inset 0 0 0 1px #dcdde1, 0 1.4cqw 3cqw rgba(0, 0, 0, .09); }
.pf-mock-screen { margin: 2.3cqw 2.3cqw 2.4cqw; aspect-ratio: 16 / 9; overflow: hidden; border-radius: .5cqw; background: #111; }
.pf-mock-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pf-mock-chin { height: 11.5cqw; border-top: 1px solid #d4d6da; background: linear-gradient(#e9eaed, #d6d8dc 55%, #c9cbd0); }
.pf-mock-stand { position: relative; width: 23cqw; height: 14cqw; margin: 0 auto; background: linear-gradient(90deg, #b6b9bd, #dcdee1 20%, #e8e9eb 50%, #d5d7da 80%, #b3b6ba); }
.pf-mock-stand::before { content: ''; position: absolute; inset: 0 0 auto; height: 3.2cqw; background: linear-gradient(rgba(0, 0, 0, .2), transparent); }
.pf-mock-stand::after { content: ''; position: absolute; left: -1.6cqw; right: -1.6cqw; top: 100%; height: 1.7cqw; border-radius: 0 0 1cqw 1cqw; background: linear-gradient(#eeeff1, #c3c6ca); box-shadow: 0 1cqw 1.8cqw rgba(0, 0, 0, .16); }
.pf-mock-desk { display: flex; align-items: center; justify-content: center; gap: 7cqw; margin-top: 6.5cqw; }
.pf-mock-keyboard { position: relative; width: 46cqw; height: 4.2cqw; border-radius: .9cqw; background: linear-gradient(#fbfbfc, #e9eaec); box-shadow: inset 0 0 0 1px #d8dadd, 0 .6cqw 1.2cqw rgba(0, 0, 0, .13); }
.pf-mock-keyboard::before { content: ''; position: absolute; inset: .7cqw 1.3cqw; background:
  repeating-linear-gradient(90deg, transparent 0 2.2cqw, rgba(0, 0, 0, .055) 2.2cqw 2.45cqw),
  repeating-linear-gradient(transparent 0 .55cqw, rgba(0, 0, 0, .055) .55cqw .7cqw); }
.pf-mock-mouse { width: 9.5cqw; height: 3.6cqw; border-radius: 50%; background: radial-gradient(ellipse at 50% 30%, #fff, #e6e7ea); box-shadow: inset 0 0 0 1px #d8dadd, 0 .6cqw 1.2cqw rgba(0, 0, 0, .15); }

/* Detail: native modal dialog scrolled as one column of full-page captures. */
.pf-detail { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--fg); overflow-y: auto; overscroll-behavior: contain; }
.pf-detail::backdrop { background: rgba(0, 0, 0, .8); }
html:has(.pf-detail[open]) { overflow: hidden; }
.pf-detail-panel { width: min(960px, calc(100% - 60px)); margin: 48px auto; overflow: clip; border: 1px solid #2a2a2a; border-radius: 16px; background: #111; }
.pf-detail-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 28px; border-bottom: 1px solid #2a2a2a; background: #111; }
.pf-detail-meta { min-width: 0; }
.pf-detail-meta .label { color: var(--accent); font-size: 18px; line-height: 1.2; }
.pf-detail-meta h2 { margin-top: 4px; font-size: 24px; font-weight: 700; line-height: 1.3; }
.pf-detail-meta .pf-tags { margin-top: 4px; }
.pf-detail-actions { display: flex; flex-shrink: 0; align-items: center; gap: 12px; }
.pf-detail-close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #444; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; transition: color .2s, border-color .2s; }
.pf-detail-close:hover, .pf-detail-close:focus-visible { border-color: var(--accent); color: var(--accent); }
.pf-detail-shots { display: grid; gap: 24px; padding: 28px; }
.pf-detail-shots img { width: auto; max-width: 100%; height: auto; margin: 0 auto; border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
/* The site pointer sits below the top layer; while a dialog is open the native cursor returns. */
html:has(.pf-detail[open]) .brand-pointer { display: none; }
html.has-brand-pointer:has(.pf-detail[open]), html.has-brand-pointer:has(.pf-detail[open]) * { cursor: auto; }
html.has-brand-pointer:has(.pf-detail[open]) .pf-detail :is(a, button) { cursor: pointer; }
@media (prefers-reduced-motion: no-preference) {
  .pf-detail[open] .pf-detail-panel { animation: pf-detail-in .28s ease-out; }
  .pf-detail[open]::backdrop { animation: pf-fade-in .28s ease-out; }
}
@keyframes pf-detail-in { from { opacity: 0; transform: translateY(16px); } }
@keyframes pf-fade-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .pf-mock, .pf-open > span { transition: none; }
  .pf-card:hover .pf-mock { transform: none; }
}

@media (max-width: 1023px) {
  .pf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 18px; }
}
@media (max-width: 767px) {
  .pf-sector .sec-head { margin-bottom: 26px; }
  .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
  .pf-open::after { border-radius: 10px; }
  .pf-title { margin-top: 12px; font-size: 15px; }
  .pf-tags { margin-top: 3px; font-size: 12px; }
  .pf-detail-panel { width: 100%; min-height: 100%; margin: 0; border: 0; border-radius: 0; }
  .pf-detail-head { gap: 12px; padding: 14px 16px; }
  .pf-detail-meta .label { font-size: 15px; }
  .pf-detail-meta h2 { font-size: 18px; }
  .pf-detail-meta .pf-tags { font-size: 12px; }
  .pf-detail-actions { gap: 8px; }
  .pf-detail-close { width: 40px; height: 40px; }
  .pf-detail-shots { gap: 16px; padding: 16px; }
}
