/* One continuous page transition, shared by the home and case-study documents.
   Push-up (after pabloux.design's portfolio → case-study transition): the outgoing page rises
   off the top of the viewport while the incoming page rises from the bottom to take its place. */
@view-transition{navigation:auto}
::view-transition{pointer-events:none;background:#f2f2f2}
::view-transition-group(root){animation-duration:700ms}
::view-transition-image-pair(root){isolation:isolate}
::view-transition-old(root){animation:push-up 680ms cubic-bezier(.65,0,.35,1) both}
::view-transition-new(root){animation:slide-up 680ms cubic-bezier(.65,0,.35,1) both}
@keyframes push-up{
  from{transform:translateY(0)}
  to{transform:translateY(-100%)}
}
@keyframes slide-up{
  from{transform:translateY(100%)}
  to{transform:translateY(0)}
}
/* Mobile navigation is captured separately from the sliding page so it stays still. */
@media(max-width:650px){
  ::view-transition-group(site-logo),
  ::view-transition-group(site-work),
  ::view-transition-group(site-about),
  ::view-transition-old(site-logo),
  ::view-transition-old(site-work),
  ::view-transition-old(site-about),
  ::view-transition-new(site-logo),
  ::view-transition-new(site-work),
  ::view-transition-new(site-about){animation:none}
}
/* Browsers without document transitions use the same motion around navigation. */
html.page-leaving{pointer-events:none}
html.page-leaving body{animation:push-up 480ms cubic-bezier(.65,0,.35,1) both}
html.page-entering body{animation:slide-up 680ms cubic-bezier(.65,0,.35,1) both}
@media(max-width:650px){
  html.page-leaving body,html.page-entering body{animation:none}
}
@media(prefers-reduced-motion:reduce){
  @view-transition{navigation:none}
  ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}
  html.page-leaving body,html.page-entering body{animation:none!important}
}
