:root { --portfolio-cursor-ready: 1; }

.portfolio-cursor {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 10000;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  color: var(--blue, #5c9dde);
  contain: layout style;
}
.portfolio-cursor.is-visible { opacity: 1; }
.portfolio-cursor-follower,
.portfolio-cursor-shapes { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.portfolio-cursor-ring {
  position: absolute;
  left: -16px;
  top: -16px;
  width: 32px;
  height: 32px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: var(--ink, #0b1017);
}
.portfolio-cursor-play {
  position: absolute;
  left: -12px;
  top: -12px;
  width: 24px;
  height: 24px;
  color: var(--paper, #f1f3f6);
  opacity: 0;
}
.portfolio-cursor-play svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.portfolio-cursor-dot {
  position: absolute;
  left: -2px;
  top: -2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.portfolio-cursor-symbol {
  position: absolute;
  left: -12px;
  top: -12px;
  width: 24px;
  height: 24px;
  text-align: center;
  opacity: 0;
  font: 400 23px/24px var(--name-font, sans-serif);
}
.portfolio-cursor-label {
  position: absolute;
  left: 31px;
  top: -6px;
  width: auto;
  text-align: left;
  color: var(--paper, #f1f3f6);
  text-shadow: 0 1px 4px #000;
  opacity: 0;
  font: 500 10px/12px var(--body-font, sans-serif);
  letter-spacing: .08em;
  white-space: nowrap;
}

/* The reading mark uses fixed geometry; GSAP animates transforms and opacity. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html.has-custom-cursor,
  html.has-custom-cursor * { cursor: none !important; }
  html.has-custom-cursor :is(input, textarea, select, video, audio, iframe, [contenteditable], [data-cursor='native']),
  html.has-custom-cursor dialog[open],
  html.has-custom-cursor dialog[open] * { cursor: auto !important; }
  html.has-custom-cursor .project-visual:hover .visual-play { opacity: 0; }
}
html.user-motion-paused .portfolio-cursor { display: none; }
@media (prefers-reduced-motion: reduce), (pointer: coarse) {
  .portfolio-cursor { display: none; }
}
