/* Mercury Station Alpha
   Monochrome, hairline, mostly empty - after the cover composition:
   a black field, a small sunlit disc high on the right, and a wide
   outlined wordmark along the bottom. */

:root {
  --bg:          #000000;
  --ink:         #b9b9b9;  /* body copy            */
  --ink-bright:  #ededed;  /* titles               */
  --ink-dim:     #8f8f8f;  /* deks, secondary      */
  --ink-faint:   #7d7d7d;  /* dates, labels        */
  --rule:        #1a1a1a;  /* hairlines            */
  --rule-lit:    #2e2e2e;
  --shell:       min(1100px, 100% - clamp(2rem, 8vw, 7rem));

  --display: "Atkinson Hyperlegible", "Segoe UI", sans-serif;
  --text: "Atkinson Hyperlegible", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, "DejaVu Sans Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* Starfield and the faint sunward glow, held behind everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 85% at 50% -10%, rgba(255, 255, 255, .045), transparent 62%),
    url("../img/stars.png") repeat 0 0 / 1500px 1500px,
    url("../img/grain.png") repeat 0 0 / 256px 256px,
    var(--bg);
}

::selection { background: #2a2a2a; color: #fff; }

a { color: inherit; }

:focus-visible {
  outline: 1px solid var(--ink-dim);
  outline-offset: 4px;
}

img { max-width: 100%; height: auto; }


/* --- Home: the cover composition ------------------------------------- */

.hero {
  width: var(--shell);
  margin-inline: auto;
  min-height: min(88vh, 860px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 7vw, 5rem) 0 clamp(1.5rem, 4vw, 3rem);
}

.hero__disc {
  align-self: flex-end;
  width: clamp(84px, 17%, 200px);
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  margin-right: clamp(0rem, 4vw, 4.5rem);
}

.wordmark {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  text-transform: lowercase;
  white-space: nowrap;
  font-size: clamp(1rem, 7vw, 5rem);
  letter-spacing: .06em;
  line-height: 1;
  color: #d8d8d8;
}

/* The hairline inline of the original lettering. */
@supports (-webkit-text-stroke: 1px #000) {
  .wordmark {
    color: transparent;
    -webkit-text-stroke: 1px #d8d8d8;
  }
}

.hero__mark { margin-top: auto; }

.hero__tagline {
  margin: clamp(1rem, 2.2vw, 1.6rem) 0 0;
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: .34em;
  text-transform: lowercase;
  color: var(--ink-faint);
}


/* --- Transmission index ---------------------------------------------- */

.log {
  width: var(--shell);
  margin: clamp(3rem, 9vw, 7rem) auto clamp(4rem, 10vw, 8rem);
}

.log__label {
  margin: 0 0 2rem;
  font-size: .68rem;
  font-weight: 400;
  letter-spacing: .38em;
  text-transform: lowercase;
  color: var(--ink-faint);
}

.entries { list-style: none; margin: 0; padding: 0; }

.entry { border-top: 1px solid var(--rule); }
.entry:last-child { border-bottom: 1px solid var(--rule); }

.entry__link {
  display: grid;
  grid-template-columns: 6rem 1fr auto;
  align-items: baseline;
  gap: 1.5rem;
  padding: clamp(1.5rem, 3vw, 2.25rem) 0;
  text-decoration: none;
  transition: background-color .25s ease;
}

.entry__link:hover { background-color: rgba(255, 255, 255, .022); }

.entry__no {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .16em;
  color: var(--ink-faint);
}

.entry__title {
  display: block;
  text-transform: lowercase;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--ink-bright);
  letter-spacing: .005em;
  transition: color .25s ease;
}

.entry__dek {
  display: block;
  margin-top: .4rem;
  font-size: .9rem;
  color: var(--ink-dim);
  line-height: 1.6;
}

.entry__date {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  color: var(--ink-faint);
  white-space: nowrap;
}

.entry__link:hover .entry__title { color: #fff; }


/* --- Interior masthead ------------------------------------------------ */

.masthead {
  width: var(--shell);
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3.5rem) 0 0;
}

