@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@500&display=swap');
/* Project pages: the same blueprint sheet as the home page, and every image draws in as a pencil sketch before the real work wipes in. */
body, .sk-paper { background:
  linear-gradient(rgba(140,180,225,0.13) 1px, transparent 1px) 0 0 / 32px 32px,
  linear-gradient(90deg, rgba(140,180,225,0.13) 1px, transparent 1px) 0 0 / 32px 32px,
  linear-gradient(rgba(140,180,225,0.08) 1px, transparent 1px) 0 0 / 160px 160px,
  linear-gradient(90deg, rgba(140,180,225,0.08) 1px, transparent 1px) 0 0 / 160px 160px,
  #0b1726; }
.project-hero, .project-cover { background: transparent !important; }

/* Hidden only until its sketch is in place (sketch.js adds .sk-on; reduced motion never does) */
.sk-on img:not(nav img, footer img, [id=lightbox-img], .scroll-frame img, .sk-ghost img, .sk-done) { opacity: 0; }
.sk-ghost { position: absolute; z-index: 5; overflow: hidden; pointer-events: none; background: #0b1726; }
.sk-ghost img { filter: url(#edges); mix-blend-mode: screen; opacity: .85; }
.sk-edge { position: absolute; z-index: 6; width: 2px; background: #DAA520; pointer-events: none; }

/* Arriving from the home wall: page hidden until the new sheet lands (sketch.js) */
.sk-lay body > :not(.sk-new) { opacity: 0; }
.sk-new { position: fixed; inset: 0; z-index: 2000; pointer-events: none; box-shadow: 0 0 0 1px rgba(140,180,225,.22), 0 40px 90px rgba(0,0,0,.75); }

/* Going home: the home page waits in a hidden frame under this page; the page crumples into a ball and is tossed */
.sk-home { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; z-index: 999; opacity: 0; pointer-events: none; }
.sk-ball { position: fixed; inset: 0; z-index: 1000; pointer-events: none; filter: drop-shadow(0 16px 18px rgba(0,0,0,.55)); }
.sk-sheet { position: absolute; inset: 0; overflow: hidden; transform: translateZ(0); }
.sk-copy { position: absolute; left: 0; width: 100%; }
.sk-creases { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }

/* Pencil notes in the margin (sketch.js). Tablet and desktop only; always visible, never behind a hover. */
.sk-notes { position: absolute; left: 0; top: 0; width: 100%; height: 0; pointer-events: none; } /* no z-index: a stacking context would stop the lines blending with the page */
.sk-notes svg { position: absolute; left: 0; top: 0; overflow: visible; mix-blend-mode: difference; } /* white on the blueprint, dark where a mark crosses a light screenshot */
.sk-notes path, .sk-notes circle { fill: none; stroke: rgba(255,255,255,.8); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .8s cubic-bezier(.6,0,.3,1) var(--d, 0s); }
.sk-notes .on path, .sk-notes .on circle { stroke-dashoffset: 0; }
.sk-note { position: absolute; margin: 0; font: 500 1.3rem/1.1 'Caveat', 'Bradley Hand', cursive; color: rgba(255,255,255,.9); white-space: pre-line; opacity: 0; transform: translateY(-50%) rotate(-1.5deg); transition: opacity .5s ease calc(var(--d, 0s) + .4s); }
.sk-note.l { text-align: right; }
.sk-note.on { opacity: 1; }
.sk-notes .still path, .sk-notes .still circle, .sk-note.still { transition: none; }
@media (max-width: 767px) { .sk-notes { display: none; } }
.sk-notes .area { stroke-dasharray: 1; }
/* Mouse: each note draws in only while its part of the screen is hovered, and pulls back out after. Touch: notes stay up and the boxes stay hidden. */
@media (hover: hover) {
  .sk-notes .on path, .sk-notes .on circle { stroke-dashoffset: 1; transition-delay: 0s; }
  .sk-notes .on .hot path, .sk-notes .on .hot circle { stroke-dashoffset: 0; }
  /* letters appear one by one behind the pencil: 500ms, then 45ms a letter (matches PRE and PER in sketch.js) */
  .sk-note .ch { opacity: 0; }
  .sk-note.hot .ch { opacity: 1; transition: opacity .05s linear calc(.5s + var(--c) * 45ms); }
  .sk-note.still .ch { transition: none; }
}
@media (hover: none) { .sk-notes .area { display: none; } }
@media (min-width: 768px) and (max-width: 1099px) {
  img[data-notes]:not([data-notes-zoom]) { width: calc(100% - 220px) !important; }
  .figure-pair:has(img[data-notes]:not([data-notes-zoom])) { grid-template-columns: 1fr; }
  .project-cover:has(img[data-notes]:not([data-notes-zoom])) { justify-content: flex-start; padding-left: 24px; }
}
@media (prefers-reduced-motion: reduce) { .sk-notes path, .sk-notes circle, .sk-note, .sk-note .ch { transition: none !important; } }
.sk-pen { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; filter: drop-shadow(3px 5px 3px rgba(0,0,0,.45)); }

/* Enlarged view with notes (sketch.js): the image shrinks to leave a margin for them on each side (tablet: right side) */
#lightbox.sk-lb-on #lightbox-img { max-width: calc(100% - 520px) !important; }
@media (max-width: 1099px) { #lightbox.sk-lb-on #lightbox-img { max-width: calc(100% - 300px) !important; margin-right: 240px; } }
.sk-lb { position: absolute; inset: 0; pointer-events: none; }
.sk-lb svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; mix-blend-mode: difference; }
.sk-lb path { fill: none; stroke: rgba(255,255,255,.85); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: sk-lb-draw .7s cubic-bezier(.6,0,.3,1) calc(.25s + var(--d, 0s)) forwards; }
.sk-lb .sk-note { opacity: 0; animation: sk-lb-fade .4s ease calc(.6s + var(--d, 0s)) forwards; transition: none; }
.sk-lb.still path, .sk-lb.still .sk-note { animation-duration: 0s; animation-delay: 0s; }
@keyframes sk-lb-draw { to { stroke-dashoffset: 0; } }
@keyframes sk-lb-fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sk-lb path, .sk-lb .sk-note { animation-duration: 0s; animation-delay: 0s; } }
