/* callitase.dev
   colours live here. change a thread colour once and it updates everywhere. */
:root {
  color-scheme: dark;
  --forest: #09130e;    /* page */
  --cloth: #0e1c15;     /* raised surfaces, the sampler cloth */
  --ink: #efe8d6;       /* text: warm cream */
  --soft: #97a898;      /* secondary text: faded sage */
  --line: #223629;      /* running-stitch rules, cloth holes */
  --gold: #cfa144;      /* topaz */
  --peacock: #21a79c;
  --garnet: #bd3f63;
  --sapphire: #5682d6;
  --pearl: #e2dac6;
  --link: var(--gold);
  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: "Instrument Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wide: 60rem;
  --read: 40rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--forest); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
  /* a faint linen weave over deep forest green */
  background:
    repeating-linear-gradient(0deg, rgb(255 255 255 / 0.018) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgb(255 255 255 / 0.018) 0 1px, transparent 1px 4px),
    radial-gradient(120% 60rem at 50% 0%, #0f2219 0%, var(--forest) 70%) no-repeat,
    var(--forest);
}
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2.5px; }
:focus-visible { outline: 2.5px solid var(--gold); outline-offset: 4px; border-radius: 4px; }
::selection { background: var(--gold); color: var(--forest); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: var(--forest); padding: 0.5rem 0.9rem; border-radius: 6px; z-index: 5; }
.skip:focus { top: 1rem; }

