/* One column of ink on old paper, found in a dark building. */

:root {
  --paper: #d9d5c8;        /* cold bone, the way paper looks under a bare bulb */
  --paper-edge: rgba(72, 50, 28, 0.22);
  --ink: #1e1b17;
  --muted: #625c53;
  --rule: #b5ae9f;
  --rust: #7d1a10;         /* the red on the door and on the last line of the memos */
  --serif: "Newsreader", "Iowan Old Style", Palatino, Georgia, serif;
  --mono: "Courier Prime", "Courier New", Courier, monospace;
}
* { box-sizing: border-box; }
html { background: #0b0907; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; padding: 56px 16px; color: var(--ink); font: 400 18px/1.55 var(--serif); font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
a, a:visited { color: inherit; text-decoration: underline; text-decoration-color: rgba(125, 26, 16, 0.55); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rust); text-decoration-color: var(--rust); }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }

/* The sheet itself: bone paper with a grain over everything and a darker rim. */
.page { position: relative; max-width: 680px; margin: 0 auto; padding: 64px 72px 40px; background: var(--paper); box-shadow: inset 0 0 70px var(--paper-edge), 0 0 80px 10px rgba(0, 0, 0, 0.85); }
.page::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.11; mix-blend-mode: multiply; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23g)'/></svg>"); }

header { margin-bottom: 72px; }
h1 { margin: 0; font-size: 36px; font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; }
.tagline { margin: 10px 0 0; color: var(--muted); font-style: italic; }
nav { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 22px; font: 14px/1 var(--mono); letter-spacing: 0.04em; }
nav a { text-decoration: none; }
nav a:hover { text-decoration: underline; }
/* A finger needs more than a line of 14px type. The links grow into the gaps around them, so nothing moves. */
@media (pointer: coarse) {
  nav { gap: 0; margin: 11px 0 -11px -11px; }
  nav a { padding: 11px; }
  .crumb a { padding: 11px 0; }
}
/* The walk is offered once the building is up, and not to a touch screen or to someone who asked for less motion. */
.walk { color: var(--rust); }
@media (pointer: coarse), (prefers-reduced-motion: reduce) { .walk { display: none; } }

main section { margin-bottom: 72px; scroll-margin-top: 24px; }

