/* 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}
}

/* Resume link: a compact glass action that matches the site controls. */
.profile-copy .text-link{
  appearance:none;
  font-family:inherit;
  cursor:pointer;
  position:relative;
  width:max-content;
  min-height:46px;
  margin-top:1.2rem;
  padding:.42rem 1rem;
  gap:.72rem;
  border:1px solid #ffffff1c;
  border-radius:999px;
  background:linear-gradient(145deg,rgba(0,0,0,.12),rgba(0,0,0,.15) 46%,rgba(0,0,0,.12));
  box-shadow:inset 0 1px 0 #ffffff0a,0 12px 30px rgba(0,0,0,.24);
  -webkit-backdrop-filter:blur(14px) saturate(1.04) brightness(.55);
  backdrop-filter:blur(14px) saturate(1.04) brightness(.55);
  color:#a9e3fa;
  font-weight:620;
  line-height:1;
  text-decoration:none;
  transition:transform .25s ease,border-color .25s ease,background .25s ease,box-shadow .25s ease,color .25s ease;
}
.profile-copy .text-link::after{
  content:'';
  width:.86rem;
  height:1.08rem;
  border:1.4px solid currentColor;
  border-radius:2px;
  background:linear-gradient(currentColor,currentColor) 50% 42%/50% 1px no-repeat,linear-gradient(currentColor,currentColor) 50% 67%/50% 1px no-repeat;
  box-shadow:inset -.19rem .19rem 0 -0.12rem rgba(169,227,250,.7);
  color:#d7f4ff;
  transition:transform .25s ease,border-color .25s ease;
}
@media(hover:hover){
  .profile-copy .text-link:hover{transform:translateY(-2px);border-color:#88d5f55c;background:linear-gradient(145deg,rgba(0,0,0,.14),rgba(0,0,0,.17) 46%,rgba(0,0,0,.14));box-shadow:inset 0 1px 0 #ffffff12,0 16px 34px rgba(30,166,217,.16);color:#e3f8ff}
  .profile-copy .text-link:hover::after{transform:translateY(-1px);border-color:#e3f8ff}
}
@media(max-width:520px){.profile-copy .text-link{min-height:44px;margin-top:1rem;padding-inline:.9rem;gap:.62rem}.profile-copy .text-link::after{width:.8rem;height:1rem}}

/* One 50%-transparent black glass shell for video, photo, and resume. */
#media-dialog{
  background:rgba(0,0,0,.5);
  -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%;}
}
