/* A real user-controlled carousel. No autoplay and no simulated video. */
.project-carousel{width:100%;max-width:650px;direction:ltr;padding:8px 0 0;min-width:0}.carousel-viewport{overflow:auto;scrollbar-width:thin;scroll-snap-type:x mandatory;border-radius:9px;outline-offset:7px}.carousel-track{display:flex;gap:0;width:100%;direction:ltr}.carousel-slide{display:block;flex:0 0 100%;min-width:0;scroll-snap-align:center;background:#1e2531;border:1px solid #53627b;border-radius:9px;overflow:hidden;box-shadow:0 24px 70px #0004;-webkit-user-select:none;user-select:none;-webkit-user-drag:none;touch-action:auto}.carousel-slide:focus-visible{outline:3px solid #9fb0ff;outline-offset:-4px}.slide-top{padding:13px 15px;display:flex;gap:15px;align-items:center;justify-content:space-between;color:#b8c4d7;font-size:10px;border-bottom:1px solid #384456}.slide-top>span:first-child{font:8px monospace;color:#9eadef;white-space:nowrap}.slide-top>span:last-child{font-size:17px}.carousel-slide img{display:block;width:100%;height:auto;aspect-ratio:1165/747;object-fit:cover;pointer-events:none;user-select:none}.slide-bottom{display:flex;justify-content:space-between;align-items:center;padding:15px 17px;color:#e3eaf6;font-size:12px;border-top:1px solid #374356}.slide-bottom>span:last-child{width:24px;height:24px;border:1px solid #7185b4;border-radius:50%;display:grid;place-items:center;font-size:18px;color:#a9beff}.project-carousel.is-enhanced .carousel-viewport{overflow:hidden;scroll-snap-type:none;touch-action:pan-y pinch-zoom}.project-carousel.is-enhanced .carousel-track{transition:transform .36s cubic-bezier(.2,.72,.22,1);will-change:transform}.project-carousel.is-dragging .carousel-track{transition:none;cursor:grabbing}.project-carousel.is-enhanced .carousel-slide{cursor:grab;touch-action:pan-y pinch-zoom}.project-carousel.is-enhanced .carousel-slide:active{cursor:grabbing}.carousel-controls{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:21px;padding:0 4px}.carousel-controls[hidden]{display:none}.carousel-arrow{border:1px solid #4e5a71;background:#202733;color:#dce5f7;border-radius:50%;width:37px;height:37px;font-size:19px;display:grid;place-items:center}.carousel-arrow:hover{background:#324362}.carousel-arrow:focus-visible,.carousel-dot:focus-visible{outline:2px solid #a1b5ff;outline-offset:4px}.carousel-dots{display:flex;gap:10px;align-items:center}.carousel-dot{border:1px solid transparent;background:transparent;color:#a2adc0;padding:7px 12px;font:11px monospace;border-radius:20px;min-width:40px;min-height:36px}.carousel-dot[aria-pressed=true]{background:#314dba;border-color:#6f86e6;color:#fff}.carousel-hint{color:#97a7bf;font-size:10px;text-align:center;margin:13px 0 0;line-height:1.5}.project-carousel[dir=rtl] .carousel-hint{direction:rtl}.project-preview-enabled{cursor:pointer}.project-preview-enabled:focus-visible{outline:3px solid var(--blue);outline-offset:5px}
#project-dialog{position:fixed;inset:0;margin:0;padding:0;border:0;width:100%;height:100%;max-width:none;max-height:none;color:#edf1f8;background:#151a22;overflow:hidden;overscroll-behavior:contain}#project-dialog::backdrop{background:#10141bef}#project-dialog:not([open]){display:none}.project-panel{height:100%;width:100%;overflow:auto;overscroll-behavior:contain;background:#151a22;transform-origin:0 0}.preview-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:19px max(28px,calc((100vw - 1240px)/2));border-bottom:1px solid #343e4d;background:#151a22;position:sticky;top:0;z-index:2}.preview-back{display:flex;align-items:center;gap:12px;font-size:12px;color:#c7d1e4}.preview-back>span:first-child{font-size:22px}.preview-brand{font:9px monospace;letter-spacing:.16em;color:#8290a8}.preview-close{width:35px;height:35px;border:1px solid #4c5970;border-radius:50%;color:#dce6f9;background:#252e3e;font-size:27px;line-height:1}.preview-close:focus-visible,.preview-back:focus-visible,#project-live:focus-visible{outline:3px solid #92aaff;outline-offset:4px}.preview-layout{width:min(1240px,calc(100% - 80px));margin:0 auto;display:grid;grid-template-columns:.7fr 1.3fr;gap:55px;align-items:center;padding:62px 0 45px}.preview-copy .eyebrow{color:#8ea8ed;font-size:10px;margin-bottom:22px}.preview-copy h2{font-size:45px;line-height:1.08;letter-spacing:-.045em;margin-bottom:20px}.preview-copy>p:not(.eyebrow):not(.micro){color:#b7c4d8;font-size:14px;line-height:1.7}.preview-copy .preview-notice{font-size:12px!important;color:#8d9db5!important;margin:24px 0}.preview-copy .micro{font-size:10px;color:#8596b0}.preview-figure{margin:0;min-width:0;border:1px solid #46516a;border-radius:7px;overflow:hidden;box-shadow:0 30px 80px #0005;align-self:center;background:#202936}.preview-figure img{display:block;width:100%;height:auto}.preview-figure figcaption{padding:12px 16px;font-size:10px;color:#9cabc2;line-height:1.5}.preview-detail{border-top:1px solid #364155;padding:28px 0 42px;width:min(1240px,calc(100% - 80px));margin:0 auto;display:grid;grid-template-columns:.7fr 1.3fr;gap:55px}.preview-detail>span{font-size:11px;color:#91a9df}.preview-detail>p{font-size:14px;color:#b8c6da;line-height:1.75;margin:0;max-width:680px}html[dir=rtl] .preview-copy h2{letter-spacing:0}html[dir=rtl] .preview-back>span:first-child{transform:rotate(180deg)}
@media(max-width:1000px){.slide-top{padding:11px;font-size:9px;gap:8px}.slide-bottom{padding:12px;font-size:11px}.carousel-controls{margin-top:17px}.preview-layout,.preview-detail{gap:35px;grid-template-columns:.85fr 1.15fr}.preview-copy h2{font-size:37px}.preview-copy>p:not(.eyebrow):not(.micro){font-size:13px}}
@media(max-width:760px){.project-carousel{padding-top:4px;max-width:530px}.carousel-controls{margin-top:15px}.carousel-arrow{width:35px;height:35px;font-size:18px}.carousel-hint{font-size:9px;margin-top:10px}.slide-top{padding:10px 12px;font-size:9px}.slide-top>span:first-child{font-size:8px}.slide-bottom{padding:11px 13px;font-size:11px}.slide-bottom>span:last-child{width:22px;height:22px;font-size:16px}.hero{gap:26px}.preview-header{padding:13px 18px;gap:12px}.preview-brand{font-size:8px;letter-spacing:.08em}.preview-back{font-size:11px;gap:8px}.preview-close{width:33px;height:33px}.preview-layout{width:calc(100% - 36px);display:flex;flex-direction:column;gap:27px;align-items:stretch;padding:27px 0}.preview-copy .eyebrow{font-size:9px;margin-bottom:13px}.preview-copy h2{font-size:35px;margin-bottom:13px}.preview-copy>p:not(.eyebrow):not(.micro){font-size:12px;line-height:1.6}.preview-copy .preview-notice{font-size:11px!important;margin:16px 0}.preview-copy .button{padding:12px 17px;font-size:12px}.preview-copy .micro{font-size:9px;margin-top:11px}.preview-figure figcaption{padding:10px 12px;font-size:9px}.preview-detail{width:calc(100% - 36px);grid-template-columns:1fr;gap:13px;padding:24px 0 34px}.preview-detail>p{font-size:12px;line-height:1.7}.preview-detail>span{font-size:10px}html[dir=rtl] .preview-copy h2{font-size:34px;line-height:1.2}}
@media(prefers-reduced-motion:reduce){.project-carousel.is-enhanced .carousel-track{transition:none;will-change:auto}}
/* Font-independent interface icons, including Arabic/system-font environments. */
.ui-icon{display:inline-block;width:1em;height:1em;flex-shrink:0;vertical-align:-.12em;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;overflow:visible}.button .ui-icon{width:18px;height:18px}.carousel-arrow .ui-icon{width:18px;height:18px}.preview-close{display:grid;place-items:center}.preview-close .ui-icon{width:19px;height:19px}.icon-text-link{display:inline-flex;align-items:center;gap:8px}.contact-line a{display:inline-flex;align-items:center;gap:6px}.slide-top .ui-icon,.capture-bar .ui-icon{width:14px;height:14px}.slide-bottom .ui-icon{width:13px;height:13px}.project-open .ui-icon{width:17px;height:17px}.discipline i .ui-icon{width:12px;height:12px}.text-link .ui-icon{width:15px;height:15px}
/* Five-demo portfolio: balanced three-plus-two gallery; five compact selectors. */
.projects{grid-template-columns:repeat(6,minmax(0,1fr))}.projects>.project{grid-column:span 2}.projects>.project:nth-child(n+4){grid-column:span 3}.carousel-dots{gap:4px}.carousel-dot{padding:7px 9px;min-width:35px}.carousel-controls{gap:12px}.books .capture-bar>span:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:760px){.projects{grid-template-columns:1fr}.projects>.project,.projects>.project:nth-child(n+4){grid-column:auto}.carousel-controls{gap:8px}.carousel-dot{padding:6px 8px;min-width:32px}.carousel-dots{gap:3px}.carousel-arrow{flex-shrink:0}}

