/* Responsive fit corrections. Keep the site's spacing, grids and motion rules. */
html #portfolio-content :is(.wrapper,.normal-wrapper,.skills-wrapper,.project-wrapper,.hero-text-block){min-width:0}
html #portfolio-content :is(p,h1,h2,h3,a){overflow-wrap:break-word}
html #portfolio-content .project-description a{overflow-wrap:anywhere}
html #portfolio-content .cal-inline-widget{min-width:0!important;max-width:100%}
/* Keep the desktop composition, but allow enough height for the actual copy. */
@media(min-width:768px){
 html #portfolio-content .hero-section{height:auto;min-height:90svh;max-height:none}
 html #portfolio-content .hero-section > .wrapper{height:auto;min-height:90svh;align-items:center}
}

/* External desktop displays: center the hero pair with a deliberate column gap.
   Leave the existing laptop composition below 1800 CSS pixels untouched. */
@media(min-width:1800px){
 html #portfolio-content .hero-section{padding-inline:6vw}
 html #portfolio-content .hero-section > .wrapper{
  max-width:2200px;
  grid-template-columns:clamp(650px,calc(16.45vw + 334px),940px) minmax(0,1fr);
  column-gap:clamp(72px,5vw,144px);
 }
 html #portfolio-content .hero-section .hero-image-box{width:100%}
 html #portfolio-content .hero-text-block{margin-left:0}
 html #portfolio-content .hero-section .hero-text-block > p{max-width:64ch;text-align:left}
}
/* Narrow desktop windows need smaller display type, not smaller body copy. */
@media(min-width:768px) and (max-width:1200px) and (orientation:portrait){
 html #portfolio-content .hero-section .heading_76px{font-size:clamp(36px,5vw,60px)}
 html #portfolio-content .hero-text-block{margin-left:0}
}
/* Landscape phones and tablets: reserve room for copy before sizing the portrait. */
@media(min-width:568px) and (max-width:1400px) and (orientation:landscape){
 html #portfolio-content .hero-section{
  min-height:0;height:auto;padding:24px max(4vw,env(safe-area-inset-right)) 32px max(4vw,env(safe-area-inset-left));
 }
 html #portfolio-content .hero-section > .wrapper.grid{
  min-height:0;height:auto;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);
  grid-template-rows:auto;gap:clamp(24px,4vw,48px);align-items:center;
 }
 html #portfolio-content .hero-section > .wrapper.grid::before{display:none}
 html #portfolio-content .hero-section .hero-image-box{
  grid-area:1 / 1 / 2 / 2;width:100%;height:clamp(240px,60svh,640px);min-height:0;max-height:none;
 }
 html #portfolio-content .hero-section .hero-image{object-position:50% 24%}
 html #portfolio-content .hero-section .hero-text-block{
  display:block;grid-area:1 / 2 / 2 / 3;margin:0;padding:0;background:none;
 }
 html #portfolio-content .hero-section .heading_76px{
  margin:0 0 20px;font-size:clamp(32px,3.5vw,48px);line-height:1.12;
 }
 html #portfolio-content .hero-section .hero-cinematic-eyebrow{display:none}
 html #portfolio-content .hero-section .heading_76px > br{display:none}
 html #portfolio-content .hero-section :is(.hero-cinematic-name,.hero-cinematic-role){display:block}
 html #portfolio-content .hero-section .hero-cinematic-role{font-size:.88em;min-height:1.2em;margin-top:6px;color:#c6b0ff}
 html #portfolio-content .hero-section .heading_76px .white_50{
  display:block;font-size:.55em;line-height:1.4;margin-top:10px;
 }
 html #portfolio-content .hero-section .inline-flag{width:22px;margin-left:6px}
 html #portfolio-content .hero-section .hero-text-block > .paragraph_18px{
  margin:0;padding:0;font-size:clamp(16px,1.45vw,18px);line-height:1.5;text-align:left;background:none;
 }
}
@media(min-width:568px) and (max-width:1400px) and (orientation:landscape) and (max-height:600px){
 html #portfolio-content .hero-section{padding-block:12px 20px}
 html #portfolio-content .hero-section > .wrapper.grid{grid-template-columns:minmax(0,.6fr) minmax(0,1.4fr);gap:24px}
 html #portfolio-content .hero-section .hero-image-box{height:clamp(220px,70svh,340px)}
 html #portfolio-content .hero-section .heading_76px{font-size:30px;margin-bottom:12px}
 html #portfolio-content .hero-section .hero-text-block > .paragraph_18px{font-size:14px;line-height:1.45}
}
/* Existing mobile stacking stays; let long panel text take its required space. */
/* Portrait tablets need a full-width introduction, not a narrow desktop column. */
@media(min-width:768px) and (max-width:1200px) and (orientation:portrait){
 html #portfolio-content .hero-section{min-height:0;padding:24px 6vw 40px}
 html #portfolio-content .hero-section > .wrapper.grid{
  min-height:0;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;
  gap:28px;justify-items:center;
 }
 html #portfolio-content .hero-section .hero-image-box{
  width:100%;max-width:640px;height:clamp(280px,38svh,540px);max-height:none;
  grid-area:1 / 1 / 2 / 2;
 }
 html #portfolio-content .hero-section .hero-image{object-position:50% 24%}
 html #portfolio-content .hero-section .hero-text-block{
  grid-area:2 / 1 / 3 / 2;width:100%;max-width:800px;margin:0;padding:0;
 }
 html #portfolio-content .hero-section .heading_76px{
  font-size:clamp(36px,4.6vw,48px);line-height:1.12;margin-bottom:20px;
 }
 html #portfolio-content .hero-section .paragraph_18px{
  font-size:18px;line-height:1.55;text-align:left;margin-bottom:0;
 }
}
@media(max-width:991px){
 html #portfolio-content .insta-section{height:auto;max-height:none}
 html #portfolio-content .philosophy-values-copy{height:auto;max-height:none}
 html #portfolio-content .philosophy-copy{overflow:visible;max-height:none}
 html #portfolio-content .philosophy-values-copy > .normal-wrapper{flex:initial}
}

