/* ==========================================================================
   marcokrestan.com

   A low-stimulus, dim room. Deep aubergine ground, lilac for what things are,
   warm ember for when they happened. Nothing flashes, nothing autoplays.
   ========================================================================== */

/* --- fonts (self-hosted; nothing is requested from a third party) -------- */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin-var-italic.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-var.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-var-italic.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/fonts/plexmono-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- tokens ------------------------------------------------------------- */

:root {
  --ink:        #14111c;
  --ink-2:      #1c1728;
  --line:       #2e2740;
  --paper:      #e9e4f2;
  --muted:      #958ab0;
  --iris:       #b6a0f5;
  --iris-deep:  #7a55d6;
  --ember:      #d99a63;

  /* the one light surface on the site: printed music */
  --sheet:      #f7f4ee;
  --sheet-ink:  #1a1622;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body:    "Newsreader", Georgia, "Times New Roman", serif;
  --mono:    "Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --rhythm: 1.65;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* --- reset -------------------------------------------------------------- */

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

[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--paper);
  font: 400 1.0625rem/var(--rhythm) var(--body);
  font-variant-numeric: oldstyle-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

img, svg, audio, video { max-width: 100%; }
img { height: auto; }

a { color: var(--iris); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--paper); }

button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--iris);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--ink-2); color: var(--paper);
  padding: .75rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

/* --- layout ------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: 52rem;
  margin-inline: auto;
  padding: clamp(2.5rem, 8vw, 5.5rem) var(--gutter);
}

.prose-wrap { max-width: calc(var(--measure) + 2 * var(--gutter)); }

/* ==========================================================================
   Masthead
   ========================================================================== */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--gutter);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--ink) 92%, transparent);
  backdrop-filter: blur(8px);
}

.masthead-name {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.0625rem;
  letter-spacing: .01em;
  color: var(--paper);
  text-decoration: none;
}
.masthead-name:hover { color: var(--iris); }

.burger {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  background: none;
  border: 0;
  padding: .4rem .2rem;
  cursor: pointer;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.burger:hover { color: var(--paper); }

.burger-icon {
  width: 26px;
  height: 26px;
  overflow: visible;
  flex: none;
}
.burger-staff line { stroke-opacity: .55; transition: stroke-opacity .3s var(--ease); }
.burger-clef { opacity: .92; transition: opacity .3s var(--ease); }

.burger:hover .burger-staff line { stroke-opacity: .85; }

/* Open state: the staff fades back and the clef leads. */
.burger[aria-expanded="true"] .burger-staff line { stroke-opacity: .2; }
.burger[aria-expanded="true"] .burger-clef { opacity: 1; }

.menu {
  position: absolute;
  top: 100%; right: var(--gutter);
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  min-width: 12rem;
  padding: .5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
}
.menu[data-open="true"] { opacity: 1; visibility: visible; transform: none; }

.menu ul { list-style: none; margin: 0; padding: 0; }
.menu a {
  display: block;
  padding: .55rem .75rem;
  color: var(--paper);
  text-decoration: none;
  font-family: var(--display);
  font-size: .98rem;
  border-radius: 3px;
}
.menu a:hover { background: color-mix(in srgb, var(--iris) 14%, transparent); color: var(--iris); }

/* Without JS the menu is simply always visible. */
.no-js .burger { display: none; }
.no-js .menu {
  position: static; opacity: 1; visibility: visible; transform: none;
  background: none; border: 0; padding: 0; min-width: 0;
}
.no-js .menu ul { display: flex; gap: 1rem; }

/* ==========================================================================
   Splash
   ========================================================================== */

body.splash { justify-content: center; }

.splash-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 88vh;
  padding: 2rem var(--gutter) 1rem;
  text-align: center;
}

.portrait {
  position: relative;
  width: min(19rem, 60vw);
  margin-bottom: clamp(1rem, 4vw, 2.25rem);
  animation: drift 11s ease-in-out 3.6s infinite;
}