/* v13: quiet layered screen stack. The first card stays visible without JavaScript. */
.project-carousel.is-enhanced .carousel-viewport{overflow:visible;border-radius:0;padding:22px 0 26px;perspective:1100px;isolation:isolate}
.project-carousel.is-enhanced .carousel-track{display:grid;transform-style:preserve-3d;transition:none;will-change:auto}
.project-carousel.is-enhanced .carousel-slide{grid-area:1 / 1;width:100%;min-width:0;backface-visibility:hidden;transform-origin:50% 50%;transition:transform .55s cubic-bezier(.18,.75,.22,1),opacity .4s ease,box-shadow .4s ease;box-shadow:0 22px 55px #0006;pointer-events:none}
.project-carousel.is-enhanced .carousel-slide[data-position="0"]{pointer-events:auto;border-color:#7c8da9;box-shadow:0 28px 65px #0007,0 0 0 1px #93a7ff14}
.project-carousel.is-dragging .carousel-slide{transition:none}
.carousel-arrow,.carousel-dot,.preview-close{min-width:44px;min-height:44px}
.carousel-controls{gap:8px;margin-top:0}.carousel-dots{gap:1px}.carousel-dot{padding:6px 8px}
.preview-back{min-height:44px}.preview-header{padding-top:12px;padding-bottom:12px}
@media(max-width:760px){.project-carousel.is-enhanced .carousel-viewport{padding:14px 0 20px}.carousel-controls{gap:2px;padding:0}.carousel-dot{min-width:38px;min-height:44px;padding:6px 5px}.carousel-dots{gap:0}.preview-header{padding:8px 12px}.preview-brand{font-size:7px}.carousel-arrow{min-width:44px}}
@media(max-width:359px){.carousel-dot{min-width:34px}.carousel-arrow{min-width:44px}}
@media(prefers-reduced-motion:reduce){.project-carousel.is-enhanced .carousel-slide{transition:none!important}.project-carousel.is-enhanced .carousel-viewport{perspective:none}}

/* Preserve finger-sized targets on compact phones without shrinking the selectors. */
@media(max-width:760px){.carousel-dot{min-width:44px}.carousel-controls{gap:2px}}
@media(max-width:359px){.carousel-controls{display:grid;grid-template-columns:44px 1fr 44px}.carousel-dots{grid-column:1 / -1;grid-row:2;justify-content:center}.carousel-controls>#carousel-prev{grid-column:1;grid-row:1}.carousel-controls>#carousel-next{grid-column:3;grid-row:1}.carousel-dot{min-width:44px}}
