/* Site addition (not part of stock duckquill): accent-color text-shadow
   glow on top-level headings, reusing the same --text-shadow-glow custom
   property duckquill already defines and uses for its :target anchor-jump
   flash (sass/_general.scss) -- so the glow uses the site's normal accent
   color (config.extra.accent_color in zola.toml, same as every other page),
   rather than a page-specific override. Shown on hover only, not
   always-on -- a permanent glow on every heading (an earlier version of
   this) turned out to be too much visual noise across a whole page of
   content. */
h1,
article h2 {
  transition: text-shadow var(--transition);
}

h1:hover,
article h2:hover {
  text-shadow: var(--text-shadow-glow);
}

/* Exception: post titles in a blog listing (e.g. /blog/) glow by default
   rather than only on hover -- see partials/articles.html, #article-list
   h3 is each post's title there. They're the entry points into each post
   in a scannable list, so drawing the eye to all of them works
   differently than a single page's own top-level heading. Deliberately
   NOT reusing duckquill's --text-shadow-glow here (that's the hover
   version above) -- at full strength (which includes a full-opacity solid
   layer, not just a soft blur) on every item in a list it was too much.
   A single 0.2rem alpha-only layer turned out to be too little in the
   other direction -- barely visible. This splits the difference: two
   alpha-only layers (no solid layer) at a wider spread than the
   single-layer version, for a softer but clearly visible glow. */
#article-list h3 {
  text-shadow:
    var(--accent-color-alpha) 0 0 0.2rem,
    var(--accent-color-alpha) 0 0 0.5rem;
}

/* Note: the homepage's CRT banner (content/_index.md, styling below) no
   longer needs its own --accent-color override on .crt -- it used to be
   scoped separately to a warm amber while the rest of the site stayed on
   duckquill's default blue-gray, but the whole site's accent_color
   (zola.toml) is now that same amber, so the CRT box just inherits it.
   duckquill's own .crt background (sass/_crt.scss) always mixes the
   accent color toward black regardless of light/dark theme, so it reads
   as a contained "monitor" tint either way. */

/* FINAL pick (2026-09-13) of 5 candidates tried for replacing the old
   jail-shutter animation on the homepage's CRT banner
   (content/_index.md) -- see git history for the removed jail-shutter
   version and the leaves/book/motes/pond-duck candidates that were built
   and visually compared before settling here. This is the scrolling
   "thoughts" ticker candidate. Started at 6 phrases, expanded to 12,
   then to 18 (2026-09-13, broadening beyond tasks/tech notes to
   life/society musings per request) -- order is reshuffled client-side
   on each page load (inline <script> in content/_index.md) for more
   visual variety than a fixed sequence.
   .thoughts-window is a fixed-height, overflow-hidden "window" with its
   content (.thoughts-scroll) animated past it via a slow constant
   upward drift.
   Seamless-loop technique: content/_index.md repeats the same phrase
   list twice in a row (and the shuffle script re-shuffles both copies
   identically -- see its comment); animating exactly -50% translateY
   moves through the first copy and lands precisely on the start of the
   second, which is pixel-identical to the start of the first, so the
   loop point is invisible. (If the phrase list or its length is ever
   edited, both copies must stay identical and the -50% must still land
   exactly on a copy boundary, or the loop will visibly jump.) */
.thoughts-window {
  overflow: hidden;
  height: 13.2rem;
  display: flex;
  align-items: flex-start;
  /* Soft top/bottom fade so lines don't hard-cut in and out of view --
     reads calmer than a sharp clip, especially at this slow a scroll. */
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    black 2rem,
    black calc(100% - 2rem),
    transparent 100%
  );
}

.thoughts-scroll {
  width: 100%;
  /* Linear, not ease-in-out -- constant velocity is what makes this read
     as a calm drift rather than a mechanical beat. ~2.2s/line at the
     current 18-phrase count (nudged faster than the original ~3.3s/line
     pace per request) -- if the list length changes again, scale this
     proportionally to keep the same per-line pace rather than leaving
     the old timing. */
  animation: thoughts-scroll 40s linear infinite;
}

.thoughts-scroll p {
  margin: 0;
  padding: 0.85rem 1.5rem;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 1.15rem;
  color: var(--accent-color);
  text-shadow:
    var(--accent-color-alpha) 0 0 0.2rem,
    var(--accent-color) 0 0 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes thoughts-scroll {
  from {
    transform: translateY(0);
  }

  to {
    /* Exactly half -- see the seamless-loop note above. */
    transform: translateY(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .thoughts-scroll {
    animation: none;
  }
}
