/* Polish pass (Dec 3). Linked last so it wins. Small fixes only. */

/* Pantheon: the Alexandr Wang line is body text now, so it uses the body font.
   Instrument Serif stays for titles and headings only. */
#pantheon .pa-what + .pa-lead {
  font-family: var(--sans);
  font-size: clamp(15.5px, 1.15vw, 17px);
  line-height: 1.55;
  max-width: 46ch;
  color: var(--ink-2);
}

/* No lonely last words: lines in paragraphs, bullets and labels rebalance so a
   single word doesn't hang on its own line. */
main p, main li, main figcaption, main dd, footer p { text-wrap: pretty; }
main h3 { text-wrap: balance; }

/* About verb, called out: a garnet line under it fills while it waits, then starts again with the next verb */
#about .t-verb > span, #about .t-verb:hover > span, #about .t-verb:focus-visible > span { text-decoration: none; }
#about .t-verb::after {
  content: ""; position: absolute; left: 0.06em; right: 0.09em; bottom: 0.04em;
  height: max(3px, 0.04em); border-radius: 3px; background: var(--acc);
  transform: scaleX(0); transform-origin: left center; pointer-events: none;
}
#about .t-verb.vfill::after { animation: vfill 2.6s linear forwards; }
#about .t-verb.vfill.vpause::after { animation-play-state: paused; }
#about .t-verb.vrest::after { transform: scaleX(1); opacity: 0.3; transition: opacity 0.5s ease; }
#about .t-verb:hover.vrest::after, #about .t-verb:focus-visible.vrest::after { opacity: 0.7; }
@keyframes vfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Planet names on hover: one clear label on a soft dark pill, above everything (doorway) */
#after-hours .mini-pl .mini-name { display: none; }
#after-hours .mini-tag {
  position: absolute; left: 0; top: 0; z-index: 20; pointer-events: none; white-space: nowrap;
  translate: -50% 4px; opacity: 0; transition: opacity 0.25s ease, translate 0.35s var(--e-out, ease-out);
  padding: 0.28em 0.8em 0.36em; border-radius: 999px;
  background: rgba(255, 246, 228, 0.94);
  box-shadow: 0 0 22px rgba(255, 246, 228, 0.28), 0 8px 22px -10px rgba(0, 0, 0, 0.8);
  font: italic 400 clamp(18px, 1.5vw, 22px)/1 var(--serif); color: #1A1816; letter-spacing: 0.01em;
}
#after-hours .mini-tag.on { opacity: 1; translate: -50% 0; }

/* Footer: small icons before LinkedIn, Instagram and YouTube, in the link's own color */
.ft-links a { display: inline-flex; align-items: center; gap: 9px; --soc-bg: #0C0B0A; }
.ft-links .soc-ico { width: 17px; height: 17px; flex: none; opacity: 0.9; transition: opacity 0.2s ease, translate 0.25s var(--e-out, ease-out); }
@media (hover: hover) { .ft-links a:hover .soc-ico { opacity: 1; translate: 0 -1px; } }

/* ---------- Where you are, clearer (Dec 3, her note: "should be clearer where i am on the top bar when i'm in particular
   sections") ----------
   The current section's link sits on a soft garnet pill, in garnet, and the pill slides to the next link as you scroll
   (features/polish.js places .nav-ind). In the phone and tablet menu the current one is garnet with a small dot. */
@media (min-width: 1241px) {
  .nav ul { position: relative; }
  @media (min-width: 1300px) { .nav ul { position: absolute; } }
  .nav ul li { position: relative; z-index: 1; }
  .nav ul a[aria-current="true"], [data-theme="dark"] .nav ul a[aria-current="true"] { color: var(--acc); font-weight: 650; }
  .nav-ind { position: absolute; z-index: 0; top: 50%; left: 0; width: 0; height: 34px; translate: 0 -50%; border-radius: 999px; pointer-events: none;
    background: color-mix(in srgb, var(--acc) 11%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 14%, transparent);
    opacity: 0; transition: left 0.5s var(--e-out, ease), width 0.5s var(--e-out, ease), opacity 0.3s ease; }
  .nav-ind.on { opacity: 1; }
  [data-theme="dark"] .nav-ind { background: color-mix(in srgb, var(--acc) 18%, transparent); }
}
@media (max-width: 1240px) {
  .nav-ind { display: none; }
  .nav ul a[aria-current="true"] { color: var(--acc); }
  .nav ul a[aria-current="true"]::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 10px; vertical-align: 0.2em; border-radius: 50%; background: var(--acc); }
}
@media (prefers-reduced-motion: reduce) { .nav-ind { transition: opacity 0.2s ease; } }

