/* Keep both photo-watermark marks inside the displayed image.  The media
   cell can be wider than a portrait image, particularly on tablets. */
body.photo-watermark-enabled #media-dialog.is-photo .photo-watermark-frame{
  position:relative;
  display:inline-block;
  flex:none;
  line-height:0;
  container-type:inline-size;
}
body.photo-watermark-enabled #media-dialog.is-photo .photo-watermark-frame::before{
  content:"";
  position:absolute;
  top:clamp(9px,1.3cqw,18px);
  left:clamp(9px,1.3cqw,18px);
  z-index:3;
  width:clamp(34px,7.6cqw,82px);
  aspect-ratio:1;
  background:url('/images/logo.webp') center/contain no-repeat;
  opacity:.82;
  filter:none;
  pointer-events:none;
}
body.photo-watermark-enabled #media-dialog.is-photo .photo-watermark-frame::after{
  content:attr(data-photo-copyright);
  position:absolute;
  bottom:0;
  right:0;
  z-index:3;
  max-width:none;
  color:rgba(255,255,255,.96);
  font-size:clamp(8px,2.4cqw,14px);
  font-weight:750;
  line-height:1.2;
  letter-spacing:.06em;
  width:100%;
  height:clamp(34px,11cqw,120px);
  box-sizing:border-box;
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  padding:clamp(8px,1.3cqw,18px);
  text-align:right;
  white-space:normal;
  overflow-wrap:anywhere;
  background:linear-gradient(to top,rgba(0,0,0,.22),rgba(0,0,0,0));
  pointer-events:none;
}

/* Portrait contact form: keep form copy aligned with the compact mobile system. */
#contact-form .contact-submit{display:inline-flex;align-items:center;gap:.58em;letter-spacing:.01em;text-transform:none}
#contact-form .contact-submit svg{width:1.08em;height:1.08em;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:520px) and (orientation:portrait){
.contact-form-heading h3{font-size:1.25rem;line-height:1.3}
.contact-form-intro{font-size:.9rem;line-height:1.65}
 #contact-form{gap:.8rem}
 #contact-form .form-field{gap:.42rem;font-size:.6875rem}
 #contact-form .form-field input,#contact-form .form-field textarea{box-sizing:border-box;width:100%;max-width:100%;padding:.78rem .9rem;font-size:16px;line-height:1.5}
 #contact-form .form-field textarea{min-height:110px}
 #contact-form .contact-submit{min-height:46px;font-size:.9375rem}
}

/* Mobile landscape: keep the form within the visual viewport and avoid
   browser input zoom, then let the footer finish close to its content. */
@media (max-width:1024px) and (orientation:landscape) and (max-height:500px){
  #contact-form,
  #contact-form .form-field,
  #contact-form .form-field input,
  #contact-form .form-field textarea{
    min-width:0;
    max-width:100%;
    box-sizing:border-box;
  }
  #contact-form .form-field input,
  #contact-form .form-field textarea{
    width:100%;
    font-size:16px;
    line-height:1.5;
  }
  .page-footer{
    min-height:0!important;
    padding-block:.65rem max(.65rem,env(safe-area-inset-bottom))!important;
  }
  .footer-panel{
    min-height:46px!important;
    gap:1rem!important;
    padding:.25rem 0!important;
  }
}

/* Keep the footer at the document edge on short pages at every breakpoint.
   When the content is taller than the viewport this has no effect on flow. */
html,body{min-height:100%}
body{display:flex;flex-direction:column}
.page-shell{min-height:100svh;display:flex;flex-direction:column}
.page-shell>main{flex:1 0 auto}
.page-footer{margin-top:auto;margin-bottom:0!important}

/* Separate the contact form headline from its supporting copy without changing the form rhythm. */
.contact-form-heading .contact-form-intro{margin-top:.85rem}

/* Keep modal close controls neutral when the dialog assigns initial focus. */
.close-button:focus,
.close-button:focus-visible{
  outline:none;
  border-color:#ffffff22;
  box-shadow:inset 0 1px 0 #ffffff0a;
}

/* Desktop bokeh motion: quicker color drift and wider, more noticeable travel. */
.bokeh-scene{z-index:0}
.page-shell{position:relative;z-index:1}
@media (max-width:760px){
  .bokeh-scene i,.bokeh-scene::before{animation:none!important}
}
/* The photo shell follows the displayed image instead of retaining the gallery's fixed width. */
#media-dialog.is-photo.photo-modal-loading{
  opacity:0!important;
  pointer-events:none;
}
#media-dialog.is-photo{
  box-sizing:border-box;
  aspect-ratio:auto!important;
  width:var(--photo-dialog-width,min(1100px,calc(100vw - 1rem)))!important;
  max-width:calc(100vw - 1rem);
  height:var(--photo-dialog-height,auto)!important;
  max-height:calc(100dvh - 1rem);
  overflow-y:auto;
}
#media-dialog.is-photo #dialog-media{
  box-sizing:border-box;
  min-height:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:6px;
}
#media-dialog.is-photo #dialog-media img{
  flex:none;
  display:block;
  width:var(--photo-image-width,auto)!important;
  height:var(--photo-image-height,auto)!important;
  max-width:100%;
  max-height:var(--photo-image-height,65dvh)!important;
  object-fit:contain;
}

/* Tablet portrait dialogs must shrink to their image and controls.  This
   prevents a previous image's max-height from leaving a tall empty panel. */
@media (min-width:761px) and (max-width:1024px) and (orientation:portrait){
  #media-dialog.is-photo{
    width:min(1000px,calc(100vw - 2rem))!important;
    height:fit-content!important;
    min-height:0!important;
    max-height:calc(100svh - 2rem);
    display:flex!important;
    flex-direction:column;
    overflow-y:auto!important;
  }
  #media-dialog.is-photo #dialog-media{
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    flex:0 0 auto;
    overflow:hidden!important;
  }
  #media-dialog.is-photo #dialog-media img{
    width:100%!important;
    height:100%!important;
    max-width:100%!important;
    max-height:none!important;
  }
  #media-dialog.is-photo .dialog-top,
  #media-dialog.is-photo .dialog-toolbar,
  #media-dialog.is-photo #dialog-description{flex:0 0 auto;}
  #media-dialog.is-photo #dialog-description:empty{display:none;}
}

/* The image frame receives its exact dimensions after every image load. */
#media-dialog.is-photo .photo-watermark-frame img{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain;
  -webkit-touch-callout:none;
  -webkit-user-drag:none;
  user-select:none;
  /* Keep browser page zoom from escalating an image gesture into a tab crash. */
  touch-action:pan-x pan-y;
}

/* Center the complete logo history block on tablet portrait layouts. */
@media (min-width:761px) and (max-width:1050px) and (orientation:portrait){
  .brand-story .logo-evolution{
    width:min(100%,560px);
    margin-inline:auto;
    justify-self:center;
  }
}

/* Match landscape photo modal bounds to each loaded image's natural ratio. */
@media (max-width:1024px) and (orientation:landscape){
  #media-dialog.is-photo{
    aspect-ratio:auto!important;
    width:var(--photo-dialog-width,calc(100vw - 1rem))!important;
    height:var(--photo-dialog-height,auto)!important;
    max-width:calc(100vw - 1rem);
    max-height:calc(100dvh - 1rem);
    grid-template-columns:var(--photo-media-width,minmax(0,1fr)) minmax(0,1fr);
    overflow:hidden!important;
  }
  #media-dialog.is-photo #dialog-media{
    width:var(--photo-media-width,auto);
    height:100%!important;
    min-height:0!important;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:4px;
    overflow:hidden!important;
  }
  #media-dialog.is-photo #dialog-media img{
    display:block;
    width:var(--photo-image-width,100%);
    height:var(--photo-image-height,auto);
    max-width:100%;
    max-height:100%;
    object-fit:contain;
    flex:none;
  }
}

