@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .cursor-layer { display: none; }

  body,
  button,
  html[data-motion][data-cursor-ready] :is(body, a, button, video) {
    cursor: var(--portfolio-cursor, url("marks/cursor-dot.svg") 16 16, auto);
  }

  :is(a[href], button:enabled, summary, [role="button"]):not([aria-disabled="true"]) {
    --portfolio-cursor: url("marks/cursor-action.svg") 16 16, pointer;
    cursor: var(--portfolio-cursor);
  }

  video[controls] { --portfolio-cursor: auto; }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html[data-soft-cursor] :is(a[href], button:enabled, summary, [role="button"]):not([aria-disabled="true"]) {
    --portfolio-cursor: url("marks/cursor-dot.svg") 16 16, pointer;
  }

  .cursor-feedback {
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    pointer-events: none;
    transform: translate(calc(var(--cursor-x) - 50%), calc(var(--cursor-y) - 50%));
  }

  .cursor-trail-dot {
    position: fixed;
    z-index: 9998;
    top: -2px;
    left: -2px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #d1fe17;
    opacity: 0;
    pointer-events: none;
  }

  .cursor-feedback::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid #d1fe17cc;
    border-radius: 50%;
    background: #d1fe1714;
    box-shadow: 0 0 0 1px #141706aa;
    opacity: 0;
    transform: scale(.55);
    transition: opacity .16s ease, transform .22s cubic-bezier(.2,.75,.3,1);
  }

  .cursor-feedback.is-active::after {
    opacity: 1;
    transform: scale(1);
  }
}

@media (hover: hover) and (pointer: fine) {
  #agent, #agent * { cursor: default; }
  #agent :is(input, textarea, [contenteditable="true"]) { cursor: text; }
}
