/* Viewport-based tiers follow Tailwind: sm 640, md 768, lg 1024,
   xl 1280, 2xl 1536. Hardware size and pointer type never select tablet mode. */
html{box-sizing:border-box}*,*::before,*::after{box-sizing:inherit}
body{margin:0;min-width:0}img{max-width:100%}button,a{-webkit-tap-highlight-color:transparent}
.portfolio-page-content{display:flex;flex-direction:column;width:100%;min-width:0;align-items:stretch}
.portfolio-page-content>section,.portfolio-page-content>footer{width:100%;flex:none}
body[data-portfolio-page=home] #main .portfolio-work{order:2}
body[data-portfolio-page=home] #main .portfolio-identity{order:3}
body[data-portfolio-page=home] #main .portfolio-motion{order:4}
body[data-portfolio-page=home] #main .portfolio-events{order:5}
body[data-portfolio-page=home] #main .portfolio-about{order:6}
body[data-portfolio-page=home] #main .portfolio-sales{order:7}
body[data-portfolio-page=home] #main .portfolio-clients{order:8}
body[data-portfolio-page=case] .portfolio-header-shell{grid-template-columns:auto auto 44px!important}
body .portfolio-header-shell>.portfolio-contact:not(.portfolio-header-back){display:none!important}
/* Images and copy remain readable without a third-party animation runtime. */
body[data-portfolio-clean=true] [data-framer-component-type=RichTextContainer]{height:auto!important;min-height:0!important}
@media(min-width:1024px) and (max-width:1279px){
 body[data-portfolio-page=home] .portfolio-header .portfolio-desktop-nav{gap:18px;margin-right:18px}
 body[data-portfolio-page=home] #main .portfolio-case-previews .portfolio-project-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 body[data-portfolio-page=home] #main .portfolio-section-heading h2{font-size:40px!important}
 body[data-portfolio-page=home] #main .portfolio-preview-caption h3{font-size:18px!important}
}
@media(max-width:639px){body[data-portfolio-page=home] #main .portfolio-case-previews .portfolio-project-grid{grid-template-columns:minmax(0,1fr)}}

body[data-portfolio-clean=true] #main>div[class]{width:100%!important;max-width:100%!important;min-width:0!important;display:flex;flex-direction:column;align-items:stretch;height:auto!important}

/* Titles and explanations share one vertical reading column on every case. */
body #main .portfolio-case-system .portfolio-chapter-copy{display:block!important;align-self:start}
body #main .portfolio-case-system .portfolio-chapter-copy>.portfolio-scout-copy{display:block!important;width:100%;max-width:100%}
body #main .portfolio-case-system .portfolio-chapter-media{align-self:start}
body #main .portfolio-case-system .portfolio-scout-chapter{scroll-margin-top:var(--case-chapter-offset,172px)}
/* A compact glass menu stays below the global header while reading the story. */
body .portfolio-case-nav-slot{position:relative;width:100%;min-width:0;margin-bottom:64px}
:is(body #main .portfolio-case-system,body) .portfolio-scout-toc.portfolio-case-menu{position:relative;top:auto;align-self:auto;width:max-content;max-width:100%;max-height:none;margin:0 auto;padding:6px;border:1px solid var(--line,#e5e5e8);border-radius:999px;overflow:visible;z-index:90;background:#ffffffd6!important;color:var(--ink,#171717);box-shadow:0 8px 32px #0000000a;backdrop-filter:blur(20px) saturate(1.25);-webkit-backdrop-filter:blur(20px) saturate(1.25)}
html[data-theme=dark] :is(body #main .portfolio-case-system,body) .portfolio-scout-toc.portfolio-case-menu{background:#1d1e21d6!important;box-shadow:0 8px 32px #0003}
:is(body #main .portfolio-case-system,body) .portfolio-scout-toc.portfolio-case-menu.is-pinned{position:fixed}
:is(body #main .portfolio-case-system,body) .portfolio-scout-toc.portfolio-case-menu>span{display:none}
:is(body #main .portfolio-case-system,body) .portfolio-scout-toc.portfolio-case-menu nav{display:flex;flex-direction:row;gap:4px;max-width:100%;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:none;scroll-snap-type:x proximity;touch-action:pan-x pan-y pinch-zoom;border-radius:999px}
:is(body #main .portfolio-case-system,body) .portfolio-scout-toc.portfolio-case-menu nav::-webkit-scrollbar{display:none}
:is(body #main .portfolio-case-system,body) .portfolio-scout-toc.portfolio-case-menu a{flex:none;display:block;padding:12px 18px;min-height:44px;white-space:nowrap;border-radius:999px;scroll-snap-align:start;font-size:14px;line-height:20px;color:var(--muted,#606064);text-decoration:none;transition:background .2s,color .2s}
:is(body #main .portfolio-case-system,body) .portfolio-scout-toc.portfolio-case-menu a:hover{color:var(--ink,#171717);background:var(--surface,#f5f5f7)}
:is(body #main .portfolio-case-system,body) .portfolio-scout-toc.portfolio-case-menu a[aria-current=location]{background:#ecffd9;color:#171717;font-weight:600}
html[data-theme=dark] :is(body #main .portfolio-case-system,body) .portfolio-scout-toc.portfolio-case-menu a[aria-current=location]{background:#293923;color:#c4ff83}
:is(body #main .portfolio-case-system,body) .portfolio-scout-toc.portfolio-case-menu a:focus-visible{outline:2px solid var(--ink,#171717);outline-offset:-3px}
@media(max-width:639px){body .portfolio-case-nav-slot{margin-bottom:40px}:is(body #main .portfolio-case-system,body) .portfolio-scout-toc.portfolio-case-menu a{padding:10px 14px}}
@media(prefers-reduced-motion:reduce){:is(body #main .portfolio-case-system,body) .portfolio-scout-toc.portfolio-case-menu a{transition:none}}
/* Mobile footer: keep the connection links and stack appearance controls. */
@media(max-width:767px){
 body .portfolio-simple-footer .portfolio-footer-columns{grid-template-columns:minmax(0,1fr)}
 body .portfolio-simple-footer :is(.portfolio-footer-column-explore,.portfolio-footer-column-cases){display:none}
 body .portfolio-simple-footer .portfolio-footer-column-connect{grid-column:1}
 body .portfolio-simple-footer .portfolio-footer-appearance{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;text-align:center}
 body .portfolio-simple-footer .portfolio-footer-appearance :is(.portfolio-theme-toggle,.portfolio-theme-reset){margin:0;max-width:100%;width:max-content;align-self:center}
}
/* Restored authored media uses the existing case reading system. */
body #main .portfolio-recovered-carousel{display:flex;gap:24px;width:100%;overflow-x:auto;scroll-snap-type:x proximity;overscroll-behavior-x:contain;touch-action:pan-x pan-y pinch-zoom;padding:0 0 16px}
body #main .portfolio-recovered-carousel>figure{flex:0 0 85%;min-width:0;margin:0;scroll-snap-align:start}
body #main .portfolio-chapter-media figure{margin:0}
body #main .portfolio-chapter-media img{display:block;width:100%;height:auto;object-fit:contain;border-radius:24px}
/* Supplied SVG wordmark follows the site's existing light/dark appearance. */
body .portfolio-header .portfolio-brand-svg{display:block;width:132px;height:44px;background:currentColor;mask:url('/assets/brand/alireza-jelodar.svg') center/contain no-repeat;-webkit-mask:url('/assets/brand/alireza-jelodar.svg') center/contain no-repeat}
.portfolio-mega-trigger,.portfolio-mega-menu{display:none}
@media(min-width:1024px){
 body .portfolio-header .portfolio-desktop-nav{display:none!important}
 body .portfolio-header .portfolio-header-shell{display:flex!important;gap:14px!important;width:max-content!important;padding:6px 12px!important;min-height:58px!important}
 body .portfolio-header .portfolio-wordmark,body .portfolio-header.is-compact .portfolio-wordmark{display:flex!important;width:132px!important;max-width:none!important;margin:0 12px 0 0!important;opacity:1!important;pointer-events:auto!important;transform:none!important}
 body .portfolio-header .portfolio-mega-trigger{display:flex;order:4;flex-direction:column;justify-content:center;gap:8px;width:48px;height:44px;padding:10px;border:0;background:transparent;color:inherit;cursor:pointer}
 .portfolio-mega-trigger span{display:block;width:28px;height:2px;background:currentColor;border-radius:2px}
 body .portfolio-header .portfolio-mega-menu:not([hidden]){display:grid;grid-template-columns:220px minmax(0,1fr);gap:40px;position:absolute;top:calc(100% + 12px);left:50%;transform:translateX(-50%);width:min(1040px,calc(100vw - 48px));max-height:calc(100dvh - 120px);overflow:auto;padding:40px;background:var(--page,#fff);color:var(--ink,#171717);border:1px solid var(--line,#ddd);border-radius:28px;box-shadow:0 24px 80px #0003;z-index:100}
 .portfolio-mega-menu::before{content:'';position:absolute;top:-15px;left:0;right:0;height:15px}
 .portfolio-mega-side{display:flex;flex-direction:column;justify-content:space-between;gap:36px}
 .portfolio-mega-categories{display:flex;flex-direction:column;align-items:start;gap:20px}
 .portfolio-mega-categories :is(a,button){font:inherit;font-size:23px;line-height:1.3;letter-spacing:-.6px;text-align:left;border:0;padding:0;background:none;color:var(--muted,#858585);cursor:pointer}
 .portfolio-mega-categories :is(a,button).is-active{color:var(--ink,#171717)}
 .portfolio-mega-projects{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;align-content:start;min-width:0}
 .portfolio-mega-project{display:block;min-width:0;color:inherit;text-decoration:none;font-size:13px}
 .portfolio-mega-project img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:16px;background:var(--line,#eee);transition:transform .2s}
 .portfolio-mega-project span{display:block;margin-top:8px;line-height:1.3}
 .portfolio-mega-project:hover img{transform:translateY(-3px)}
 .portfolio-mega-social{display:flex;gap:12px;flex-wrap:wrap;font-size:12px}
 .portfolio-mega-social a{color:inherit;text-decoration:none}
 .portfolio-mega-menu :is(a,button):focus-visible,.portfolio-mega-trigger:focus-visible{outline:2px solid currentColor;outline-offset:5px;border-radius:4px}
}
@media(max-width:1023px){body .portfolio-header .portfolio-brand-svg{width:100px;height:34px}}
@media(prefers-reduced-motion:reduce){.portfolio-mega-project img{transition:none}}
.portfolio-mega-social a{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px}
.portfolio-mega-social svg{width:22px;height:22px}
body #main [data-media-recovery] .portfolio-chapter-copy h1{font-size:clamp(32px,3.1vw,48px)!important;line-height:1.18!important;margin:0 0 24px!important}
body #main .portfolio-case-inline-video{aspect-ratio:var(--case-video-ratio,16/9)}
body #main .portfolio-case-portrait-film{width:60%;margin-inline:auto}
/* Click-open menu: only the project area scrolls; categories/socials stay visible. */
@media(min-width:1024px){
 body .portfolio-header .portfolio-mega-menu:not([hidden]){height:min(680px,var(--mega-space,calc(100dvh - 120px)))!important;max-height:var(--mega-space,calc(100dvh - 120px))!important;overflow:hidden!important;align-items:stretch;padding:32px!important;gap:32px}
 body .portfolio-mega-side{min-height:0;overflow:hidden;gap:24px}
 body .portfolio-mega-categories{flex:1;min-height:0;overflow-y:auto;padding:4px 6px 8px 0}
 body .portfolio-mega-projects{min-height:0;max-height:100%;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:4px 8px 8px 4px;grid-auto-rows:min-content;align-content:start}
 body .portfolio-mega-social{flex-shrink:0;min-height:36px;gap:12px;padding:4px 0;color:var(--ink,#171717)}
 body .portfolio-mega-social a{width:32px;height:32px;flex:none;color:inherit!important;opacity:1!important}
 body .portfolio-mega-social svg{display:block!important;width:22px!important;height:22px!important;opacity:1!important;visibility:visible!important}
 body .portfolio-header .portfolio-mega-trigger{position:relative;background:transparent!important;color:var(--ink,#171717)!important;border-radius:50%}
 body .portfolio-header .portfolio-mega-trigger span{transition:transform .22s ease;transform-origin:center}
 body .portfolio-header.mega-open .portfolio-mega-trigger span:first-child{transform:translateY(5px) rotate(45deg)}
 body .portfolio-header.mega-open .portfolio-mega-trigger span:last-child{transform:translateY(-5px) rotate(-45deg)}
}
@media(prefers-reduced-motion:reduce){body .portfolio-header .portfolio-mega-trigger span{transition:none}}

/* The header intentionally passes clicks through; the open menu must receive them. */
@media(min-width:1024px){
 body .portfolio-header .portfolio-mega-menu:not([hidden]){pointer-events:auto!important}
 body .portfolio-header .portfolio-mega-menu::before{pointer-events:none}
 body .portfolio-mega-categories a{display:block;text-decoration:none}
}
/* Uploaded horizontal signature in the hero and above the retained footer columns. */
body .portfolio-signature-wide{display:block;width:100%;aspect-ratio:554/96;font-size:0!important;line-height:0!important;background:currentColor;color:var(--ink,#171717);mask:url('/assets/brand/alireza-jelodar-wide.svg') center/contain no-repeat;-webkit-mask:url('/assets/brand/alireza-jelodar-wide.svg') center/contain no-repeat}
body .portfolio-liquid-hero .portfolio-footer-name{display:block!important;width:100%;max-width:1300px;margin-inline:auto!important;filter:none!important}
body .portfolio-simple-footer .portfolio-footer-title{flex:0 1 480px;width:min(480px,50%);min-width:0}
@media(max-width:639px){body .portfolio-simple-footer .portfolio-footer-title{flex:none;width:min(360px,100%)}}

/* Case reading: restore the desktop sidebar and keep artwork within the viewport. */
body .portfolio-case-progress[hidden]{display:none!important}
body .portfolio-case-progress{position:fixed;right:12px;top:50%;transform:translateY(-50%);z-index:40;display:flex;flex-direction:column;gap:0;padding:6px 2px;max-height:65svh;overflow-y:auto;scrollbar-width:none;border:1px solid var(--line,#ddd);border-radius:24px;background:var(--page,#fff);box-shadow:0 4px 20px #0001}
body .portfolio-case-progress a{display:flex;align-items:center;justify-content:center;width:24px;height:22px;flex:none}
body .portfolio-case-progress a::after{content:'';width:5px;height:5px;border-radius:50%;background:var(--muted,#888);opacity:.45;transition:background .18s,opacity .18s,transform .18s}
body .portfolio-case-progress a[aria-current=location]::after{background:#84d925;opacity:1;transform:scale(1.4)}
body .portfolio-case-progress a:focus-visible{outline:2px solid var(--ink,#171717);outline-offset:-2px;border-radius:12px}
@media(min-width:1024px){
 body #main .portfolio-case-system{display:grid!important;grid-template-columns:148px minmax(0,1fr);gap:clamp(28px,3.5vw,52px);max-width:1440px;padding:40px clamp(40px,4vw,64px) 64px;align-items:start}
 body #main .portfolio-case-system .portfolio-case-nav-slot{position:sticky;top:var(--case-nav-top,100px);width:100%;margin:0;align-self:start;z-index:30}
 body #main .portfolio-case-system .portfolio-scout-toc.portfolio-case-menu{position:relative!important;top:auto!important;width:100%;max-width:100%;max-height:calc(100svh - var(--case-nav-top,100px) - 28px);margin:0;padding:8px;border-radius:18px;overflow:hidden;box-sizing:border-box;z-index:30}
 body #main .portfolio-case-system .portfolio-scout-toc.portfolio-case-menu nav{display:flex;flex-direction:column;align-items:stretch;gap:2px;max-height:calc(100svh - var(--case-nav-top,100px) - 46px);overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;scroll-snap-type:none}
 body #main .portfolio-case-system .portfolio-scout-toc.portfolio-case-menu a{flex:none;width:100%;min-height:36px;padding:8px 10px;border-radius:10px;font-size:13px;line-height:20px;box-sizing:border-box}
 body #main .portfolio-case-system .portfolio-scout-narrative{max-width:1040px;min-width:0}
 body #main .portfolio-case-system .portfolio-scout-chapter{margin-bottom:48px;padding-bottom:32px;min-height:0}
 body #main .portfolio-case-system :is(h1,h2,.portfolio-case-section-title){font-size:clamp(28px,2.6vw,38px)!important;line-height:1.14!important;letter-spacing:-.025em!important;margin:0 0 20px!important;max-width:24ch}
 body #main .portfolio-case-system :is(p:not(.portfolio-eyebrow):not(.portfolio-case-section-title),li){font-size:16px!important;line-height:1.65!important;max-width:54ch;margin-bottom:16px!important}
 body #main .portfolio-case-system .portfolio-eyebrow{font-size:12px!important;margin-bottom:14px!important}
 body #main .portfolio-case-system h3,body #main .portfolio-case-system .portfolio-chapter-copy .portfolio-heading-paragraph:not(.portfolio-case-section-title){font-size:24px!important;line-height:1.25!important;margin:24px 0 14px!important}
 body #main .portfolio-case-system .portfolio-scout-chapter img{max-height:calc(100svh - 200px)!important;height:auto!important;object-fit:contain!important;max-width:100%;min-height:0!important}
 body #main .portfolio-case-system :is(.mc-artwork,.zp-artwork){max-height:calc(100svh - 200px)!important}
 body #main .portfolio-case-system :is(.mc-artwork,.zp-artwork) img{height:100%!important;object-fit:contain!important}
 body #main .portfolio-case-system .portfolio-case-inline-video{max-height:calc(100svh - 200px);max-width:100%;width:min(100%,calc((100svh - 200px) * var(--case-video-ratio,16/9)));margin-inline:auto}
 body #main .portfolio-case-system .portfolio-scout-prototype-device{height:min(660px,calc(100svh - 220px));min-height:0}
 body #main .portfolio-case-system .portfolio-chapter-media>:first-child{margin-top:0}
 body #main .portfolio-case-system .mc-carousel{margin-top:0}
 body #main .portfolio-case-system .mc-slide{flex-basis:82%;width:82%}
 body #main .portfolio-case-system .zp-phone-gallery .mc-slide{flex-basis:220px;width:220px}
 body #main .portfolio-case-system .portfolio-recovered-carousel>figure{flex-basis:82%}
}
@media(max-width:1023px){body .portfolio-case-progress{display:none!important}}
@media(prefers-reduced-motion:reduce){body .portfolio-case-progress a::after{transition:none}}

/* Undo the enforced text/artwork split. Native section layouts keep their full reading width. */
body #main .portfolio-case-system .portfolio-chapter-layout{display:block!important;min-width:0;width:100%}
body #main .portfolio-case-system .portfolio-chapter-layout>.portfolio-chapter-copy,
body #main .portfolio-case-system .portfolio-chapter-layout>.portfolio-chapter-media{display:contents!important;max-width:none!important}
body #main .portfolio-case-system .portfolio-scout-narrative{width:100%;min-width:0}
@media(min-width:1024px){body #main .portfolio-case-system .portfolio-scout-toc.portfolio-case-menu nav{border-radius:8px}}