@media (min-width:761px) and (prefers-reduced-motion:no-preference){
  .bokeh-scene::before{
    animation-name:bokeh-color-wash-desktop;
    animation-duration:10s;
  }
  .bokeh-scene i{
    animation-name:drift-desktop;
    animation-duration:9s;
  }
}
@keyframes drift-desktop{
  0%{transform:translate3d(0,0,0) scale(.9) rotate(0deg);opacity:.62}
  50%{transform:translate3d(calc(var(--dx)*.72),calc(var(--dy)*.55),0) scale(1.08) rotate(4deg);opacity:.92}
  100%{transform:translate3d(calc(var(--dx)*1.4),calc(var(--dy)*1.35),0) scale(1.18) rotate(-3deg);opacity:1}
}
@keyframes bokeh-color-wash-desktop{
  from{transform:translate3d(-3%,-2%,0) scale(.96);opacity:.52}
  to{transform:translate3d(3%,2%,0) scale(1.08);opacity:.9}
}

/* Add a few restrained mid-size lights while keeping the main amber light smaller. */
.bokeh-scene i:nth-child(1){width:22vw;min-width:130px}
.bokeh-scene i:nth-child(11){left:34%;top:9%;width:clamp(58px,7vw,124px);background:radial-gradient(circle,#b8e9ff78 0 7%,#397fa34a 32%,transparent 72%);animation-delay:-3s;--dx:38px;--dy:42px}
.bokeh-scene i:nth-child(12){right:14%;top:47%;width:clamp(64px,8vw,138px);background:radial-gradient(circle,#f6d28b72 0 7%,#9d663b42 34%,transparent 72%);animation-delay:-9s;--dx:-44px;--dy:58px}
.bokeh-scene i:nth-child(13){left:10%;top:57%;width:clamp(56px,6.5vw,116px);background:radial-gradient(circle,#f0a8d178 0 7%,#853c6840 34%,transparent 72%);animation-delay:-14s;--dx:52px;--dy:-34px}
.bokeh-scene i:nth-child(14){left:54%;top:86%;width:clamp(68px,9vw,150px);background:radial-gradient(circle,#a7ecff70 0 7%,#327b9540 34%,transparent 72%);animation-delay:-6s;--dx:-48px;--dy:-40px}
@media(max-width:520px){
  .bokeh-scene i:nth-child(11),.bokeh-scene i:nth-child(12),.bokeh-scene i:nth-child(13),.bokeh-scene i:nth-child(14){display:block;opacity:.58}
}

/* Mobile bottom navigation labels need enough contrast against the glass rail. */
@media (max-width:520px){
  body > .main-nav{
    border-color:rgba(136,213,245,.42);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 0 18px rgba(88,198,238,.12);
  }
  body > .main-nav .nav-label{
    color:#fff;
    text-shadow:0 0 8px rgba(136,213,245,.16);
  }
  body > .main-nav a[aria-current] .nav-label{color:var(--blue)}
}

/* Keep Vimeo's white bootstrap document out of the first paint. */
.hero .reel-shell{
  background:#000;
}
.hero .reel-shell::before{
  content:"";
  position:absolute;
  z-index:0;
  top:50%;
  left:50%;
  width:34px;
  height:34px;
  margin:-17px 0 0 -17px;
  border:2px solid rgba(255,255,255,.16);
  border-top-color:var(--blue);
  border-radius:50%;
  box-shadow:0 0 18px rgba(136,213,245,.16);
  animation:showreel-loading-spin .8s linear infinite;
  transition:opacity .18s ease;
}
.hero .reel-shell.is-video-ready::before{
  opacity:0;
  animation:none;
}
.hero .showreel-video{
  opacity:0 !important;
  transition:opacity .18s ease;
}
.hero .reel-shell.is-video-ready .showreel-video{
  opacity:1 !important;
}
@keyframes showreel-loading-spin{
  to{transform:rotate(360deg)}
}
@media(prefers-reduced-motion:reduce){
  .hero .reel-shell::before{animation-duration:1.6s}
}

/* Resume modal: render every PDF page as a responsive single-column document.
   This avoids mobile PDF viewers that crop embedded pages. */
#media-dialog.is-resume{
  width:min(980px,calc(100vw - 2rem));
  height:min(92dvh,1000px);
  max-width:none;
  max-height:calc(100dvh - 1rem);
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:auto minmax(0,1fr);
  grid-template-areas:"top" "media";
  overflow:hidden;
}
#media-dialog.is-resume .dialog-top{grid-area:top}
#media-dialog.is-resume .dialog-toolbar,
#media-dialog.is-resume #dialog-description{display:none}
#media-dialog.is-resume #dialog-media{
  grid-area:media;
  min-width:0;
  min-height:0;
  height:auto;
  padding:10px;
  display:block;
  overflow-x:hidden;
  overflow-y:auto;
  border-right:0;
  background:linear-gradient(145deg,#151719,#020303 45%);
  overscroll-behavior:contain;
  scrollbar-width:thin;
}
#media-dialog.is-resume .resume-pages{
  width:min(100%,850px);
  margin-inline:auto;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:10px;
}
#media-dialog.is-resume .resume-pages img{
  display:block;
  width:100%;
  height:auto;
  max-width:100%;
  max-height:none;
  margin:0;
  border:0;
  border-radius:10px;
  object-fit:contain;
  background:#fff;
  box-shadow:0 18px 54px #0009;
}
@media(max-width:600px){
  #media-dialog.is-resume{
    width:calc(100vw - .75rem);
    height:calc(100dvh - .75rem);
    max-height:calc(100dvh - .75rem);
    border-radius:15px;
  }
  #media-dialog.is-resume .dialog-top{padding:.85rem .9rem}
  #media-dialog.is-resume #dialog-media{padding:6px}
  #media-dialog.is-resume .resume-pages{gap:6px}
  #media-dialog.is-resume .resume-pages img{border-radius:8px}
}
@media(max-width:920px) and (orientation:landscape){
  #media-dialog.is-resume{
    width:calc(100vw - .75rem);
    height:calc(100dvh - .75rem);
    max-height:calc(100dvh - .75rem);
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto minmax(0,1fr);
    grid-template-areas:"top" "media";
  }
  #media-dialog.is-resume .dialog-top{padding:.5rem .7rem}
  #media-dialog.is-resume #dialog-media{
    width:100%;
    height:auto;
    min-height:0;
    padding:5px;
    overflow-x:hidden;
    overflow-y:auto;
    border-right:0;
  }
  #media-dialog.is-resume .resume-pages{width:min(100%,640px);gap:5px}
}

/* Contact and resume actions follow the language switch glass treatment. */
.profile-copy button.text-link,
.contact-hub #contact-form .contact-submit{
  --action-icon-size:17px;
  appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 1 auto;
  width:max-content;
  min-width:0;
  max-width:100%;
  min-height:40px;
  gap:8px;
  padding:8px 15px;
  border:1px solid #ffffff20;
  border-radius:999px;
  background:linear-gradient(145deg,#ffffff09,#0008);
  color:#c3d9e1;
  box-shadow:inset 0 1px 0 #ffffff08;
  -webkit-backdrop-filter:blur(16px);
  backdrop-filter:blur(16px);
  font-family:inherit;
  font-size:clamp(.8125rem,.77rem + .14vw,.875rem);
  font-weight:650;
  line-height:1.25;
  letter-spacing:.01em;
  text-align:center;
  text-decoration:none;
  text-transform:none;
  cursor:pointer;
  filter:none;
  transform:none;
  transition:color .18s ease,border-color .18s ease,background .18s ease,transform .18s ease;
}
.profile-copy button.text-link{margin-top:1rem;}
.profile-copy button.text-link::after,
.contact-hub #contact-form .contact-submit svg{
  flex:0 0 var(--action-icon-size);
  width:var(--action-icon-size);
  height:var(--action-icon-size);
  color:inherit;
}
.profile-copy button.text-link::after{
  content:'';
  background:currentColor;
  --document-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z'/%3E%3Cpath d='M14 3v6h6M8 13h8M8 17h5'/%3E%3C/svg%3E");
  -webkit-mask:var(--document-icon) center/contain no-repeat;
  mask:var(--document-icon) center/contain no-repeat;
}
.contact-hub #contact-form .contact-submit svg{
  order:1;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
@media(hover:hover) and (pointer:fine){
  .profile-copy button.text-link:hover,
  .contact-hub #contact-form .contact-submit:hover:not(:disabled){
    color:#dff5fc;
    border-color:#88d5f55c;
    background:#88d5f50c;
    transform:translateY(-1px);
  }
}
.profile-copy button.text-link:focus-visible,
.contact-hub #contact-form .contact-submit:focus-visible{outline:2px solid #b6e5f5;outline-offset:4px;}
.profile-copy button.text-link:active,
.contact-hub #contact-form .contact-submit:active:not(:disabled){transform:scale(.985);}
.contact-hub #contact-form .contact-submit:disabled{opacity:.55;cursor:wait;transform:none;}
@media(max-width:520px){
  .profile-copy button.text-link{min-height:38px;padding:7px 13px;}
  .contact-hub #contact-form .contact-submit{width:max-content;min-width:0;min-height:38px;padding:7px 13px;}
}
@media(prefers-reduced-motion:reduce){
  .profile-copy button.text-link,
  .contact-hub #contact-form .contact-submit{transition:none;}
}
@media(forced-colors:active){
  .profile-copy button.text-link,
  .contact-hub #contact-form .contact-submit{background:ButtonFace;color:ButtonText;border-color:ButtonText;box-shadow:none;}
  .profile-copy button.text-link::after{background:ButtonText;}
}
/* One shared black glass shell for video, photo, and resume. */
#media-dialog{
  background:rgba(0,0,0,.55);
  -webkit-backdrop-filter:blur(22px) saturate(1.08);
  backdrop-filter:blur(22px) saturate(1.08);
}
#media-dialog::backdrop{
  background:rgba(0,0,0,.28);
  -webkit-backdrop-filter:blur(14px);
  backdrop-filter:blur(14px);
}
#media-dialog .dialog-top,
#media-dialog .dialog-toolbar,
#media-dialog #dialog-media,
#media-dialog.is-resume #dialog-media{
  background:transparent;
}
#media-dialog .dialog-top{
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}
/* Match the video and photo modal footer text treatment. */
#media-dialog #dialog-position,
#media-dialog .dialog-actions button,
#media-dialog #dialog-description,
#media-dialog #dialog-description a,
#media-dialog #dialog-description a:hover,
#media-dialog #dialog-description a:focus-visible{
  color:#fff;
}
@media(max-width:1024px) and (orientation:landscape){
  /* A filtered ancestor shifts embedded YouTube video on iOS Safari. */
  #media-dialog:not(.is-photo):not(.is-resume){
    -webkit-backdrop-filter:none;
    backdrop-filter:none;
  }
  #media-dialog:not(.is-photo):not(.is-resume) #dialog-description{
    max-height:none;
  }
}

