/* George Stathopoulos' blog: an 80s terminal. Amber on black by default; green and paper on request. */

@font-face { font-family: "VT323"; src: url("fonts/vt323-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("fonts/space-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("fonts/space-mono-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
	--bg: #0b0a08;
	--bg2: #15120d;
	--fg: #ffb000;
	--text: #f2d49a;
	--dim: #9a7424;
	--line: #3a2d10;
	--accent: #ffd36b;
	--on-accent: #0b0a08;
	--glow: 0 0 6px rgba(255, 176, 0, .55), 0 0 22px rgba(255, 176, 0, .2);
	--scan: rgba(0, 0, 0, .22);
	--display: "VT323", "IBM Plex Mono", ui-monospace, Menlo, monospace;
	--body: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	--wrap: 980px;
	--ds: 1; /* display size scale: VT323 is small for its size, the other fonts are not */
	--dw: 400;
}
:root[data-font="plex"] { --display: "IBM Plex Mono", ui-monospace, monospace; --ds: .74; --dw: 700; }
:root[data-font="jetbrains"] { --display: "JetBrains Mono", ui-monospace, monospace; --body: "JetBrains Mono", ui-monospace, monospace; --ds: .72; --dw: 700; }
:root[data-font="space"] { --display: "Space Mono", ui-monospace, monospace; --body: "Space Mono", ui-monospace, monospace; --ds: .72; --dw: 700; }
:root[data-font="system"] { --display: ui-monospace, "SF Mono", Menlo, Consolas, monospace; --body: ui-monospace, "SF Mono", Menlo, Consolas, monospace; --ds: .74; --dw: 700; }
:root[data-theme="green"] {
	--bg: #050a05; --bg2: #0a140a; --fg: #33ff66; --text: #b6ffc9; --dim: #2e9c4d; --line: #123a1d; --accent: #8dffab;
	--glow: 0 0 6px rgba(51, 255, 102, .5), 0 0 22px rgba(51, 255, 102, .18);
}
:root[data-theme="white"] {
	--bg: #090909; --bg2: #141414; --fg: #f2f2f2; --text: #d4d4d4; --dim: #8a8a8a; --line: #333; --accent: #ffffff;
	--glow: 0 0 6px rgba(255, 255, 255, .4), 0 0 22px rgba(255, 255, 255, .14);
}
:root[data-theme="paper"] {
	--bg: #f4efe2; --bg2: #ebe4d1; --fg: #1d1a12; --text: #2b261a; --dim: #7a6f55; --line: #cfc6ac; --accent: #b3470f; --on-accent: #f4efe2;
	--glow: none; --scan: rgba(0, 0, 0, 0);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
	margin: 0; background: var(--bg); color: var(--text); font-family: var(--body);
	font-size: 19px; line-height: 1.7; min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}
/* CRT: faint scanlines and a vignette. Never over text hit-areas. */
body::before, body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; }
body::before { background: repeating-linear-gradient(to bottom, transparent 0, transparent 2px, var(--scan) 3px); }
body::after { background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .35) 100%); }
:root[data-theme="paper"] body::after { display: none; }

a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { background: var(--accent); color: var(--on-accent); text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px dashed var(--fg); outline-offset: 3px; }
::selection { background: var(--fg); color: var(--bg); }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.dim { color: var(--dim); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--fg); color: var(--bg); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* ------------------------------------------------------------------ Bar */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 60; opacity: 0; transition: opacity .3s; }
.progress i { display: block; height: 100%; width: 100%; background: var(--fg); box-shadow: var(--glow); transform: scaleX(var(--read, 0)); transform-origin: left; }
.is-post .progress { opacity: 1; }

