/* JDA Immersive Depth v11
   Opt-in depth cues over Quiet v8, Carousel v9, Geist v10.
   Preserves semantic layout, readable copy, and all interaction targets. */
:root{
  --depth-gold:#e4bb78;
  --depth-blue:#7bdceb;
  --depth-ink:#071521;
  --depth-ease:cubic-bezier(.22,1,.36,1);
}
/* Atmospheric lighting in existing editorial surfaces. No extra panels. */
html.jda-depth-ready .page-head,
html.jda-depth-ready .featured-research,
html.jda-depth-ready .profile-layout{
  background-blend-mode:screen,normal;
}
/* The architecture: a layered penumbra, a narrow edge highlight, and dark inset shading. */
html.jda-depth-ready .hero-portrait,
html.jda-depth-ready .profile-picture,
html.jda-depth-ready .studio-full img{
  box-shadow:0 16px 48px #01070c7a,0 4px 12px #02091270,0 0 0 1px #84d6e61e;
}
html.jda-depth-ready .writing-panel,
html.jda-depth-ready .case-step,
html.jda-depth-ready .contact-feature,
html.jda-depth-ready .desk-card,
html.jda-depth-ready .editorial-action,
html.jda-depth-ready .jda-quiet-subroutes a{
  box-shadow:0 19px 48px #02091167,0 5px 11px #020b1270,inset 0 1px 0 #c6e9ef12,inset 0 -1px 0 #03080da6;
  transition:box-shadow .5s var(--depth-ease),border-color .35s ease,transform .5s var(--depth-ease);
}
@media(hover:hover) and (pointer:fine){
  html.jda-depth-ready .writing-panel:hover,
  html.jda-depth-ready .desk-card:hover,
  html.jda-depth-ready .jda-quiet-subroutes a:hover{
    transform:translateY(-4px);
    box-shadow:0 28px 64px #020911a3,0 8px 18px #020b1280,inset 0 1px 0 #cbf2fa22,0 0 26px #62ccdf1a;
  }
}
/* A quiet portrait parallax creates a foreground/background separation on desktop.
   The existing image, cropping and text hierarchy remain unchanged. */
@media(hover:hover) and (pointer:fine){
  html.jda-depth-ready body.is-home .hero-portrait{
    transform:perspective(1500px) rotateY(var(--jda-hero-ry,0deg)) translate3d(var(--jda-hero-x,0px),var(--jda-hero-y,0px),0) scale(1.012);
    transition:transform .7s var(--depth-ease);
  }
}
html.jda-depth-ready .jda-depth-enter-source{
  border-color:#b4eaf1!important;
  box-shadow:0 25px 75px #000e,0 0 40px #8ae1ef49,inset 0 1px 0 #ffffff38!important;
}
/* The portfolio is the centerpiece. Its 3D cues follow actual carousel position,
   while touch scrolling and links remain native. */