/* Short desktop windows need a side-by-side player and details, not a tall scrolling modal. */
@media(min-width:1025px) and (max-height:960px) and (orientation:landscape){
  #media-dialog:not(.is-photo):not(.is-resume){
    box-sizing:border-box;
    display:grid;
    grid-template-columns:minmax(0,1fr) 300px;
    grid-template-rows:auto auto minmax(0,1fr);
    grid-template-areas:"media top" "media toolbar" "media description";
    width:min(1500px,calc(100vw - 1rem),calc(177.778dvh + 300px - 1.7778rem));
    max-width:none;
    max-height:calc(100dvh - 1rem);
    height:min(677px,calc(56.25vw - 168.75px - .5625rem + 2px),calc(100dvh - 1rem));
    overflow:hidden;
    -webkit-backdrop-filter:none;
    backdrop-filter:none;
  }
  #media-dialog:not(.is-photo):not(.is-resume) #dialog-media{
    grid-area:media;
    position:relative;
    display:block;
    width:100%;
    height:auto;
    min-width:0;
    min-height:0;
    aspect-ratio:16/9;
    padding:0;
    overflow:hidden;
    border-right:1px solid #ffffff12;
  }
  #media-dialog:not(.is-photo):not(.is-resume) #dialog-media iframe{
    position:absolute;
    inset:0;
    display:block;
    width:100%;
    height:100%;
    max-width:none;
    max-height:none;
    margin:0;
    aspect-ratio:auto;
  }
  #media-dialog:not(.is-photo):not(.is-resume) .dialog-top{
    grid-area:top;
    position:static;
    padding:.85rem 1rem;
    gap:.6rem;
  }
  #media-dialog:not(.is-photo):not(.is-resume) .dialog-top h2{
    font-size:clamp(.9rem,1.1vw,1.15rem);
    line-height:1.3;
  }
  #media-dialog:not(.is-photo):not(.is-resume) .dialog-toolbar{
    grid-area:toolbar;
    padding:.55rem 1rem;
  }
  #media-dialog:not(.is-photo):not(.is-resume) #dialog-description{
    grid-area:description;
    min-height:0;
    max-height:none;
    overflow:auto;
    padding:.65rem 1rem 1rem;
    scrollbar-width:thin;
  }
}

/* Clip the embedded player at its wrapper; iOS may not clip iframe contents
   to the iframe's own border radius. Keep the existing 4px inset. */
#media-dialog:not(.is-photo):not(.is-resume) #dialog-media{
  padding:0;
  margin:4px;
  overflow:hidden;
  border-radius:12px;
}
#media-dialog:not(.is-photo):not(.is-resume) #dialog-media iframe{
  border-radius:0;
}
@media (max-width:1024px) and (orientation:landscape),
       (min-width:1025px) and (max-height:960px) and (orientation:landscape){
  #media-dialog:not(.is-photo):not(.is-resume) #dialog-media{
    margin:0;
    border-radius:14px 0 0 14px;
  }
}

/* Desktop-only bokeh: wider independent paths, varied sizes, and a fuller
   color range. Portrait and landscape mobile still keep these animations off. */
