/* Light stays behind content and never intercepts a link or a drag. */
.pointer-surface { --surface-x: 0px; --surface-y: 0px; --text-x: 0px; --text-y: 0px; --icon-x: 0px; --icon-y: 0px; --glow-opacity: 0; }
.pointer-text-ink { display: none; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .modern-mode.pointer-effects .pointer-surface { position: relative; isolation: isolate; }
  .modern-mode.pointer-effects .pointer-surface::before {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: -1;
    border-radius: inherit; corner-shape: inherit; pointer-events: none; opacity: calc(var(--glow-opacity) * .4);
    background: radial-gradient(circle 210px at var(--glow-x, 50%) var(--glow-y, 50%), rgba(255, 255, 255, .35), rgba(49, 204, 224, .07) 42%, transparent 75%);
  }
  .modern-mode.pointer-effects .content-panel::before { opacity: calc(var(--glow-opacity) * .28); background: radial-gradient(circle 440px at var(--glow-x, 50%) var(--glow-y, 50%), rgba(255, 255, 255, .25), rgba(35, 195, 222, .04) 45%, transparent 76%); }
  .modern-mode.pointer-effects .site-header h1, .modern-mode.pointer-effects .site-footer > .chrome-text,
  .modern-mode.pointer-effects .article-site-header > a, .modern-mode.pointer-effects .article-footer > .chrome-text,
  .modern-mode.pointer-effects .about-card > p, .modern-mode.pointer-effects .about-card > h3, .modern-mode.pointer-effects .about-times,
  .modern-mode.pointer-effects .card-meta, .modern-mode.pointer-effects .card-content > p, .modern-mode.pointer-effects .card-tags, .modern-mode.pointer-effects .pointer-title,
  .modern-mode.pointer-effects .panel-section-heading h2, .modern-mode.pointer-effects .posts-section > h2, .modern-mode.pointer-effects .column-heading h3 {
    transform: translate3d(var(--text-x), var(--text-y), 0);
  }
  /* A separate ink layer masks the halo per glyph; the readable text stays intact. */
  .pointer-text-source { position: relative; }
  @supports ((mask-image: radial-gradient(#000, transparent)) or (-webkit-mask-image: radial-gradient(#000, transparent))) {
    .modern-mode.pointer-effects .pointer-text-ink {
      display: block; position: absolute; top: -18px; right: -18px; bottom: -18px; left: -18px;
      padding: inherit; pointer-events: none; user-select: none; -webkit-user-select: none;
      opacity: var(--glow-opacity); text-shadow: 0 0 5px rgba(25, 184, 211, .28), 0 0 16px rgba(17, 155, 201, .17);
      -webkit-mask-image: radial-gradient(circle 110px at var(--text-light-x, -1000px) var(--text-light-y, -1000px), #000 0%, rgba(0, 0, 0, .8) 25%, transparent 100%);
      mask-image: radial-gradient(circle 110px at var(--text-light-x, -1000px) var(--text-light-y, -1000px), #000 0%, rgba(0, 0, 0, .8) 25%, transparent 100%);
    }
  }
  .pointer-text-copy { position: absolute; top: 18px; right: 18px; bottom: 18px; left: 18px; padding: inherit; }
  .pointer-text-ink, .pointer-text-ink * { color: transparent !important; -webkit-text-fill-color: transparent; }
  .pointer-text-ink * { text-shadow: inherit !important; pointer-events: none !important; user-select: none !important; -webkit-user-select: none !important; }
  .modern-mode.pointer-effects .about-icon { transform: translate3d(var(--icon-x), var(--icon-y), 0); }
  .pointer-title { display: inline-block; max-width: 100%; }
  /* Independent translation leaves the existing entrance/lift transform intact. */
  @supports (translate: 1px 1px) {
    .modern-mode.pointer-effects .pointer-surface { translate: var(--surface-x) var(--surface-y); }
  }
}

/* WebKit fallback: keep the visual effect when newer unprefixed properties are absent. */
@supports (-webkit-touch-callout: none) {
  html { -webkit-text-size-adjust: 100%; }
  .about-viewport { -webkit-overflow-scrolling: touch; }
  .content-panel, .site-header, .site-footer, .article-site-header, .article-footer { background-clip: padding-box; }
  @supports not (translate: 1px 1px) {
    .modern-mode.pointer-effects .pointer-surface { transform: translate3d(var(--surface-x), var(--surface-y), 0); }
  }
}
