/* project.css: shared styles for the per-project pages in projects/.
   Same visual language as flow.css (the normal-flow site below the journey): dark water,
   teal + firelight, the display serif, mono dates, hairline cards with corner brackets.
   Tokens are copied from styles.css :root so these pages need no other stylesheet.
   Motion: CSS only, transform/opacity only, off under prefers-reduced-motion. */

:root {
  --bg: #04100f;
  --ink: #eaf4ef;
  --ink-dim: #a9c4ba;
  --body: #cfe0d9;
  --teal: #5fe3c9;
  --fire: #ffb35c;
  --rule: rgb(95 227 201 / .16);
  --t: 95 227 201;                       /* card tint, "r g b" */
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --ui: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gut: max(16px, clamp(1.25rem, 5vw, 5rem));
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; }
body {
  margin: 0; background: var(--bg); color: var(--body);
  font: 400 1.0625rem/1.6 var(--ui);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--teal); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover, a:focus-visible { color: var(--ink); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
p { margin: 0 0 1rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.pj-wrap { width: min(52rem, 100% - 2 * var(--gut)); margin-inline: auto; }

/* ---------- top bar: back to the main page ---------- */
.pj-top {
  position: sticky; top: 0; z-index: 5;
  background: rgb(4 16 15 / .86);
  -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid var(--rule);
}
.pj-top .pj-wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.pj-back {
  display: inline-block; padding: .85rem 0;
  font: 400 .9rem/1 var(--ui); color: var(--ink-dim); text-decoration: none;
}
.pj-back:hover, .pj-back:focus-visible { color: var(--teal); }
.pj-top .pj-name { font: 400 .75rem/1 var(--mono); color: var(--fire); letter-spacing: .04em; white-space: nowrap; }

/* ---------- hero band: a journey still, seen through a slot ---------- */
.pj-hero {
  position: relative; overflow: hidden;
  height: clamp(10rem, 32vh, 20rem);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
}
.pj-hero img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; opacity: .55;
}
.pj-hero::after {   /* a reticle from the journey */
  content: ""; position: absolute; left: 72%; top: 46%; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border: 1px solid rgb(95 227 201 / .5); border-radius: 50%;
  box-shadow: 0 0 18px rgb(95 227 201 / .25), inset 0 0 8px rgb(95 227 201 / .2);
}

/* ---------- title block ---------- */
.pj-head { margin-top: clamp(-4.5rem, -8vw, -2.5rem); position: relative; padding-bottom: 1rem; }
.pj-meta {
  display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin: 0 0 .8rem;
  font: 400 .78rem/1.4 var(--mono); color: var(--ink-dim); letter-spacing: .03em;
}
.pj-meta time, .pj-meta .pj-dates { color: var(--fire); }
h1 {
  margin: 0 0 .7rem; color: var(--ink);
  font: 400 clamp(2.3rem, 8vw, 4.2rem)/1.02 var(--display); letter-spacing: -.02em;
  text-shadow: 0 0 50px rgb(255 179 92 / .16);
  overflow-wrap: anywhere;
}
.pj-role { margin: 0 0 .4rem; color: var(--ink); font: 400 1.25rem/1.4 var(--display); }
.pj-status { margin: 0 0 1.2rem; font: 400 .8rem/1.5 var(--mono); color: var(--teal); letter-spacing: .03em; }
.pj-lead { max-width: 40rem; color: var(--ink); font: 400 clamp(1.1rem, 2.4vw, 1.35rem)/1.5 var(--display); }

.chips { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.chips li {
  padding: .28rem .55rem; border: 1px solid rgb(var(--t) / .3); border-radius: 2px;
  background: rgb(var(--t) / .06);
  font: 400 .75rem/1.35 var(--mono); color: var(--ink); letter-spacing: .01em;
}
.chips li.award { --t: 255 179 92; }

/* ---------- sections as hairline cards ---------- */
.pj-body { display: grid; gap: 1rem; padding-block: 1.5rem 3rem; }
.pc {
  position: relative; min-width: 0;
  padding: 1.3rem 1.25rem 1.2rem;
  background:
    linear-gradient(180deg, rgb(var(--t) / .07), rgb(var(--t) / 0) 45%),
    linear-gradient(160deg, rgb(5 26 28 / .72), rgb(3 12 14 / .6));
  border: 1px solid rgb(var(--t) / .26);
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / .25), 0 14px 36px rgb(0 0 0 / .35);
}
.pc::before, .pc::after {   /* corner brackets */
  content: ""; position: absolute; width: 12px; height: 12px; pointer-events: none;
  border: 0 solid rgb(var(--t));
}
.pc::before { left: -1px; top: -1px; border-left-width: 2px; border-top-width: 2px; }
.pc::after { right: -1px; bottom: -1px; border-right-width: 2px; border-bottom-width: 2px; }
.pc--fire { --t: 255 179 92; }
.pc > :last-child { margin-bottom: 0; }
.pc h2 {
  margin: 0 0 .9rem; color: rgb(var(--t));
  font: 400 clamp(1.35rem, 3.4vw, 1.7rem)/1.15 var(--display);
}
.pc h3 { margin: 1.2rem 0 .5rem; font: 400 .75rem/1.4 var(--mono); color: rgb(var(--t)); letter-spacing: .04em; text-transform: uppercase; }
.pc p, .pc li { font-size: .975rem; line-height: 1.6; }
.pc-note { color: var(--ink-dim); font-size: .9rem !important; font-style: italic; }

.did { margin: 0; padding-left: 1.1rem; display: grid; gap: .45rem; }
.did li::marker { color: rgb(var(--t)); }

.pj-two { display: grid; gap: 1rem; }
@media (min-width: 46rem) { .pj-two { grid-template-columns: 1fr 1fr; } }
.ms-note { margin-top: 1rem !important; }

/* milestones */
.ms-count { font: 400 .78rem/1.4 var(--mono); color: var(--fire); letter-spacing: .03em; margin-bottom: .8rem !important; }
.ms { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.ms li { position: relative; padding-left: 1.4rem; font-size: .95rem; line-height: 1.45; color: var(--ink-dim); }
.ms li::before {
  content: ""; position: absolute; left: 0; top: .38em; width: .62rem; height: .62rem;
  border: 1px solid rgb(var(--t) / .7); border-radius: 50%;
}
.ms li.done { color: var(--ink); }
.ms li.done::before { background: rgb(var(--t)); box-shadow: 0 0 8px rgb(var(--t) / .6); }

/* links */
.pj-links { list-style: none; margin: 0; padding: 0; }
.pj-links li { border-top: 1px solid var(--rule); }
.pj-links li:last-child { border-bottom: 1px solid var(--rule); }
.pj-links a {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .2rem 1rem;
  padding: .8rem 0; color: var(--ink); text-decoration: none; font: 400 1.05rem/1.3 var(--display);
}
.pj-links a span { font: 400 .72rem/1.4 var(--mono); color: var(--ink-dim); overflow-wrap: anywhere; }
.pj-links a:hover, .pj-links a:focus-visible { color: var(--teal); }

/* ---------- hand-fill sections: visibly unfinished until Neeor writes them ---------- */
.todo { --t: 255 179 92; background: none; box-shadow: none; border-style: dashed; }
.fill {
  display: inline-block; max-width: 100%;
  font: 500 .85rem/1.5 var(--mono) !important; color: var(--fire);
  border: 1px dashed rgb(255 179 92 / .7); border-radius: 4px; padding: .2em .6em;
  background: rgb(20 10 0 / .4);
}

/* photo slots: a dashed box naming the wanted file, replaced by an <img> once it exists */
.slots { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.slot { margin: 0; min-width: 0; }
.slot-box {
  aspect-ratio: 4 / 3; display: grid; place-content: center; gap: .4rem; padding: 1rem; text-align: center;
  border: 1px dashed rgb(255 179 92 / .6); border-radius: 3px; background: rgb(20 10 0 / .25);
}
.slot-box code { font: 500 .8rem/1.4 var(--mono); color: var(--fire); overflow-wrap: anywhere; }
.slot-box span { font-size: .82rem; line-height: 1.4; color: var(--ink-dim); }
.slot img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; border: 1px solid var(--rule); }
.slot figcaption { margin-top: .4rem; font: 400 .75rem/1.4 var(--mono); color: var(--ink-dim); }

/* ---------- footer ---------- */
.pj-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem;
  padding: 1.6rem 0 3rem; border-top: 1px solid var(--rule);
  font: 400 .75rem/1.4 var(--mono); color: var(--ink-dim); letter-spacing: .04em;
}
.pj-foot a { color: var(--teal); }

/* ---------- motion: a slow settle on load, nothing under reduced motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .pj-hero img { animation: pj-drift 2.4s cubic-bezier(.2, .8, .2, 1) both; }
  .pj-head, .pj-body > * { animation: pj-rise .8s cubic-bezier(.2, .8, .2, 1) both; }
  .pj-body > :nth-child(2) { animation-delay: .06s; }
  .pj-body > :nth-child(n+3) { animation-delay: .12s; }
}
@keyframes pj-drift { from { opacity: 0; transform: scale(1.06); } to { opacity: .55; transform: none; } }
@keyframes pj-rise { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }
