/* ---------- Lab: selected work around a floating stone (inspired by Sutéra) ---------- */
.lab {
  --lab-ink: #111312;
  --lab-mono: var(--mono);
  position: relative;
  z-index: 3;
  height: 440vh;                      /* ~one screen of scrolling per project */
  background: #fbfbfa;
  color: var(--lab-ink);
}
.lab__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  font-family: var(--lab-mono);
}
.lab__stage { position: absolute; inset: 0; }
.lab__stage canvas { display: block; width: 100%; height: 100%; }
.lab__wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.lab__wires polyline { fill: none; stroke: var(--lab-ink); stroke-width: 1; transition: stroke .2s; }
.lab__wires polyline.is-on { stroke: #23b97f; stroke-width: 1.5; }

/* big title */
.lab__title {
  position: absolute;
  z-index: 3;
  top: 112px;
  left: 2.4vw;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(44px, 6.2vw, 96px);
  line-height: .9;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}
.lab__line { position: relative; }
.lab__tag {
  position: absolute;
  top: .55em;
  left: 100%;
  margin-left: .15em;
  padding: 3px 5px;
  border: 1px solid var(--lab-ink);
  font: 600 9px/1 var(--lab-mono);
  letter-spacing: .06em;
  white-space: nowrap;
}

.lab__pill {
  position: absolute;
  z-index: 3;
  top: 108px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.lab__time {
  position: absolute;
  z-index: 3;
  top: 112px;
  right: 2.4vw;
  display: grid;
  justify-items: end;
  gap: 4px;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.lab__time span { opacity: .45; }
.lab__time b { font-size: 12px; }

/* callouts: tiny caps with an underline the wire continues from */
.lab__callout {
  position: absolute;
  z-index: 3;
  width: 190px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--lab-ink);
  font-size: 9px;
  line-height: 1.35;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.lab__callout--top { top: 20%; left: 57%; }
.lab__callout--left { top: 38%; left: 13%; }
.lab__callout--bottom { top: 77%; left: 58%; }
.lab__callout.is-on { color: #23b97f; border-color: #23b97f; }

.lab__box {
  position: absolute;
  z-index: 3;
  top: 30%;
  right: 8%;
  width: 230px;
  padding: 8px 10px 12px;
  border: 1.5px solid var(--lab-ink);
  background: #fbfbfa;
  font-size: 10px;
  line-height: 1.45;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .2s;
}
.lab__box p + p { margin-top: 8px; }
.lab__box-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 6px;
  margin: 0 -2px 10px;
  background: #e7e8e7;
}
.lab__box-head b { font-family: var(--sans); font-size: 15px; letter-spacing: -0.02em; }
.lab__box.is-on { border-color: #23b97f; }

/* markers pinned to points on the stone */
.lab__marker {
  position: absolute;
  z-index: 4;
  left: 0;
  top: 0;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 1.5px solid var(--lab-ink);
  background: #fff;
  cursor: pointer;
  transition: opacity .25s, transform .25s;
}
.lab__marker::after { content: ""; position: absolute; inset: 3px; background: var(--lab-ink); transition: background .2s; }
.lab__marker.is-on::after { background: #23b97f; }
.lab__marker.is-on { border-color: #23b97f; }

/* core threads */
.lab__threads { position: absolute; z-index: 3; left: 2.4vw; bottom: 34px; width: 290px; }
.lab__threads-title { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 10px; }
.lab__threads ol { list-style: none; display: grid; gap: 8px; }
.lab__threads li {
  display: grid;
  grid-template-columns: 30px 1fr;
  column-gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(17, 19, 18, .4);
  font-size: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.lab__threads li i {
  grid-row: span 2;
  width: 30px;
  height: 26px;
  border: 1px solid var(--lab-ink);
  background:
    linear-gradient(45deg, transparent 46%, var(--lab-ink) 46% 54%, transparent 54%),
    repeating-conic-gradient(rgba(17, 19, 18, .12) 0 25%, transparent 0 50%) 0 0 / 6px 6px;
}
.lab__threads li span { display: flex; gap: 6px; align-items: center; font-size: 8px; opacity: .6; }
.lab__threads li s { flex: 1; height: 5px; background: repeating-linear-gradient(90deg, var(--lab-ink) 0 2px, transparent 2px 3px); opacity: .5; }

/* about box */
.lab__about { position: absolute; z-index: 3; right: 2.4vw; bottom: 34px; width: 280px; }
.lab__about-head { display: inline-block; padding: 3px 6px; background: var(--lab-ink); color: #fff; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.lab__about-body { padding: 10px; border: 1.5px solid var(--lab-ink); font-size: 11px; line-height: 1.45; }
.lab__links { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; }
.lab__links a { padding: 3px 9px; border: 1.5px solid var(--lab-ink); border-radius: 999px; font-size: 10px; text-transform: uppercase; transition: background .2s, color .2s; }
.lab__links a:hover { background: var(--lab-ink); color: #fff; }

/* recent-work card */
.lab__card {
  position: absolute;
  z-index: 6;
  left: 0;
  top: 0;
  width: 250px;
  padding: 8px 8px 12px;
  background: #fff;
  border: 1.5px solid var(--lab-ink);
  box-shadow: 6px 6px 0 rgba(17, 19, 18, .9);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .25s, transform .25s;
}
.lab__card.is-on { opacity: 1; pointer-events: auto; transform: none; }
.lab__thumb {
  display: grid;
  place-items: end start;
  aspect-ratio: 16 / 10;
  padding: 8px;
  background: var(--thumb, #c9f2d6);
  background-image:
    repeating-linear-gradient(rgba(0, 0, 0, .06) 0 1px, transparent 1px 4px),
    linear-gradient(135deg, var(--thumb, #c9f2d6), #fff);
}
.lab__thumb span { padding: 2px 5px; background: #fff; border: 1px solid var(--lab-ink); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.lab__card-meta { margin-top: 10px; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; opacity: .6; }
.lab__card-title { margin-top: 4px; font-family: var(--sans); font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.lab__card-link { display: inline-block; margin-top: 8px; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid currentColor; }

@media (max-width: 900px) {
  .lab__callout, .lab__box, .lab__wires, .lab__threads, .lab__time { display: none; }
  .lab__pill { display: none; }
  .lab__about { left: 16px; right: 16px; width: auto; }
}
.lab__pill-label { padding: 4px 6px; border: 1.5px solid var(--lab-ink); }
.lab__thumb.has-img { background-size: cover; background-position: center top; }
.lab__thumb.has-img span { display: none; }
.lab__card { width: 290px; }
.lab__stage { cursor: pointer; }

.lab__card-desc { margin-top: 8px; font-size: 11px; line-height: 1.5; letter-spacing: .02em; opacity: .75; }
.lab__card { width: 300px; }
.lab__callout b, .lab__box-title { display: block; font-family: var(--sans); font-weight: 600; font-size: 13px; letter-spacing: -.01em; text-transform: none; margin: 2px 0 4px; }
.lab__callout i { font-style: normal; opacity: .6; margin-right: 6px; }
.lab__callout span { display: block; }
.lab__tag em { font-style: normal; opacity: .6; margin-left: 4px; }

/* phones / small tablets: the project card becomes a compact sheet above the bio box,
   and the stone sits a little higher so the card never covers it */
@media (max-width: 900px) {
  .lab__card {
    left: 16px !important; right: 16px; top: auto !important; bottom: 168px;
    width: auto; padding: 8px 8px 10px;
    display: grid; grid-template-columns: 112px 1fr; column-gap: 12px; align-items: start;
    box-shadow: 4px 4px 0 rgba(17, 19, 18, .9);
  }
  .lab__thumb { grid-row: 1 / span 4; aspect-ratio: 4 / 5; }
  .lab__card-meta { margin-top: 2px; font-size: 8px; }
  .lab__card-title { margin-top: 2px; font-size: 16px; }
  .lab__card-desc { margin-top: 4px; font-size: 10px; line-height: 1.4; }
  .lab__card-link { margin-top: 6px; font-size: 9px; justify-self: start; }
  .lab__stage { transform: translateY(-7%); }
}