.portrait-halo {
  position: absolute;
  inset: -26%;
  pointer-events: none;
  background: radial-gradient(circle at 50% 46%,
    color-mix(in srgb, var(--iris-deep) 46%, transparent) 0%,
    color-mix(in srgb, var(--iris-deep) 12%, transparent) 45%,
    transparent 70%);
  opacity: 0;
  animation: soft-in 2.4s var(--ease) 1.6s forwards;
}

.logo { display: block; width: 100%; height: auto; }
.logo path { fill: var(--paper); }

/* On the splash the mark stays an outline: it draws itself and stops there.
   The filled version is the compact signature, used small in the masthead
   and in the icons, where hairlines would disappear. */
.portrait .logo path {
  fill: none;
  stroke: var(--iris);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 2.8s var(--ease) .3s forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes soft-in { to { opacity: 1; } }

@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

.wordmark {
  font-family: var(--display);
  font-variation-settings: "SOFT" 40, "WONK" 1;
  font-weight: 420;
  font-size: clamp(2.6rem, 11vw, 4.6rem);
  line-height: .95;
  letter-spacing: -.015em;
  margin: 0;
  color: var(--paper);
}
.wordmark-line { display: block; }

.lt {
  display: inline-block;
  opacity: 0;
  filter: blur(14px);
  transform: translateY(26px);
  animation:
    conjure .9s var(--ease) forwards,
    hover 6s ease-in-out infinite;
  animation-delay:
    calc(1.9s + var(--i) * .085s),
    calc(3.1s + var(--i) * .19s);
}
.lt-space { width: .3em; }

@keyframes conjure {
  from { opacity: 0; filter: blur(14px); transform: translateY(26px); }
  to   { opacity: 1; filter: blur(0);    transform: translateY(0); }
}
/* Candles in the Great Hall: small amplitude, unequal phases. */
@keyframes hover {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3.5px); }
}

.tagline {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--muted);
  margin: 1.4rem 0 0;
  opacity: 0;
  animation: fade-up 1s var(--ease) 3.3s forwards;
}

.enter {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  margin-top: clamp(2rem, 7vh, 3.5rem);
  padding: .6rem 1.6rem;
  font-family: var(--mono);
  font-size: .82rem;
  letter-spacing: .34em;
  text-indent: .34em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--iris);
  opacity: 0;
  animation: fade-up 1s var(--ease) 3.7s forwards;
}
.enter svg { animation: nudge 2.6s ease-in-out infinite; }
.enter:hover { color: var(--paper); }
.enter:hover svg { animation-play-state: paused; transform: translateY(3px); }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes nudge {
  0%, 100% { transform: translateY(0); opacity: .55; }
  50%      { transform: translateY(4px); opacity: 1; }
}

/* ==========================================================================
   Timeline — a fretboard. One dot per entry, a double dot at each year,
   the way position markers work on a guitar neck.
   ========================================================================== */

.lede { margin-bottom: clamp(2rem, 6vw, 3.5rem); }
.lede h1 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 30;
  font-weight: 460;
  font-size: clamp(2rem, 6vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 0 0 .5rem;
}
.lede p { color: var(--muted); font-size: .98rem; margin: 0; }

.quiet-link { color: var(--muted); }
.quiet-link:hover { color: var(--iris); }

.empty { color: var(--muted); }
.empty code { font-family: var(--mono); font-size: .85em; color: var(--iris); }

.stave {
  position: relative;
  padding-left: 2.5rem;
}
.stave::before {
  content: "";
  position: absolute;
  left: .5rem; top: .35rem; bottom: .35rem;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent, var(--line) 3rem, var(--line) calc(100% - 3rem), transparent);
}

.year { margin-bottom: 2.75rem; }

.year-label {
  position: relative;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .2em;
  color: var(--muted);
  font-weight: 400;
  margin: 0 0 1.1rem;
}
/* A double barline, the way a score marks the end of a section. Works
   whatever instrument the entry happens to be about. */
