/* flurries of latent creativity: the still life.
   A workbench by a window at the Sea Ranch (drawn by /bench/bench.js), and writing set as paper lying on it. */
:root {
  --lum: 1; --room: #120d09; --ink: #231e18; --soft: #6f665a; --wine: #7a1f2e; --rule: rgba(35,30,24,.18);
  --paper: color-mix(in srgb, #f4eee0 calc(var(--lum) * 100%), #dccfb4); --light: #f3ecdf; --dim: rgba(243,236,223,.68);
  --serif: "et-book", Palatino, "Palatino Linotype", Georgia, serif; --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { background: var(--room); }
body { margin: 0; color: var(--ink); font-family: var(--serif); font-size: 21px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; }
.osf { font-family: "et-book-roman-old-style", "et-book", Georgia, serif; }

/* ---------- shared: the bar across the top of the scene ---------- */
.top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; padding: 22px 28px; display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  color: var(--light); text-shadow: 0 1px 12px rgba(0,0,0,.75); font-size: 17px; }
.top a { text-decoration: none; color: var(--dim); border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.top a:hover { color: var(--light); border-color: var(--dim); }
.top .home { font-style: italic; font-size: clamp(18px, 2.2vw, 28px); color: var(--light); margin: 0; font-weight: normal; }
.top .home a { color: var(--light); }
.top nav { display: flex; gap: 20px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- the home page: the whole bench ---------- */
body.home { height: 100vh; height: 100dvh; overflow: hidden; background: #0b0a09; color: var(--light); }
body.home canvas#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
body.home .top { position: fixed; pointer-events: none; }
body.home .top a { pointer-events: auto; }
#veil { position: fixed; inset: 0; background: #0b0a09; transition: opacity 2.2s ease; pointer-events: none; z-index: 5; }
#veil.gone { opacity: 0; }
#tag { position: fixed; z-index: 4; pointer-events: none; transform: translate(-50%, -100%); text-align: center; opacity: 0; transition: opacity .25s; padding-bottom: 14px;
  max-width: min(560px, 92vw); text-shadow: 0 1px 14px rgba(0,0,0,.9), 0 0 3px rgba(0,0,0,.8); }
#tag.on { opacity: 1; }
#tag b { display: block; font-weight: normal; font-size: clamp(17px, 1.7vw, 23px); text-wrap: balance; }
#tag i { display: block; font-size: 15px; color: var(--dim); margin-top: 2px; }
.foot { position: fixed; left: 0; right: 0; bottom: 0; padding: 18px 28px; z-index: 3; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  font-size: 15px; color: var(--dim); text-shadow: 0 1px 10px rgba(0,0,0,.8); }
#clock { display: flex; flex-direction: column; gap: 6px; }
#clock span { font-style: italic; }
#clock .hint { display: none; font-size: 13px; }
@media (max-aspect-ratio: 23/20) { #clock .hint { display: block; } }
body.home canvas#c { touch-action: none; }
#clock .row { display: flex; align-items: center; gap: 10px; }
.foot input[type=range] { -webkit-appearance: none; appearance: none; width: min(240px, 44vw); height: 1px; background: var(--dim); outline-offset: 6px; }
.foot input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; border-radius: 50%; background: var(--light); cursor: pointer; }
.foot input[type=range]::-moz-range-thumb { width: 11px; height: 11px; border: 0; border-radius: 50%; background: var(--light); cursor: pointer; }
body.home button { font: inherit; color: var(--dim); background: none; border: 0; border-bottom: 1px solid currentColor; padding: 0; cursor: pointer; }
body.home button:hover { color: var(--light); }
#plain { text-align: right; }
#plain summary { cursor: pointer; list-style: none; border-bottom: 1px solid currentColor; display: inline-block; }
#plain summary::-webkit-details-marker { display: none; }
#plain .panel { position: absolute; right: 28px; bottom: 48px; padding: 16px 20px; text-align: left; background: rgba(14,12,10,.94); border: 1px solid rgba(243,236,223,.18);
  max-height: 64vh; overflow: auto; width: min(420px, calc(100vw - 32px)); text-shadow: none; }
#plain h2 { font-weight: normal; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin: 14px 0 4px; }
#plain h2:first-child { margin-top: 0; }
#plain ul { margin: 0; padding: 0; list-style: none; }
#plain li { padding: 4px 0; color: var(--light); font-size: 16px; line-height: 1.3; }
#plain li a { text-decoration: none; }
#plain li a:hover { border-bottom: 1px solid var(--dim); }
/* a sheet of paper lifted off the bench: the work tray and the old books */
#sheet { position: fixed; inset: 0; z-index: 6; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(8,6,4,.45); }
#sheet.on { display: flex; }
#sheet article { background: #f1eadb; color: var(--ink); width: min(520px, 100%); max-height: 84vh; overflow: auto; padding: 38px 44px 34px; box-shadow: 0 30px 80px rgba(0,0,0,.6);
  transform: rotate(-.6deg); border-top: 3px solid var(--wine); }
#sheet h2 { margin: 0; font-weight: normal; font-style: italic; font-size: 30px; line-height: 1.15; }
#sheet p { margin: 6px 0 20px; color: var(--soft); font-size: 16px; }
#sheet ol { margin: 0; padding: 0; list-style: none; }
#sheet li { display: flex; gap: 16px; align-items: baseline; padding: 7px 0; border-top: 1px solid rgba(35,30,24,.16); font-size: 19px; line-height: 1.3; }
#sheet li span { color: var(--soft); font-size: 14px; letter-spacing: .08em; min-width: 3em; }
#sheet li a { text-decoration: none; }
#sheet li a:hover { color: var(--wine); }
#sheet button { margin-top: 22px; color: var(--soft); font-size: 15px; }
#sheet button:hover { color: var(--ink); }
/* names in the sky, when you are standing at the window */
#skynames { position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity 1.2s; }
body.out #skynames { opacity: 1; }
#skynames span { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; text-shadow: 0 0 6px rgba(0,0,0,.9); }
#skynames .con { font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: rgba(190,205,240,.5); }
#skynames .star { font-size: 14px; font-style: italic; color: rgba(243,236,223,.72); transform: translate(10px, -130%); }
#skynames .planet { font-size: 15px; color: rgba(255,226,170,.9); transform: translate(12px, -130%); }
#back { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 4; font-style: italic; font-size: 16px; opacity: 0; transition: opacity .8s; pointer-events: none;
  text-shadow: 0 1px 10px rgba(0,0,0,.9); color: var(--dim); white-space: nowrap; }