/* header */
.top, main > *, .foot { max-width: var(--wide); margin-inline: auto; padding-inline: clamp(1.25rem, 5vw, 2.5rem); }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 1.75rem 1.25rem; }
.mark { display: inline-flex; align-items: center; gap: 0.6rem; font: italic 500 1.7rem/1 var(--display); color: var(--ink); text-decoration: none; }
.mark-bloom { width: 1.55rem; height: 1.55rem; flex: none; transition: transform 0.4s; }
.mark:hover .mark-bloom { transform: rotate(90deg); }
.mark-word { display: inline-flex; flex-direction: column; gap: 0.3rem; }
.mark-hem { display: block; width: 100%; height: 0.62rem; }
.mark-hem .x { stroke-width: 2.2; }
@media (prefers-reduced-motion: reduce) { .mark-bloom { transition: none; } }
.top nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.6rem; }
.top nav a { font: italic 400 1.1rem var(--display); color: var(--soft); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { color: var(--gold); }

/* hero: the sampler is the one loud thing on the page */
.hero { padding-block: clamp(1rem, 3vw, 2rem) clamp(2.5rem, 7vw, 4.5rem); }
.cloth {
  background: var(--cloth);
  border-radius: 18px;
  padding: clamp(0.9rem, 3vw, 2rem);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 0 0 7px var(--cloth), inset 0 0 0 8px rgb(207 161 68 / 0.4), 0 24px 50px -30px rgb(0 0 0 / 0.7);
}
.chart { display: block; width: 100%; height: auto; }
.chart-tall { display: none; }
@media (max-width: 40rem) { .chart-wide { display: none; } .chart-tall { display: block; } }
.hole { fill: var(--line); }
.x { fill: none; stroke-width: 2.5; stroke-linecap: round; }
.x-gold { stroke: var(--gold); }
.x-peacock { stroke: var(--peacock); }
.x-garnet { stroke: var(--garnet); }
.x-sapphire { stroke: var(--sapphire); }
.x-pearl { stroke: var(--pearl); }
.intro { margin-top: clamp(1.75rem, 4vw, 2.75rem); font: 300 clamp(1.5rem, 3.6vw, 2.3rem)/1.25 var(--display); letter-spacing: -0.01em; }
.tail { margin-top: 1.25rem; max-width: 44ch; color: var(--soft); font-size: 1.15rem; }

/* the flip board: one flap per letter, like a station departures board */
.board { display: flex; gap: clamp(2px, 0.6vw, 5px); margin-top: 0.75rem; perspective: 600px; }
.flap {
  position: relative; flex: 0 1 1.5em; min-width: 0; height: 1.9em;
  display: grid; place-items: center;
  background: linear-gradient(#060d0a 0 50%, #040907 50% 100%);
  border-radius: 0.18em;
  box-shadow: inset 0 0 0 1px var(--line), 0 0.25em 0.5em -0.3em #000;
  color: var(--gold); font: 500 1.05em/1 var(--display);
}
.flap::after { content: ""; position: absolute; inset: 50% 0 auto; height: 1.5px; background: var(--forest); }
.flap b { font-weight: inherit; }
.flap.turn { animation: flap 0.16s ease-in both; }
@keyframes flap { 0% { transform: rotateX(0); } 49% { transform: rotateX(-88deg); } 51% { transform: rotateX(88deg); } 100% { transform: rotateX(0); } }

@media (prefers-reduced-motion: no-preference) {
  /* stitched bottom-up, one row at a time */
  .chart .x { animation: stitch 0.4s both; animation-delay: calc(var(--row) * 75ms + 150ms); }
  @keyframes stitch { from { opacity: 0; } }
}

/* sections, divided by a running stitch */
.band { padding-block: clamp(2rem, 5vw, 3.25rem); border-top: 2px dashed var(--line); }
.band.first { border-top: 0; }
.band > h2 { font-size: clamp(1.7rem, 3.4vw, 2.2rem); font-style: italic; margin-bottom: 1.5rem; }
.band > h1 { font-size: clamp(2.6rem, 7vw, 4rem); font-style: italic; margin-bottom: 2rem; }
.band > p + p { margin-top: 1rem; }
.empty, .soon { color: var(--soft); }

/* wip tag: a little running-stitch label */
.wip { display: inline-block; vertical-align: middle; margin-left: 0.4em; padding: 0.2em 0.6em 0.25em; border: 1.5px dashed var(--gold); border-radius: 99px; color: var(--gold); font: normal 600 0.72rem/1 var(--body); letter-spacing: 0.06em; }
.project .wip { margin: 0.7rem 0 0; }
h1 .wip, h2 .wip { font-size: 0.8rem; margin-left: 0.6em; position: relative; top: -0.15em; }

/* projects */
.projects { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.project { display: grid; grid-template-columns: 2.4rem 1fr; grid-template-rows: auto 1fr; gap: 0.35rem 1.1rem; align-items: start; background: var(--cloth); border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem 1.6rem 1.6rem; }
.swatch { width: 2.4rem; grid-row: span 2; margin-top: 0.1rem; }
.project h3 { font-size: 1.5rem; }
.project h3 a { color: var(--ink); text-decoration-color: var(--gold); }
.project p { color: var(--soft); max-width: 44ch; }

/* post lists */
.posts { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.posts li { display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 1.5rem; align-items: baseline; padding-block: 1rem; }
.posts li + li { border-top: 1px solid var(--line); }
.posts a { font: 400 1.4rem/1.25 var(--display); color: var(--ink); text-decoration-color: var(--gold); }
.posts time { color: var(--soft); font: italic 400 1rem var(--display); white-space: nowrap; }
.posts p { grid-column: 1 / -1; color: var(--soft); max-width: 60ch; }
.draft { font-size: 0.8rem; color: var(--garnet); border: 1px solid currentColor; border-radius: 99px; padding: 0.05rem 0.55rem; vertical-align: middle; }
.more { margin-top: 1.25rem; }

/* socials */
.socials { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.socials li { display: flex; gap: 0.6rem; align-items: baseline; background: var(--cloth); border: 1px solid var(--line); border-radius: 99px; padding: 0.5rem 1.2rem; }
.socials a, .socials b { font: italic 400 1.15rem var(--display); color: var(--ink); text-decoration-color: var(--gold); }
.socials span { color: var(--soft); font-size: 0.95rem; }

/* a single post */
.post { padding-block: clamp(1.5rem, 5vw, 3.5rem); }
.post > * { max-width: var(--read); }
.post header h1 { font-size: clamp(2.4rem, 6.5vw, 3.75rem); font-weight: 300; text-wrap: balance; }
.post header time { display: block; margin-top: 0.9rem; color: var(--soft); font: italic 400 1.1rem var(--display); }
.prose { margin-top: 2.5rem; font-size: 1.125rem; line-height: 1.7; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: 1.75rem; font-style: italic; margin-top: 2em; }
.prose h3 { font-size: 1.35rem; margin-top: 1.75em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.35em; }
.prose li::marker { color: var(--gold); font-family: var(--display); }
.prose img { max-width: 100%; height: auto; border-radius: 14px; display: block; }
.prose blockquote { margin-inline: 0; padding-left: 1.2rem; border-left: 2px dashed var(--gold); color: var(--soft); font: italic 400 1.2rem/1.5 var(--display); }
.prose code { font: 0.88em var(--mono); background: var(--cloth); border: 1px solid var(--line); border-radius: 6px; padding: 0.1em 0.35em; }
.prose pre { background: var(--cloth); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.2rem; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; }
.prose hr { border: 0; border-top: 2px dashed var(--line); margin-block: 2.5em; }
.pager { display: flex; justify-content: space-between; gap: 2rem; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 2px dashed var(--line); }
.pager a { font: 400 1.2rem var(--display); color: var(--ink); text-decoration-color: var(--gold); }
.pager span { display: block; font: italic 400 0.95rem var(--display); color: var(--soft); }
.pager .next { text-align: right; }

/* weekly r.e.p.o.r.t photo dump */
.kicker { margin-bottom: 0.9rem; color: var(--soft); font: italic 400 1.1rem var(--display); }
.kicker a { color: var(--soft); }
.post > .dump { max-width: none; }
.post > .prose:empty { display: none; }
.dump { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr)); }
.slot { background: var(--cloth); border: 1px solid var(--line); border-radius: 18px; padding: 1.1rem 1.1rem 1.25rem; display: flex; flex-direction: column; gap: 0.8rem; }
.slot-head { display: flex; align-items: center; gap: 0.75rem; perspective: 500px; }
.slot-head b {
  position: relative; display: grid; place-items: center; width: 1.3em; height: 1.45em;
  background: linear-gradient(#060d0a 0 50%, #040907 50% 100%); border-radius: 0.14em;
  box-shadow: inset 0 0 0 1px var(--line), 0 0.2em 0.4em -0.25em #000;
  font: 500 2.1rem/1 var(--display); color: var(--gold); text-transform: uppercase;
}
.slot-head b::after { content: ""; position: absolute; inset: 50% 0 auto; height: 1.5px; background: var(--cloth); }
.slot-head b.turn { animation: flap 0.11s ease-in both; }
.slot-head span { font: italic 400 1.25rem var(--display); color: var(--soft); }
.slot-text { line-height: 1.5; }
.past { margin-top: 3.5rem; padding-top: 1.75rem; border-top: 2px dashed var(--line); max-width: var(--read); }
.past .here { font: 400 1.4rem/1.25 var(--display); color: var(--soft); }
.past h2 { font-size: 1.5rem; font-style: italic; margin-bottom: 0.5rem; }

/* photo carousel: swipe, scroll, or use the buttons */
.post > .carousel { max-width: none; margin-top: 2.25rem; }
.reel { list-style: none; margin: 0; padding: 0 0 0.75rem; display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-color: var(--line) transparent; border-radius: 14px; }
.reel li { flex: none; scroll-snap-align: start; }
.reel figure { margin: 0; }
.reel img { display: block; height: clamp(15rem, 42vw, 24rem); width: auto; max-width: 85vw; object-fit: cover; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); background: var(--cloth); }
.reel figcaption { margin-top: 0.5rem; color: var(--soft); font: italic 400 1rem var(--display); }
.reel-nav { display: flex; gap: 0.6rem; margin-top: 0.5rem; }
.reel-nav button { cursor: pointer; background: var(--cloth); color: var(--ink); border: 1.5px dashed var(--gold); border-radius: 99px; padding: 0.4rem 1rem; font: italic 400 1rem var(--display); }
.reel-nav button:hover { background: var(--line); }

/* footer */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 2rem 3rem; border-top: 2px dashed var(--line); color: var(--soft); font: italic 400 1rem var(--display); }
.foot a { color: var(--soft); }

@media (max-width: 30rem) {
  .posts li { grid-template-columns: 1fr; }
}