html.jda-depth-ready #catalog-grid.jda-carousel-track{
  position:relative;
  padding-block:24px 41px;
  perspective:1250px;
  perspective-origin:50% 48%;
  transform-style:preserve-3d;
  isolation:isolate;
}
html.jda-depth-ready #catalog-grid.jda-carousel-track>.project-card:not([hidden]){
  position:relative;
  --jda-depth-rot:0deg;
  --jda-depth-scale:1;
  --jda-depth-rise:0px;
  --jda-pointer-x:0deg;
  --jda-pointer-y:0deg;
  --jda-glow-x:50%;
  --jda-glow-y:28%;
  border:1px solid #64869a;
  border-radius:14px;
  backface-visibility:hidden;
  transform-origin:50% 52%;
  transform:translate3d(0,var(--jda-depth-rise),0) scale(var(--jda-depth-scale)) rotateY(calc(var(--jda-depth-rot) + var(--jda-pointer-x))) rotateX(var(--jda-pointer-y));
  box-shadow:0 16px 34px #0009,0 5px 12px #0007,inset 0 1px 0 #ffffff24,0 0 0 1px #7cd6e413;
  filter:saturate(.94);
  transition:transform .5s var(--depth-ease),box-shadow .5s var(--depth-ease),border-color .4s ease,filter .5s ease;
  will-change:transform;
}
html.jda-depth-ready #catalog-grid.jda-carousel-track>.project-card:not([hidden])::after{
  content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:radial-gradient(300px 250px at var(--jda-glow-x) var(--jda-glow-y),#c7f5ff1a,transparent 75%),linear-gradient(145deg,#e5faff0c 0%,transparent 38%,#00000022 100%);
  opacity:.7;transition:opacity .45s ease;
}
html.jda-depth-ready #catalog-grid.jda-carousel-track>.project-card:not([hidden]).jda-depth-active,
html.jda-depth-ready #catalog-grid.jda-carousel-track>.project-card:not([hidden]):focus-visible{
  z-index:2;border-color:#9bdee4;
  box-shadow:0 30px 76px #000c,0 11px 26px #000a,0 0 30px #63ccdd24,inset 0 1px 0 #fcffff30;
  filter:saturate(1.07);
}
html.jda-depth-ready #catalog-grid.jda-carousel-track>.project-card:not([hidden]):hover{
  border-color:#c1e8ee;
  transform:translate3d(0,calc(var(--jda-depth-rise) - 5px),0) scale(calc(var(--jda-depth-scale) + .012)) rotateY(calc(var(--jda-depth-rot) + var(--jda-pointer-x))) rotateX(var(--jda-pointer-y));
  box-shadow:0 32px 75px #000c,0 10px 22px #000a,0 0 34px #71dced33,inset 0 1px 0 #ffffff33;
}
html.jda-depth-ready #catalog-grid.jda-carousel-track>.project-card:not([hidden]):focus-visible{
  outline:3px solid #a7eff4;outline-offset:3px;
}
html.jda-depth-ready #catalog-grid.jda-carousel-track>.project-card:not([hidden]) .project-mid h3{
  text-shadow:0 2px 14px #000c,0 0 24px #8ce7ef12;
}
/* Directional headlines, but never shaded paragraphs or form text. */
html.jda-depth-ready .hero h1,
html.jda-depth-ready .page-head h1,
html.jda-depth-ready .jda-quiet-head h2{
  text-shadow:0 3px 0 #020a11c7,0 12px 34px #0007,0 0 55px #66d4e510;
}
/* Buttons are a nearer layer, with short, honest response feedback. */
html.jda-depth-ready .btn,
html.jda-depth-ready .filter,
html.jda-depth-ready .jda-carousel-button,
html.jda-depth-ready .jda-quiet-menu,
html.jda-depth-ready .resource-link,
html.jda-depth-ready .copy-address{
  box-shadow:0 7px 17px #0008,0 2px 4px #0008,inset 0 1px 0 #fff3;
  transform:translateY(0);
  transition:transform .22s var(--depth-ease),box-shadow .26s ease,background-color .24s ease,border-color .24s ease;
}
html.jda-depth-ready .filter.active{
  box-shadow:0 9px 21px #0009,0 0 0 1px #8cdcec33,inset 0 1px 0 #f9ffff2e;
}
@media(hover:hover) and (pointer:fine){
  html.jda-depth-ready .btn:hover,
  html.jda-depth-ready .filter:hover:not(:disabled),
  html.jda-depth-ready .jda-carousel-button:hover:not(:disabled),
  html.jda-depth-ready .jda-quiet-menu:hover,
  html.jda-depth-ready .resource-link:hover,
  html.jda-depth-ready .copy-address:hover{
    transform:translateY(-3px);
    box-shadow:0 13px 27px #000a,0 3px 8px #0008,0 0 23px #69cfda20,inset 0 1px 0 #fff4;
  }
}
html.jda-depth-ready .btn:active,
html.jda-depth-ready .filter:active,
html.jda-depth-ready .jda-carousel-button:active:not(:disabled),
html.jda-depth-ready .jda-quiet-menu:active,
html.jda-depth-ready .resource-link:active{
  transform:translateY(1px) scale(.992);
  box-shadow:0 2px 5px #000a,inset 0 2px 5px #0008;
}
html.jda-depth-ready :is(.btn,.filter,.jda-carousel-button,.jda-quiet-menu,.resource-link):focus-visible{
  outline:3px solid #a3ebf2;outline-offset:3px;
}
/* The existing page dissolve gains a slight sense of moving between planes.
   V9 continues to own navigation and link interception. */
html.jda-depth-ready body.is-home,
html.jda-depth-ready body.is-subpage{
  animation:jda-depth-arrive .7s var(--depth-ease) both;
  transform-origin:50% 35%;
}
@keyframes jda-depth-arrive{
  from{opacity:.15;filter:blur(5px) brightness(.85);transform:scale(.985) translateY(8px)}
  to{opacity:1;filter:blur(0) brightness(1);transform:scale(1) translateY(0)}
}
html.jda-depth-ready.jda-v9-leaving body{
  filter:blur(3px) brightness(.89);
  transform:scale(.985) translateY(-6px);
  transition:filter .55s ease,transform .55s ease;
}
html.jda-depth-ready.jda-v9-leaving body::after{
  background:radial-gradient(ellipse at 50% 43%,#123044,#06121e 75%);
}
/* Only apply hover tilt to desktop pointer devices; responsive performance matters. */
@media(max-width:740px){
  html.jda-depth-ready #catalog-grid.jda-carousel-track{perspective:900px;padding-block:18px 31px}
  html.jda-depth-ready #catalog-grid.jda-carousel-track>.project-card:not([hidden]){
    --jda-pointer-x:0deg!important;--jda-pointer-y:0deg!important;
    min-height:355px;
  }
  html.jda-depth-ready .writing-panel,
  html.jda-depth-ready .desk-card,
  html.jda-depth-ready .contact-feature{box-shadow:0 13px 26px #0008,0 3px 8px #0007,inset 0 1px 0 #fff2}
}
@media(prefers-reduced-motion:reduce){
  html.jda-depth-ready body.is-home,html.jda-depth-ready body.is-subpage{animation:none!important;transform:none!important;filter:none!important}
  html.jda-depth-ready.jda-v9-leaving body{transition:none!important;transform:none!important;filter:none!important}
  html.jda-depth-ready #catalog-grid.jda-carousel-track>.project-card:not([hidden]),
  html.jda-depth-ready #catalog-grid.jda-carousel-track>.project-card:not([hidden]):hover,
  html.jda-depth-ready .btn,html.jda-depth-ready .filter,html.jda-depth-ready .jda-carousel-button,
  html.jda-depth-ready .jda-quiet-menu,html.jda-depth-ready .resource-link,
  html.jda-depth-ready .writing-panel,html.jda-depth-ready .desk-card,
  html.jda-depth-ready .jda-quiet-subroutes a,
  html.jda-depth-ready body.is-home .hero-portrait{
    transform:none!important;transition:none!important;animation:none!important;filter:none!important;
  }
}