body.out #back { opacity: 1; }
body.out .top nav, body.out #plain, body.out #tag { opacity: 0; pointer-events: none; transition: opacity .6s; }
/* no WebGL, or the scene failed to load: the index becomes the page */
body.nobench.home { overflow: auto; height: auto; }
body.nobench canvas#c, body.nobench #clock, body.nobench #veil, body.nobench #plain summary { display: none; }
body.nobench .foot, body.nobench #plain .panel { position: static; }
body.nobench .foot { display: block; padding: 96px 16px 60px; }
body.nobench #plain .panel { margin: 0 auto; max-height: none; width: min(560px, 100%); border: 0; background: none; }
body.nobench #plain li { font-size: 19px; }

/* ---------- a page: the bench leaning in on one object, and the writing as a sheet of paper on it ---------- */
.hero { position: relative; height: min(56vh, 600px); min-height: 300px; background: #0b0a09; overflow: hidden; }
.hero.short { height: min(46vh, 460px); min-height: 260px; }
.hero canvas { width: 100%; height: 100%; display: block; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 38%; background: linear-gradient(transparent, var(--room)); pointer-events: none; }
.hero .when { position: absolute; left: 28px; bottom: 96px; z-index: 2; color: var(--dim); font-style: italic; font-size: 15px; text-shadow: 0 1px 10px rgba(0,0,0,.8); }
body.nobench .hero { height: 150px; min-height: 0; }

.sheet { position: relative; z-index: 3; max-width: 1040px; margin: -84px auto 0; padding: 0 16px; }
.sheet > article { background: var(--paper); border-top: 3px solid var(--wine); padding: 60px clamp(22px, 7vw, 96px) 68px; box-shadow: 0 2px 0 rgba(0,0,0,.25), 0 40px 90px -30px rgba(0,0,0,.8);
  transition: background .6s; display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); column-gap: 48px; }