.bar { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(6px); border-bottom: 1px dashed var(--line); }
.bar-in { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.prompt { font-family: var(--display); font-weight: var(--dw); font-size: calc(30px * var(--ds)); line-height: 1; color: var(--fg); text-decoration: none; text-shadow: var(--glow); white-space: nowrap; }
.prompt:hover { background: none; color: var(--accent); }
.prompt .h { color: var(--accent); } .prompt .p { color: var(--dim); }
.caret { display: inline-block; width: .55em; height: 1em; margin-left: .15em; background: var(--fg); vertical-align: -.12em; animation: blink 1.05s steps(1) infinite; box-shadow: var(--glow); }
.caret.big { width: .5em; height: .85em; margin-left: .1em; vertical-align: -.05em; }
@keyframes blink { 50% { opacity: 0; } }

.nav { display: flex; gap: 6px 22px; margin-left: auto; font-size: 16px; }
.nav a { white-space: nowrap; text-decoration: none; color: var(--text); padding: 2px 6px; }
.nav a .cmd { color: var(--dim); }
.nav a:hover, .nav a[aria-current="page"] { background: var(--fg); color: var(--bg); }
.nav a:hover .cmd, .nav a[aria-current="page"] .cmd { color: var(--bg); }
.bar-tools { display: flex; gap: 10px; }
.tool { font: inherit; font-size: 15px; color: var(--dim); background: none; border: 0; padding: 4px 6px; cursor: pointer; }
.tool:hover { color: var(--fg); }
.tool.menu { display: none; }

/* ----------------------------------------------------------------- Hero */
.hero { position: relative; min-height: calc(100vh - var(--bar-h, 65px)); min-height: calc(100svh - var(--bar-h, 65px)); display: flex; align-items: center; overflow: clip; }
.hero-in { padding-block: clamp(10px, 3vh, 28px) clamp(56px, 9vh, 76px); will-change: opacity, transform; opacity: calc(1 - var(--p, 0) * 1.15); transform: translateY(calc(var(--p, 0) * -48px)); filter: blur(calc(var(--p, 0) * 6px)); }
.boot { margin: 0 0 clamp(16px, 4vh, 36px); font: 16px/1.5 var(--body); color: var(--dim); white-space: pre-wrap; min-height: 9.2em; }
.boot .ok { color: var(--accent); font-weight: 400; }
.boot .err { color: #ff4d4d; font-weight: 400; text-shadow: 0 0 8px rgba(255, 77, 77, .6); animation: blink 1.05s steps(1) 3; }
:root[data-theme="paper"] .boot .err { color: #c0261c; text-shadow: none; }
.hero-title .br { display: none; }
.hero-title { margin: 0; font: var(--dw) calc(clamp(52px, min(10.4vw, 8.4vh), 118px) * var(--ds))/.95 var(--display); color: var(--fg); text-shadow: var(--glow); letter-spacing: .01em; text-wrap: balance; }
.hero-sub { max-width: 54ch; margin: clamp(18px, 4vh, 36px) 0 clamp(18px, 3.5vh, 32px); font-size: clamp(17px, min(2.4vw, 2.7vh), 23px); line-height: 1.55; color: var(--text); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; }
.scroll-hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); font-size: 15px; color: var(--dim); text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 2px; opacity: calc(1 - var(--p, 0) * 3); }
.scroll-hint span { animation: bob 1.6s ease-in-out infinite; }
.scroll-hint:hover { background: none; color: var(--fg); }
@keyframes bob { 50% { transform: translateY(5px); } }

.btn { display: inline-block; font: inherit; font-size: 18px; padding: 10px 18px; background: var(--fg); color: var(--bg); text-decoration: none; border: 2px solid var(--fg); box-shadow: 4px 4px 0 var(--line); transition: transform .12s, box-shadow .12s; }
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--line); }
.btn.ghost { background: transparent; color: var(--fg); }
.btn.ghost:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }

/* ----------------------------------------------------------------- Lists */
.sec-title, .crumb { font: var(--dw) calc(30px * var(--ds))/1.1 var(--display); color: var(--fg); text-shadow: var(--glow); margin: 0 0 22px; letter-spacing: .02em; }
.crumb { font-size: calc(26px * var(--ds)); margin-bottom: 14px; }
.list-sec { padding-block: 72px 24px; }
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px dashed var(--line); }
.row { border-bottom: 1px dashed var(--line); }
.row a { display: grid; grid-template-columns: 3.2ch 1fr auto; gap: 18px; padding: 24px 12px; text-decoration: none; color: var(--text); align-items: start; }
.row-n { font-family: var(--display); font-size: calc(30px * var(--ds)); line-height: 1.2; color: var(--dim); }
.row-main { display: grid; gap: 4px; }
.row-title { font: var(--dw) calc(clamp(30px, 5vw, 42px) * var(--ds))/1.05 var(--display); color: var(--fg); text-shadow: var(--glow); }
.row-sum { font-size: 17px; color: var(--text); max-width: 62ch; }
.row-meta { font-size: 14px; color: var(--dim); }
.row-go { font-family: var(--display); font-size: calc(34px * var(--ds)); color: var(--dim); transition: transform .15s; align-self: center; }
.row a:hover { background: var(--fg); color: var(--bg); }
.row a:hover .row-title, .row a:hover .row-n, .row a:hover .row-sum, .row a:hover .row-meta, .row a:hover .row-go, .row a:hover .tag { color: var(--bg); text-shadow: none; }
.row a:hover .row-go { transform: translateX(6px); }
.tag { color: var(--accent); }
.more { margin: 26px 0 0; }
.pitch { padding-block: 56px 96px; max-width: 760px; }
.pitch p { margin: 0 0 18px; }