/* Expand real layout dimensions; never transform/zoom the page or motion layers. */
@media(min-width:1920px){
 html{--wide-content:clamp(1920px,calc(50vw + 960px),2800px);--wide-gap:clamp(24px,1.25vw,36px)}
 html #portfolio-content .wrapper{max-width:var(--wide-content)}
 html #portfolio-content :is(.wrapper.projects-grid,.experience-grid,.wrapper.grid-3_col){column-gap:var(--wide-gap)}
 html #portfolio-content .heading_76px{font-size:clamp(76px,calc(1.32vw + 50.66px),100px)}
 html #portfolio-content .heading_55px{font-size:clamp(55px,calc(.86vw + 38.49px),72px);max-width:clamp(780px,calc(14.48vw + 502px),1040px)}
 html #portfolio-content .heading_24px{font-size:clamp(24px,calc(.26vw + 19px),29px)}
 html #portfolio-content .paragraph_18px{font-size:clamp(18px,calc(.263vw + 12.95px),23px)}
 html #portfolio-content .paragraph_16px{font-size:clamp(16px,calc(.197vw + 12.22px),20px)}
 html #portfolio-content .hero-image-box{width:clamp(650px,calc(16.45vw + 334px),940px);max-height:clamp(864px,calc(14.21vw + 591.17px),1120px)}
 html #portfolio-content .hero-text-block > p{max-width:72ch}
 html #portfolio-content #scroll-quote{max-width:clamp(1000px,calc(26.3vw + 495px),1450px)!important}
 html #portfolio-content #scroll-quote h2{font-size:clamp(58px,calc(1.05vw + 37.84px),78px)!important}
 html #portfolio-content :is(.projects-section,.research-section) .project-image{height:clamp(400px,calc(7.9vw + 248px),550px);object-fit:cover}
 html #portfolio-content .insta-section{height:clamp(600px,calc(11.84vw + 372.67px),800px)}
 html #portfolio-content .philosophy-values-copy{max-height:none;padding:clamp(48px,2.5vw,68px)}
 html #portfolio-content .philosophy-values-copy h2{font-size:clamp(48px,calc(.79vw + 32.83px),64px)}
 html #portfolio-content .philosophy-copy .paragraph_18px{font-size:clamp(16px,calc(.263vw + 10.95px),21px)}
}