.masthead__home {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.masthead__disc {
  width: 30px;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.masthead__mark {
  font-family: var(--display);
  text-transform: lowercase;
  font-size: .74rem;
  letter-spacing: .12em;
  color: var(--ink-dim);
  transition: color .25s ease;
}

.masthead__home:hover .masthead__mark { color: var(--ink-bright); }


/* --- Post ------------------------------------------------------------- */

.post {
  width: min(38rem, 100% - clamp(2rem, 8vw, 7rem));
  margin: clamp(4rem, 11vw, 8rem) auto 0;
}

.post__head { margin-bottom: clamp(2.5rem, 6vw, 4rem); }

.post__title {
  margin: 1.1rem 0 0;
  text-transform: lowercase;
  font-size: clamp(1.75rem, 4.6vw, 2.6rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -.012em;
  color: var(--ink-bright);
}

.post__dek {
  margin: 1rem 0 0;
  font-size: 1.05rem;
  color: var(--ink-dim);
  line-height: 1.65;
}

.post__date {
  display: block;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  color: var(--ink-faint);
}


/* --- Prose ------------------------------------------------------------ */

.prose > * + * { margin-top: 1.5em; }

.prose h2, .prose h3 {
  margin-top: 2.75em;
  font-weight: 400;
  color: var(--ink-bright);
  letter-spacing: .005em;
  line-height: 1.3;
}

.prose h2 { font-size: 1.3rem; }
.prose h3 { font-size: 1.08rem; }

.prose a {
  color: var(--ink-bright);
  text-decoration: underline;
  text-decoration-color: var(--rule-lit);
  text-underline-offset: .22em;
  transition: text-decoration-color .25s ease;
}

.prose a:hover { text-decoration-color: var(--ink-dim); }

.prose strong { color: var(--ink-bright); font-weight: 500; }

.prose blockquote {
  margin-inline: 0;
  padding-left: 1.75rem;
  border-left: 1px solid var(--rule-lit);
  color: var(--ink-dim);
  font-style: italic;
}

.prose code {
  font-family: var(--mono);
  font-size: .86em;
  color: var(--ink-bright);
  background: #0e0e0e;
  border: 1px solid var(--rule);
  padding: .12em .4em;
}

.prose pre {
  overflow-x: auto;
  padding: 1.25rem 1.4rem;
  background: #0a0a0a;
  border: 1px solid var(--rule);
  font-size: .86rem;
  line-height: 1.65;
}

.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }

.prose hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin-block: 3em;
}

.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li + li { margin-top: .5em; }
.prose li::marker { color: var(--ink-faint); }


/* --- Footer ----------------------------------------------------------- */

.backlink {
  width: min(38rem, 100% - clamp(2rem, 8vw, 7rem));
  margin: clamp(4rem, 9vw, 6rem) auto 0;
  font-size: .8rem;
  letter-spacing: .06em;
  color: var(--ink-faint);
}

.backlink a { text-decoration: none; transition: color .25s ease; }
.backlink a:hover { color: var(--ink-bright); }

.foot {
  width: var(--shell);
  margin: clamp(5rem, 12vw, 9rem) auto 0;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 2rem;
  justify-content: space-between;
  font-size: .66rem;
  letter-spacing: .22em;
  text-transform: lowercase;
  color: var(--ink-faint);
}

.foot a { text-decoration: none; transition: color .25s ease; }
.foot a:hover { color: var(--ink-bright); }


/* --- Narrow ----------------------------------------------------------- */

@media (max-width: 40rem) {
  @supports (-webkit-text-stroke: 1px #000) {
    .wordmark { -webkit-text-stroke-width: .6px; }
  }
}

@media (max-width: 34rem) {
  .entry__link {
    grid-template-columns: 1fr;
    gap: .55rem;
  }
  .entry__date { grid-row: 1; justify-self: start; }
  .entry__no { grid-row: 1; }
  .entry__link {
    grid-template-columns: auto 1fr;
    grid-template-areas: "no date" "body body";
  }
  .entry__no { grid-area: no; }
  .entry__date { grid-area: date; justify-self: end; }
  .entry__body { grid-area: body; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