@media (min-width:761px) and (prefers-reduced-motion:no-preference){
  .bokeh-scene i{
    animation-name:bokeh-drift-wide;
    animation-duration:var(--bokeh-duration,12s);
    animation-delay:var(--bokeh-delay,0s);
    animation-timing-function:cubic-bezier(.42,.04,.5,.98);
  }
  .bokeh-scene i:nth-child(1){--bokeh-duration:12.6s;--bokeh-delay:-8.4s;--x1:13vw;--y1:-8vh;--x2:-4vw;--y2:16vh;--x3:21vw;--y3:9vh}
  .bokeh-scene i:nth-child(2){width:clamp(110px,18vw,330px);--bokeh-duration:15.2s;--bokeh-delay:-4.8s;--x1:-15vw;--y1:9vh;--x2:8vw;--y2:19vh;--x3:-22vw;--y3:14vh}
  .bokeh-scene i:nth-child(3){width:clamp(74px,11vw,190px);--bokeh-duration:10.9s;--bokeh-delay:-7.2s;--x1:17vw;--y1:-14vh;--x2:5vw;--y2:12vh;--x3:24vw;--y3:-7vh}
  .bokeh-scene i:nth-child(4){width:clamp(118px,17vw,300px);--bokeh-duration:14.1s;--bokeh-delay:-10.6s;--x1:-18vw;--y1:-7vh;--x2:-5vw;--y2:14vh;--x3:-27vw;--y3:-13vh}
  .bokeh-scene i:nth-child(5){width:clamp(96px,15vw,250px);--bokeh-duration:11.8s;--bokeh-delay:-2.6s;--x1:16vw;--y1:-17vh;--x2:3vw;--y2:-5vh;--x3:25vw;--y3:-20vh}
  .bokeh-scene i:nth-child(6){width:clamp(130px,19vw,340px);--bokeh-duration:16.4s;--bokeh-delay:-12.1s;--x1:-14vw;--y1:12vh;--x2:9vw;--y2:-16vh;--x3:-24vw;--y3:18vh}
  .bokeh-scene i:nth-child(7){width:clamp(55px,7vw,122px);--bokeh-duration:9.8s;--bokeh-delay:-5.7s;--x1:-12vw;--y1:18vh;--x2:7vw;--y2:4vh;--x3:-18vw;--y3:21vh}
  .bokeh-scene i:nth-child(8){width:clamp(66px,8vw,142px);--bokeh-duration:13.3s;--bokeh-delay:-9.3s;--x1:12vw;--y1:-13vh;--x2:-6vw;--y2:-20vh;--x3:19vw;--y3:-17vh}
  .bokeh-scene i:nth-child(9){width:clamp(58px,7.5vw,130px);--bokeh-duration:10.6s;--bokeh-delay:-1.5s;--x1:-10vw;--y1:-19vh;--x2:14vw;--y2:5vh;--x3:-17vw;--y3:-24vh}
  .bokeh-scene i:nth-child(10){width:clamp(50px,6.5vw,110px);--bokeh-duration:12.1s;--bokeh-delay:-11.4s;--x1:15vw;--y1:11vh;--x2:-8vw;--y2:-9vh;--x3:22vw;--y3:17vh}
  .bokeh-scene i:nth-child(11){--bokeh-duration:11.3s;--bokeh-delay:-6.2s;--x1:-17vw;--y1:9vh;--x2:6vw;--y2:18vh;--x3:-23vw;--y3:14vh}
  .bokeh-scene i:nth-child(12){--bokeh-duration:14.8s;--bokeh-delay:-3.3s;--x1:14vw;--y1:-15vh;--x2:-9vw;--y2:6vh;--x3:22vw;--y3:-20vh}
  .bokeh-scene i:nth-child(13){--bokeh-duration:10.2s;--bokeh-delay:-8.9s;--x1:18vw;--y1:14vh;--x2:-4vw;--y2:-13vh;--x3:27vw;--y3:19vh}
  .bokeh-scene i:nth-child(14){--bokeh-duration:13.7s;--bokeh-delay:-4.1s;--x1:-16vw;--y1:-12vh;--x2:11vw;--y2:8vh;--x3:-25vw;--y3:-16vh}
  .bokeh-scene i:nth-child(15){left:72%;top:13%;width:clamp(52px,6vw,106px);background:radial-gradient(circle,#b9fff17d 0 7%,#2fbf9870 30%,#145f5c3c 55%,transparent 74%);--bokeh-duration:9.6s;--bokeh-delay:-5.2s;--x1:-19vw;--y1:17vh;--x2:8vw;--y2:-7vh;--x3:-27vw;--y3:22vh}
  .bokeh-scene i:nth-child(16){left:84%;top:72%;width:clamp(72px,10vw,172px);background:radial-gradient(circle,#d2ff9c7c 0 6%,#83be4d67 28%,#365f3338 54%,transparent 74%);--bokeh-duration:15.7s;--bokeh-delay:-13.4s;--x1:-21vw;--y1:-14vh;--x2:4vw;--y2:10vh;--x3:-30vw;--y3:-18vh}
  .bokeh-scene i:nth-child(17){left:43%;top:43%;width:clamp(48px,6.2vw,114px);background:radial-gradient(circle,#e9b8ff7d 0 7%,#9e56d16b 31%,#4d2a813a 55%,transparent 74%);--bokeh-duration:11.1s;--bokeh-delay:-2.2s;--x1:16vw;--y1:-18vh;--x2:-12vw;--y2:9vh;--x3:24vw;--y3:-23vh}
  .bokeh-scene i:nth-child(18){left:4%;top:31%;width:clamp(60px,8vw,148px);background:radial-gradient(circle,#ffb1a17d 0 6%,#d45a6170 29%,#762b413d 54%,transparent 74%);--bokeh-duration:13.9s;--bokeh-delay:-7.7s;--x1:22vw;--y1:12vh;--x2:5vw;--y2:-16vh;--x3:31vw;--y3:17vh}
  .bokeh-scene i:nth-child(19){left:27%;top:74%;width:clamp(44px,5.7vw,98px);background:radial-gradient(circle,#ffe6a57d 0 7%,#d79b4570 31%,#7d532c3a 55%,transparent 74%);--bokeh-duration:10.4s;--bokeh-delay:-10.1s;--x1:-13vw;--y1:-20vh;--x2:10vw;--y2:5vh;--x3:-21vw;--y3:-25vh}
  .bokeh-scene i:nth-child(20){left:61%;top:60%;width:clamp(70px,9vw,164px);background:radial-gradient(circle,#a5d1ff7d 0 6%,#547cd570 29%,#2c3d8b3a 54%,transparent 74%);--bokeh-duration:16.1s;--bokeh-delay:-6.8s;--x1:19vw;--y1:-11vh;--x2:-8vw;--y2:16vh;--x3:28vw;--y3:-15vh}
}
@keyframes bokeh-drift-wide{
  0%{transform:translate3d(0,0,0) scale(.96) rotate(-1deg);opacity:.64}
  34%{transform:translate3d(clamp(-5vw,var(--x1),5vw),clamp(-4vh,var(--y1),4vh),0) scale(1.03) rotate(1deg);opacity:.78}
  69%{transform:translate3d(clamp(-5vw,var(--x2),5vw),clamp(-4vh,var(--y2),4vh),0) scale(.98) rotate(-1deg);opacity:.7}
  100%{transform:translate3d(clamp(-6vw,var(--x3),6vw),clamp(-5vh,var(--y3),5vh),0) scale(1.05) rotate(1deg);opacity:.82}
}

/* Desktop returns close to the original restrained pace, with only subtle variation. */
@media (min-width:761px) and (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
  .bokeh-scene::before{animation-duration:30s}
  .bokeh-scene i{animation-timing-function:ease-in-out}
  .bokeh-scene i:nth-child(1){--bokeh-duration:31.2s}.bokeh-scene i:nth-child(2){--bokeh-duration:33.4s}
  .bokeh-scene i:nth-child(3){--bokeh-duration:30.6s}.bokeh-scene i:nth-child(4){--bokeh-duration:34.1s}
  .bokeh-scene i:nth-child(5){--bokeh-duration:31.7s}.bokeh-scene i:nth-child(6){--bokeh-duration:35s}
  .bokeh-scene i:nth-child(7){--bokeh-duration:30.5s}.bokeh-scene i:nth-child(8){--bokeh-duration:32.8s}
  .bokeh-scene i:nth-child(9){--bokeh-duration:31s}.bokeh-scene i:nth-child(10){--bokeh-duration:33.1s}
  .bokeh-scene i:nth-child(11){--bokeh-duration:30.8s}.bokeh-scene i:nth-child(12){--bokeh-duration:34.5s}
  .bokeh-scene i:nth-child(13){--bokeh-duration:31.5s}.bokeh-scene i:nth-child(14){--bokeh-duration:33.7s}
  .bokeh-scene i:nth-child(15){--bokeh-duration:30.7s}.bokeh-scene i:nth-child(16){--bokeh-duration:34.8s}
  .bokeh-scene i:nth-child(17){--bokeh-duration:31.3s}.bokeh-scene i:nth-child(18){--bokeh-duration:33.9s}
  .bokeh-scene i:nth-child(19){--bokeh-duration:30.9s}.bokeh-scene i:nth-child(20){--bokeh-duration:34.6s}
}

/* A touch-first device stays still in either portrait or landscape. */
@media (hover:none) and (pointer:coarse){
  .bokeh-scene i,.bokeh-scene::before{animation:none!important}
}

/* Give the smallest lights enough presence without changing the larger bokeh. */
.bokeh-scene i:nth-child(7){width:clamp(68px,8.5vw,144px)}
.bokeh-scene i:nth-child(8){width:clamp(80px,9.5vw,164px)}
.bokeh-scene i:nth-child(9){width:clamp(72px,8.8vw,152px)}
.bokeh-scene i:nth-child(10){width:clamp(64px,7.8vw,136px)}
.bokeh-scene i:nth-child(11){width:clamp(72px,8.5vw,144px)}
.bokeh-scene i:nth-child(13){width:clamp(70px,8vw,138px)}
.bokeh-scene i:nth-child(15){width:clamp(66px,7.5vw,128px)}
.bokeh-scene i:nth-child(17){width:clamp(62px,7.4vw,128px)}
.bokeh-scene i:nth-child(19){width:clamp(58px,7vw,118px)}

/* Mobile uses the same still bokeh composition as desktop; only motion stops. */
@media (max-width:760px){
  .bokeh-scene::before{opacity:.76;filter:blur(54px) saturate(1.3)}
  .bokeh-scene i{display:block;opacity:.78;filter:blur(9px) saturate(1.5)}
  .bokeh-scene i:nth-child(1){left:-6%;top:8%;width:22vw;min-width:130px}
  .bokeh-scene i:nth-child(2){left:72%;top:3%;width:clamp(110px,18vw,330px)}
  .bokeh-scene i:nth-child(3){left:19%;top:40%;width:clamp(74px,11vw,190px);min-width:0}
  .bokeh-scene i:nth-child(4){right:-5%;top:41%;width:clamp(118px,17vw,300px)}
  .bokeh-scene i:nth-child(5){left:2%;top:80%;width:clamp(96px,15vw,250px)}
  .bokeh-scene i:nth-child(6){left:60%;top:75%;width:clamp(130px,19vw,340px)}
  .bokeh-scene i:nth-child(7){left:42%;top:18%;width:clamp(55px,7vw,122px)}
  .bokeh-scene i:nth-child(8){right:12%;top:60%;width:clamp(66px,8vw,142px)}
  .bokeh-scene i:nth-child(9){left:29%;top:90%;width:clamp(58px,7.5vw,130px)}
  .bokeh-scene i:nth-child(10){left:49%;top:55%;width:clamp(50px,6.5vw,110px)}
  .bokeh-scene i:nth-child(11){left:34%;top:9%;width:clamp(58px,7vw,124px)}
  .bokeh-scene i:nth-child(12){right:14%;top:47%;width:clamp(64px,8vw,138px)}
  .bokeh-scene i:nth-child(13){left:10%;top:57%;width:clamp(56px,6.5vw,116px)}
  .bokeh-scene i:nth-child(14){left:54%;top:86%;width:clamp(68px,9vw,150px)}
  .bokeh-scene i:nth-child(15){left:72%;top:13%;width:clamp(52px,6vw,106px);background:radial-gradient(circle,#b9fff17d 0 7%,#2fbf9870 30%,#145f5c3c 55%,transparent 74%)}
  .bokeh-scene i:nth-child(16){left:84%;top:72%;width:clamp(72px,10vw,172px);background:radial-gradient(circle,#d2ff9c7c 0 6%,#83be4d67 28%,#365f3338 54%,transparent 74%)}
  .bokeh-scene i:nth-child(17){left:43%;top:43%;width:clamp(48px,6.2vw,114px);background:radial-gradient(circle,#e9b8ff7d 0 7%,#9e56d16b 31%,#4d2a813a 55%,transparent 74%)}
  .bokeh-scene i:nth-child(18){left:4%;top:31%;width:clamp(60px,8vw,148px);background:radial-gradient(circle,#ffb1a17d 0 6%,#d45a6170 29%,#762b413d 54%,transparent 74%)}
  .bokeh-scene i:nth-child(19){left:27%;top:74%;width:clamp(44px,5.7vw,98px);background:radial-gradient(circle,#ffe6a57d 0 7%,#d79b4570 31%,#7d532c3a 55%,transparent 74%)}
  .bokeh-scene i:nth-child(20){left:61%;top:60%;width:clamp(70px,9vw,164px);background:radial-gradient(circle,#a5d1ff7d 0 6%,#547cd570 29%,#2c3d8b3a 54%,transparent 74%)}
}

@media (max-width:760px){
  .bokeh-scene i:nth-child(7){width:clamp(68px,8.5vw,144px)}
  .bokeh-scene i:nth-child(8){width:clamp(80px,9.5vw,164px)}
  .bokeh-scene i:nth-child(9){width:clamp(72px,8.8vw,152px)}
  .bokeh-scene i:nth-child(10){width:clamp(64px,7.8vw,136px)}
  .bokeh-scene i:nth-child(11){width:clamp(72px,8.5vw,144px)}
  .bokeh-scene i:nth-child(13){width:clamp(70px,8vw,138px)}
  .bokeh-scene i:nth-child(15){width:clamp(66px,7.5vw,128px)}
  .bokeh-scene i:nth-child(17){width:clamp(62px,7.4vw,128px)}
  .bokeh-scene i:nth-child(19){width:clamp(58px,7vw,118px)}
}

/* Tablet landscape has limited height: keep photo modals in a stable
   single-column flow so a transient image measurement cannot collapse them. */
@media (min-width:761px) and (max-width:1024px) and (orientation:landscape) and (min-height:501px){
  #media-dialog.is-photo{
    width:min(1000px,calc(100vw - 2rem))!important;
    height:auto!important;
    max-height:calc(100svh - 1rem);
    display:flex!important;
    flex-direction:column;
    grid-template-columns:none!important;
    overflow-y:auto!important;
  }
  #media-dialog.is-photo #dialog-media{
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    display:flex!important;
    border-right:0;
    overflow:hidden!important;
  }
  #media-dialog.is-photo #dialog-media img{
    width:auto!important;
    height:auto!important;
    max-width:100%!important;
    max-height:none!important;
    object-fit:contain;
  }
  #media-dialog.is-photo .dialog-top,
  #media-dialog.is-photo .dialog-toolbar,
  #media-dialog.is-photo #dialog-description{width:100%;}
}

/* Shared photo/video metadata readability and tighter footer spacing. */
#media-dialog:not(.is-resume) #dialog-kind{
  font-size:.75rem;
  line-height:1.5;
}
#media-dialog:not(.is-resume) .dialog-toolbar,
#media-dialog:not(.is-photo):not(.is-resume) .dialog-toolbar{
  padding-bottom:.25rem;
}
#media-dialog:not(.is-resume) #dialog-description,
#media-dialog:not(.is-photo):not(.is-resume) #dialog-description{
  padding-top:0;
}
/* Improve small labels while retaining the responsive gallery and hero layout. */
.filter-select-shell .filter-select-kicker{font-size:.625rem;}
.project-caption small{font-size:.75rem;font-weight:650;}
.hero-copy .eyebrow{font-size:calc(var(--hero-kicker-size) + .125rem);}
@media(max-width:520px){
  .filter-select-shell .filter-select-kicker,.project-caption small{font-size:.53125rem;}
  .hero-copy .eyebrow{font-size:calc(var(--hero-kicker-size) + .0625rem);}
}

/* Align category labels at the top of equal-height card captions. */
.project-caption{align-items:flex-start;}

/* A restrained slogan increase, with a smaller step for compact headers. */
.site-header .wordmark-copy small{
  --slogan-scale:1.08;
  font-size:.587em;
}
@media(max-width:920px){
  .site-header .wordmark-copy small{
    --slogan-scale:1.05;
    font-size:.571em;
  }
}
/* Keep mobile modal categories subordinate to the media title. */
@media(max-width:760px),(max-width:920px) and (max-height:500px) and (orientation:landscape){
  #media-dialog:not(.is-resume) #dialog-kind{font-size:.625rem;}
}

/* Use the available mobile landscape viewport without cropping the photo.
   Only the description scrolls when the viewport is especially short. */
@media (max-width:760px) and (orientation:landscape),
       (max-width:1024px) and (max-height:500px) and (orientation:landscape){
  #media-dialog.is-photo{
    --photo-edge-left:max(6px,env(safe-area-inset-left));
    --photo-edge-right:max(6px,env(safe-area-inset-right));
    --photo-edge-top:max(6px,env(safe-area-inset-top));
    --photo-edge-bottom:max(6px,env(safe-area-inset-bottom));
    scroll-padding:var(--photo-edge-top) var(--photo-edge-right) var(--photo-edge-bottom) var(--photo-edge-left);
    position:fixed;
    inset:auto;
    left:var(--photo-dialog-left,6px);
    top:var(--photo-dialog-top,6px);
    margin:0;
    max-width:calc(100vw - var(--photo-edge-left) - var(--photo-edge-right));
    max-height:calc(100dvh - var(--photo-edge-top) - var(--photo-edge-bottom));
    grid-template-rows:auto auto minmax(0,1fr);
  }
  #media-dialog.is-photo .dialog-top,
  #media-dialog.is-photo .dialog-toolbar{
    min-width:0;
    padding-inline:clamp(8px,1.3vw,14px);
  }
  #media-dialog.is-photo .dialog-top>div{min-width:0;}
  #media-dialog.is-photo .dialog-top h2{overflow-wrap:anywhere;}
  #media-dialog.is-photo .close-button{flex-shrink:0;}
  #media-dialog.is-photo #dialog-description{
    min-width:0;
    max-height:none;
    margin:0;
    padding-inline:clamp(8px,1.3vw,14px);
    overflow:auto;
    overflow-wrap:anywhere;
  }
}

/* Match the expanded photo shell on short mobile landscape viewports.
   Keep the native video surface unfiltered for iOS Safari. */
@media (max-width:760px) and (orientation:landscape),
       (max-width:1024px) and (max-height:500px) and (orientation:landscape){
  #media-dialog:not(.is-photo):not(.is-resume){
    --video-edge-left:max(6px,env(safe-area-inset-left));
    --video-edge-right:max(6px,env(safe-area-inset-right));
    --video-edge-top:max(6px,env(safe-area-inset-top));
    --video-edge-bottom:max(6px,env(safe-area-inset-bottom));
    scroll-padding:var(--video-edge-top) var(--video-edge-right) var(--video-edge-bottom) var(--video-edge-left);
    box-sizing:border-box;
    position:fixed;
    inset:auto;
    left:var(--video-dialog-left,var(--video-edge-left));
    top:var(--video-dialog-top,var(--video-edge-top));
    margin:0;
    width:var(--video-dialog-width,calc(100vw - var(--video-edge-left) - var(--video-edge-right)));
    height:var(--video-dialog-height,calc(100dvh - var(--video-edge-top) - var(--video-edge-bottom)));
    max-width:calc(100vw - var(--video-edge-left) - var(--video-edge-right));
    max-height:calc(100dvh - var(--video-edge-top) - var(--video-edge-bottom));
    aspect-ratio:auto;
    grid-template-columns:minmax(0,1fr) var(--video-sidebar-width,clamp(168px,28vw,280px));
    grid-template-rows:auto auto minmax(0,1fr);
    overflow:hidden;
    -webkit-backdrop-filter:none;
    backdrop-filter:none;
  }
  #media-dialog:not(.is-photo):not(.is-resume) #dialog-media{
    display:flex;
    align-items:center;
    justify-content:center;
    width:auto;
    height:100%;
    aspect-ratio:auto;
  }
  #media-dialog:not(.is-photo):not(.is-resume) #dialog-media iframe{
    position:static;
    inset:auto;
    flex:none;
    margin:auto;
    max-width:100%;
    max-height:100%;
    aspect-ratio:16/9;
  }
  #media-dialog:not(.is-photo):not(.is-resume) .dialog-top,
  #media-dialog:not(.is-photo):not(.is-resume) .dialog-toolbar{
    min-width:0;
    padding-inline:clamp(8px,1.3vw,14px);
  }
  #media-dialog:not(.is-photo):not(.is-resume) .dialog-top>div{
    min-width:0;
    max-height:max(54px,calc(var(--video-dialog-height,100dvh) - 7rem));
    overflow:auto;
    scrollbar-width:thin;
  }
  #media-dialog:not(.is-photo):not(.is-resume) .dialog-top h2{overflow-wrap:anywhere;}
  #media-dialog:not(.is-photo):not(.is-resume) .close-button{flex-shrink:0;}
  #media-dialog:not(.is-photo):not(.is-resume) #dialog-description{
    min-width:0;
    min-height:0;
    max-height:none;
    margin:0;
    padding-inline:clamp(8px,1.3vw,14px);
    overflow:auto;
    overflow-wrap:anywhere;
  }
}

/* Keep one photo-dialog shell per viewport; only the image frame follows its ratio. */
#media-dialog.is-photo[open]{
  box-sizing:border-box;
  width:min(1100px,calc(100vw - 2rem))!important;
  max-width:calc(100vw - 2rem);
  height:min(850px,calc(100dvh - 2rem))!important;
  max-height:calc(100dvh - 2rem);
  display:flex!important;
  flex-direction:column;
  overflow:hidden!important;
}
#media-dialog.is-photo .dialog-top,
#media-dialog.is-photo .dialog-toolbar,
#media-dialog.is-photo #dialog-description{flex:0 0 auto;}
#media-dialog.is-photo #dialog-media{
  box-sizing:border-box;
  flex:1 1 auto;
  width:100%!important;
  height:auto!important;
  min-width:0;
  min-height:0!important;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden!important;
}
#media-dialog.is-photo #dialog-media .photo-watermark-frame{
  flex:none;
  max-width:100%;
  max-height:100%;
}
#media-dialog.is-photo #dialog-media .photo-watermark-frame img{
  display:block;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain;
}
#media-dialog.is-photo #dialog-description{
  max-height:min(7.5rem,22dvh);
  overflow:auto;
}
@media(max-width:760px) and (orientation:portrait){
  #media-dialog.is-photo[open]{
    width:calc(100vw - max(8px,env(safe-area-inset-left)) - max(8px,env(safe-area-inset-right)))!important;
    max-width:calc(100vw - max(8px,env(safe-area-inset-left)) - max(8px,env(safe-area-inset-right)));
    height:calc(100dvh - max(8px,env(safe-area-inset-top)) - max(8px,env(safe-area-inset-bottom)))!important;
    max-height:calc(100dvh - max(8px,env(safe-area-inset-top)) - max(8px,env(safe-area-inset-bottom)));
  }
}
@media(max-width:760px) and (orientation:landscape),
      (max-width:1024px) and (max-height:500px) and (orientation:landscape){
  #media-dialog.is-photo[open]{
    width:var(--photo-dialog-width,calc(100vw - var(--photo-edge-left) - var(--photo-edge-right)))!important;
    height:var(--photo-dialog-height,calc(100dvh - var(--photo-edge-top) - var(--photo-edge-bottom)))!important;
    max-width:calc(100vw - var(--photo-edge-left) - var(--photo-edge-right));
    max-height:calc(100dvh - var(--photo-edge-top) - var(--photo-edge-bottom));
    display:grid!important;
    grid-template-columns:minmax(0,1fr) clamp(168px,28vw,280px)!important;
    grid-template-rows:auto auto minmax(0,1fr);
    grid-template-areas:"media top" "media toolbar" "media description";
  }
  #media-dialog.is-photo #dialog-media{
    grid-area:media;
    width:100%!important;
    height:100%!important;
    padding:4px;
    border-right:1px solid #ffffff12;
  }
  #media-dialog.is-photo .dialog-top{grid-area:top;}
  #media-dialog.is-photo .dialog-toolbar{grid-area:toolbar;}
  #media-dialog.is-photo #dialog-description{
    grid-area:description;
    min-height:0;
    max-height:none;
    overflow:auto;
  }
}

