/* Navigation aids: hover/focus tags, first-visit hint, corner menu. Only transform + opacity animate. */
#nv {
  position: fixed; right: 14px; top: 12px; z-index: 40; display: flex; gap: 2px; padding: 4px; border-radius: 99px;
  background: var(--paper2); color: var(--ink); font: 500 11px/1 var(--mono); letter-spacing: .02em;
  box-shadow: 0 1px 0 rgba(255,255,255,.55) inset, 0 0 0 1px var(--hair), 0 6px 14px -6px rgba(70,50,120,.28), 0 14px 30px -14px rgba(var(--shadow-c), .4);
}
html.dark #nv { box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 0 0 1px var(--hair), 0 6px 14px -6px rgba(0,0,0,.6), 0 14px 30px -14px rgba(0,0,0,.7); }
#nv button {
  border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; cursor: pointer; padding: 8px 11px; border-radius: 99px;
  transition: transform .35s var(--spring), opacity .2s var(--out);
}
#nv button:hover { transform: translateY(-1px); background: var(--hair); }
#nv button:active { transform: scale(.94); }
#nv button:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 1px; }
#nv .nv-t { padding: 8px 10px; }
#nv .nv-t i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); vertical-align: -1px; }
html.dark #nv .nv-t i { transform: rotate(180deg); }

#nt {
  position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; opacity: 0; padding: 6px 9px; border-radius: 7px; white-space: nowrap;
  background: var(--pill-bg); color: var(--pill-fg); font: 500 11px/1 var(--mono); letter-spacing: .02em;
  box-shadow: 0 4px 10px -3px rgba(70,50,120,.35), 0 10px 22px -8px rgba(var(--shadow-c), .45); transition: opacity .18s var(--out);
}
#nt.on { opacity: 1; }

#nh {
  position: fixed; left: 50%; bottom: 26px; z-index: 39; margin: 0; padding: 10px 16px; border-radius: 99px; pointer-events: none;
  background: var(--paper2); color: var(--ink); font: 500 11.5px/1 var(--mono); letter-spacing: .02em; white-space: nowrap;
  box-shadow: 0 0 0 1px var(--hair), 0 6px 14px -6px rgba(70,50,120,.28), 0 14px 30px -14px rgba(var(--shadow-c), .4);
  transform: translate(-50%, 0); opacity: 0; transition: opacity .6s var(--out), transform .6s var(--out);
}
#nh.on { opacity: 1; }
#nh.gone { opacity: 0; transform: translate(-50%, 8px); }
@media (max-width: 760px) {
  #nv { right: 8px; top: 8px; } #nv button { padding: 8px 8px; font-size: 10.5px; } #nh { bottom: 76px; }
}
@media (prefers-reduced-motion: reduce) { #nv button, #nt, #nh { transition: none !important; } }
/* the new tag (#nt) replaces the per-object ::after tags */
.obj[data-t]::after { display: none !important; }

/* ---------- chrome in the project-page system: Inter 300/400/500, 10px / .12em uppercase labels, hairline rules, accent #8C7B68. Overrides the rules above. Only transform + opacity animate. */
#nv, #nh, #hint, #nt, #all-btn, #idx-link, #tidy, .cap-meta, .cap-link, .cap-close, .all-x, #all a i {
  font-family: var(--ps-font); font-size: 10px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; }

/* top left: the project pages' home icon on a backing disc, so it holds over busy art in light and dark */
#home { left: 40px; top: 14px; width: 30px; height: 30px; padding: 0; display: flex; align-items: center; justify-content: center; border: 1px solid var(--ps-rule); border-radius: 50%;
  background: var(--ps-nav); color: var(--ps-tp); box-shadow: 0 1px 0 rgba(17,17,17,.04), 0 4px 12px -6px rgba(0,0,0,.3); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: border-color .2s, background-color .2s, transform .35s var(--spring); }
#home { font-family: var(--ps-font); }
#home svg { width: 12px; height: 12px; display: block; }
#home:hover { border-color: var(--ps-accent); background: var(--ps-elev); }
#home:active { transform: scale(.94); }
#home:focus-visible { outline: 1.5px solid var(--ps-accent); outline-offset: 2px; }

