/* type: self-hosted (OFL, licences beside the files) so the site needs no outside requests */
@font-face { font-family: "Cormorant Garamond"; src: url(/fonts/CormorantGaramond-300i-latin-ext.woff2) format("woff2"); font-style: italic; font-weight: 300; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; src: url(/fonts/CormorantGaramond-300i-latin.woff2) format("woff2"); font-style: italic; font-weight: 300; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; src: url(/fonts/CormorantGaramond-300-latin-ext.woff2) format("woff2"); font-style: normal; font-weight: 300; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; src: url(/fonts/CormorantGaramond-300-latin.woff2) format("woff2"); font-style: normal; font-weight: 300; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "EB Garamond"; src: url(/fonts/EBGaramond-400i-latin-ext.woff2) format("woff2"); font-style: italic; font-weight: 400; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "EB Garamond"; src: url(/fonts/EBGaramond-400i-latin.woff2) format("woff2"); font-style: italic; font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "EB Garamond"; src: url(/fonts/EBGaramond-400-latin-ext.woff2) format("woff2"); font-style: normal; font-weight: 400; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "EB Garamond"; src: url(/fonts/EBGaramond-400-latin.woff2) format("woff2"); font-style: normal; font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; src: url(/fonts/Fraunces-300i-latin-ext.woff2) format("woff2"); font-style: italic; font-weight: 300; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; src: url(/fonts/Fraunces-300i-latin.woff2) format("woff2"); font-style: italic; font-weight: 300; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; src: url(/fonts/Fraunces-300-latin-ext.woff2) format("woff2"); font-style: normal; font-weight: 300; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; src: url(/fonts/Fraunces-300-latin.woff2) format("woff2"); font-style: normal; font-weight: 300; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; src: url(/fonts/IBMPlexMono-400-latin-ext.woff2) format("woff2"); font-style: normal; font-weight: 400; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; src: url(/fonts/IBMPlexMono-400-latin.woff2) format("woff2"); font-style: normal; font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lefaif"; src: url(/fonts/Lefaif-Regular.woff2) format("woff2"); font-weight: 400; font-display: block; }
@font-face { font-family: "Lefaif"; src: url(/fonts/Lefaif-Bold.woff2) format("woff2"); font-weight: 700; font-display: block; }

:root {
  --paper: #f4ede2;
  --paper-old: #f1e8da;
  --back: #f2ede4;
  --ink: #2b241f;
  --ink-old: #6a5240;
  --graphite: #3b3836;
  --new: #c4532f;
  --shadow: 74, 51, 32;
  --lift: 0 16px 44px -12px rgba(var(--shadow), .26);
  --lift-hot: 0 27px 60px -14px rgba(var(--shadow), .4);
  --serif: "EB Garamond", Garamond, serif;
  --display: "Cormorant Garamond", Garamond, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --hand: "Lefaif", cursive;
}

* { box-sizing: border-box; margin: 0; }
html, body { background: var(--paper); color: var(--ink); font-family: var(--serif); }
body { overflow-x: clip; }
a { color: inherit; }
.mono { font: 400 10px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; opacity: .55; }

/* ---------- shell ---------- */
.topbar { position: fixed; inset: 0 0 auto 0; display: flex; justify-content: space-between; align-items: center; padding: 28px 40px; z-index: 30; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.topbar nav a { font: 17px var(--serif); opacity: .75; text-decoration: none; margin-left: 26px; }

.avatar { position: relative; display: block; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: #fbf7ef; border: 3px solid #fbf7ef;
  box-shadow: 0 10px 26px -10px rgba(var(--shadow), .45); animation: bob 6s ease-in-out infinite;
  transform-origin: 0 0; transition: scale .5s cubic-bezier(.22, 1, .36, 1); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .4s; }
.avatar .wave, .avatar:hover .face { opacity: 0; }
.avatar:hover { scale: 2.3; }
.avatar:hover .wave { opacity: 1; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg) } 50% { transform: translateY(-5px) rotate(2deg) } }

