/* the almost blog — phosphene
   The colours you see with your eyes closed. Nothing has edges.
   On the home page, things come into focus only where your attention is.
   In an article, each passage comes into focus once as you reach it, then stays sharp. */

:root{
  --paper:#fbf2e2;
  --ink:#57412f;
  --ink-soft:#977a61;
  --accent:#c4672e;
  --apricot:#ffcf96;
  --butter:#ffe6a1;
  --peach:#ffbfa3;
  --blush:#f7d3e2;
  --mist:#d8e2f2;
  --glass:rgba(255,249,236,.62);
  --mono:"IBM Plex Mono",ui-monospace,monospace;
}
*{box-sizing:border-box}
html,body{margin:0}
html{-webkit-text-size-adjust:100%}
body{
  background:var(--paper);color:var(--ink);
  font-family:"Fraunces",Georgia,serif;font-weight:340;
  font-variation-settings:"SOFT" 100,"WONK" 0;
  min-height:100vh;overflow-x:hidden;
}
::selection{background:#ffd9a8;color:#3d2a1c}
a{color:inherit}

/* ---------- the field ---------- */
.field{position:fixed;inset:-20vmax;z-index:0;pointer-events:none}
.blob{position:absolute;border-radius:50%;mix-blend-mode:multiply;opacity:.85;filter:blur(70px);will-change:transform}
.b1{width:60vmax;height:55vmax;background:var(--apricot);left:5%;top:10%;animation:drift1 71s ease-in-out infinite alternate}
.b2{width:50vmax;height:60vmax;background:var(--butter);left:45%;top:-5%;animation:drift2 89s ease-in-out infinite alternate}
.b3{width:45vmax;height:40vmax;background:var(--peach);left:30%;top:45%;animation:drift3 63s ease-in-out infinite alternate}
.b4{width:35vmax;height:35vmax;background:var(--blush);left:65%;top:50%;animation:drift1 97s ease-in-out infinite alternate-reverse}
.b5{width:25vmax;height:30vmax;background:var(--mist);left:10%;top:60%;opacity:.55;animation:drift2 113s ease-in-out infinite alternate-reverse}
@keyframes drift1{to{transform:translate(18vmax,12vmax) scale(1.2,.85)}}
@keyframes drift2{to{transform:translate(-20vmax,15vmax) scale(.8,1.15)}}
@keyframes drift3{to{transform:translate(10vmax,-18vmax) scale(1.3)}}
/* in an article the field is quieter, so the words have the stage */
.page-post .field{opacity:.7}

.attention{position:fixed;z-index:1;pointer-events:none;width:46vmax;height:46vmax;left:0;top:0;
  margin:-23vmax 0 0 -23vmax;border-radius:50%;opacity:0;
  background:radial-gradient(circle,rgba(255,248,225,.75) 0%,rgba(255,240,200,.25) 40%,transparent 70%);
  transition:transform 1.8s cubic-bezier(.2,.7,.2,1),opacity 2s;mix-blend-mode:soft-light}
.attention.on{opacity:1}

.grain{position:fixed;inset:0;z-index:2;pointer-events:none;opacity:.26;mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .33 0 0 0 0 .2 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}

main,footer,nav.top{position:relative;z-index:3}
main{max-width:min(1100px,100%);margin:0 auto;padding:0 clamp(16px,5vw,64px)}

.sigil{width:64px;height:64px;border-radius:50%;
  background:radial-gradient(circle at 40% 38%,#fff9ec 0 18%,var(--apricot) 45%,transparent 72%);
  filter:blur(3px);animation:breathe 9s ease-in-out infinite}
.sigil.small{width:22px;height:22px;filter:blur(1.5px)}
@keyframes breathe{50%{transform:scale(1.25);filter:blur(6px);opacity:.7}}

/* ---------- home ---------- */
.hero{height:92vh;display:flex;flex-direction:column;justify-content:flex-end;padding-bottom:12vh}
.hero .sigil{margin-bottom:5vh}
.murmur{font-size:clamp(34px,5.2vw,68px);line-height:1.08;font-weight:200;letter-spacing:-.01em;max-width:16ch;margin:0;
  font-variation-settings:"SOFT" 100,"WONK" 1,"opsz" 144}
.murmur em{font-style:italic;color:var(--ink-soft)}
.scrollhint{margin-top:6vh;font-size:13px;letter-spacing:.3em;color:var(--ink-soft)}
.scrollhint a{text-decoration:none;border-bottom:1px solid rgba(196,103,46,.35)}

.posts{list-style:none;margin:0;padding:10vh 0 16vh}
.posts .post{display:block;text-decoration:none;padding:7vh 0;will-change:filter,opacity}
.when{font-size:13px;letter-spacing:.24em;color:var(--ink-soft);display:block;margin-bottom:1.2em}
.posts h2{font-weight:250;font-size:clamp(36px,7vw,96px);line-height:.98;margin:0;letter-spacing:-.025em;
  font-variation-settings:"SOFT" 100,"WONK" 1,"opsz" 144;transition:letter-spacing 2.5s cubic-bezier(.2,.7,.2,1)}
.posts a:hover h2,.posts a:focus-visible h2{letter-spacing:.01em}
.posts p{font-size:clamp(17px,1.6vw,20px);line-height:1.6;max-width:34em;margin:1.4em 0 0}
.posts li:nth-child(even) .post{text-align:right}
.posts li:nth-child(even) p{margin-left:auto}
.posts li:nth-child(3n) h2{font-style:italic}
a:focus-visible{outline:2px solid rgba(196,103,46,.5);outline-offset:6px;border-radius:6px}

/* ---------- article ---------- */
nav.top{padding:28px clamp(16px,5vw,64px) 0;max-width:1100px;margin:0 auto}
nav.top .home{display:inline-flex;align-items:center;gap:12px;font-size:13px;letter-spacing:.3em;color:var(--ink-soft);text-decoration:none}

article{max-width:38rem;margin:0 auto;padding:16vh 0 4vh}
article header .when .draft{color:var(--accent)}
article h1{font-size:clamp(42px,7vw,84px);font-weight:200;line-height:1;margin:.35em 0 .9em;letter-spacing:-.025em;
  font-variation-settings:"SOFT" 100,"WONK" 1,"opsz" 144}

.prose{font-size:clamp(18px,1.25vw + 12px,21px);line-height:1.75;font-variation-settings:"SOFT" 100,"WONK" 0}
.prose > *{margin:0 0 1.3em}
.prose > p:first-child:not(:has(> em:first-child, > strong:first-child))::first-letter{font-size:3.3em;float:left;line-height:.85;padding:.06em .1em 0 0;font-weight:200;color:#d98b4e;font-style:italic}
.prose h2{font-size:clamp(28px,3.4vw,40px);font-weight:250;line-height:1.1;margin:2.4em 0 .8em;letter-spacing:-.015em;
  font-variation-settings:"SOFT" 100,"WONK" 1,"opsz" 144}
.prose h3{font-size:1.25em;font-weight:400;font-style:italic;margin:2em 0 .6em}
.prose strong{font-weight:560}
.prose a{color:var(--accent);text-decoration:underline;text-decoration-color:rgba(196,103,46,.35);text-decoration-thickness:1px;text-underline-offset:.2em;transition:text-decoration-color .4s}
.prose a:hover{text-decoration-color:var(--accent)}
.prose blockquote{margin:2.2em 0;padding:0 0 0 1.1em;border-left:1px solid rgba(196,103,46,.35);font-size:1.22em;line-height:1.5;font-style:italic;font-weight:250;color:#7d6049}
.prose blockquote p{margin:0 0 .6em}
.prose blockquote em{font-style:normal}
.prose ul,.prose ol{padding-left:1.3em}
.prose li{margin:.35em 0}
.prose li::marker{color:#d98b4e}
.prose hr{border:0;height:1px;margin:3em auto;width:40%;background:linear-gradient(90deg,transparent,#e9a96a,transparent)}

.prose figure{margin:2.4em 0}
.prose img{display:block;max-width:100%;height:auto;margin:0 auto;border-radius:18px;
  box-shadow:0 0 0 1px rgba(196,103,46,.12),0 30px 70px -35px rgba(196,103,46,.55)}
.prose figcaption{text-align:center;font-size:.8em;color:var(--ink-soft);margin-top:1em;font-style:italic}

.prose code{font-family:var(--mono);font-size:.82em}
.prose :not(pre) > code{background:rgba(255,214,160,.45);padding:.1em .35em;border-radius:6px}
.prose pre{margin:2em 0;padding:1.3em 1.5em;border-radius:18px;overflow-x:auto;line-height:1.6;
  background:var(--glass);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  box-shadow:0 0 0 1px rgba(196,103,46,.13)}
.prose pre code{font-size:.78em;color:#5a4433}
/* syntax: warm, low-contrast, never neon */
.hljs-keyword,.hljs-built_in,.hljs-literal{color:#c05a22}
.hljs-string,.hljs-regexp{color:#7b7a2c}
.hljs-number{color:#b46a2a}
.hljs-comment,.hljs-quote{color:#ad9680;font-style:italic}
.hljs-title,.hljs-title.function_{color:#9c4f6c}
.hljs-attr,.hljs-variable,.hljs-property{color:#6a5590}
.hljs-tag,.hljs-name{color:#c05a22}

.prose table{border-collapse:collapse;width:100%;font-size:.88em}
.prose th,.prose td{padding:.5em .7em;border-bottom:1px solid rgba(196,103,46,.2);text-align:left}

/* passages surface once as you reach them */
.js .prose > *,.js article header{filter:blur(6px);opacity:.15;transition:filter 1.6s cubic-bezier(.2,.7,.2,1),opacity 1.6s cubic-bezier(.2,.7,.2,1)}
.js .prose > .seen,.js article header.seen{filter:none;opacity:1}

.divider{height:1px;margin:6em auto 3em;width:40%;background:linear-gradient(90deg,transparent,#e9a96a,transparent)}
.back{text-align:center;font-size:14px;letter-spacing:.24em;margin:0 0 4vh}
.back a{color:var(--ink-soft);text-decoration:none}
.back a:hover{color:var(--accent)}

footer{text-align:center;padding:10vh 16px 12vh;color:var(--ink-soft);font-size:13px;letter-spacing:.2em;line-height:2.2}
footer a{text-decoration:none}
footer a:hover{color:var(--accent)}
footer .sigil{margin:0 auto 3vh}

@media (prefers-reduced-motion:reduce){
  .blob,.sigil{animation:none}
  .attention{display:none}
  .js .prose > *,.js article header{filter:none;opacity:1;transition:none}
}
@media print{
  .field,.attention,.grain,nav.top,footer,.divider,.back{display:none}
  body{background:#fff}
}
