repos

darkfurrow.com-rust

mirror archived upstream

A living almanac of seasons, soil, and the quiet knowledge that used to be common. Rust axum with minijinja and Vite.

agriculturealmanacaxumfolk-knowledgegardeningminijinjarustseasonalvite

17.4 KB · 719 lines · SCSS Raw History
  1/* ================================================================
  2 * dark furrow / stylesheet
  3 * editorial almanac. fraunces (variable, with opsz / SOFT / wonk
  4 * axes) carries the serif voice; jetbrains mono carries the data
  5 * voice. one ember accent. warm charcoal ground. svg grain over
  6 * everything for paper-by-firelight texture.
  7 *
  8 * fonts are self-hosted woff2 from @fontsource. no third-party
  9 * cdn calls at runtime.
 10 * ================================================================ */
 11
 12@font-face {
 13  font-family: 'Fraunces';
 14  font-style: normal;
 15  font-weight: 100 900;
 16  font-stretch: 25% 151%;
 17  font-display: swap;
 18  src: url('/static/fonts/fraunces-latin-full-normal.woff2') format('woff2-variations');
 19}
 20
 21@font-face {
 22  font-family: 'Fraunces';
 23  font-style: italic;
 24  font-weight: 100 900;
 25  font-stretch: 25% 151%;
 26  font-display: swap;
 27  src: url('/static/fonts/fraunces-latin-full-italic.woff2') format('woff2-variations');
 28}
 29
 30@font-face {
 31  font-family: 'JetBrains Mono';
 32  font-style: normal;
 33  font-weight: 100 800;
 34  font-display: swap;
 35  src: url('/static/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations');
 36}
 37
 38:root {
 39  /* --- palette ---------------------------------------------------
 40   * warmer than pitch black, leaning toward burnt walnut. one
 41   * ember-gold accent does the heavy lifting; bone is body; ash
 42   * is for italic and secondary text. moss only survives for
 43   * ::selection (it's the most useful "alive" color we have).
 44   * -------------------------------------------------------------- */
 45  --earth:      #16110d;
 46  --earth-2:    #1d1714;
 47  --bark:       #2a2118;
 48  --ash:        #8c8175;
 49  --bone:       #d8cdb9;
 50  --parchment:  #ebe1cc;
 51  --ember:      #d4a574;
 52  --ember-warm: #c8884c;
 53  --moss:       #5a7d4a;
 54
 55  /* atmospheric layers — kept for the daylight cycle in JS */
 56  --glow:   rgba(140, 100, 50, 0.04);
 57  --under1: rgba(26, 23, 20, 0.7);
 58  --under2: rgba(42, 36, 32, 0.5);
 59  --under3: rgba(26, 23, 20, 0.4);
 60
 61  /* --- type ----------------------------------------------------- */
 62  --serif: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
 63  --mono:  'JetBrains Mono', 'IBM Plex Mono', ui-monospace, 'SFMono-Regular',
 64           Menlo, Consolas, monospace;
 65
 66  /* fluid type scale — set only the few that vary by viewport */
 67  --type-wordmark:  clamp(3.2rem, 5vw + 1.4rem, 5.4rem);
 68  --type-season:    clamp(2.6rem, 3vw + 1.4rem, 4.2rem);
 69  --type-section:   clamp(1.5rem, 1vw + 1rem, 1.9rem);
 70  --type-body:      clamp(1.0rem, 0.4vw + 0.85rem, 1.12rem);
 71  --type-meta:      0.72rem;
 72
 73  /* layout */
 74  --measure: 36rem;
 75  --rule:    1px solid rgba(140, 110, 80, 0.18);
 76}
 77
 78* {
 79  margin: 0;
 80  padding: 0;
 81  box-sizing: border-box;
 82}
 83
 84html {
 85  font-size: 17px;
 86  scroll-behavior: smooth;
 87  text-rendering: optimizeLegibility;
 88  -webkit-font-smoothing: antialiased;
 89  -moz-osx-font-smoothing: grayscale;
 90}
 91
 92body {
 93  background-color: var(--earth);
 94  color: var(--bone);
 95  font-family: var(--serif);
 96  font-variation-settings: 'opsz' 14, 'SOFT' 50, 'wght' 380;
 97  font-feature-settings: 'liga', 'kern', 'onum';
 98  line-height: 1.7;
 99  transition: background-color 2s ease, color 2s ease;
100  min-height: 100vh;
101}
102
103main {
104  position: relative;
105  z-index: 1;
106}
107
108::selection {
109  background-color: var(--moss);
110  color: var(--parchment);
111}
112
113
114/* ===== ATMOSPHERIC LAYERS =======================================
115 * three fixed layers stacked behind the content:
116 *   - sky-layer: season radial tint (set by JS)
117 *   - time-layer: time-of-day vertical light (set by JS)
118 *   - grain: SVG noise texture for paper-by-firelight feel
119 * ================================================================ */
120
121#sky-layer {
122  position: fixed;
123  inset: 0;
124  pointer-events: none;
125  z-index: -2;
126  transition: background 4s ease;
127}
128
129#time-layer {
130  position: fixed;
131  inset: 0;
132  height: 100vh;
133  height: 100dvh;
134  pointer-events: none;
135  z-index: -1;
136  transition: background 4s ease;
137}
138
139/* svg-noise grain. heavier than typical (~13%) because this needs
140   to read as paper texture and firelight haze, not just polish.
141   layered with mix-blend-mode overlay so it darkens shadows and
142   warms highlights at the same time. */
143.grain {
144  position: fixed;
145  inset: 0;
146  pointer-events: none;
147  z-index: 9999;
148  opacity: 0.07;
149  mix-blend-mode: soft-light;
150  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='3' stitchTiles='stitch' seed='4'/><feColorMatrix values='0 0 0 0 0.85  0 0 0 0 0.72  0 0 0 0 0.55  0 0 0 0.7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
151}
152
153/* slow breathing warm glow. anchored above center, drifts alpha
154   over 28s so the page pulses like a coal that won't quite go out.
155   sits behind the season radial so it tints rather than dominates. */
156.glow {
157  position: fixed;
158  inset: 0;
159  pointer-events: none;
160  z-index: -3;
161  background: radial-gradient(ellipse 60% 50% at 50% 32%,
162    rgba(212, 165, 116, 0.12) 0%,
163    rgba(180, 120, 60, 0.04) 30%,
164    transparent 65%);
165  animation: ember-breathe 28s ease-in-out infinite;
166}
167
168@keyframes ember-breathe {
169  0%, 100% { opacity: 0.4; transform: translateY(0) scale(1); }
170  50%      { opacity: 0.8; transform: translateY(-10px) scale(1.03); }
171}
172
173
174/* ===== READOUT (the page column) ================================ */
175
176.readout {
177  max-width: var(--measure);
178  margin: 0 auto;
179  padding: 3.5rem 1.6rem 2rem;
180}
181
182
183/* ===== MASTHEAD (almanac coordinate strip) ======================
184 * a tiny mono ribbon at the top: year roman, zone, latitude. like
185 * a ship's log header. justified across the column.
186 * ================================================================ */
187
188.masthead {
189  display: flex;
190  justify-content: space-between;
191  align-items: center;
192  font-family: var(--mono);
193  font-size: var(--type-meta);
194  font-weight: 400;
195  letter-spacing: 0.18em;
196  color: var(--ash);
197  text-transform: uppercase;
198  padding-bottom: 0.9rem;
199  margin-bottom: 3rem;
200  border-bottom: var(--rule);
201  opacity: 0.7;
202}
203
204.masthead-mark:nth-child(2) {
205  /* center mark gets a subtle ember tone */
206  color: var(--ember);
207  opacity: 0.85;
208}
209
210
211/* ===== TITLE BLOCK ============================================== */
212
213.title-block {
214  margin-bottom: 3.5rem;
215}
216
217.wordmark {
218  font-family: var(--serif);
219  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'wght' 320, 'WONK' 1;
220  font-style: normal;
221  font-weight: 400;
222  font-size: var(--type-wordmark);
223  line-height: 0.95;
224  letter-spacing: -0.02em;
225  color: var(--parchment);
226  margin-bottom: 0.4rem;
227}
228
229.wordmark-sub {
230  font-family: var(--serif);
231  font-variation-settings: 'opsz' 14, 'SOFT' 80, 'wght' 320;
232  font-style: italic;
233  font-size: 1rem;
234  color: var(--ash);
235  letter-spacing: 0.01em;
236  animation: breathe 9s ease-in-out infinite;
237}
238
239
240/* ===== DATE LINE (poetic) ======================================= */
241
242.date-line {
243  font-family: var(--serif);
244  font-variation-settings: 'opsz' 14, 'SOFT' 60, 'wght' 320;
245  font-style: italic;
246  font-size: 0.95rem;
247  color: var(--ash);
248  margin-bottom: 2rem;
249  padding-left: 0.05em;
250}
251
252
253/* ===== SEASON BLOCK ============================================= */
254
255.season-block {
256  margin-bottom: 3.5rem;
257}
258
259.season-name {
260  font-family: var(--serif);
261  font-variation-settings: 'opsz' 144, 'SOFT' 80, 'wght' 280;
262  font-weight: 300;
263  font-size: var(--type-season);
264  line-height: 1.0;
265  letter-spacing: -0.015em;
266  color: var(--ember);
267  margin-bottom: 1.4rem;
268  transition: color 2s ease;
269}
270
271.season-note {
272  font-family: var(--serif);
273  font-variation-settings: 'opsz' 18, 'SOFT' 70, 'wght' 380;
274  font-style: italic;
275  font-size: 1.05rem;
276  line-height: 1.75;
277  color: var(--bone);
278  max-width: 30rem;
279}
280
281.season-note p {
282  margin-bottom: 0.6rem;
283}
284
285.season-note p:last-child {
286  margin-bottom: 0;
287}
288
289/* drop cap on the very first letter — illuminated almanac feel */
290.season-note > p:first-child::first-letter {
291  font-family: var(--serif);
292  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'wght' 320;
293  font-style: italic;
294  font-size: 3.6em;
295  line-height: 0.85;
296  float: left;
297  padding: 0.18em 0.18em 0 0;
298  margin-right: 0.04em;
299  color: var(--ember);
300}
301
302
303/* ===== HAIKU ====================================================
304 * a quiet verse between the season note and the buckets. styled as
305 * a printed chapter-break: a short centered hairline rule with a
306 * tiny ember mark on it, then the verse in italic. left-aligned
307 * inside a centered inline-block so the staircase reads naturally.
308 * ================================================================ */
309
310.haiku-block {
311  margin: 0 auto 4rem;
312  text-align: center;
313  padding-top: 2.2rem;
314  position: relative;
315}
316
317/* short centered hairline rule */
318.haiku-block::before {
319  content: '';
320  position: absolute;
321  top: 0;
322  left: 50%;
323  transform: translateX(-50%);
324  width: 6rem;
325  height: 1px;
326  background: linear-gradient(to right,
327    transparent,
328    rgba(140, 110, 80, 0.35) 18%,
329    rgba(140, 110, 80, 0.35) 82%,
330    transparent);
331}
332
333/* small ember mark sitting on the rule */
334.haiku-block::after {
335  content: '';
336  position: absolute;
337  top: -3px;
338  left: 50%;
339  transform: translateX(-50%);
340  width: 7px;
341  height: 7px;
342  border-radius: 50%;
343  background: var(--ember);
344  opacity: 0.55;
345  box-shadow: 0 0 10px rgba(212, 165, 116, 0.45);
346}
347
348.haiku-block blockquote {
349  display: inline-block;
350  text-align: left;
351  font-family: var(--serif);
352  font-variation-settings: 'opsz' 36, 'SOFT' 100, 'wght' 320;
353  font-style: italic;
354  font-size: 1.16rem;
355  line-height: 2.05;
356  color: var(--parchment);
357  letter-spacing: 0.005em;
358  margin-top: 1.6rem;
359}
360
361.haiku-block .haiku-line {
362  display: block;
363  white-space: nowrap;
364}
365
366.haiku-block .haiku-line:nth-child(2) { padding-left: 1rem; }
367.haiku-block .haiku-line:nth-child(3) { padding-left: 2rem; }
368
369
370/* ===== BUCKETS (sections) =======================================
371 * each section: roman numeral counter, small-caps mono label, then
372 * the content. hairline separator above each (instead of below the
373 * heading) so the rule reads as a chapter break.
374 * ================================================================ */
375
376.sections {
377  margin-top: 1rem;
378}
379
380.bucket {
381  position: relative;
382  padding-top: 5rem;
383  margin-bottom: 4.5rem;
384  transition: opacity 0.4s ease;
385}
386
387/* the section glyph: a single ornamental character centered above
388   the section, varied per section so the page reads as a sequence
389   of small ceremonies rather than a stack of cards. all from the
390   Dingbats block so they render reliably in any font; system
391   symbol fonts fall back to cover anything Fraunces lacks. */
392.bucket::before {
393  display: block;
394  text-align: center;
395  font-family: 'Apple Symbols', 'Segoe UI Symbol', 'Noto Sans Symbols 2',
396               'Noto Sans Symbols', var(--serif);
397  font-style: normal;
398  font-weight: 400;
399  font-size: 1.7rem;
400  line-height: 1;
401  color: var(--ember);
402  opacity: 0.65;
403  margin-bottom: 3.4rem;
404  letter-spacing: 0;
405  transition: color 1.4s ease, opacity 1.4s ease;
406}
407
408/* assign a glyph per section, all from U+2700-U+27BF Dingbats so
409   they universally render as monochrome glyphs (never emoji). */
410.bucket-sky::before      { content: '✶'; }   /* six-pointed star — celestial */
411.bucket-garden::before   { content: '❀'; }   /* white florette — flower */
412.bucket-kitchen::before  { content: '❦'; }   /* floral heart — hearth */
413.bucket-foraging::before { content: '✿'; }   /* black florette — wild plant */
414.bucket-folklore::before { content: '✦'; }   /* four-pointed star — story */
415
416.bucket:last-child {
417  margin-bottom: 2rem;
418}
419
420.bucket h2 {
421  font-family: var(--mono);
422  font-weight: 400;
423  font-size: var(--type-meta);
424  letter-spacing: 0.36em;
425  text-transform: lowercase;
426  color: var(--ash);
427  margin-bottom: 2rem;
428  text-align: center;
429  transition: color 0.4s ease;
430}
431
432.bucket h2:hover {
433  color: var(--parchment);
434}
435
436
437/* --- intro line (italic mood for the SKY section) --- */
438
439.bucket-intro {
440  font-family: var(--serif);
441  font-variation-settings: 'opsz' 18, 'SOFT' 70, 'wght' 360;
442  font-style: italic;
443  font-size: 1rem;
444  line-height: 1.7;
445  color: var(--ash);
446  margin-bottom: 1.4rem;
447  max-width: 30rem;
448}
449
450
451/* --- group sub-labels ("in the ground now", "tonight", etc) --- */
452
453.bucket-label {
454  font-family: var(--mono);
455  font-size: var(--type-meta);
456  font-weight: 400;
457  letter-spacing: 0.22em;
458  text-transform: uppercase;
459  color: var(--ember-warm);
460  margin-top: 1.6rem;
461  margin-bottom: 0.7rem;
462  opacity: 0.75;
463}
464
465.bucket-label:first-child,
466.bucket .bucket-intro + .bucket-label {
467  margin-top: 0;
468}
469
470
471/* --- bullet lists --- */
472
473.bucket-list {
474  list-style: none;
475  padding: 0;
476  margin: 0 0 0.4rem 0;
477}
478
479.bucket-list li {
480  font-family: var(--serif);
481  font-variation-settings: 'opsz' 14, 'SOFT' 50, 'wght' 380;
482  font-size: var(--type-body);
483  line-height: 1.65;
484  color: var(--bone);
485  padding: 0.18rem 0 0.18rem 1.5rem;
486  position: relative;
487}
488
489.bucket-list li::before {
490  content: '·';
491  position: absolute;
492  left: 0.4rem;
493  top: 0.18rem;
494  color: var(--ember);
495  opacity: 0.55;
496  font-size: 1.2em;
497  line-height: 1.4;
498}
499
500
501/* --- sky data lines (mono, no bullets — the data IS the point) --- */
502
503.bucket-sky .bucket-list {
504  font-family: var(--mono);
505  font-size: 0.86rem;
506  line-height: 1.95;
507  letter-spacing: 0.02em;
508  margin: 0.4rem 0 1rem;
509  padding: 0.8rem 1.1rem;
510  background: rgba(140, 100, 50, 0.04);
511  border-left: 2px solid var(--ember);
512}
513
514.bucket-sky .bucket-list li {
515  font-family: var(--mono);
516  padding: 0;
517  color: var(--bone);
518}
519
520.bucket-sky .bucket-list li::before { content: ''; }
521
522.bucket-sky .bucket-list li strong {
523  color: var(--ember);
524  font-weight: 500;
525}
526
527
528/* --- lore paragraphs (italic prose under each section) --- */
529
530.bucket-lore {
531  font-family: var(--serif);
532  font-variation-settings: 'opsz' 18, 'SOFT' 70, 'wght' 380;
533  font-style: italic;
534  font-size: 1rem;
535  line-height: 1.8;
536  color: var(--ash);
537  margin-top: 1.2rem;
538  max-width: 32rem;
539}
540
541.bucket-lore:first-of-type {
542  margin-top: 1.4rem;
543}
544
545
546/* ===== STRONG / EMPHASIS ======================================== */
547
548.readout strong {
549  font-variation-settings: 'opsz' 14, 'SOFT' 50, 'wght' 540;
550  color: var(--parchment);
551  font-weight: 540;
552}
553
554.bucket-lore strong {
555  font-style: italic;
556  color: var(--ember);
557}
558
559
560/* ===== FOOTER =================================================== */
561
562footer {
563  max-width: var(--measure);
564  margin: 0 auto;
565  padding: 3rem 1.6rem 4rem;
566  text-align: center;
567  border-top: var(--rule);
568  transition: opacity 0.4s ease, background-color 2s ease;
569}
570
571.footer-status {
572  font-family: var(--mono);
573  font-size: var(--type-meta);
574  font-weight: 400;
575  letter-spacing: 0.22em;
576  text-transform: uppercase;
577  color: var(--ash);
578  opacity: 0.75;
579}
580
581.seasons-nav {
582  display: flex;
583  flex-wrap: wrap;
584  justify-content: center;
585  gap: 0.4rem 1.1rem;
586  margin-top: 1.6rem;
587  opacity: 0.55;
588  transition: opacity 0.6s ease;
589}
590
591.seasons-nav:hover,
592.seasons-nav:focus-within {
593  opacity: 0.9;
594}
595
596.seasons-nav a {
597  font-family: var(--serif);
598  font-variation-settings: 'opsz' 14, 'SOFT' 70, 'wght' 380;
599  font-style: italic;
600  font-size: 0.88rem;
601  color: var(--ash);
602  text-decoration: none;
603  cursor: pointer;
604  letter-spacing: 0.005em;
605  transition: color 0.4s ease, font-variation-settings 0.4s ease;
606  position: relative;
607}
608
609.seasons-nav a:hover {
610  color: var(--bone);
611  font-variation-settings: 'opsz' 14, 'SOFT' 80, 'wght' 460;
612}
613
614.seasons-nav a.active {
615  color: var(--ember);
616  font-variation-settings: 'opsz' 14, 'SOFT' 80, 'wght' 460;
617}
618
619.seasons-nav a:focus-visible {
620  outline: 1px solid var(--ember);
621  outline-offset: 4px;
622}
623
624.credit {
625  margin-top: 2rem;
626  font-family: var(--mono);
627  font-size: 0.66rem;
628  font-weight: 300;
629  letter-spacing: 0.18em;
630  text-transform: uppercase;
631  color: var(--ash);
632  opacity: 0.45;
633  transition: opacity 0.6s ease;
634}
635
636.credit:hover { opacity: 0.85; }
637
638.credit a {
639  color: var(--bone);
640  text-decoration: none;
641  border-bottom: 1px solid rgba(140, 110, 80, 0.25);
642  padding-bottom: 1px;
643  transition: color 0.4s ease, border-color 0.4s ease;
644}
645
646.credit a:hover {
647  color: var(--ember);
648  border-color: var(--ember);
649}
650
651
652/* ===== ANIMATIONS =============================================== */
653
654.word {
655  opacity: 0;
656  display: inline-block;
657  animation: word-in 0.4s ease-out forwards;
658}
659
660.bucket-list li {
661  opacity: 0;
662  animation: word-in 0.45s ease-out forwards;
663}
664
665@keyframes word-in {
666  from { opacity: 0; filter: blur(4px); transform: translateY(2px); }
667  to   { opacity: 1; filter: blur(0);   transform: translateY(0); }
668}
669
670@keyframes breathe {
671  0%, 100% { opacity: 0.65; }
672  50%      { opacity: 1; }
673}
674
675@media (prefers-reduced-motion: reduce) {
676  *, *::before, *::after {
677    animation-duration: 0.01ms !important;
678    animation-iteration-count: 1 !important;
679    transition-duration: 0.01ms !important;
680  }
681}
682
683
684/* ===== RESPONSIVE =============================================== */
685
686@media (max-width: 560px) {
687  html { font-size: 16px; }
688
689  .readout { padding: 2.2rem 1.2rem 1.5rem; }
690  footer   { padding: 2.4rem 1.2rem 3rem; }
691
692  .masthead {
693    font-size: 0.62rem;
694    letter-spacing: 0.16em;
695    margin-bottom: 2.2rem;
696  }
697
698  .title-block { margin-bottom: 2.6rem; }
699  .season-block { margin-bottom: 2.6rem; }
700  .haiku-block { margin-bottom: 3rem; }
701
702  .bucket {
703    padding-top: 2.2rem;
704    margin-bottom: 2.6rem;
705  }
706
707  .bucket h2 {
708    letter-spacing: 0.28em;
709  }
710
711  .bucket-sky .bucket-list {
712    font-size: 0.78rem;
713    padding: 0.7rem 0.9rem;
714  }
715
716  .haiku-block .haiku-line:nth-child(2) { padding-left: 1rem; }
717  .haiku-block .haiku-line:nth-child(3) { padding-left: 2rem; }
718}