/* film grain: plain alpha on reading pages, alive only on the landing */
.grain { position: fixed; inset: -200px; z-index: 50; pointer-events: none; background: url(/img/grain.png) 0 0 / 256px; mix-blend-mode: overlay; opacity: .4; }
.page-landing .grain { animation: grain 1s steps(12) infinite; opacity: .5; }
@keyframes grain {
  0% { transform: translate(0, 0) } 10% { transform: translate(-60px, 40px) } 20% { transform: translate(80px, -70px) }
  30% { transform: translate(-120px, 90px) } 40% { transform: translate(30px, 140px) } 50% { transform: translate(-90px, -30px) }
  60% { transform: translate(140px, 60px) } 70% { transform: translate(-40px, -120px) } 80% { transform: translate(100px, 110px) }
  90% { transform: translate(-150px, 20px) } 100% { transform: translate(0, 0) }
}

/* the silent title card */
.titlecard { position: fixed; inset: 0; z-index: 40; background: #14110e; color: #f4eee4; display: grid; place-content: center; text-align: center; opacity: 0; }
.titlecard.on { opacity: 1; }
.titlecard h1 { font: 300 84px "Fraunces", serif; }
.titlecard p { font: italic 300 30px "Fraunces", serif; opacity: .8; margin-top: 10px; }
.titlecard p.mono { font: 400 10px var(--mono); opacity: .45; margin-top: 22px; }

/* lines traced as written, drawn in graphite through a mask */
.phrase { display: inline-block; vertical-align: middle; background: var(--graphite);
  -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; }

/* ---------- landing: a print with a front and a back ---------- */
.page-landing { height: 100vh; overflow: hidden; }
.card { position: fixed; inset: 0; perspective: 2200px; }
.card-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 1.2s cubic-bezier(.22, 1, .36, 1); }
.card.flipped .card-inner { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; overflow: hidden; }
.front { background: var(--paper) url(/img/bg.webp) center / cover; transition: transform .5s cubic-bezier(.55, 0, .45, 1), filter .5s; }
.card.flipped .front { pointer-events: none; }
.leaving .front { transform: translateY(-100vh); filter: blur(8px); }

.lede { position: absolute; left: 10.5vw; top: 19vh; z-index: 2; }
.poem { font: 300 clamp(36px, 5vw, 76px)/1.12 var(--display); letter-spacing: -.01em; max-width: 60vw; }
.poem .w { display: inline-block; opacity: 0; filter: blur(10px); transform: translateY(16px); transition: opacity 1.1s ease-out, filter 1.1s ease-out, transform 1.1s cubic-bezier(.22, 1, .36, 1); }
.poem.on .w { opacity: .92; filter: blur(0); transform: none; }
.credit { margin: 22px 0 0 4px; opacity: 0; transition: opacity 1s 4s; }
.poem.on + .credit { opacity: .5; }

.floats { position: absolute; inset: 0; z-index: 3; }
.float { position: absolute; top: 0; animation: rise linear infinite; }
.float .sway { animation: sway ease-in-out infinite alternate; }
.float img { display: block; width: 100%; cursor: pointer; box-shadow: var(--lift); filter: blur(var(--blur, 0)); transition: transform .5s cubic-bezier(.22, 1, .36, 1), box-shadow .5s, opacity .5s; }
.float .cap { position: absolute; left: 6px; top: calc(100% + 12px); opacity: 0; transition: opacity .4s; white-space: nowrap; }
.float .cap b { display: block; font: italic 400 21px var(--serif); }
.floats.hovering .float:not(.hot) img { opacity: .5; }
.float.hot { z-index: 5; }
.float.hot img { transform: scale(1.16) rotate(calc(-1 * var(--tilt))); box-shadow: var(--lift-hot); }
.float.hot .cap { opacity: 1; }
@keyframes rise { from { transform: translate3d(0, 112vh, 0) } to { transform: translate3d(0, -60vh, 0) } }
@keyframes sway { from { transform: translateX(calc(-1 * var(--amp))) rotate(var(--tilt)) } to { transform: translateX(var(--amp)) rotate(calc(var(--tilt) * .4)) } }