/* Keep the async YouTube count on one fixed-height line. Its hidden state uses
   visibility so loading or changing videos cannot alter the modal header. */
#media-dialog:not(.is-photo):not(.is-resume) .dialog-youtube-stats{
  display:block;
  box-sizing:border-box;
  height:1.35em;
  min-height:1.35em;
  max-height:1.35em;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
#media-dialog:not(.is-photo):not(.is-resume) .dialog-youtube-stats[hidden]{
  visibility:hidden;
}

/* Give video the same stable shell while its 16:9 player fits the media cell. */
@media(min-width:1025px) and (min-height:961px),
      (max-width:1024px) and (orientation:portrait){
  #media-dialog:not(.is-photo):not(.is-resume)[open]{
    box-sizing:border-box;
    width:min(1100px,calc(100vw - 2rem))!important;
    max-width:calc(100vw - 2rem);
    height:min(850px,calc(100dvh - 2rem))!important;
    max-height:calc(100dvh - 2rem);
    display:flex!important;
    flex-direction:column;
    overflow:hidden;
  }
  #media-dialog:not(.is-photo):not(.is-resume) .dialog-top,
  #media-dialog:not(.is-photo):not(.is-resume) .dialog-toolbar,
  #media-dialog:not(.is-photo):not(.is-resume) #dialog-description{flex:0 0 auto;}
  #media-dialog:not(.is-photo):not(.is-resume) #dialog-media{
    box-sizing:border-box;
    flex:1 1 auto;
    width:calc(100% - 8px);
    height:auto;
    min-height:0;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
  }
  #media-dialog:not(.is-photo):not(.is-resume) #dialog-media iframe{
    position:static;
    flex:none;
    max-width:100%;
    max-height:100%;
    aspect-ratio:16/9;
  }
  #media-dialog:not(.is-photo):not(.is-resume) #dialog-description{
    box-sizing:border-box;
    flex:0 0 min(7.5rem,22dvh);
    height:min(7.5rem,22dvh);
    max-height:none;
    overflow:auto;
  }
}
@media(max-width:760px) and (orientation:portrait){
  #media-dialog:not(.is-photo):not(.is-resume)[open]{
    width:calc(100vw - max(8px,env(safe-area-inset-left)) - max(8px,env(safe-area-inset-right)))!important;
    max-width:calc(100vw - max(8px,env(safe-area-inset-left)) - max(8px,env(safe-area-inset-right)));
    height:var(--video-dialog-height,fit-content)!important;
    max-height:calc(100dvh - max(8px,env(safe-area-inset-top)) - max(8px,env(safe-area-inset-bottom)));
  }
  #media-dialog:not(.is-photo):not(.is-resume) .dialog-top{
    box-sizing:border-box;
    flex:0 0 clamp(120px,18dvh,144px);
    min-height:0;
    overflow:hidden;
  }
  #media-dialog:not(.is-photo):not(.is-resume) .dialog-top>div{
    min-width:0;
    max-height:100%;
    overflow:auto;
    scrollbar-width:thin;
  }
  #media-dialog:not(.is-photo):not(.is-resume) #dialog-media{
    flex:0 1 auto;
    aspect-ratio:16/9;
  }
}

