/* Monday — the mark and the index.

   One header on every page: the same mark, the same size, the same place.
   Four words, right-aligned, standing under one another at the top right.

   The index used to stand in a column, one word under the next. It lies down
   now: one line, read left to right, ending where the leaf ends. The distance
   between its words is not chosen either — it is still taken from the mark,
   from the air between its corner marks and the word MONDAY, so the index
   breathes exactly as the mark breathes, at every size.

   The mark stands half as far from the left edge as the index stands from the
   right one: it is almost in the corner, the way a stamp is.

   Moving down is reading, so the header leaves with the first screen.
   Moving up is looking for something, so it comes back — small, and only
   for as long as you are looking. */

:root{
  --head-pad-x:clamp(20px,5vw,80px);
  --mark-pad-x:calc(var(--head-pad-x) * .5);
  --mark-w:clamp(139px,13.9vw,222px);
  --logo-gap:calc(var(--mark-w) * 32 / 456);
  /* the one face the two big titles are set in: the mark's own */
  --mark-font:'Questrial','Inter Tight','Helvetica Neue',Helvetica,Arial,sans-serif;
}

.site-head{position:relative;z-index:30;
  display:flex;justify-content:space-between;align-items:flex-start;gap:20px;
  padding:clamp(20px,3.4vh,34px) var(--head-pad-x) 0 var(--mark-pad-x);pointer-events:none}
.site-head a{pointer-events:auto}
.site-head .home{display:block;flex:none;width:var(--mark-w)}
.site-head .home img{display:block;width:100%;height:auto}
/* ——— one mark, cast twice ———
   The mark is a single drawing held in two inks: the dark one for a page that
   is a wall, the pale one for a page that is a film or a dark leaf. Both are
   in the page and the page says which of them is standing, so the mark is
   never a lightened or inverted copy of itself — each is drawn in its own
   colour, the way a stamp is cut for the paper it will be pressed on. */
.site-head .home .pale{display:none}
body.mark-pale .site-head .home .ink{display:none}
body.mark-pale .site-head .home .pale{display:block}
/* where a film or a photograph lies behind it, the header rests on top of it */
body.has-hero .site-head{position:absolute;left:0;right:0;top:0}

/* the index: one word per line, every line ending on the same right edge */
.ix{display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline;
  justify-content:flex-end;gap:calc(var(--logo-gap) * .5) clamp(13px,1.55vw,32px);
  font-family:'Share Tech Mono','Courier Prime','Courier New',monospace;
  /* it gives a little as the leaf narrows, so the one line stays one line */
  /* one size, everywhere: the index is the leaf's own machine type and it is
     set at twelve on every page, so no two headers are ever a hair apart */
  font-size:12px;line-height:1.3;color:#d9d5ce;text-align:right;
  /* set down on the line the word MONDAY stands on inside the mark */
  padding-top:calc(var(--mark-w) * 32 / 456)}
/* one stop between the letters, .08, the same one every typed thing keeps */
.ix a{display:inline-block;letter-spacing:.08em;opacity:.6;text-decoration:none;
  transform-origin:100% 50%;
  transition:opacity .35s ease, letter-spacing .4s ease, transform .4s ease}
.ix a:hover,.ix a:focus-visible,.ix a[aria-current]{opacity:1}
/* under the hand the word opens: the letters step apart again, and it grows a little */
.ix a:hover,.ix a:focus-visible{letter-spacing:.264em;transform:scale(1.06)}
.site-head .ix{text-shadow:0 1px 3px rgba(20,20,19,.4)}
/* the one dot at the end of the index: a mark of punctuation to everyone else */
.ix .pv{opacity:.26;letter-spacing:0;transform:none;font-size:17px;line-height:.8;padding:2px 0}
.ix .pv:hover,.ix .pv:focus-visible{opacity:.9;letter-spacing:0;transform:none}

/* ——— the index is a table of contents ———
   A number that was given once and never changes, then the name of the page in
   lower case. On the page you are standing on, a cursor that does not blink:
   nothing is being written there, it is simply where you are. */
.ix a .n{font-style:normal;opacity:.42;letter-spacing:.08em;margin-right:.7em;font-variant-numeric:tabular-nums}
.ix a .cur{font-style:normal;opacity:.75;margin-left:.1em}
.ix a[aria-current]{opacity:1}
.ix a[aria-current] .n{opacity:.62}

