/*
  NIGHT WATCH — design rules
  The page is one long rest: 22:00 at the top, dawn (06:00) at the bottom.
  1. Background colour = time of night. It only ever warms downward.
  2. Hours live in the left margin, each with a hairline rule. No boxes, no cards.
  3. Each project sits at its own hour. Content aligns to one text column.
  4. Warm colour is earned: campfire = something you can act on; dawn = the end.
  5. Two faces only: Instrument Sans for words, Plex Mono for times and domains.
  Dark only, on purpose: it is always night here.
  Shared with longrestlabs.com (same family). On the games hub each game takes an hour;
  a game's domain turns campfire-orange only once it can be played.
*/
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url(/fonts/instrument-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-display: swap; src: url(/fonts/instrument-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url(/fonts/instrument-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }

:root {
  color-scheme: dark;
  --sky-22: #0A0E13;
  --sky-02: #141826;
  --sky-05: #2B2233;
  --sky-06: #3D2C3A;
  --dawn: #E9C77B;
  --moon: #E4E0D6;
  --hour: #7E8694;
  --rule: rgba(126, 134, 148, .28);
  --fire: #F0A04B;
  --fire-line: rgba(240, 160, 75, .4);
  --sans: "Instrument Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --margin: 7.5rem;
}
* { box-sizing: border-box; }
html { background: var(--sky-22); }
body {
  position: relative;
  z-index: 0;
  margin: 0;
  min-height: 100vh;
  color: var(--moon);
  font: 400 1.0625rem/1.55 var(--sans);
  background:
    radial-gradient(120% 22% at 50% 100%, rgba(233, 199, 123, .22), transparent 70%),
    linear-gradient(180deg,
      var(--sky-22) 0%, var(--sky-22) 15%,
      var(--sky-02) 45%,
      var(--sky-05) 80%,
      var(--sky-06) 100%);
  -webkit-font-smoothing: antialiased;
}
main { max-width: 52rem; margin: 0 auto; padding: 0 1.5rem; }
a:focus-visible { outline: 2px solid var(--fire); outline-offset: 3px; border-radius: 2px; }

.watch {
  display: grid;
  grid-template-columns: var(--margin) 1fr;
  border-top: 1px solid var(--rule);
  padding: 1.1rem 0 4.5rem;
}
.watch > time {
  font: 400 .8125rem/1.6 var(--mono);
  color: var(--hour);
  letter-spacing: .02em;
  padding-top: .15rem;
}
.watch:first-child { border-top: 0; padding-top: 22vh; }
.watch:first-child > time { padding-top: .9rem; }

h1 {
  margin: 0;
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -.02em;
}
.lede { margin: 1rem 0 0; color: var(--hour); max-width: 30rem; }

h2 { margin: 0; font-weight: 600; font-size: 1.375rem; letter-spacing: -.01em; }
.project p { margin: .35rem 0 0; max-width: 32rem; }
.domain {
  display: inline-block;
  margin-top: .6rem;
  font: 400 .875rem var(--mono);
  color: var(--hour);
}
.domain em { font-style: normal; opacity: .75; }
a.domain { color: var(--fire); text-decoration: none; border-bottom: 1px solid var(--fire-line); }

.contact p { margin: 0 0 .5rem; color: var(--hour); }
.contact a {
  font: 500 1.125rem var(--mono);
  color: var(--fire);
  text-decoration: none;
  border-bottom: 1px solid var(--fire-line);
}
.contact a:hover, a.domain:hover { border-bottom-color: var(--fire); }

.dawn { position: relative; border-top: 1px solid var(--dawn); padding-bottom: 5rem; }
.dawn::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px;
  box-shadow: 0 0 12px 1px rgba(233, 199, 123, .5);
}
.dawn > time { color: var(--dawn); }
.dawn small { display: block; font: 400 .8125rem/1.6 var(--mono); color: var(--moon); opacity: .8; }
.dawn small + small { margin-top: .35rem; }
.dawn a { color: var(--fire); text-decoration: none; border-bottom: 1px solid var(--fire-line); }
.dawn a:hover { border-bottom-color: var(--fire); }

/* a few stars, only in the first hours */
.stars {
  position: absolute; inset: 0 0 auto 0; height: 60vh; pointer-events: none; z-index: -1;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(228, 224, 214, .8), transparent),
    radial-gradient(1.5px 1.5px at 78% 9%, rgba(228, 224, 214, .65), transparent),
    radial-gradient(2px 2px at 64% 27%, rgba(228, 224, 214, .75), transparent),
    radial-gradient(1.5px 1.5px at 88% 41%, rgba(228, 224, 214, .4), transparent),
    radial-gradient(1.5px 1.5px at 33% 7%, rgba(228, 224, 214, .6), transparent),
    radial-gradient(1px 1px at 47% 36%, rgba(228, 224, 214, .4), transparent),
    radial-gradient(1px 1px at 92% 22%, rgba(228, 224, 214, .5), transparent),
    radial-gradient(1px 1px at 5% 33%, rgba(228, 224, 214, .35), transparent);
}

@media (max-width: 560px) {
  :root { --margin: 3.75rem; }
  main { padding: 0 1rem; }
  .watch { padding-bottom: 3.25rem; }
  .watch:first-child { padding-top: 14vh; }
}