/* Reserve stable toolbar positions in side-by-side video layouts. */
@media(max-width:1024px) and (orientation:landscape),
      (min-width:1025px) and (max-height:960px) and (orientation:landscape){
  #media-dialog:not(.is-photo):not(.is-resume)[open]{
    grid-template-rows:clamp(112px,20dvh,150px) auto minmax(0,1fr);
  }
  #media-dialog:not(.is-photo):not(.is-resume) .dialog-top{
    min-height:0;
    overflow:hidden;
  }
  #media-dialog:not(.is-photo):not(.is-resume) .dialog-top>div{
    max-height:100%;
    overflow:auto;
    scrollbar-width:thin;
  }
}
@media(max-width:760px) and (orientation:landscape),
      (max-width:1024px) and (max-height:500px) and (orientation:landscape){
  #media-dialog:not(.is-photo):not(.is-resume)[open]{
    grid-template-rows:clamp(90px,27dvh,126px) auto minmax(0,1fr);
  }
}

/* Let the original glass dialog follow the displayed media.  JavaScript sets
   the dimensions from the photo's natural ratio or the video's 16:9 ratio,
   while these limits keep every orientation inside the visible viewport. */
#media-dialog.is-photo[open]{
  width:var(--photo-dialog-width,min(1100px,calc(100vw - 2rem)))!important;
  height:var(--photo-dialog-height,auto)!important;
  max-width:calc(100vw - 1rem)!important;
  max-height:calc(100dvh - 1rem)!important;
}
#media-dialog.is-photo #dialog-media{
  flex:0 0 calc(var(--photo-media-height,0px) + 12px)!important;
  height:calc(var(--photo-media-height,0px) + 12px)!important;
}
#media-dialog.is-photo #dialog-media .photo-watermark-frame{
  width:var(--photo-media-width,auto)!important;
  height:var(--photo-media-height,auto)!important;
  border-radius:14px;
  overflow:hidden;
  isolation:isolate;
}