.year-label::before,
.year-label::after {
  content: "";
  position: absolute;
  left: calc(-2rem - 6px);
  width: 14px;
  background: var(--iris);
  opacity: .85;
}
.year-label::before { top: .18rem; height: 1.5px; }
.year-label::after  { top: .52rem; height: 4px; }

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

.entry { position: relative; }
/* one notehead per entry, sitting on the line */
.entry::before {
  content: "";
  position: absolute;
  left: calc(-2rem - 3.5px);
  top: 1.3rem;
  width: 8px; height: 5.5px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--muted) 55%, transparent);
  transform: rotate(-22deg);
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.entry:hover::before,
.entry:focus-within::before {
  background: var(--iris);
  transform: rotate(-22deg) scale(1.35);
}

/* The row is a grid, not a link wrapping everything, so the title and each
   hashtag can be their own link. Nested anchors are not valid HTML. */
.entry {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  gap: .3rem 1.1rem;
  align-items: baseline;
  padding: .85rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}
.entry:last-child { border-bottom: 0; }

.entry-date {
  grid-column: 1;
  grid-row: 1;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--ember);
  opacity: .85;
  white-space: nowrap;
}

.entry-title {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--display);
  font-variation-settings: "SOFT" 25;
  font-weight: 420;
  font-size: 1.18rem;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--paper);
  text-decoration: none;
  transition: color .2s var(--ease);
}
.entry-title:hover { color: var(--iris); }

.entry-tags {
  grid-column: 2;
  grid-row: 2;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .9rem;
  margin: 0;
  padding: 0;
}

/* Sits under the date, in the date's column: it is a second date, not a
   second label. Smaller and dimmer, so the entry date still leads. */
.entry-updated {
  grid-column: 1;
  grid-row: 2;
  font-family: var(--mono);
  font-size: .62rem;
  line-height: 1.4;
  letter-spacing: .02em;
  color: var(--ember);
  opacity: .55;
  white-space: nowrap;
}
.entry-tags a {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s var(--ease);
}
.entry-tags a:hover { color: var(--iris); }

/* ==========================================================================
   Topics
   ========================================================================== */

.tagcloud {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .7rem 1.1rem;
  align-items: baseline;
}
.tag-cloud {
  font-family: var(--mono);
  font-size: calc(.8rem + var(--weight, 1) * .085rem);
  text-decoration: none;
}
.tag-count {
  font-size: .62em;
  color: var(--muted);
  margin-left: .3em;
  vertical-align: .35em;
}

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .55rem .9rem; margin: 0; padding: 0; }
.tag {
  font-family: var(--mono);
  font-size: .78rem;
  text-decoration: none;
  color: var(--iris);
  opacity: .85;
}
.tag:hover { opacity: 1; }

/* ==========================================================================
   Prose
   ========================================================================== */

.post-head { margin-bottom: 2.5rem; }
.post-head h1 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 35, "WONK" 1;
  font-weight: 460;
  font-size: clamp(1.9rem, 5.5vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: 0 0 .7rem;
  text-wrap: balance;
}

.dateline {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .06em;
  color: var(--ember);
  opacity: .85;
  margin: 0;
}
.dateline-sep { margin: 0 .5rem; opacity: .5; }
.dateline-updated { color: var(--muted); }

.prose { max-width: var(--measure); }
.prose > * { margin-block: 0; }
.prose > * + * { margin-top: 1.35em; }

.prose h2, .prose h3 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 25;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.01em;
  margin-top: 2.4em;
}
.prose h2 { font-size: 1.4rem; }
.prose h3 { font-size: 1.13rem; color: var(--muted); }

.prose blockquote {
  margin-inline: 0;
  padding-left: 1.2rem;
  border-left: 2px solid var(--iris-deep);
  color: var(--muted);
  font-style: italic;
}

.prose code {
  font-family: var(--mono);
  font-size: .84em;
  background: var(--ink-2);
  padding: .12em .35em;
  border-radius: 3px;
}
.prose pre {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
}
.prose pre code { background: none; padding: 0; font-size: .82rem; }