.page-head { padding-block: 64px 28px; }
.page-title { margin: 0; font: var(--dw) calc(clamp(48px, 9vw, 92px) * var(--ds))/.95 var(--display); color: var(--fg); text-shadow: var(--glow); }
.lede { font-size: 21px; max-width: 46ch; margin: 18px 0 0; }
.projs { list-style: none; margin: 0; padding: 0 0 80px; display: grid; gap: 22px; }
.proj { border: 2px solid var(--line); padding: 22px 24px; background: var(--bg2); }
.proj h2 { margin: 0; font: var(--dw) calc(40px * var(--ds))/1 var(--display); color: var(--fg); text-shadow: var(--glow); }
.proj h2 a { text-decoration: none; color: inherit; }
.proj p { margin: 8px 0 0; }
.kind { color: var(--dim); font-size: 15px; }
.proj-links { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 16px; margin-top: 14px !important; }

/* ------------------------------------------------------------------ Post */
.post { padding-block: 56px 80px; max-width: 760px; }
.post-head { margin-bottom: 40px; }
.post-title { margin: 0 0 18px; font: var(--dw) calc(clamp(46px, 8.4vw, 84px) * var(--ds))/.96 var(--display); color: var(--fg); text-shadow: var(--glow); text-wrap: balance; }
.post-meta { margin: 0 0 18px; font-size: 15px; color: var(--dim); }
.post-lede { font-size: 22px; line-height: 1.5; color: var(--accent); margin: 0; padding-left: 18px; border-left: 3px solid var(--fg); }

.prose { font-size: 20px; line-height: 1.75; }
.prose > * { margin: 0 0 1.25em; }
.prose h2 { font: var(--dw) calc(40px * var(--ds))/1.05 var(--display); color: var(--fg); text-shadow: var(--glow); margin: 2em 0 .6em; }
.prose h2::before { content: "## "; color: var(--dim); }
.prose h3 { font: var(--dw) calc(30px * var(--ds))/1.1 var(--display); color: var(--accent); margin: 1.8em 0 .5em; }
.prose h3::before { content: "### "; color: var(--dim); }
.prose strong { color: var(--fg); font-weight: 700; }
.prose em { color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .45em; }
.prose ul { list-style: none; padding-left: 1.6em; }
.prose ul li { position: relative; }
.prose ul li::before { content: ">"; position: absolute; left: -1.5em; color: var(--fg); }
.prose blockquote { margin-inline: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--fg); color: var(--accent); font-size: 1.08em; }
.prose blockquote p { margin: 0 0 .6em; }
.prose code { font-family: var(--body); font-size: .88em; background: var(--bg2); padding: 2px 6px; border: 1px solid var(--line); color: var(--accent); }
.prose pre { background: var(--bg2); border: 1px solid var(--line); border-left: 4px solid var(--fg); padding: 16px 18px; overflow-x: auto; font-size: 16px; line-height: 1.55; }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; color: var(--text); }
.prose img { max-width: 100%; height: auto; border: 2px solid var(--line); }
.prose hr { border: 0; border-top: 1px dashed var(--line); margin: 2.4em 0; }
.eof { color: var(--dim); text-align: center; margin: 56px 0 40px; font-size: 15px; letter-spacing: .3em; }

.project-box { border: 2px solid var(--fg); padding: 22px 24px; margin-bottom: 40px; box-shadow: 6px 6px 0 var(--line); }
.project-box h2 { margin: 0; font: var(--dw) calc(44px * var(--ds))/1 var(--display); color: var(--fg); text-shadow: var(--glow); }
.project-box p { margin: 10px 0 0; }
.project-box .crumb { font-size: calc(22px * var(--ds)); margin: 0 0 8px; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 30px; }
.pager a { display: block; padding: 16px 18px; border: 1px dashed var(--line); text-decoration: none; color: var(--text); }
.pager a.next { text-align: right; }
.pager small { display: block; color: var(--dim); font-size: 14px; }
.pager span { font: var(--dw) calc(26px * var(--ds))/1.1 var(--display); color: var(--fg); }
.pager a:hover { background: var(--fg); color: var(--bg); }
.pager a:hover small, .pager a:hover span { color: var(--bg); }
.back { margin: 0; }