#media-dialog:not(.is-photo):not(.is-resume)[open]{
  width:var(--video-dialog-width,min(1100px,calc(100vw - 2rem)))!important;
  height:var(--video-dialog-height,auto)!important;
  max-width:calc(100vw - 1rem)!important;
  max-height:calc(100dvh - 1rem)!important;
}
#media-dialog:not(.is-photo):not(.is-resume) #dialog-media{
  flex:0 0 var(--video-media-height,auto)!important;
  height:var(--video-media-height,auto)!important;
}
#media-dialog:not(.is-photo):not(.is-resume) #dialog-media iframe{
  width:var(--video-media-width,100%)!important;
  height:var(--video-media-height,auto)!important;
  max-width:100%;
  max-height:100%;
}

@media(max-width:760px) and (orientation:portrait){
  #media-dialog.is-photo[open],
  #media-dialog:not(.is-photo):not(.is-resume)[open]{
    left:var(--photo-dialog-left,var(--video-dialog-left,auto));
    top:var(--photo-dialog-top,var(--video-dialog-top,auto));
    margin:0;
  }
}

/* Match photo and video dialogs to the shared navigation and section glass. */
#media-dialog{
  border-color:#ffffff1c;
  background:var(--primary-glass-background);
  box-shadow:inset 0 1px 0 #ffffff0a;
  -webkit-backdrop-filter:var(--primary-glass-filter);
  backdrop-filter:var(--primary-glass-filter);
}
#media-dialog[open]{
  transform:scale(var(--media-dialog-scale,1));
  transform-origin:top left;
}
#media-dialog[open]:not(.is-resume){
  position:fixed;
  inset:auto;
  left:var(--photo-dialog-left,var(--video-dialog-left,50%));
  top:var(--photo-dialog-top,var(--video-dialog-top,50%));
  margin:0;
}
#media-dialog::backdrop{
  background:var(--primary-glass-background);
  -webkit-backdrop-filter:var(--primary-glass-filter);
  backdrop-filter:var(--primary-glass-filter);
}
#media-dialog .dialog-top{
  background:var(--primary-glass-background);
  border-bottom-color:#ffffff1c;
  -webkit-backdrop-filter:var(--primary-glass-filter);
  backdrop-filter:var(--primary-glass-filter);
}
#media-dialog .dialog-toolbar,
#media-dialog #dialog-description{
  background:transparent;
}

#media-dialog:not(.is-resume) #dialog-description{
  background:transparent;
}

/* Resume controls share the navigation language switch glass and active state. */
.resume-controls{display:none}
#media-dialog.is-resume #dialog-media{overflow-anchor:none;overflow-x:auto}
#media-dialog.is-resume .resume-pages{width:min(100%,850px)}
#media-dialog.is-resume .dialog-top{
  display:grid;grid-template-columns:minmax(0,1fr) auto auto;
  grid-template-rows:auto auto;align-items:center;gap:.3rem .65rem;
}
#media-dialog.is-resume .dialog-top>div,
#media-dialog.is-resume .dialog-title-row{display:contents}
#media-dialog.is-resume #dialog-kind{grid-column:1;grid-row:1;align-self:end;margin:0 0 .25rem}
#media-dialog.is-resume .dialog-title-row h2{grid-column:1;grid-row:2;align-self:start;margin:0}
#media-dialog.is-resume .close-button{grid-column:3;grid-row:1 / 3;justify-self:end;margin-inline-start:.5rem;width:48px;height:48px}
#media-dialog.is-resume .resume-controls{
  grid-column:2;grid-row:1 / 3;justify-self:end;display:flex;
  align-items:center;gap:.4rem;max-width:100%;
}
#resume-language-switch{margin:0;padding:3px}
#resume-language-switch button{min-width:4rem;min-height:40px;padding:.5rem .65rem;gap:.3rem;font-size:.75rem}
#resume-language-switch button[aria-pressed="true"]{border-color:transparent}
.resume-print-button{
  display:inline-flex;align-items:center;justify-content:center;gap:.35rem;
  min-height:48px;padding:.55rem .9rem;border:1px solid #ffffff20;
  border-radius:100px;background:linear-gradient(145deg,#ffffff09,#0008);
  box-shadow:inset 0 1px 0 #ffffff07;color:#e4f6ff;font-size:.75rem;
  line-height:1.2;font-weight:650;white-space:nowrap;
  -webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);
}
.resume-print-button svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.resume-print-button:hover{border-color:#88d5f53b;background:linear-gradient(145deg,#88d5f51f,#88d5f507)}
.resume-print-button:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.resume-print-button:disabled{opacity:.6;cursor:wait}
#media-dialog.is-resume{
  width:min(980px,calc(100vw - max(1rem,env(safe-area-inset-left)) - max(1rem,env(safe-area-inset-right))));
  max-height:calc(100dvh - max(.5rem,env(safe-area-inset-top)) - max(.5rem,env(safe-area-inset-bottom)));
}
@media(max-width:600px){
  #media-dialog.is-resume{width:calc(100vw - max(.375rem,env(safe-area-inset-left)) - max(.375rem,env(safe-area-inset-right)))}
  #resume-language-switch{padding:2px}
  #resume-language-switch button{min-width:3.3rem;min-height:38px;padding:.45rem .4rem;gap:.25rem;font-size:.6875rem}
  .resume-print-button{min-height:44px;padding:.5rem .6rem;font-size:.6875rem}
  #media-dialog.is-resume .close-button{width:44px;height:44px}
}
@media(max-height:500px) and (orientation:landscape){
  #media-dialog.is-resume .dialog-top{gap:.3rem .5rem}
  #resume-language-switch{padding:2px}
  #resume-language-switch button{min-height:38px;padding:.4rem .55rem}
  .resume-print-button{min-height:44px;padding:.5rem .75rem}
  #media-dialog.is-resume .close-button{width:44px;height:44px}
}

