/* The education graphical abstract's motion. Loaded only by a ::figure layers="true"
   showing one of the SVGs claimed here, and scoped to it, so nothing here reaches
   another figure. Try new ideas in education-lab.css first.
   @svg img/education/graphical-abstract.svg
   @svg images/abstracts/education.svg */
@media (prefers-reduced-motion: no-preference) {
  /* the education cycle's arrows come in one after another */
  [data-abstract="education"] [id^="ga-arc-"] { animation: ga-in .6s ease-out both; }
  [data-abstract="education"] #ga-arc-2 { animation-delay: .4s; }
  [data-abstract="education"] #ga-arc-3 { animation-delay: .8s; }
}
@keyframes ga-in { from { opacity: 0; } to { opacity: 1; } }

/* Hover: education.js lifts each pill and circle into its own layer (.ga-layer).
   A pill slides sideways out of its circle ("this one"), a circle lifts.
   One property each, so they never fight: slide = transform, lift = scale. */
[data-abstract="education"] { position: relative; }
[data-abstract="education"] > svg { overflow: visible; }   /* a lifted or slid part may pass the edge */
[data-abstract="education"] > .ga-layer {
  position: absolute; inset: 0; height: 100%;
  pointer-events: none;            /* the layer is figure-sized: only its drawing is a target */
  transition: transform var(--dur-base) var(--ease-out), scale var(--dur-base) var(--ease-out),
              filter var(--dur-base) var(--ease-out);
}
[data-abstract="education"] > .ga-layer > * { pointer-events: visiblePainted; }
[data-abstract="education"] > .ga-layer a { cursor: pointer; }
/* a shadow at rest too, just invisible: switching the filter on and off changes
   how the layer is drawn, and it lands a hair off when the hover ends */
[data-abstract="education"] > .ga-layer.is-node { filter: drop-shadow(0 0 0 rgb(0 0 0 / 0)); }
/* only where there is a real hover: on a phone it would stick after a tap */
@media (hover: hover) {
  [data-abstract="education"] > .ga-layer.is-pill:hover { transform: translateX(var(--slide)); }
  [data-abstract="education"] > .ga-layer.is-node:hover {
    scale: var(--lift-lg);
    filter: drop-shadow(0 6px 10px rgb(0 0 0 / .22));
  }
}
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"]) [data-abstract="education"] > .ga-layer { transition: none; }
}
:root[data-motion="reduced"] [data-abstract="education"] > .ga-layer { transition: none; }