/* ——— the moon ———
   Monday is the Moon's day, and has no light of its own. */
.moon{display:block;width:18px;height:18px;margin-bottom:16px;flex:none}
.moon .rim{fill:none;stroke:currentColor;stroke-width:1;opacity:.3}
.moon .lit{fill:currentColor;opacity:.5}
footer .ends{align-items:center}

/* Gone while you read, back when you look for it.
   The class is written twice on purpose: the landing page holds its header
   hidden until the thought is finished, with a rule of its own, and this one
   has to be able to speak over it. */
/* ——— why this needs saying ———
   The header lives inside the first screen — the film, the cover photograph —
   and that block carries a z-index of its own. A position:fixed element cannot
   climb out of its ancestor's stacking context, so the small index was being
   laid under everything written below it and could not be clicked, however high
   its own z-index was set. The block it lives in is lifted instead, which it can
   be safely: by the time the small index is wanted, that block is long off the
   screen and has nothing of its own left to show. */
body.away [data-hero]{z-index:90}
body.away .site-head.site-head{position:fixed;top:0;left:0;right:0;z-index:95;
  --mark-w:clamp(104px,9vw,140px);
  align-items:center;padding-top:14px;padding-bottom:14px;
  opacity:0;transform:translateY(-10px);pointer-events:none;
  transition:opacity .55s ease, transform .55s ease}
/* ——— the index that comes back is the same index ———
   It used to gather into the right-hand corner when it came back, which made
   it a second, different header. It is the one on the first leaf: the same
   size, the same stops, lying from the mark to the edge. */
body.away .site-head.site-head .ix{flex-direction:row;flex-wrap:wrap;align-items:center;
  gap:8px clamp(10px,1.6vw,26px);font-size:12px;padding-top:0}
@media (min-width:821px){
  body.away .site-head.site-head .ix{flex:1 1 auto;justify-content:space-between;
    padding-left:clamp(28px,5vw,88px)}
}
@media (max-width:820px){
  body.away .site-head.site-head .ix{justify-content:flex-end}
}
body.away .site-head::before{content:"";position:absolute;left:0;right:0;top:0;height:112px;z-index:-1;
  pointer-events:none;background:linear-gradient(180deg,rgba(18,18,17,.52),rgba(18,18,17,.28) 45%,rgba(18,18,17,0))}
body.recall .site-head.site-head{opacity:1;transform:none;pointer-events:auto}
/* nothing is allowed over it, and it takes a click the moment it is there */
body.recall .site-head.site-head a{pointer-events:auto}
body.recall .site-head.site-head .ix{pointer-events:auto}

@media (max-width:820px){
  /* ——— on a narrow sheet the index keeps the corner ———
     The mark does not step aside for it and it does not drop beneath the mark:
     they stand on one line, the mark at the left edge, the index in the top
     right corner, lying down, reading left to right and ending on the right.
     The mark is cut back so there is room for both on one line with air in
     between, and the words are set a little closer so the index can never run
     into anything written beside it. */
  .site-head{flex-direction:row;align-items:flex-start;gap:clamp(12px,3.4vw,22px);
    --mark-w:clamp(85px,23.2vw,114px)}
  .ix{align-self:flex-start;justify-content:flex-end;
    gap:calc(var(--logo-gap) * .8) 12px;font-size:12px;
    padding-top:calc(var(--mark-w) * 32 / 456)}
  .ix a{letter-spacing:.08em}
  .ix a .n{margin-right:.5em}
  .ix a:hover,.ix a:focus-visible{letter-spacing:.16em;transform:none}
  body.away .site-head{flex-direction:row;align-items:center;--mark-w:clamp(84px,22vw,112px)}
}
@media (prefers-reduced-motion:reduce){
  body.away .site-head{transform:none;transition:opacity .3s ease}
  .ix a:hover,.ix a:focus-visible{transform:none}
}


/* ——— ink blue: only where a hand touched the page ———

   One colour, the blue of a ballpoint, and it is never decoration. It marks
   the places where something was done by hand rather than set in type: the
   cursor still waiting, the line drawn through a word, the writing, and a
   link under a finger. Backgrounds, headings, running text, the mark, the
   menu and the coordinates never take it.                                  */