/* Compact document viewer zoom group, aligned with the language and print tools. */
.resume-zoom-controls{
  display:flex;align-items:center;flex:none;padding:3px;
  border:1px solid #ffffff20;border-radius:100px;
  background:linear-gradient(145deg,#ffffff09,#0008);
  box-shadow:inset 0 1px 0 #ffffff07;
}
.resume-zoom-controls button{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:34px;min-height:40px;padding:.45rem .35rem;
  border:0;border-radius:100px;background:transparent;color:#e4f6ff;
  font-size:.75rem;line-height:1.2;font-weight:650;
}
.resume-zoom-controls button:hover{background:#ffffff0b}
.resume-zoom-controls button:focus-visible{outline:2px solid #ffffff80;outline-offset:1px}
.resume-zoom-controls button:disabled{opacity:.3;cursor:default}
.resume-zoom-controls svg{width:16px;height:16px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;fill:none}
#resume-zoom-reset{min-width:50px;font-variant-numeric:tabular-nums}
#resume-language-switch button:focus-visible{outline:2px solid #ffffff80;outline-offset:1px}
@media(max-width:760px), (max-width:920px) and (orientation:landscape){
  #media-dialog.is-resume .dialog-top{
    grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto auto;
    gap:.35rem .75rem;padding:.8rem;
  }
  #media-dialog.is-resume #dialog-kind{grid-column:1;grid-row:1;align-self:start;margin:0}
  #media-dialog.is-resume .dialog-title-row h2{grid-column:1;grid-row:2}
  #media-dialog.is-resume .close-button{grid-column:2;grid-row:1 / 3;align-self:start;margin:0}
  #media-dialog.is-resume .resume-controls{
    grid-column:1 / -1;grid-row:3;justify-self:stretch;display:grid;
    grid-template-columns:auto auto auto;justify-content:space-between;
    gap:.6rem .5rem;margin-top:.3rem;padding-top:.6rem;border-top:1px solid #ffffff12;
  }
  #resume-language-switch{grid-column:1;grid-row:1;justify-self:start}
  #resume-zoom-controls{grid-column:2;grid-row:1;justify-self:center;padding:2px}
  #resume-print{grid-column:3;grid-row:1;justify-self:end}
  .resume-zoom-controls button{min-height:38px;font-size:.6875rem}
}
@media(max-width:480px){
  #media-dialog.is-resume .resume-controls{grid-template-columns:auto auto auto;gap:.3rem;justify-content:space-between}
  #resume-print{grid-column:3;grid-row:1;min-width:44px;min-height:44px;padding:.5rem}
  #resume-print-label{display:none}
  #resume-zoom-controls{grid-column:2;grid-row:1;justify-self:center}
  #resume-zoom-controls button{min-height:40px;min-width:32px;padding:.4rem .2rem}
  #resume-zoom-reset{min-width:44px;flex:none}
}
@media(max-width:350px){
  #media-dialog.is-resume .dialog-top{padding:.7rem}
  #resume-language-switch .language-flag{display:none}
}
/* Pan the document with touch, using the viewer buttons for zoom. */
#media-dialog.is-resume,
#media-dialog.is-resume #dialog-media,
#media-dialog.is-resume .resume-pages,
#media-dialog.is-resume::backdrop{touch-action:pan-x pan-y}
/* Let the document scroller receive touches instead of the page images. */
#media-dialog.is-resume .resume-pages,
#media-dialog.is-resume .resume-pages img{
  -webkit-touch-callout:none;-webkit-user-select:none;user-select:none;
}
#media-dialog.is-resume .resume-pages img{-webkit-user-drag:none;pointer-events:none}
@media(max-width:920px) and (orientation:landscape){
  #media-dialog.is-resume .resume-pages{width:min(100%,640px)}
}

/* Keep the long resume scroller out of transformed/filtered Safari compositor layers. */
#media-dialog.is-resume[open]{transform:none;animation:none;opacity:1}
html.bokah-touch-device #media-dialog.is-resume,
html.bokah-touch-device #media-dialog.is-resume::backdrop,
html.bokah-touch-device #media-dialog.is-resume .dialog-top,
html.bokah-touch-device #media-dialog.is-resume .resume-controls :is(.language-switch,.resume-print-button){
 -webkit-backdrop-filter:none;backdrop-filter:none;
}
html.bokah-touch-device #media-dialog.is-resume .dialog-top{background:linear-gradient(145deg,#111315,#050606)}
#media-dialog.is-resume .dialog-top{position:relative;z-index:1;flex-shrink:0}
#media-dialog.is-resume .resume-pages{display:flex;flex-direction:column;align-items:stretch;min-height:0}
#media-dialog.is-resume .resume-pages img{flex:none;aspect-ratio:17 / 22;box-shadow:none}

html.bokah-touch-device #media-dialog.is-resume{background:linear-gradient(145deg,#0c0e0f,#030404)}
html.bokah-touch-device #media-dialog.is-resume::backdrop{background:#000d}

/* Keep the print document alive through AirPrint preview/cancellation, without an iframe. */
#resume-print-document{display:block;position:absolute;left:-100000px;top:0;width:180mm;visibility:hidden;pointer-events:none}
#resume-print-document img{display:block;width:180mm;height:auto}
@page{size:auto;margin:10mm}
@media print{
 html.resume-print-ready,
 html.resume-print-ready body{color-scheme:light!important;color:black!important;print-color-adjust:exact!important;-webkit-print-color-adjust:exact!important;display:block!important;position:static!important;width:auto!important;max-width:none!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;overflow:visible!important;background:white!important;transform:none!important;filter:none!important}
 html.resume-print-ready body>:not(#resume-print-document),
 html.resume-print-ready #media-dialog,
 html.resume-print-ready body::before,
 html.resume-print-ready body::after{display:none!important}
 html.resume-print-ready dialog::backdrop{display:none!important;background:transparent!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
 html.resume-print-ready #resume-print-document{display:block!important;visibility:visible!important;position:static!important;width:auto!important;margin:0!important;padding:0!important;font-size:0!important;line-height:0!important}
 html.resume-print-ready #resume-print-document .resume-print-page{display:block!important;box-sizing:border-box!important;position:static!important;width:180mm!important;height:232.941mm!important;margin:0 auto!important;padding:0!important;border:0!important;overflow:hidden!important;page-break-inside:avoid;page-break-after:always}
 html.resume-print-ready #resume-print-document .resume-print-page:last-child{page-break-after:auto}
 html.resume-print-ready #resume-print-document img{display:block!important;box-sizing:border-box!important;position:static!important;width:180mm!important;height:232.941mm!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;object-fit:contain!important;border:0!important;border-radius:0!important;box-shadow:none!important;transform:none!important}
}

/* A regular fixed resume dialog preserves touch hit testing after AirPrint cancellation. */
#media-dialog.is-resume[open]{position:fixed!important;inset:0!important;margin:auto!important;z-index:10000;transform:none!important}
.resume-backdrop{position:fixed;inset:0;z-index:9999;background:#000d;touch-action:pan-x pan-y}
@media print{html.resume-print-ready .resume-backdrop{display:none!important}}

/* Reveal the showreel only after playback, retaining one stable hero layout. */
.reel-shell:not(.is-video-ready) .showreel-video{opacity:0;visibility:hidden}
.reel-shell.is-video-ready .showreel-video{opacity:1;visibility:visible;transition:opacity .25s ease}

@media(max-width:920px){body.has-mobile-nav-dock>.main-nav{--mobile-nav-safe-bottom:env(safe-area-inset-bottom,0px)}}