.sheet > article > * { grid-column: 1; min-width: 0; }
.kicker { color: var(--wine); font-size: .72em; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 .9em; }
.sheet h1.title { font-weight: normal; font-style: italic; font-size: clamp(34px, 5.2vw, 58px); line-height: 1.06; margin: 0 0 .6em; letter-spacing: -.01em; text-wrap: balance; }
.margin { grid-column: 2 !important; grid-row: 1 / span 3; align-self: start; position: sticky; top: 24px; font-size: .72em; line-height: 1.4; color: var(--soft); border-top: 1px solid var(--rule); padding-top: .8em; margin-top: .3em; }
.margin b { display: block; font-weight: normal; letter-spacing: .14em; text-transform: uppercase; font-size: .82em; color: var(--wine); margin-bottom: .5em; }
.margin ul { list-style: none; margin: 0; padding: 0; } .margin ul ul { padding-left: 1em; }
.margin li { margin: .35em 0; } .margin a { text-decoration: none; } .margin a:hover { color: var(--wine); }
.more { text-align: center; color: var(--wine); letter-spacing: .6em; margin: 2.2em 0 0; }

.article-entry > :first-child { margin-top: 0; }
.article-entry p { margin: 0 0 1.05em; }
.article-entry h1, .article-entry h2, .article-entry h3, .article-entry h4 { font-weight: normal; font-style: italic; line-height: 1.15; margin: 1.6em 0 .5em; text-wrap: balance; }
.article-entry h1 { font-size: 1.7em; } .article-entry h2 { font-size: 1.5em; } .article-entry h3 { font-size: 1.22em; } .article-entry h4 { font-size: 1.05em; }
.article-entry a { text-decoration: none; background: linear-gradient(var(--wine), var(--wine)) 0 93% / 100% 1px no-repeat; overflow-wrap: anywhere; }
.article-entry a:hover { color: var(--wine); }
.article-entry img, .article-entry video, .article-entry iframe { max-width: 100%; display: block; margin: 1.5em auto; border-radius: 3px; }
.article-entry img, .article-entry video { height: auto; }
.article-entry a:has(img) { background: none; }
.article-entry ul, .article-entry ol { padding-left: 1.3em; margin: 0 0 1.05em; } .article-entry li { margin: .3em 0; }
.article-entry blockquote { margin: 1.3em 0; padding: .1em 0 .1em 1.1em; border-left: 2px solid var(--wine); font-style: italic; color: #4a4338; }
.article-entry blockquote p:last-child { margin-bottom: 0; }
.article-entry code { font-family: var(--mono); font-size: .8em; }
.article-entry :not(pre) > code { background: rgba(35,30,24,.07); padding: .1em .3em; border-radius: 3px; overflow-wrap: anywhere; }
.article-entry pre { overflow-x: auto; font-size: .7em; line-height: 1.5; border-radius: 4px; padding: 14px 16px; margin: 1.4em 0; background: #272822; color: #f8f8f2; }
.article-entry pre code { font-size: 1em; white-space: pre; }
.article-entry .highlight { margin: 1.4em 0; } .article-entry .highlight pre { margin: 0; }
.article-entry table { border-collapse: collapse; font-size: .82em; display: block; overflow-x: auto; margin: 1.4em 0; }
.article-entry th, .article-entry td { border-bottom: 1px solid var(--rule); padding: .4em .7em; text-align: left; vertical-align: top; }
.article-entry th { font-weight: normal; letter-spacing: .1em; text-transform: uppercase; font-size: .82em; color: var(--soft); }
.article-entry hr { border: 0; text-align: center; margin: 2em 0; } .article-entry hr::after { content: "· · ·"; color: var(--wine); letter-spacing: .6em; }
.article-entry figure { margin: 1.6em 0; } .article-entry figcaption { font-size: .78em; color: var(--soft); font-style: italic; margin-top: .5em; text-align: center; }
.article-entry .footnotes { font-size: .8em; color: var(--soft); }
.article-entry .vidspan { max-width: 100%; } .article-entry .vidspan video { max-width: 100%; margin: 0; }
.article-entry mjx-container { overflow-x: auto; overflow-y: hidden; max-width: 100%; }

/* lists of things: posts by year, recipes */
.index h2 { font-weight: normal; font-size: .72em; letter-spacing: .16em; text-transform: uppercase; color: var(--wine); margin: 2.2em 0 .4em; }
.index ol { list-style: none; margin: 0; padding: 0; }
.index li { display: flex; gap: 18px; align-items: baseline; padding: .42em 0; border-top: 1px solid var(--rule); line-height: 1.3; }
.index li time { color: var(--soft); font-size: .72em; letter-spacing: .06em; min-width: 3.6em; white-space: nowrap; }
.index li a { text-decoration: none; } .index li a:hover { color: var(--wine); }
.index .note { color: var(--soft); font-size: .86em; }
.index .note a { background: linear-gradient(var(--wine), var(--wine)) 0 93% / 100% 1px no-repeat; text-decoration: none; }

/* under the sheet: onward, and back to the bench */
.onward { max-width: 1040px; margin: 0 auto; padding: 52px 16px 90px; color: var(--light); }
.onward h3 { font-weight: normal; font-size: .72em; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin: 0 0 1em; }
.onward ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.onward li a { display: block; text-decoration: none; padding: 18px 20px 20px; border: 1px solid rgba(243,236,223,.16); height: 100%; transition: border-color .2s, background .2s; }
.onward li a:hover { border-color: rgba(243,236,223,.5); background: rgba(243,236,223,.04); }
.onward li i { display: block; font-size: 1.05em; line-height: 1.25; }
.onward li small { display: block; color: var(--dim); font-size: .7em; margin-top: .5em; }
.onward p { margin: 2.2em 0 0; font-size: .78em; color: var(--dim); }
.onward p a { color: var(--light); }

@media (max-width: 900px) { .sheet > article { display: block; } .margin { position: static; margin: 0 0 1.6em; } }
@media (max-width: 640px) {
  body { font-size: 19px; }
  .top, .foot { padding: 14px 16px; } .top { font-size: 15px; } .top nav { gap: 12px; }
  #plain .panel { right: 16px; } #sheet article { padding: 28px 24px; } #back { font-size: 13px; }
  .hero .when { left: 16px; } .sheet { padding: 0 8px; margin-top: -64px; } .sheet > article { padding-top: 40px; padding-bottom: 48px; }
  .onward ul { grid-template-columns: 1fr; }
}
@media print { .hero, .onward { display: none; } html { background: #fff; } .sheet { margin: 0; max-width: none; } .sheet > article { box-shadow: none; border: 0; display: block; padding: 0; background: #fff; } .margin { display: none; } }

/* the kitchen is a bright room: give the words something dark to sit on */
body.kitchen .top { background: linear-gradient(rgba(12,10,8,.62), rgba(12,10,8,0)); padding-bottom: 46px; }
body.kitchen .foot { background: linear-gradient(rgba(12,10,8,0), rgba(12,10,8,.66)); padding-top: 54px; }
body.kitchen #tag b, body.kitchen #tag i { background: rgba(14,12,10,.74); padding: 3px 12px; width: fit-content; margin-left: auto; margin-right: auto; text-shadow: none; }
body.kitchen #tag i { color: rgba(243,236,223,.82); padding-bottom: 5px; }
#tvlayer { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
#tvlayer iframe { position: absolute; left: 0; top: 0; border: 0; background: #000; transform-origin: 0 0; pointer-events: auto; }
#tvlayer button { position: absolute; transform: translateX(-100%); pointer-events: auto; font-size: 14px; font-style: italic; background: rgba(14,12,10,.74); color: var(--light); border: 0; padding: 3px 10px; }
