/* ==========================================================================
   Seidr Labs · projects page
   Extends the shared .project / .group-head blocks in seidr-v2.css with a
   sticky jump bar, screenshot stages and project headings at h3.
   ========================================================================== */

.page-projects {
  --nav-h: calc(62px + env(safe-area-inset-top, 0px)); /* fixed .site-nav once scrolled */
  --jump-h: 55px;                                        /* sticky jump bar */
  --stick: calc(var(--nav-h) + var(--jump-h));
}

/* ---------- hero ---------- */
.page-projects .page-hero h1 { max-width: 11ch; }
.hero-folio { margin-top: 34px; color: var(--mist-2); }
.hero-folio { flex-wrap: wrap; row-gap: .6em; }
.hero-folio span { white-space: nowrap; }

/* ---------- sticky jump bar ---------- */
.jumpbar {
  position: sticky; top: var(--nav-h); z-index: 20;
  background: rgba(6, 11, 13, .82);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.jump-scroll {
  position: relative; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%);
}
.jump-scroll::-webkit-scrollbar { display: none; }
.jump-scroll:focus { outline: none; }
.jump-list {
  list-style: none; margin: 0; display: flex; align-items: center; gap: 6px; width: max-content;
  padding: 10px max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)));
}
.jump-list li { flex: none; }
.jumpbar .chip {
  text-decoration: none; white-space: nowrap; backdrop-filter: none; -webkit-backdrop-filter: none;
  padding: 6px 12px 6px 10px; font-size: .75rem;
}
.jumpbar .chip::before { display: none; }
.jumpbar .chip .rune { color: var(--c); font-size: .95rem; }
.jumpbar .chip[aria-current] { color: var(--bone); border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, rgba(10, 19, 22, .6)); box-shadow: 0 0 18px -6px var(--c); }
.jump-group {
  display: inline-flex; align-items: center; gap: .55em; padding: 6px 8px 6px 18px; margin-left: 6px;
  font-family: var(--f-mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--mist-2); text-decoration: none; white-space: nowrap; border-radius: 99px; transition: color .25s;
}
.jump-list li:first-child .jump-group { padding-left: 4px; margin-left: 0; }
.jump-group span { color: var(--c); }
.jump-group:hover, .jump-group[aria-current] { color: var(--bone); }

/* "Explore the projects" lands with the jump bar just under the nav */
#all-projects { scroll-margin-top: var(--nav-h); }

/* ---------- groups ---------- */
.p-group { scroll-margin-top: var(--stick); }
.p-group .group-head { padding-bottom: clamp(26px, 3vw, 40px); }
.group-head h2 { display: flex; align-items: baseline; gap: .45em; }
.group-num { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .12em; color: var(--sap); transform: translateY(-.9em); }
.group-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; color: var(--mist); font-size: .95rem; max-width: 52ch; }
.group-note .label { color: var(--mist-2); }

/* ---------- project blocks ---------- */
.page-projects .project { position: relative; scroll-margin-top: calc(var(--stick) - 1px); }
.page-projects .project .p-side { top: calc(var(--stick) + 28px); }
.project h3 { font-size: clamp(2.4rem, 4.4vw, 3.8rem); }
.project .p-kicker { display: block; margin-top: .35em; font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: .16em; text-transform: uppercase; color: var(--mist); font-weight: 400; }
.p-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.p-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.p-side .facts-list { padding-top: 16px; border-top: 1px solid var(--line); }
.anchor-alias { position: absolute; top: 0; left: 0; width: 1px; height: 1px; scroll-margin-top: calc(var(--stick) - 1px); }

.p-main { display: grid; gap: clamp(24px, 3vw, 36px); align-content: start; min-width: 0; }
.p-main .prose > p:first-child { color: var(--bone); font-size: 1.12rem; }

/* images and video */
.p-fig { margin: 0; display: grid; gap: 12px; }
.p-fig figcaption { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .06em; color: var(--mist-2); }
.p-video video { aspect-ratio: 16 / 9; background: #050a0b; }
.p-art { position: relative; }
.p-art img { aspect-ratio: 16 / 9; object-fit: cover; opacity: .9; }
.p-art--tall img { aspect-ratio: 16 / 11; }
.p-art::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 55%, rgba(6, 11, 13, .55)); }

/* screenshot on a stage of atmospheric art */
.p-stage {
  position: relative; display: grid; place-items: center; overflow: hidden; isolation: isolate;
  min-height: 340px; padding: clamp(22px, 5vw, 56px) clamp(16px, 4vw, 48px);
  border-radius: var(--r-m); border: 1px solid var(--line); background: #050a0b;
}
.p-stage-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; z-index: -2; }
.p-stage::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 70% at 50% 50%, color-mix(in srgb, var(--c, var(--aurora)) 12%, transparent), rgba(5, 10, 11, .55) 80%); }
.p-shot {
  width: 100%; max-width: min(100%, var(--w, 420px)); height: auto; border-radius: 12px;
  box-shadow: 0 0 0 1px var(--line-2), 0 30px 80px -24px rgba(0, 0, 0, .85), 0 0 60px -30px var(--c, var(--aurora));
}

/* embedded sub-projects */
.p-subs .step { background: rgba(10, 19, 22, .7); }
.p-subs h4 { font-family: var(--f-display); font-weight: 500; font-size: 1.6rem; line-height: 1.05; }
.p-icon { width: 28px; height: 28px; color: var(--c, var(--ember)); }

/* keep the end-of-page CTA clear of the last project */
.page-projects .cta { margin-top: clamp(40px, 6vw, 80px); }

@media (max-width: 900px) {
  .project .p-rune { font-size: 3.2rem; }
}
@media (max-width: 520px) {
  .hero-folio { flex-direction: column; align-items: flex-start; }
  .hero-folio .sep { display: none; }
  .group-num { transform: translateY(-.6em); }
  .p-stage { min-height: 0; }
}

/* in-page jumps use a down-right arrow, so it nudges down-right on hover */
.btn[href^="#"]:hover .arr { transform: translate(3px, 3px); }
