/* AsiaTech → Arfat responsive portfolio. Scoped; does not alter the main theme. */
.a1ps{--a1ps-ink:#0b2052;--a1ps-blue:#386aff;--a1ps-border:#e1e9fc;--a1ps-soft:#f4f7ff;font-family:inherit;color:var(--a1ps-ink);max-width:100%;width:100%;min-width:0;overflow-x:clip;padding:0 2px 14px}
.a1ps *{box-sizing:border-box}
.a1ps-tools{display:flex;gap:12px;justify-content:space-between;align-items:center;flex-wrap:wrap;margin:0 0 13px}
.a1ps-heading-meta{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap;font-size:12px}
.a1ps-heading-meta strong{font-size:13px;font-weight:850;color:#214fbc}
.a1ps-muted{color:#647a9f;font-weight:520}
.a1ps-pulse{display:inline-block;width:9px;height:9px;border-radius:50%;background:#54ca81;box-shadow:0 0 0 4px #e3f9ed}
.a1ps-search{display:flex;align-items:center;gap:8px;padding:0 12px;background:#fff;border:1px solid #dce6fb;border-radius:12px;min-height:37px;width:min(100%,236px);color:#6680aa}
.a1ps-search:focus-within{border-color:#4071ff;box-shadow:0 0 0 3px #4071ff1b}
.a1ps-search svg{stroke:currentColor;stroke-width:2;stroke-linecap:round;fill:none;width:17px;height:17px;flex:none}
.a1ps-search input{font:inherit;font-size:12px;min-width:0;outline:none;border:0;background:none;color:#102c61;width:100%}
.a1ps-chips{display:flex;flex-wrap:wrap;gap:7px;overflow:visible;max-width:100%;padding:2px 0 8px;margin:0 0 10px}
.a1ps-chip{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;border:1px solid #e0e8fd;border-radius:100px;padding:7px 13px;background:#fff;color:#486492;font-size:11px;font-weight:725;cursor:pointer;line-height:1.2;white-space:nowrap}
.a1ps-chip:hover{background:#edf2ff;border-color:#c0d4ff}.a1ps-chip.is-selected{color:#fff;border-color:#335ff5;background:linear-gradient(115deg,#326dff,#7c40e9);box-shadow:0 4px 13px #4765ee2c}
.a1ps-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:stretch;min-width:0;max-width:100%}
.a1ps-card{border:1px solid var(--a1ps-border);border-radius:18px;overflow:hidden;background:#fff;min-width:0;display:flex;flex-direction:column;box-shadow:0 5px 16px rgba(35,65,138,.045);transition:transform .2s,box-shadow .2s,border-color .2s}
.a1ps-card:hover{transform:translateY(-2px);box-shadow:0 13px 26px #243b821e;border-color:#c4d5ff}
.a1ps-card[hidden]{display:none!important}
.a1ps-image-area{height:clamp(118px,14vw,175px);overflow:hidden;position:relative;background:linear-gradient(136deg,#edf3ff,#e5eafe 55%,#f8edff);isolation:isolate}
.a1ps-image-area>img{width:100%;height:100%;object-fit:cover;display:block;position:relative;z-index:1;transition:transform .3s}
.a1ps-card:hover .a1ps-image-area>img{transform:scale(1.035)}
.a1ps-image-area>img[hidden]{display:none!important}
.a1ps-image-fallback{display:none;position:absolute;inset:0;align-items:center;justify-content:center;font-size:38px;color:#4d7aff}
.a1ps-no-image .a1ps-image-fallback,.a1ps-image-area:not(:has(img)) .a1ps-image-fallback{display:flex}
.a1ps-badge{position:absolute;z-index:3;left:10px;bottom:10px;border:1px solid #ffffffbc;padding:6px 9px;background:#fffefef0;backdrop-filter:blur(6px);font-size:10px;font-weight:800;border-radius:100px;color:#224680;max-width:calc(100% - 20px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.a1ps-card-body{padding:12px 14px 13px;display:flex;flex-direction:column;gap:7px;flex:1;min-width:0}
.a1s-section-content .a1ps-card-body h3,.a1ps-card-body h3{font-size:clamp(13px,1.1vw,16px);font-weight:790;line-height:1.3;letter-spacing:-.02em;margin:0;color:#0d2458;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.a1s-section-content .a1ps-card-body .a1ps-desc,.a1ps-card-body .a1ps-desc{font-size:11px;line-height:1.4;color:#6a7fa6;margin:0;min-height:16px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.a1ps-bottom{display:flex;align-items:center;justify-content:center;gap:13px;min-height:44px;padding:13px 0 1px}
.a1s-section-content .a1ps-bottom .a1ps-count,.a1ps-bottom .a1ps-count{font-size:11px;margin:0;color:#6f84a8}
/* An unobtrusive infinite-scroll sentinel replaces the old Load More button. */
.a1ps-auto-status{display:inline-flex;align-items:center;gap:5px;color:#4770c6;font-size:11px;font-weight:650}
.a1ps-auto-status[hidden],.a1ps-sentinel[hidden]{display:none!important}
.a1ps-auto-indicator{background:#eaf0ff;color:#4771e7;width:19px;height:19px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;animation:a1ps-bounce 1.9s ease-in-out infinite}
@keyframes a1ps-bounce{0%,100%{transform:translateY(0)}50%{transform:translateY(3px)}}
.a1ps-sentinel{height:2px;max-width:100%;pointer-events:none}
.a1ps-mobile-category{display:none}
.a1ps *{max-width:100%}
.a1ps .a1ps-modal,.a1ps .a1ps-dialog{max-width:none}
.a1s-section-content .a1ps-none,.a1ps-none{padding:25px;text-align:center;border:1px dashed #b5c9f3;background:#f7faff;border-radius:14px;margin:0;color:#6681ab;font-size:12px}
.a1ps-none[hidden]{display:none}
.a1ps :is(button,input,a):focus-visible{outline:3px solid #a5a3ff;outline-offset:2px}
.a1ps-modal[hidden]{display:none!important}
.a1ps-modal{position:fixed;inset:0;z-index:999999;display:flex;align-items:center;justify-content:center;padding:18px;isolation:isolate}
.a1ps-backdrop{position:absolute;inset:0;background:#031129c9;backdrop-filter:blur(5px);z-index:-1}
.a1ps-dialog{width:min(100%,650px);background:#fff;color:#102c5e;position:relative;max-height:calc(100dvh - 36px);overflow:auto;box-shadow:0 20px 80px #07153c60;border:1px solid #c9d5f4;border-radius:18px;outline:none}
.a1ps-dialog-photo{aspect-ratio:16/8;background:linear-gradient(125deg,#e1eafe,#f5eaff);max-height:33dvh}
.a1ps-dialog-photo img{height:100%;width:100%;display:block;object-fit:contain}
.a1ps-dialog-photo.is-empty{display:none}
.a1ps-modal-close{position:absolute;right:13px;top:13px;width:36px;height:36px;font-size:25px;border-radius:50%;border:1px solid #d3e0fa;background:#fff;color:#173763;z-index:3;cursor:pointer;box-shadow:0 2px 10px #18387029}
.a1ps-dialog-body{padding:20px 23px 23px}
.a1ps-dialog-cats{display:block;font-size:12px;color:#386de6;font-weight:700;margin-bottom:7px}
.a1ps-dialog-body h3{font-size:23px;line-height:1.2;margin:0 0 8px;color:#0d295c}
.a1ps-dialog-body p{line-height:1.65;font-size:13px;color:#526d99;margin:0 0 15px}
.a1ps-dialog-link{display:inline-flex;padding:12px 17px;border-radius:11px;background:linear-gradient(110deg,#2869ff,#8043e7);color:white;font-size:12px;font-weight:700;text-decoration:none}
.a1ps-dialog-link[hidden]{display:none}
@media(max-width:860px){
 .a1ps-tools{gap:7px;margin:0 0 9px;flex-wrap:nowrap}.a1ps-search{width:min(49%,200px);padding:0 8px;min-height:33px}.a1ps-muted{display:none}
 .a1ps-chips{display:none}
 .a1ps-mobile-category{display:flex;align-items:center;gap:8px;margin:0 0 10px;color:#486492;font-size:11px;font-weight:700}
 .a1ps-category-select{appearance:auto;flex:1 1 0;width:100%;min-width:0;max-width:100%;border:1px solid #dce6fb;border-radius:10px;min-height:34px;padding:6px 10px;color:#244c96;background:#fff;font:inherit;font-size:11px}
 .a1ps-grid{gap:9px}.a1ps-card{border-radius:13px}.a1ps-image-area{height:clamp(106px,24vw,170px)}
 .a1ps-card-body{padding:9px 10px;gap:5px}.a1ps-card-body h3{font-size:12px}.a1ps-actions{gap:5px}.a1ps-actions a,.a1ps-actions button{padding:6px 7px;font-size:10px;min-height:29px}
 .a1ps-badge{font-size:9px;padding:5px 7px;left:7px;bottom:7px}
 .a1ps-bottom{padding-top:9px}
}
@media(max-width:400px){
 .a1ps-search input{font-size:11px}.a1ps-tools{gap:4px}.a1ps-search{width:49%}
 .a1ps-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .a1ps-image-area{height:97px}.a1ps-card-body{padding:8px;gap:4px}
 .a1ps-card-body h3{font-size:11px}.a1s-section-content .a1ps-card-body .a1ps-desc{display:none}
 .a1ps-dialog-body{padding:14px}
}
@media(max-width:340px){.a1ps-image-area{height:85px}.a1ps-badge{font-size:8px}}
@media(prefers-reduced-motion:reduce){.a1ps-card,.a1ps-image-area img{transition:none}}

/* Extra protection against cross-axis scroll in the fixed-height Arfat layout. */
.a1s-section-content:has(> .a1ps),.a1s-section-content:has(.a1ps){overflow-x:hidden!important}
@media(prefers-reduced-motion:reduce){.a1ps-auto-indicator{animation:none}}

/* v1.2: Avoid expensive painting/reflow for offscreen cards. */
.a1ps-card{contain:layout style paint;content-visibility:auto;contain-intrinsic-size:auto 255px}
.a1ps-image-area>img{background:#eef3fc}
@media(max-width:400px){.a1ps-card{contain-intrinsic-size:auto 188px}}

/* v1.3: Photo-only details launcher. Card remains clean and fully keyboard accessible. */
.a1ps-image-open{display:block;width:100%;max-width:100%;padding:0;border:0;border-radius:0;appearance:none;outline-offset:-3px;text-align:initial;cursor:zoom-in;font:inherit;color:inherit}
.a1ps-image-open:hover>img,.a1ps-image-open:focus-visible>img{transform:scale(1.055)}
.a1ps-image-open:focus-visible{outline:3px solid #5c77ff;outline-offset:-3px}
.a1ps-image-cue{position:absolute;right:9px;top:9px;z-index:3;display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#fffffff2;color:#275add;font-size:17px;font-weight:800;box-shadow:0 3px 12px #1c3d7240;pointer-events:none;transition:transform .18s ease}
.a1ps-image-open:hover .a1ps-image-cue,.a1ps-image-open:focus-visible .a1ps-image-cue{transform:translate(2px,-2px)}
.a1ps-card-body{flex:0 0 auto}
.a1ps-card-body h3{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-clamp:2;overflow:hidden}
@media(max-width:400px){.a1ps-image-cue{width:23px;height:23px;font-size:14px;right:5px;top:5px}}
@media(prefers-reduced-motion:reduce){.a1ps-image-cue{transition:none}}

/* v1.4: Hi-res project dialog, cleaner typography, no external-project CTA. */
.a1ps,.a1ps button,.a1ps input,.a1ps select{font-family:'Manrope','Poppins',system-ui,Arial,sans-serif}
.a1ps-dialog{width:min(100%,940px);max-height:calc(100dvh - 28px);border-radius:22px;box-shadow:0 25px 110px rgba(4,17,58,.45)}
.a1ps-dialog-photo{height:auto;aspect-ratio:16/9;max-height:min(60dvh,575px);background:linear-gradient(135deg,#e7edff,#f6f4ff)}
.a1ps-dialog-photo img{width:100%;height:100%;object-fit:contain;image-rendering:auto}
.a1ps-dialog-body{padding:17px 24px 19px}
.a1ps-dialog-body h3{font-weight:800;letter-spacing:-.028em}
.a1ps-dialog-body p{font-size:13px;margin:0;line-height:1.55}
.a1ps-dialog-link{display:none!important}
@media(max-width:640px){.a1ps-modal{padding:10px}.a1ps-dialog{max-height:calc(100dvh - 20px);border-radius:17px}.a1ps-dialog-photo{aspect-ratio:4/3;max-height:55dvh}.a1ps-dialog-body{padding:12px 15px 16px}.a1ps-dialog-body h3{font-size:19px}.a1ps-dialog-body p{font-size:12px}}

/* Hi-res modal is intentionally fetched on image click, not on initial gallery load. */
.a1ps-dialog-photo.is-loading{background:linear-gradient(110deg,#eaf0ff 10%,#f6f8ff 45%,#eaf0ff 82%);background-size:220% 100%;animation:a1ps-photo-shimmer 1.5s ease-in-out infinite}
@keyframes a1ps-photo-shimmer{0%{background-position:100% 50%}100%{background-position:0% 50%}}
@media(prefers-reduced-motion:reduce){.a1ps-dialog-photo.is-loading{animation:none}}

/* v1.5: Clear, high-resolution portfolio gallery. */
.a1ps{padding:0 4px 16px;overflow-x:hidden;--a1ps-ink:#0b2454}
.a1ps-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;padding:4px 0}
.a1ps-heading-meta{font-size:13px;gap:10px}
.a1ps-heading-meta strong{font-size:14px;letter-spacing:-.01em}
.a1ps-chips{display:none!important}
.a1ps-mobile-category{display:flex!important;align-items:center;justify-content:flex-start;gap:9px;margin:0 0 14px;color:#2f528c;font-size:12px;font-weight:750;max-width:100%;width:100%}
.a1ps-mobile-category span{white-space:nowrap}
.a1ps-category-select{appearance:auto;width:min(100%,330px);flex:1 1 200px;min-width:0;max-width:330px;background:#ffffffef;border:1px solid #cddaf8;color:#15386c;font:inherit;font-size:12px;font-weight:700;border-radius:12px;padding:10px 12px;min-height:42px;box-shadow:0 3px 15px #2e5dc20b}
.a1ps-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:stretch}
.a1ps-card{border:1px solid #dce8ff;border-radius:17px;background:rgba(255,255,255,.97);box-shadow:0 7px 20px rgba(15,50,115,.10);overflow:hidden;content-visibility:visible;contain:none;min-width:0}
.a1ps-card:hover{transform:translateY(-2px);border-color:#a7bbfc;box-shadow:0 12px 32px #143f8430}
.a1ps-image-area{display:grid;place-items:center;aspect-ratio:16/10;height:auto!important;max-height:none;background:linear-gradient(145deg,#f6f9ff,#e7efff 55%,#edf2fb);overflow:hidden;padding:9px!important;isolation:isolate}
.a1ps-image-area>img{width:100%;height:100%;object-fit:contain;object-position:center center;transition:transform .25s ease;filter:none;image-rendering:auto;border-radius:6px;max-width:100%;max-height:100%;background:transparent}
.a1ps-card:hover .a1ps-image-area>img{transform:scale(1.012)}
.a1ps-image-open:focus-visible>img{transform:none}
.a1ps-badge{left:12px;bottom:12px;max-width:calc(100% - 24px);padding:5px 11px;background:rgba(249,251,255,.93);border:1px solid #dce6f9;color:#224e94;box-shadow:0 3px 11px #0d35751a;font-size:10px}
.a1ps-image-cue{display:none!important}
.a1ps-card-body{padding:12px 14px 14px;gap:4px;flex:0 0 auto;min-height:54px}
.a1ps-card-body h3,.a1s-section-content .a1ps-card-body h3{font-size:clamp(14px,1.25vw,18px);line-height:1.32;letter-spacing:-.035em;font-weight:850;margin:0;color:#0b2454;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-clamp:2;overflow:hidden}
.a1ps-card-body .a1ps-desc,.a1s-section-content .a1ps-card-body .a1ps-desc{font-size:11.5px;line-height:1.5;margin:4px 0 0;min-height:0;color:#587398}
.a1ps-search{min-height:40px;border-radius:12px;width:min(100%,270px)}
.a1ps-search input{font-size:12px}
.a1ps-bottom{min-height:26px;padding:6px 0}
.a1ps-auto-status{display:none!important}
.a1ps-dialog-photo{aspect-ratio:16/10;max-height:min(67dvh,640px);padding:4px;background:#f0f4ff}
.a1ps-dialog-photo img{object-fit:contain;width:100%;height:100%;background:transparent}
.a1ps-dialog-description[hidden]{display:none}
@media(max-width:720px){
 .a1ps-tools{gap:7px;flex-wrap:nowrap}.a1ps-heading-meta strong{font-size:12px}.a1ps-heading-meta .a1ps-muted{display:none}
 .a1ps-search{width:min(50%,180px);min-height:35px;padding:0 9px}
 .a1ps-grid{grid-template-columns:1fr;gap:12px}
 .a1ps-image-area{aspect-ratio:16/10;padding:7px!important}
 .a1ps-card{border-radius:14px}.a1ps-card-body{padding:11px 12px}
 .a1ps-card-body h3,.a1s-section-content .a1ps-card-body h3{font-size:15px}
 .a1ps-mobile-category{font-size:11px;margin:0 0 10px}
 .a1ps-category-select{width:min(100%,280px);min-height:36px;padding:7px 10px}
 .a1ps-dialog-photo{aspect-ratio:16/11;max-height:58dvh}
}
@media(max-width:360px){.a1ps-tools{gap:6px}.a1ps-search{width:47%}.a1ps-card-body{min-height:47px}.a1ps-image-area{aspect-ratio:16/10}}