/* ---------------------------------------------------------------- Footer */
.foot { border-top: 1px dashed var(--line); padding-block: 40px 56px; margin-top: 40px; font-size: 16px; }
.foot-line { font: var(--dw) calc(26px * var(--ds))/1 var(--display); color: var(--fg); margin: 0 0 14px; }
.foot-projects { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 6px; }
.foot-projects span { color: var(--dim); }
.foot-meta { margin: 0; color: var(--dim); font-size: 14px; line-height: 1.8; }
.heart { color: var(--accent); }

/* --------------------------------------------------------------- Motion */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Opening a post: the hero and list dissolve, then the post types in. */
.hero-in, .list-sec, .pitch { transition: opacity .38s ease, transform .38s ease, filter .38s ease; }
.leaving .hero-in, .leaving .list-sec, .leaving .pitch, .leaving .scroll-hint { opacity: 0 !important; transform: translateY(-26px) scale(.985) !important; filter: blur(8px) !important; }
.leaving .bar, .leaving .foot { opacity: .3; transition: opacity .38s ease; }

.js .entering .post-head > *, .js .entering .prose { opacity: 0; animation: rise .65s ease forwards; }
.js .entering .post-head > :nth-child(1) { animation-delay: .05s; }
.js .entering .post-head > :nth-child(2) { animation-delay: .22s; }
.js .entering .post-head > :nth-child(3) { animation-delay: .4s; }
.js .entering .post-head > :nth-child(4) { animation-delay: .52s; }
.js .entering .prose { animation-delay: .7s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.js .entering .post-head .crumb { overflow: hidden; white-space: nowrap; width: 0; animation: type .7s steps(30) .05s forwards, rise .1s linear forwards; opacity: 1; }
@keyframes type { to { width: 100%; } }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.js .reveal { opacity: 1; transform: none; }
	.hero-in { opacity: 1; transform: none; filter: none; }
	.js .entering .post-head > *, .js .entering .prose { opacity: 1; }
	.js .entering .post-head .crumb { width: auto; }
	.caret { opacity: 1; }
}