.prose hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 2.8em 0;
}

.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }

.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.prose th { font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 400; }

/* --- figures, gallery, lightbox trigger --------------------------------- */

.figure { margin: 2.2rem 0; }
.figure img { display: block; width: 100%; border-radius: 3px; }

.lightbox-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: 3px;
}
.lightbox-open img { transition: opacity .25s var(--ease); }
.lightbox-open:hover img { opacity: .82; }

figcaption {
  margin-top: .6rem;
  font-family: var(--mono);
  font-size: .72rem;
  line-height: 1.55;
  color: var(--muted);
}

/* Vector art — engraved notation, diagrams — is black line work, so it sits
   on paper like the score player does rather than on the dark page. */
.figure-vector .lightbox-open {
  background: var(--sheet);
  padding: 1rem 1.1rem;
  cursor: zoom-in;
}
.figure-vector img { display: block; width: 100%; height: auto; }

.lightbox img[data-vector] { background: var(--sheet); padding: 1.5rem; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: .6rem;
  margin: 2.2rem 0 .5rem;
}
.gallery .figure { margin: 0; }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; }

.lightbox {
  border: 0;
  padding: 0;
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
  background: color-mix(in srgb, var(--ink) 96%, black);
  color: var(--paper);
}
.lightbox::backdrop { background: rgba(10, 8, 16, .9); }
.lightbox figure {
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  object-fit: contain;
  border-radius: 3px;
}
.lightbox figcaption { text-align: center; max-width: 40rem; }
.lightbox-close {
  position: absolute;
  top: .5rem; right: .9rem;
  background: none; border: 0;
  font-size: 2rem; line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.lightbox-close:hover { color: var(--paper); }

/* --- audio and score players -------------------------------------------- */

.player, .score, .embed {
  margin: 2.2rem 0;
  padding: 1.1rem 1.2rem;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.player-label {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .8rem;
}

.player audio { width: 100%; display: block; }

/* A sheet of paper laid on the dark page. */
.score-canvas {
  background: var(--sheet);
  border-radius: 3px;
  padding: .9rem .8rem .5rem;
  overflow-x: auto;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--paper) 12%, transparent);
}
.score-canvas svg { max-width: none; height: auto; }
.score-canvas .score-fallback { padding: .6rem .4rem; color: var(--sheet-ink); }
.score-canvas .score-fallback a { color: var(--iris-deep); }

/* the default scrollbar is loud against paper */
.score-canvas { scrollbar-width: thin; scrollbar-color: #c9c2b6 transparent; }
.score-canvas::-webkit-scrollbar { height: 7px; }
.score-canvas::-webkit-scrollbar-track { background: transparent; }
.score-canvas::-webkit-scrollbar-thumb {
  background: #c9c2b6; border-radius: 4px;
}
.score-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem .9rem;
  margin-top: .9rem;
}
.score-readout, .score-download {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--muted);
}
.score-download { margin-left: auto; }
.score-download:hover { color: var(--iris); }
.score-controls button[disabled] { opacity: .4; cursor: not-allowed; }
.score-canvas { min-height: 2rem; }
.score-canvas svg { display: block; }
.score-controls button, .embed-load {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: none;
  border: 1px solid var(--iris-deep);
  color: var(--iris);
  padding: .45rem .95rem;
  border-radius: 3px;
  cursor: pointer;
  transition: background .2s var(--ease);
}
.score-controls button:hover, .embed-load:hover {
  background: color-mix(in srgb, var(--iris) 16%, transparent);
}
.score-fallback { font-size: .9rem; margin: 0; }

/* --- downloadable files: PDF, MIDI, archives ----------------------------- */

.filecard { margin: 2.2rem 0; }

.filecard-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1.1rem;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.filecard-link:hover {
  border-color: color-mix(in srgb, var(--iris) 45%, transparent);
  background: color-mix(in srgb, var(--iris) 7%, var(--ink-2));
}

