@font-face {
  font-family: "Space Mono";
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/space-mono-700.woff2") format("woff2");
}

:root {
  /* Darkest, most common colour along the bottom of city-near.svg. */
  --bg: #120d21;
  color-scheme: dark;
  background: var(--bg);
  color: #f6e8ff;
  font-family: system-ui, sans-serif;
  line-height: 1.5;
}

body {
  margin: 0;
}

/* The header is full width; the feed is a padded, centred column. */
main {
  width: min(100% - 2rem, 540px); /* 540px: widest Instagram embed */
  margin-inline: auto;
}

a {
  color: inherit;
}

.site-header {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-bottom: 2rem;
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size;
}

/* --scroll is set by parallax.js. A higher --speed lags further behind the
   page, so it reads as further away. */
.layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  transform: translate3d(0, calc(var(--scroll, 0px) * var(--speed)), 0);
  will-change: transform;
}

.layer-far { --speed: 0.5; }
.layer-title { --speed: 0.4; }
.layer-mid { --speed: 0.25; }
.layer-near { --speed: 0; }

/* Let clicks pass through to the title link. */
.layer-mid,
.layer-near {
  pointer-events: none;
}

.layer-title {
  display: grid;
  place-items: center;
  font: 700 11cqi/1 "Space Mono", ui-monospace, monospace;
  letter-spacing: -0.02em;
}

.layer-title a {
  color: #f6e8ff;
  text-decoration: none;
  text-shadow: 0 0.06em 0 var(--bg), 0 0 0.35em var(--bg);
}

.post {
  margin-bottom: 3rem;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.post-title {
  margin: 0;
  font-size: 1.125rem;
}

.source-icon {
  flex: none;
  width: 2rem;
  height: 2rem;
}

.embed iframe {
  max-width: 100%;
  border: 0;
}

/* Instagram sets its own size; centre it if narrower than the column. */
.embed-instagram > * {
  margin-inline: auto !important;
}

.embed-youtube iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}
