﻿/* Row-based grids keep three projects on each desktop row. */
.design-gallery-page .portfolio-gallery,.app-ui-page .portfolio-gallery { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; columns:auto; align-items:start; }
.design-gallery-page .portfolio-item,.app-ui-page .portfolio-item { width:100%; min-width:0; margin:0; padding:0; font:inherit; text-align:left; color:inherit; cursor:pointer; }
.project-preview { display:block; position:relative; overflow:hidden; background:#edf1f5; }
.design-gallery-page .project-preview img,.app-ui-page .project-preview img { width:100%; height:auto; aspect-ratio:4/3; object-fit:contain; }
.project-hover { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:white; background:#0054a6b3; font-size:16px; opacity:0; transition:opacity .2s; }
.portfolio-item:hover .project-hover,.portfolio-item:focus-visible .project-hover { opacity:1; }
.project-viewer { width:100vw; max-width:100vw; height:100dvh; max-height:100dvh; margin:0; border:0; padding:0; background:#fff; color:#242424; }
.project-viewer[open] { display:flex; flex-direction:column; }
.project-viewer::backdrop { background:#132b46d9; }
.viewer-toolbar { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:16px 24px; border-bottom:1px solid #dce2ea; flex-shrink:0; }
.viewer-toolbar h2 { margin:0; font-size:20px; line-height:1.3; }
.viewer-close,.viewer-navigation button { border:1px solid #0054a6; border-radius:4px; padding:9px 18px; background:white; color:#0054a6; font:inherit; font-size:14px; cursor:pointer; }
.viewer-close span { font-size:22px; margin-left:8px; }
.viewer-content { flex:1; min-height:0; overflow:hidden; display:flex; align-items:center; justify-content:center; background:#f3f7fc; padding:20px; }
.viewer-image { display:block; width:100%; height:100%; min-height:0; max-width:100%; max-height:100%; object-fit:contain; margin:0; }
.viewer-navigation { display:flex; justify-content:center; align-items:center; gap:24px; padding:12px 20px; border-top:1px solid #dce2ea; flex-shrink:0; }
.viewer-count { font-size:14px; margin:0; }
body.viewer-open { overflow:hidden; }
@media(max-width:760px){.design-gallery-page .portfolio-gallery,.app-ui-page .portfolio-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.viewer-toolbar{padding:12px 16px}.viewer-toolbar h2{font-size:16px}.viewer-content{padding:12px}.viewer-navigation{gap:14px}}
@media(max-width:480px){.design-gallery-page .portfolio-gallery,.app-ui-page .portfolio-gallery{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.project-hover{transition:none}}