/* top right: pill of nav links */
#nv { right: 40px; top: 14px; gap: 4px; padding: 0 6px; height: 30px; align-items: center; border-radius: 99px; background: var(--ps-nav); color: var(--ps-ts); border: 1px solid var(--ps-rule); box-shadow: none; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
#nv button { padding: 0 11px; height: 100%; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--ps-ts); transition: color .2s, transform .3s var(--spring); }
#nv button:hover { transform: none; background: none; color: var(--ps-tp); }
#nv button:active { transform: scale(.96); }
#nv button:focus-visible { outline: 1.5px solid var(--ps-accent); outline-offset: -2px; border-radius: 99px; }
#nv .nv-t { padding: 0 9px; }
#nv .nv-t i { width: 10px; height: 10px; border-color: currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
html.dark #nv { box-shadow: none; }
body:has(#tv.on) #nv { opacity: 0; pointer-events: none; }
#nt { padding: 8px 12px; border-radius: 99px; background: var(--ps-nav); color: var(--ps-tp); border: 1px solid var(--ps-rule); box-shadow: var(--ps-shadow); backdrop-filter: blur(12px); }
#nh, #hint, #tidy { padding: 10px 14px; border-radius: 99px; background: var(--ps-nav); color: var(--ps-ts); border: 1px solid var(--ps-rule); box-shadow: none; backdrop-filter: blur(12px); }
#hint span { opacity: 1; }
#tidy { cursor: pointer; transition: transform .3s var(--spring), border-color .2s, color .2s; }
#tidy:hover { transform: translateY(-1px); border-color: var(--ps-accent); color: var(--ps-tp); } #tidy:active { transform: scale(.96); }
#tidy:focus-visible { outline: 1.5px solid var(--ps-accent); outline-offset: 2px; }
/* the top nav's Index button replaces the corner "index" link and the "All work" button */
#idx-link, #all-btn { display: none !important; }
@media (max-width: 760px) { #home { left: 14px; } #nv { right: 14px; } #nv button { padding: 0 7px; letter-spacing: .08em; font-size: 9px; } }

/* the All work list */
#all { padding: 14px 20px 16px; border-radius: 4px; background-color: var(--ps-bg); color: var(--ps-tp); border: 1px solid var(--ps-rule); box-shadow: var(--ps-shadow); }
#all a { border-top: 1px solid var(--ps-rule); padding: 10px 0; font: 300 16px/1.25 var(--ps-font); letter-spacing: -.01em; }
#all a i { color: var(--ps-ts); opacity: 1; }
#all a:focus-visible { outline: 1.5px solid var(--ps-accent); }
.all-x { color: var(--ps-ts); opacity: 1; padding: 8px 0; }
.all-x:hover { color: var(--ps-tp); }

/* project details card */
#cap { width: 340px; padding: 22px 24px 20px; border: 1px solid var(--ps-rule); border-radius: 4px; background: var(--ps-bg); color: var(--ps-tp); background-image: none; box-shadow: var(--ps-shadow); }
.cap-meta { height: auto; margin: 0 0 14px; display: block; padding: 0; color: var(--ps-accent-ink); opacity: 1; line-height: 1.5; }
.cap-title { margin: 0 0 14px; font: 300 32px/.98 var(--ps-font); letter-spacing: -.035em; color: var(--ps-tp); }
.cap-short { margin: 0 0 22px; padding-top: 14px; border-top: 1px solid var(--ps-rule); font: 300 13px/1.7 var(--ps-font); color: var(--ps-ts); letter-spacing: 0; }
.cap-row { gap: 14px; }
.cap-link, .cap-close { border-radius: 999px; padding: 10px 14px; line-height: 1; border: 1px solid var(--ps-rule); background: var(--ps-elev); color: var(--ps-tp); transition: border-color .2s, background-color .2s, color .2s, transform .3s var(--spring); }
.cap-link { font-weight: 500; border-color: var(--ps-tp); background: var(--ps-tp); color: var(--ps-bg); }
.cap-close { background: none; border-color: transparent; color: var(--ps-ts); padding-right: 0; opacity: 1; }
.cap-close kbd { font: inherit; opacity: .5; margin-left: 4px; }
.cap-link:hover { background: var(--ps-accent); border-color: var(--ps-accent); color: var(--ps-bg); transform: translateY(-1px); }
.cap-close:hover { background: none; color: var(--ps-tp); transform: none; }
.cap-link:active, .cap-close:active { transform: scale(.96); }
.cap-link:focus-visible, .cap-close:focus-visible { outline: 1.5px solid var(--ps-accent); outline-offset: 2px; }

/* chrome scales with the desk camera: bench.js fit() sets --ui on <html> (desktop = camera zoom clamped to 1..2, phones 1). zoom scales size, offsets and hover travel together, and leaves each element's own transform to its animations. */
#nv, #home, #cap, #hint, #tidy { zoom: var(--ui, 1); }

/* phones: the chrome keeps its look, its touch targets grow to 44 px with an invisible hit area; the first-visit hint steps aside when the card is up */
html.m #nv button, html.m #home, html.m .cap-link, html.m .cap-close { position: relative; }
html.m #nv button::after, html.m .cap-link::after, html.m .cap-close::after { content: ''; position: absolute; left: -2px; right: -2px; top: 50%; height: 44px; transform: translateY(-50%); }
html.m #home::after { content: ''; position: absolute; inset: -7px; }
html.m #home { position: fixed; }
html.m body:has(#cap.on) #hint { opacity: 0; }