.filecard-kind {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border: 1px solid color-mix(in srgb, var(--iris) 40%, transparent);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .06em;
  color: var(--iris);
}

.filecard-body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }

.filecard-title {
  font-family: var(--display);
  font-size: 1.02rem;
  line-height: 1.3;
  color: var(--paper);
}
.filecard-link:hover .filecard-title { color: var(--iris); }

.filecard-meta {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .06em;
  color: var(--muted);
}

/* --- click-to-load embeds ------------------------------------------------ */

.embed-title { font-family: var(--display); font-size: 1.05rem; margin: 0 0 .5rem; }
.embed-text { font-size: .88rem; color: var(--muted); margin: 0 0 1rem; max-width: 34rem; }
.embed-external { font-family: var(--mono); font-size: .74rem; margin-left: .8rem; }
.embed iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 3px; display: block; }
.embed.is-loaded { padding: 0; border: 0; background: none; }

/* ==========================================================================
   Post navigation and footer
   ========================================================================== */

.post-foot { margin-top: 3rem; }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.post-nav a { text-decoration: none; color: var(--paper); }
.post-nav-next { text-align: right; grid-column: 2; }
.post-nav-label {
  display: block;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .3rem;
}
.post-nav-title { font-family: var(--display); font-size: .98rem; line-height: 1.3; }
.post-nav a:hover .post-nav-title { color: var(--iris); }

.colophon {
  flex-shrink: 0;
  padding: 2.5rem var(--gutter) 3rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: .72rem;
  line-height: 1.8;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .4rem 2rem;
}
.colophon p { margin: 0; }
.colophon-links,
.colophon-social {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.1rem;
  margin: 0;
  padding: 0;
}
.colophon-links a,
.colophon-social a { color: var(--muted); text-decoration: none; }
.colophon-links a:hover,
.colophon-social a:hover { color: var(--iris); }

/* Set off from the site's own pages: these lead away from here. */
.colophon-social {
  padding-left: 1.1rem;
  border-left: 1px solid var(--line);
}
.colophon-social a { text-decoration: underline; text-decoration-color: var(--line); }

.colophon-note { opacity: .65; margin-left: auto; }

.colophon-splash .colophon-social { padding-left: 0; border-left: 0; }

.colophon-splash {
  border-top: 0;
  justify-content: center;
  padding-bottom: 2rem;
  opacity: 0;
  animation: fade-up 1s var(--ease) 4.2s forwards;
}

/* --- contact ------------------------------------------------------------- */

.mailto {
  font-family: var(--mono);
  font-size: .9rem;
  background: none;
  border: 1px solid var(--iris-deep);
  color: var(--iris);
  padding: .6rem 1.2rem;
  border-radius: 3px;
  cursor: pointer;
  transition: background .2s var(--ease);
}
.mailto:hover { background: color-mix(in srgb, var(--iris) 16%, transparent); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 34rem) {
  .entry { grid-template-columns: 1fr; gap: .25rem; }
  .entry-date, .entry-updated, .entry-title, .entry-tags { grid-column: 1; }
  .entry-date { grid-row: 1; }
  .entry-updated { grid-row: 2; }
  .entry-title { grid-row: 3; }
  .entry-tags { grid-row: 4; }
  .entry-updated { margin-top: -.15rem; margin-bottom: .1rem; }
  .stave { padding-left: 1.6rem; }
  .stave::before { left: .25rem; }
  .year-label::before, .year-label::after { left: calc(-1.35rem - 6px); }
  .entry::before { left: calc(-1.35rem - 3.5px); top: 1rem; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-next { text-align: left; grid-column: 1; }
  .colophon-note { margin-left: 0; }
  .colophon-social { padding-left: 0; border-left: 0; }
}

/* ==========================================================================
   Reduced motion — everything arrives, nothing performs.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .portrait .logo path { stroke-dashoffset: 0; }
  .portrait-halo { opacity: 1; }
  .lt { opacity: 1; filter: none; transform: none; }
  .tagline, .enter, .colophon-splash { opacity: 1; }
}