/* Dec 3, her note: "the underline under the verbs rn sometimes overlaps with the bottom of letters like the p in perform
   or g in engage". The verb's box reaches further down, and the line sits under the descenders, not through them. */
html #about .t-verb { padding-bottom: 0.36em; margin-bottom: -0.2em; }
html #about .t-verb::after { bottom: 0.03em; }

/* Dec 3, her OK: the verb's line started as a tiny red dash under the "I". It now stays hidden for the first part of the
   fill (while the new verb settles in) and fades in once it's long enough to read as a line. Same 2.6 s clock. */
@keyframes vfill {
  0% { transform: scaleX(0); opacity: 0; }
  12% { transform: scaleX(0.12); opacity: 0; }
  22% { transform: scaleX(0.22); opacity: 1; }
  100% { transform: scaleX(1); opacity: 1; }
}

/* Dec 3, her note: "the verb thing looks so weird". The verb sat a little higher than the "I" (its box was lined up by its
   bottom edge, which the room for the line pushed down), and the line floated far under the word like a divider. Now the
   verb sits on the same baseline as the "I", and the line runs just under the tails of p and g. */
html #about .t-verb { vertical-align: baseline; }
html #about .t-verb::after { bottom: 0.2em; height: max(2px, 0.03em); }

/* Dec 3, her note: "the line animation for the verbs needs to be better". Before: one line that filled at a flat speed,
   started as a stray dash, and snapped back to nothing when the verb changed. Now a faint track always sits under the
   verb (so the fill reads as progress, never as a dash), the garnet fill eases across it, and when it's full it sweeps
   off to the right as the next verb comes in, then the next fill starts from the left. Clip-path, so the line keeps
   its rounded ends and stretches with the verb's box as it glides between widths. Same 2.6 s clock. */
html #about .t-verb::before {
  content: ""; position: absolute; left: 0.06em; right: 0.09em; bottom: 0.2em; height: max(2px, 0.03em);
  border-radius: 3px; background: var(--acc); opacity: 0.16; pointer-events: none;
}
html #about .t-verb::after { transform: none; opacity: 1; clip-path: inset(0 100% 0 0); transition: none; }
html #about .t-verb.vfill::after { animation: vgrow 2.6s cubic-bezier(.45, .05, .35, 1) forwards; }
html #about .t-verb.vout::after { animation: vsweep 0.5s cubic-bezier(.6, 0, .25, 1) forwards; }
html #about .t-verb.vrest::after { clip-path: inset(0 0 0 0); opacity: 0.45; transition: opacity 0.5s ease; }
html #about .t-verb:hover.vrest::after, html #about .t-verb:focus-visible.vrest::after { opacity: 0.8; }
@keyframes vgrow { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes vsweep { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 0 100%); } }

/* Dec 3, her note: "when i hover it should start playing the progress bar ... it doesn't just break it". Pointing keeps
   the line running and makes it read as a progress bar: the track and the fill grow a little thicker and the track
   darker. A click sweeps away whatever had filled (from where it was, via --vr) and a fresh line starts. */
html #about .t-verb::before, html #about .t-verb::after { transition: height 0.3s ease, opacity 0.3s ease, bottom 0.3s ease; }
@media (hover: hover) {
  html #about .t-verb:hover::before { opacity: 0.26; height: max(3px, 0.045em); bottom: 0.19em; }
  html #about .t-verb:hover::after { height: max(3px, 0.045em); bottom: 0.19em; }
}
html #about .t-verb.vout::after { animation: vsweep 0.42s cubic-bezier(.6, 0, .25, 1) forwards; }
html #about .t-verb.vpause::after { animation-play-state: paused; }
@keyframes vsweep { from { clip-path: inset(0 var(--vr, 0%) 0 0); } to { clip-path: inset(0 0 0 100%); } }