:root{--hand:#1B33C4;--hand-light:#1B33C4}

/* every blinking cursor */
.k{color:var(--hand)}

/* the cursor after the leaf you are standing on */
.ix a .cur{color:var(--hand);opacity:1}

/* and the ink left on the page by a selection */
::selection{background:rgba(27,51,196,.18)}


/* the cursor is a stroke of the pen, not a hairline: at the size it is set
   in, a thin underscore in any colour reads as grey. Drawn as a short heavy
   rule under the line, the ink is unmistakable and the shape is the same. */
.k{font-weight:700;letter-spacing:0}



/* ——— foxing ———

   Paper that has been kept does not stay clean. It takes on faint brown
   blooms where damp reached it, a sallow edge where light did, a ring where
   something stood on it. None of it is an event; you only notice it when
   you look, and then it is the reason the sheet feels old rather than new.

   That is what this is, and it is held at the edge of visible on purpose:
   six blooms at two to five percent, warm, enormous and soft, with the
   paper's own colour showing through. They are laid out across the whole
   height of the leaf, so they travel with the paper as it is scrolled and
   never behave like something on the screen. Nothing is drawn, nothing is
   loaded, and nothing sits on top of the writing: the whole thing is one
   layer behind everything, multiplied into the paper the way a stain is
   in it rather than on it.

   If it is ever too much, the one number to change is the opacity below. */
html::before{
  content:none;
  mix-blend-mode:multiply;opacity:.62;
  background-repeat:no-repeat;
  background-image:
    /* a damp bloom, high on the left */
    radial-gradient(38% 13% at 14% 6%,
      rgba(150,122,78,.075) 0%, rgba(150,122,78,.042) 44%, rgba(150,122,78,0) 76%),
    /* the ring of something that stood here */
    radial-gradient(16% 7% at 79% 17%,
      rgba(138,112,72,.0) 52%, rgba(138,112,72,.055) 62%,
      rgba(138,112,72,.03) 70%, rgba(138,112,72,0) 80%),
    /* where light reached the sheet and took the colour out */
    radial-gradient(52% 16% at 92% 38%,
      rgba(152,128,86,.055) 0%, rgba(152,128,86,0) 72%),
    /* a soft brown bloom at half height */
    radial-gradient(44% 11% at 22% 54%,
      rgba(144,116,74,.06) 0%, rgba(144,116,74,.03) 48%, rgba(144,116,74,0) 78%),
    /* the fold, low on the right */
    radial-gradient(30% 9% at 74% 73%,
      rgba(146,120,80,.05) 0%, rgba(146,120,80,0) 74%),
    /* and the foot of the sheet, where hands held it */
    radial-gradient(60% 14% at 36% 94%,
      rgba(148,124,84,.055) 0%, rgba(148,124,84,.026) 50%, rgba(148,124,84,0) 80%)}

/* the film on the landing is not paper: nothing is stained over it */
body.has-hero .first{position:relative;z-index:1}


/* ——— the index lies from the mark to the edge ———
   On every leaf, not only the first one: the names stand at even
   distances from the mark to the right edge, so the top of every page
   is one line of type read left to right. The small header that comes
   back when you look for it keeps its old corner; it is a passing
   thing and has no room to lie down in. */
@media (min-width:821px){
  .site-head .ix{flex:1 1 auto;justify-content:space-between;
    padding-left:clamp(28px,5vw,88px);
    gap:10px clamp(10px,1.6vw,26px)}
}

/* ——— the index, laid by hand: two levels, uneven gaps, the same everywhere ———
   Not a row at even distances any more. Six words set in six fixed places on
   two lines, with the moon in the corner. The same places on every leaf, on
   the landing, and in the small header that comes back when you look up. */
@media (min-width:901px){
  .site-head{position:relative;min-height:96px}
  body.away .site-head.site-head{min-height:0}
  .site-head .ix{position:absolute!important;left:180px;right:36px;top:30px;
    height:40px;display:block!important;margin:0!important}
  .site-head .ix > a{position:absolute;white-space:nowrap;margin:0!important}
  .site-head .ix > a:nth-of-type(1){left:13.5%;top:0}     /* the story  */
  .site-head .ix > a:nth-of-type(2){left:43%;  top:0}     /* projects   */
  .site-head .ix > a:nth-of-type(3){left:64.5%;top:21px}  /* archive    */
  .site-head .ix > a:nth-of-type(4){left:79%;  top:0}     /* because of */
  .site-head .ix > a:nth-of-type(5){left:88%;  top:21px}  /* contact    */
  .site-head .ix > a:nth-of-type(6){left:72%;  top:21px}  /* instagram  */
  .site-head .ix > .pv{position:absolute;right:0;top:0}   /* the moon   */
}

/* ——— the mark at the end of the index is the moon ———

   It was a dot. It is the moon now: the same drawing the foot of the page
   carries, at the size of a letter, and it stands on the line the words
   stand on. It is the quietest thing in the header, and nothing says what
   it is. */
.ix .pv{display:inline-block;width:11px;height:11px;padding:0;
  font-size:0;line-height:0;letter-spacing:0;opacity:.34;transform:none;
  align-self:center;transition:opacity .4s ease}
.ix .pv:hover,.ix .pv:focus-visible{opacity:.8;letter-spacing:0;transform:none}
.ix .pv svg{display:block;width:100%;height:100%}
.ix .pv .rim{fill:none;stroke:currentColor;stroke-width:1.1;opacity:.55}
.ix .pv .lit{fill:currentColor;opacity:.8}

/* and the dot that says one part is open now */
.ix .live{font-style:normal;display:inline-block;margin-left:.5em;
  font-size:1.45em;line-height:0;letter-spacing:0;color:var(--hand-light);
  animation:breathe 3.6s ease-in-out infinite}
@keyframes breathe{0%,100%{opacity:.26}50%{opacity:.92}}
@media (prefers-reduced-motion:reduce){.ix .live{animation:none;opacity:.6}}


/* ——— ballpoint blue: only where a hand would be ———
   One filter, laid on the few marks a hand would have made: the cursor,
   the pen underlines, the strike. Everything else on the site is printed. */
:root{--hand:#1B33C4;--hand-light:#1B33C4}

/* every cursor _ */
.k,.ix a .cur{color:var(--hand);filter:url(#mb-ink)}

/* an underline drawn by pen, uneven pressure */
.ink-u{position:relative;text-decoration:none;border-bottom:0!important}
.ink-u::after{content:"";position:absolute;left:0;right:0;bottom:-4px;height:1.5px;
  background:linear-gradient(90deg,rgba(27,51,196,.95),rgba(27,51,196,.72) 38%,
    rgba(27,51,196,.92) 66%,rgba(27,51,196,.8));
  filter:url(#mb-ink)}

/* next: … at the bottom of every page */
body > footer .ends a{position:relative;border-bottom:0!important}
body > footer .ends a::after{content:"";position:absolute;left:0;right:0;bottom:-4px;height:1.5px;
  background:linear-gradient(90deg,rgba(27,51,196,.95),rgba(27,51,196,.72) 38%,
    rgba(27,51,196,.92) 66%,rgba(27,51,196,.8));
  filter:url(#mb-ink)}

/* page titles: huge, cut by the edge, never a whole letter */
html{overflow-x:hidden}


/* ——— where you are ———
   No name at the head of the leaf any more: the word in the index turns to
   pen and takes the cursor. Same size, same place, so the uneven index
   stays exactly as it is laid. */
.site-head .ix a[aria-current]{color:var(--hand)!important;filter:url(#mb-ink)}
.site-head .ix a[aria-current]::after{content:"_";margin-left:1px}
.site-head .ix a[aria-current] .cur{display:none!important}


/* ——— the mark is a stamp in the corner ———
   One size on every leaf, the landing included, and the same size the
   small header has always taken when it comes back: the mark stops being
   a second title and goes back to being a stamp. Phones keep their own. */
@media (min-width:821px){
  .site-head{--mark-w:clamp(104px,9vw,140px)}
}

/* ---- on the landing the word takes the ink when a hand is over it ---- */
body.has-hero .site-head .ix a:not(.pv):hover,
body.has-hero .site-head .ix a:not(.pv):focus-visible{
  color:var(--hand-light);
  filter:url(#mb-ink)}