/* The card: who this is, typed onto an index card at the top of the file. */
.card { padding: 18px 22px 12px; border: 1px solid var(--rule); background: rgba(30, 27, 23, 0.03); font: 14px/1.7 var(--mono); }
.card dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 22px; }
.card dt { padding-top: 2px; color: var(--muted); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.card dd { margin: 0; }
/* Stack and experience: a label in the card's type, then the plain serif. */
.facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 14px 24px; }
.facts dt { padding-top: 5px; color: var(--muted); font: 12px/1.5 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.facts dd { margin: 0; }
.facts dd p { margin: 10px 0 0; }
p + .facts { margin-top: 24px; }
/* How a project with a client goes: numbered in the card's type. */
.steps { margin: 0 0 16px; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; margin: 0 0 10px; padding-left: 44px; counter-increment: step; }
.steps li::before { content: "0" counter(step); position: absolute; left: 0; top: 5px; color: var(--rust); font: 13px/1.5 var(--mono); }
.steps span { display: block; color: var(--muted); font: 12px/1.6 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.facts .when { display: block; color: var(--muted); font: 13px/1.7 var(--mono); }
/* Where the work before language models starts, in Stack and in Experience: a rule and a label. */
h3.era { margin: 40px 0 20px; padding-top: 22px; border-top: 1px solid var(--rule); color: var(--rust); font: 12px/1.5 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
h2 { margin: 0 0 28px; color: var(--muted); font: 13px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
p { margin: 0 0 16px; }

article { margin-bottom: 44px; scroll-margin-top: 24px; }
.meta { margin: 0 0 6px; color: var(--muted); font: 13px/1.5 var(--mono); }
h3 { margin: 0 0 10px; font-size: 24px; font-weight: 500; line-height: 1.25; letter-spacing: -0.005em; }
h3 a { text-decoration: none; }
h3 a:hover { text-decoration: underline; }
.more { color: var(--muted); font: 14px/1 var(--mono); }
.more:hover { color: var(--rust); }
.aside { color: var(--muted); font-size: 16px; font-style: italic; }

/* Work: the deployments as a plain list, and one recommendation set off like a clipping. */

/* Contact: the ways to reach me, typed like the label on a file. */
.ways { font: 14px/1.9 var(--mono); }

/* The shape of a deployment: one typed line of steps that wraps like text, the person's step boxed. */

/* A single entry on its own page: a small way back at the top, the text, a way on at the end. */
.post-header { margin-bottom: 40px; }
.crumb { margin: 0; color: var(--muted); font: 13px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.crumb .walk::before { content: '· '; display: inline-block; white-space: pre; color: var(--muted); }
article h1 { margin: 0 0 20px; }
article h2 { margin: 32px 0 10px; color: var(--ink); font: 500 21px/1.3 var(--serif); letter-spacing: 0; text-transform: none; }
.post-nav { margin-top: 48px; color: var(--muted); font: 14px/1.6 var(--mono); }
.post-nav p { margin: 0 0 10px; }

footer { padding-top: 24px; border-top: 1px solid var(--rule); color: var(--muted); font: 13px/1.5 var(--mono); }
footer p { margin: 0; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 30; padding: 8px 12px; background: var(--paper); color: var(--ink); }
.skip:focus { top: 12px; }

/* The building sits behind everything, drawn at a few hundred lines and scaled up hard. */
#room { position: fixed; inset: 0; z-index: -1; display: block; width: 100%; height: 100%; image-rendering: crisp-edges; image-rendering: pixelated; }
.room-pointing, .room-pointing body { cursor: pointer; }

/* The examine prompt over a note: the cross button, blue as on the pad, blinking in two steps. */
#prompt { position: fixed; left: 0; top: 0; z-index: 5; width: 30px; height: 30px; margin: -15px 0 0 -15px; border: 2px solid #cfc7b3; border-radius: 50%; background: rgba(10, 8, 6, 0.78); color: #7f95d6; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7), 0 0 14px rgba(0, 0, 0, 0.7); pointer-events: none; will-change: transform; animation: prompt-blink 1.2s steps(2, end) infinite; }
#prompt svg { position: absolute; inset: 0; margin: auto; display: block; }
@keyframes prompt-blink { 50% { opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) { #prompt { animation: none; } }
@media not all and (min-width: 920px) and (pointer: fine) { #room { display: none; } }

/* On foot: the page folds away, the building has the screen, and the keys are written at the bottom. */
html.walking { overflow: hidden; }
/* The page comes back the way it went, fading, rather than all at once. */
.page { transition: opacity 0.45s ease-out; }
html.walking .page { opacity: 0; visibility: hidden; transition: opacity 0.5s, visibility 0s 0.5s; }
#hud { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin: 0; padding: 40px 16px 18px; color: #cfc7b3; font: 13px/1.5 var(--mono); letter-spacing: 0.06em; text-shadow: 0 1px 0 #000, 0 0 10px #000; pointer-events: none; background: linear-gradient(to top, rgba(4, 3, 2, 0.55), rgba(4, 3, 2, 0)); transition: opacity 0.4s; }
/* Each key as a cap, with what it does beside it. */
#hud .key { white-space: nowrap; }
#hud kbd { display: inline-block; min-width: 1.4em; margin-right: 7px; padding: 0 5px; border: 1px solid rgba(207, 199, 179, 0.55); border-bottom-width: 2px; border-radius: 3px; background: rgba(10, 8, 6, 0.6); color: #e8e0cc; font: inherit; line-height: 1.35; text-align: center; text-shadow: none; }
#hud #now-playing { flex-basis: 100%; margin-top: 2px; color: #c0b7a4; font-size: 12px; text-align: center; overflow-wrap: anywhere; }
#now-playing a { display: table; margin: 4px auto 0; padding: 2px 4px; color: #cfc7b3; pointer-events: auto; text-decoration: underline; text-underline-offset: 3px; }
#now-playing a:hover { color: #fff7e4; }
#now-playing a:focus-visible { outline: 2px solid #e8e0cc; outline-offset: 3px; }
#hud .look { flex-basis: 100%; text-align: center; color: #e8e0cc; }
/* Once learnt, the remaining controls are quieter, so the room has the screen. */
#hud.short { opacity: 0.7; }
#leave { position: fixed; top: 16px; right: 16px; z-index: 6; padding: 5px 10px; border: 1px solid #cfc7b3; background: rgba(10, 8, 6, 0.78); color: #cfc7b3; font: 13px var(--mono); cursor: pointer; }
#leave:hover, #leave:focus-visible { background: #cfc7b3; color: #000; outline: none; }
/* The sound shortcut is also clickable, even when the other hints fade. */
#hud #mute { padding: 4px 0; margin: -4px 0; border: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-shadow: inherit; line-height: inherit; pointer-events: auto; cursor: pointer; }
#hud #mute:hover span { text-decoration: underline; text-underline-offset: 4px; }
#hud #mute:focus-visible { outline: 2px solid #e8e0cc; outline-offset: 4px; }
#hud #mute[aria-pressed="true"] kbd { background: #cfc7b3; color: #0a0806; }
/* The way back in, on the page, in the same place. */
#back { position: fixed; top: 16px; right: 16px; z-index: 6; padding: 5px 10px; border: 1px solid #cfc7b3; background: rgba(10, 8, 6, 0.78); color: #cfc7b3; font: 13px var(--mono); cursor: pointer; }
#back:hover, #back:focus-visible { background: #cfc7b3; color: #000; outline: none; }
@media not all and (min-width: 920px) and (pointer: fine) { #back { display: none !important; } }
#prompt .label { position: absolute; top: 36px; left: 50%; transform: translateX(-50%); white-space: nowrap; color: #e8e0cc; font: 13px/1 var(--mono); letter-spacing: 0.04em; text-shadow: 0 1px 0 #000, 0 0 8px #000; }
#prompt .label:empty { display: none; }
#prompt.at-left .label { left: -15px; transform: none; }
/* The name of the place, when you come into it, the way the games wrote it across the screen. */
/* What the years are, said once, the first time the visitor steps into them. */
#prompt.at-right .label { left: auto; right: -15px; transform: none; }

/* Examining a note: the building goes dark and the paper fills the screen. */
#memo { width: min(460px, calc(100% - 32px)); padding: 0; border: 0; background: transparent; color: #d8cfbc; overflow: visible; }
#memo::backdrop { background: rgba(4, 3, 2, 0.96); }
/* On foot the paper is not a modal dialog, so the mouse stays taken; it covers the window itself. */
#memo.foot { position: fixed; inset: 0; width: auto; height: auto; max-width: none; max-height: none; margin: 0; background: rgba(4, 3, 2, 0.96); }
#memo.foot[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; padding-bottom: 64px; box-sizing: border-box; }
/* A note in the hand: the sheet is painted on a canvas behind the words (room/paper.js), and its
   shadow follows the tear. Everything sits on a line of --line, so the writing stays on the rules. */
.memo-paper.hand { position: relative; isolation: isolate; box-sizing: border-box; width: 100%; min-height: min(600px, calc(100vh - 170px)); max-height: calc(100vh - 170px); overflow-y: auto; padding: 42px 38px 40px 34px; background: none; box-shadow: none; filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.85)); color: var(--pen); font: 400 27px/var(--line) "Caveat", "Bradley Hand", "Segoe Print", Noteworthy, cursive; }
.memo-paper.hand .sheet { position: absolute; left: 0; top: 0; z-index: -1; pointer-events: none; }
.memo-paper.hand p { margin: 0; text-indent: 26px; word-spacing: 0.1em; }
.memo-paper.hand p:first-child { text-indent: 0; }
.memo-paper.hand .w { display: inline-block; text-indent: 0; transform-origin: 0 75%; }
.memo-paper.hand .memo-red { margin-top: var(--line); text-indent: 0; color: var(--red-pen); font: inherit; font-size: 30px; }
.memo-paper.hand.lined { padding-left: 54px; }
.memo-paper.hand.sticky { min-height: 340px; padding: 40px 28px 34px; }
.memo-paper.hand.printed { padding: 44px 40px 40px; font: 15px/24px var(--mono); }
.memo-paper.hand.printed p { margin: 0 0 24px; text-indent: 0; }
#memo.foot .memo-paper { width: min(520px, calc(100% - 32px)); max-height: calc(100vh - 170px); box-sizing: border-box; overflow-y: auto; }
#memo.foot .memo-paper.hand.long { width: min(680px, calc(100% - 32px)); }
#memo.foot .memo-paper.hand.sticky { width: min(390px, calc(100% - 32px)); }
#memo.foot.room .memo-paper { width: min(720px, calc(100% - 32px)); }
#memo.foot.video .memo-paper { width: 100%; height: 100%; }
.memo-where { margin: 0 0 14px; text-align: center; font: 12px var(--mono); letter-spacing: 2px; text-transform: uppercase; }
.memo-paper { padding: 26px 30px 18px; background: #d6ccb1; color: #221a12; box-shadow: 0 0 0 1px #000, 0 24px 70px #000; transform: rotate(-1deg); font: 16px/1.55 var(--mono); }
.memo-paper p { margin: 0 0 14px; }
.memo-red { color: #8a1208; font: 24px/1.2 "Caveat", "Bradley Hand", "Segoe Print", "Ink Free", Noteworthy, cursive; }
/* How the paper goes away, said under it, so nobody reaches for esc and loses the mouse. */
.memo-close { margin: 14px 0 0; text-align: center; color: #8a8070; font: 12px var(--mono); letter-spacing: 2px; text-transform: uppercase; }
.memo-close:empty { display: none; }

/* Behind a door: a section of the page, or an entry, as a sheet you can scroll, in the page's own type. */
#memo.room { width: min(720px, calc(100% - 32px)); }
#memo.room .memo-paper { max-height: calc(100vh - 150px); padding: 36px 48px 30px; overflow-y: auto; background: var(--paper); color: var(--ink); transform: none; font: 17px/1.55 var(--serif); }
.memo-paper:focus { outline: none; }
/* A screen playing a video: the player has the whole window, since the video goes all the way
   round and you drag it to look. */
#memo.video { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; }
#memo.video .memo-where { position: fixed; left: 0; right: 0; top: 10px; z-index: 1; }
#memo.video .memo-paper { height: 100%; padding: 0; background: #000; transform: none; box-shadow: none; }
#memo.video form { position: fixed; left: 0; right: 0; bottom: 12px; margin: 0; }
#memo.video .memo-text { height: 100%; }
#memo.video iframe { display: block; width: 100%; height: 100%; border: 0; }
#memo.room .memo-paper p { margin: 0 0 16px; }
#memo.room article { margin: 0; }
#memo.room h1 { margin: 0 0 20px; font-size: 28px; }
#memo.room h3 { font-size: 22px; }
#memo.room .card { margin-bottom: 28px; }
#memo.room .memo-open { margin: 28px 0 0; font: 14px/1 var(--mono); }
#memo form { margin-top: 20px; text-align: center; }
#memo button, #entrance button { padding: 3px 10px; border: 1px solid #d8cfbc; background: transparent; color: #d8cfbc; font: 13px var(--mono); cursor: pointer; }
#memo button:hover, #memo button:focus-visible, #entrance button:hover, #entrance button:focus-visible { background: #d8cfbc; color: #000; outline: none; }

/* The note on the door, over the building, when the home page opens: what is here, the keys, and the choice. */
html.entering { overflow: hidden; }
html.entering .page { opacity: 0; visibility: hidden; }
html.entering #back, html.entering #prompt { display: none; }
/* Until the note is up there is only dark, so a line says something is coming. It waits a moment,
   so a fast line never sees it. */
html.entering body:not(:has(#entrance[open]))::after { content: 'Opening the door'; position: fixed; inset: 0; display: grid; place-items: center; color: #c0b7a4; font: 12px/1 var(--mono); letter-spacing: 0.24em; text-transform: uppercase; pointer-events: none; opacity: 0; animation: door-wait 1.6s 0.6s ease-in-out infinite alternate; }
html.entering:lang(pl) body:not(:has(#entrance[open]))::after { content: 'Otwieram drzwi'; }
@keyframes door-wait { from { opacity: 0.25; } to { opacity: 0.85; } }
#entrance { width: min(560px, calc(100% - 32px)); padding: 0; border: 0; background: transparent; color: #d8cfbc; overflow: visible; }
#entrance::backdrop { background: rgba(4, 3, 2, 0.72); }
#entrance .memo-paper { max-height: calc(100vh - 170px); overflow-y: auto; }
#entrance form { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 22px 0 0; }

[hidden] { display: none !important; }
@media print { #room, #memo, .page::before { display: none !important; } .page { box-shadow: none; } }

@media (max-width: 720px) {
  body { padding: 0; font-size: 17px; }
  .page { padding: 40px 20px 32px; box-shadow: none; }
  header { margin-bottom: 52px; }
  main section { margin-bottom: 56px; }
  h1 { font-size: 30px; }
  h3 { font-size: 22px; }
  .card { padding: 14px 16px 6px; }
  .card dl { grid-template-columns: 1fr; gap: 0; }
  .card dd { margin-bottom: 10px; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: 16px; }
}