/* ------------------------------------------------------------ Responsive */
@media (max-width: 820px) {
	body { font-size: 18px; }
	.bar-in { flex-wrap: wrap; gap: 0 12px; min-height: 58px; }
	.prompt { font-size: calc(26px * var(--ds)); }
	.bar-tools { margin-left: auto; }
	.tool.menu { display: inline-block; }
	.nav { display: none; flex-basis: 100%; flex-direction: column; margin: 0; padding: 6px 0 16px; font-size: 19px; order: 5; }
	.nav.open { display: flex; }
	.nav a { padding: 8px 6px; }
	.row a { grid-template-columns: 1fr auto; padding: 20px 6px; }
	.row-n { display: none; }
	.pager { grid-template-columns: 1fr; }
	.pager a.next { text-align: left; }
	.prose { font-size: 18.5px; }
	.prose h2 { font-size: calc(36px * var(--ds)); }
}
@media (max-width: 480px) {
	.wrap { width: min(100% - 32px, var(--wrap)); }
	.boot { font-size: 14px; }
	.hero-sub { margin: 28px 0 26px; }
	.btn { font-size: 17px; padding: 10px 14px; }
	.post-lede { font-size: 20px; }
}
@media print { body::before, body::after, .bar, .progress, .scroll-hint { display: none; } body { background: #fff; color: #000; } a { color: #000; } }

/* ----------------------------------------------------------- Style panel */
.bar-in { position: relative; }
.style-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(92vw, 440px); background: var(--bg); border: 2px solid var(--fg); box-shadow: 6px 6px 0 var(--line); padding: 16px 18px 18px; z-index: 70; }
.style-panel[hidden] { display: none; }
.sp-h { margin: 0 0 8px; font-size: 14px; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; }
.sp-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.sp-row:last-child { margin-bottom: 0; }
.sp-btn { font: inherit; font-size: 16px; color: var(--text); background: none; border: 1px dashed var(--line); padding: 6px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.sp-btn:hover { border-color: var(--fg); color: var(--fg); }
.sp-btn[aria-pressed="true"] { background: var(--fg); color: var(--bg); border: 1px solid var(--fg); }
.sp-sw { width: 12px; height: 12px; border-radius: 50%; background: var(--sw); border: 1px solid var(--dim); }

/* -------------------------------------------------------------- Portrait */
.about-head { display: grid; grid-template-columns: 1fr minmax(260px, 430px); gap: 24px; align-items: center; padding-block: 56px 28px; }
.about-head .page-head { padding: 0; width: auto; margin: 0; }
.portrait { margin: 0; position: relative; }
.p-stage { position: relative; aspect-ratio: 1; background: #000; overflow: hidden; isolation: isolate; opacity: 0; -webkit-mask-image: radial-gradient(ellipse 62% 62% at 62% 50%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 62% 62% at 62% 50%, #000 62%, transparent 100%); }
.p-stage img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; mix-blend-mode: screen; image-rendering: auto; }
.p-slice { opacity: 0; }
.p-bar { position: absolute; left: 0; right: 0; height: 14%; top: -20%; background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, .22), transparent); mix-blend-mode: screen; animation: roll 7s linear infinite; }
.p-noise { position: absolute; inset: 0; opacity: .06; mix-blend-mode: screen; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='1' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>"); animation: grain .5s steps(4) infinite; }
.p-shake { position: absolute; inset: 0; animation: shake 5.5s steps(1) infinite; }
.osd { position: absolute; left: 6%; right: 6%; bottom: 5%; display: flex; justify-content: space-between; font: var(--dw) calc(24px * var(--ds))/1 var(--display); color: var(--fg); text-shadow: var(--glow); opacity: 0; letter-spacing: .04em; }
.portrait.on .p-stage { animation: signal-in 2.2s steps(1) forwards; }
.portrait.on .osd { animation: osd-in .4s 1.6s forwards; }
.osd .rec::before { content: "\25CF "; }
@keyframes signal-in {
	0% { opacity: 0; transform: translateX(0) scaleY(1); }
	8% { opacity: .5; transform: translateX(-18px) scaleY(.96); }
	12% { opacity: 0; }
	22% { opacity: .85; transform: translateX(14px) scaleY(1.03); }
	28% { opacity: .2; transform: translateX(-6px); }
	40% { opacity: .9; transform: translateX(0) scaleY(.5); }
	46% { opacity: .35; transform: translateX(10px) scaleY(1.1); }
	58% { opacity: 1; transform: translateX(-4px) scaleY(1); }
	64% { opacity: .55; transform: translateX(0); }
	78% { opacity: 1; transform: translateX(3px); }
	100% { opacity: 1; transform: none; }
}
@keyframes osd-in { to { opacity: 1; } }
@keyframes roll { to { top: 120%; } }
@keyframes grain { 25% { background-position: 40px 20px; } 50% { background-position: -30px 60px; } 75% { background-position: 70px -40px; } }
@keyframes shake {
	0%, 38%, 41%, 100% { transform: none; }
	39% { transform: translate(-3px, 1px); }
	40% { transform: translate(4px, -1px); }
	70% { transform: none; }
	71% { transform: translate(2px, 0); }
	72% { transform: translate(-2px, 1px); }
}
@media (max-width: 820px) {
	.about-head { grid-template-columns: 1fr; padding-top: 40px; }
	.portrait { max-width: 400px; margin-inline: auto; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.p-stage, .osd { opacity: 1 !important; }
	.p-bar, .p-noise { display: none; }
}
.no-js .p-stage, .no-js .osd { opacity: 1; }

.pin { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); }
.pin svg { transform: rotate(35deg); }
.row a:hover .pin { color: var(--bg); }

/* Short screens: tighten the hero so the title, intro and both buttons always fit on the first screen. */
@media (max-height: 760px) {
	.boot { font-size: 13px; line-height: 1.35; min-height: 8.2em; }
	.btn { padding: 8px 16px; font-size: 17px; }
}
@media (max-height: 640px) {
	.hero-cta { gap: 10px; }
	.scroll-hint { display: none; }
}

/* The portrait is a grey tone map. Multiplying it by the text colour turns it amber (or green, or white),
   and a "lighten" layer lifts the blacks to the page colour so no box shows. Plain CSS blending, no SVG
   filter, so it also works on phones and tablets. */
.p-bar, .p-noise { z-index: 1; }
.p-stage::after, .p-stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; }
.p-stage::after { background: var(--fg); mix-blend-mode: multiply; z-index: 3; }
.p-stage::before { background: var(--bg); mix-blend-mode: lighten; z-index: 4; }
/* Paper: dark ink on a light page, so invert the tone map and multiply it into the page. */
:root[data-theme="paper"] .p-stage { filter: invert(1); mix-blend-mode: multiply; }
:root[data-theme="paper"] .p-stage::after { background: #fff; }
:root[data-theme="paper"] .p-stage::before { display: none; }

/* No flash on load: the hero's boot text is typed by script, so it stays hidden until the script starts typing (the "js" class is set in the head, before the first paint). */
@media (prefers-reduced-motion: no-preference) { .js .boot:not(.on) .bl { visibility: hidden; } }