.timehint { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 30; transition: opacity 1s; }
.card.flipped ~ .timehint { opacity: 0; }

/* the back of the print: margin notes */
.back { transform: rotateY(180deg); background: var(--back); pointer-events: none; color: var(--graphite); }
.card.flipped .back { pointer-events: auto; }
.back::before { content: ""; position: absolute; inset: -50%; transform: rotate(-24deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='120'%3E%3Ctext x='0' y='60' font-family='Helvetica, Arial' font-size='13' letter-spacing='3' fill='%237d8aa0' fill-opacity='.08'%3ELEVANTO · ARCHIVAL PAPIER · 2026 ·%3C/text%3E%3C/svg%3E"); }
.margin { position: absolute; z-index: 2; top: 50%; display: flex; gap: 34px; align-items: center; white-space: nowrap; font: 400 24px var(--hand); -webkit-text-stroke: .25px currentColor; }
.margin.left { left: 5vw; transform: translate(-50%, -50%) rotate(-90deg); }
.margin.right { right: 5vw; transform: translate(50%, -50%) rotate(90deg); }
.margin a { text-decoration: none; border-bottom: 1px solid color-mix(in srgb, currentColor 35%, transparent); }
.flipback { position: absolute; right: 7vw; bottom: 4vh; z-index: 2; background: none; border: 0; cursor: pointer; }

/* ---------- stream ---------- */
.stream { position: relative; width: 1440px; margin: 0 auto; min-height: 100vh; }
.stream .item-media { position: absolute; display: block; cursor: pointer; box-shadow: var(--lift); }
.stream .item-media:hover { box-shadow: var(--lift-hot); }
.stream .item-text { position: absolute; cursor: pointer; color: color-mix(in srgb, var(--ink), var(--ink-old) calc(var(--age) * 80%)); }
.stream .item-text:hover .t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.stream .t { font: italic 400 28px/1.2 var(--serif); }
.stream .ex { font: 20px/1.45 var(--serif); opacity: calc(.86 - var(--age) * .06); margin-top: 8px; }
.stream .dot { color: var(--new); }
.seedtag { position: fixed; right: 40px; bottom: 28px; z-index: 30; }

/* ---------- post, 404 ---------- */
.post { max-width: 1440px; margin: 0 auto; padding: 140px 0 160px; }
.page-post { background: color-mix(in srgb, var(--paper), var(--paper-old) calc(var(--age, 0) * 100%)); }
.post-head { display: grid; grid-template-columns: 200px 1fr; gap: 40px; padding: 0 120px 0 150px; align-items: start; }
.post-head .print { width: 170px; transform: rotate(-3deg); box-shadow: var(--lift); }
.post-head h1 { font: 300 clamp(44px, 5.4vw, 78px)/1.05 var(--display); letter-spacing: -.01em; margin: 8px 0 12px; }
.post-head .sub { font: italic 400 26px var(--serif); opacity: .75; }
.post-head .mono { display: block; margin-top: 14px; }
.post-body { width: 640px; margin: 60px 0 0 360px; font: 21px/1.58 var(--serif); }
.post-body p, .post-body ul, .post-body ol, .post-body pre, .post-body blockquote, .post-body img, .post-body table { margin: 0 0 1.1em; }
.post-body ul, .post-body ol { padding-left: 1.2em; }
.post-body img { max-width: 100%; height: auto; display: block; box-shadow: 0 12px 34px -14px rgba(var(--shadow), .3); }
.post-body pre { background: #e8dece; padding: 22px 26px; font: 15px/1.65 var(--mono); overflow-x: auto; }
.post-body code { font: .82em var(--mono); }
.post-body blockquote { font-style: italic; opacity: .8; padding-left: 1em; border-left: 1px solid rgba(43, 36, 31, .3); }
.post-body.verse { font: italic 400 24px/1.6 var(--serif); }
.post-end { margin: 80px 0 0 360px; }
.post-end p { margin-bottom: 18px; }

/* ---------- the year strip: edge printing on film, right at the page edge ---------- */
.years { position: fixed; right: 0; top: 0; bottom: 0; width: 26px; z-index: 20; cursor: ns-resize; --edge: #9a7a52; }
.years .yr { position: absolute; top: var(--p); right: 9px; transform: translateY(-50%) rotate(90deg); font: 9px var(--mono); letter-spacing: .14em; color: var(--edge); opacity: .55; pointer-events: none; }
.years .tick { position: absolute; top: var(--p); right: 0; width: 6px; height: 1px; background: var(--edge); opacity: .5; transition: opacity .3s; }
.years .tick::after { content: ""; position: absolute; inset: -4px 0; }
.years .tick.out { opacity: .12; }
.years .here { position: absolute; top: var(--p); right: 0; width: 12px; height: 2px; background: var(--edge); transition: top .3s; pointer-events: none; }
.years:hover .yr, .years:hover .tick:not(.out) { opacity: .9; }
.years .tick:hover { width: 14px; opacity: 1; }

/* ---------- lenses and kin ---------- */
.lenses { position: absolute; top: 140px; left: 0; right: 0; width: 1440px; margin: 0 auto; padding-left: 160px; display: flex; flex-wrap: wrap; gap: 6px 22px; z-index: 5; }
.lenses a { text-decoration: none; opacity: .45; padding-bottom: 3px; border-bottom: 1px solid transparent; }
.lenses a:hover { opacity: .8; }
.lenses a.on { opacity: .9; border-bottom-color: currentColor; }
.stream > * { transition: opacity .35s ease, translate .45s cubic-bezier(.22, 1, .36, 1), box-shadow .5s; }
.stream:not(.dealt) > * { opacity: 0; translate: 0 18px; }
.stream.relating > *:not(.kin):not(.self) { opacity: .22; }
.stream.relating > .kin { translate: 0 -6px; }
.stream.relating > img.kin, .stream.relating > img.self { box-shadow: var(--lift-hot); }

/* ---------- between the landing and the stream ---------- */
.uphint { position: fixed; left: 50%; top: 104px; transform: translateX(-50%); z-index: 25; opacity: 0; transition: opacity .3s; pointer-events: none; }
.page-stream .stream { transition: translate .4s cubic-bezier(.22, 1, .36, 1); }
.returning .stream, .returning .lenses { translate: 0 100vh !important; filter: blur(8px); transition: translate .5s cubic-bezier(.55, 0, .45, 1), filter .5s; }
.arriving .front { animation: descend 1.3s cubic-bezier(.22, 1, .36, 1) backwards; }
@keyframes descend { from { transform: translateY(-100vh); filter: blur(8px); } }

/* ---------- small screens, reduced motion ---------- */
@media (max-width: 800px) {
  .margin.left { left: 9vw; }
  .margin.right { right: 9vw; }
  .stream { width: 100%; }
  .lenses { top: 100px; width: auto; padding: 0 20px; }
  .seedtag { display: none; }
  .float { width: calc(var(--w) * 2.1vw) !important; }
  .post-head { grid-template-columns: 1fr; padding: 0 20px; }
  .post-body, .post-end { width: auto; margin: 40px 20px 0; }
  .years { top: auto; left: 0; bottom: 0; width: auto; height: 24px; cursor: ew-resize; background: var(--paper); }
  .years .yr { top: auto; bottom: 8px; left: calc(100% - var(--p)); right: auto; transform: translateX(-50%); }
  .years .tick, .years .here { top: auto; bottom: 0; right: auto; left: calc(100% - var(--p)); width: 1px; height: 6px; }
  .years .here { height: 12px; width: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .float, .float .sway, .grain, .avatar { animation: none !important; }
  .float { top: var(--y); }
  .poem .w, .card-inner, .stream > *, .front, .returning .stream, .returning .lenses { transition: none; }
  .stream:not(.dealt) > * { opacity: 1; translate: none; }
  .arriving .front { animation: none; }
}
