/* Oli's.Online — v39. One stylesheet, no framework. */

/* Self-hosted (SIL OFL) so the page talks to no third party: "0 trackers" has to be true. */
@font-face {
	font-family: 'Bricolage Grotesque';
	src: url('../fonts/bricolage-grotesque-latin.woff2') format('woff2');
	font-weight: 300 800;
	font-stretch: 100%;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'JetBrains Mono';
	src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
	font-weight: 400 500;
	font-style: normal;
	font-display: swap;
}

:root {
	--black: #000;            /* pure black: the portraits were shot on black and melt into it */
	--ink: #f3f1ea;
	--paper: #f3f1ea;
	--paper-ink: #0b0b0b;
	--green: #a8e56b;         /* the one accent, sampled up from the plant */
	--green-deep: #1f5a2a;    /* same accent, dark enough to read on paper */
	--red: #ff9b87;           /* only ever used for "removed" things */
	--dim: rgba(243, 241, 234, .6);
	--dim-paper: rgba(11, 11, 11, .66);
	--line: rgba(243, 241, 234, .16);
	--line-paper: rgba(11, 11, 11, .14);
	--display: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
	--mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
	--gutter: clamp(20px, 5vw, 72px);
	--space: clamp(80px, 11vw, 150px);
	--ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }

/* clip (not hidden) so the page can't scroll sideways and sticky still works */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
	margin: 0;
	background: var(--black);
	color: var(--ink);
	font-family: var(--display);
	font-size: clamp(1rem, .95rem + .3vw, 1.2rem);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ol, dl, dd, figure { margin: 0; padding: 0; }
ol { list-style: none; }
a { color: inherit; }
b { font-weight: 700; }
main:focus { outline: 0; }
section, footer { overflow-x: clip; }

::selection { background: var(--green); color: #000; }

:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; border-radius: 2px; }
.paper :focus-visible, .top[data-theme="paper"] :focus-visible { outline-color: var(--green-deep); }

.skip {
	position: fixed; left: 12px; top: -60px; z-index: 100;
	background: var(--green); color: #000; padding: 10px 14px;
	font: 500 .8rem var(--mono); text-decoration: none; border-radius: 6px;
}
.skip:focus { top: 12px; }

/* ---------- shared bits ---------- */

.eyebrow {
	font: 500 .78rem/1.3 var(--mono);
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--dim);
}
.paper .eyebrow { color: var(--dim-paper); }

h2 {
	font-size: clamp(2.2rem, 4.6vw, 3.8rem);
	font-weight: 600;
	line-height: 1.02;
	letter-spacing: -.035em;
}

.section-head { display: grid; gap: 16px; }

.paper { background: var(--paper); color: var(--paper-ink); }

.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

.kind {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 5px 10px; border-radius: 999px;
	border: 1px solid var(--line);
	font: 500 .75rem/1 var(--mono); letter-spacing: .06em;
	color: var(--dim);
}
.kind-rm { color: var(--red); border-color: rgba(255, 155, 135, .4); }
.kind-now { color: var(--green); border-color: rgba(168, 229, 107, .45); }

/* ---------- progress + header ---------- */

.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--green); transform: scaleX(0); transform-origin: 0 50%; }

/* The header takes the colours of the section under it (site.js sets data-theme). */
.top {
	--top-fg: var(--ink); --top-bg: rgba(0, 0, 0, .94); --top-bg0: rgba(0, 0, 0, 0); --top-dot: var(--green);
	position: fixed; inset: 0 0 auto 0; z-index: 50;
	display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
	padding: 20px var(--gutter) 34px;
	color: var(--top-fg);
	background: linear-gradient(to bottom, var(--top-bg) 58%, var(--top-bg0));
	transition: transform .5s var(--ease), color .35s;
}
.top[data-theme="paper"] {
	--top-fg: var(--paper-ink); --top-bg: rgba(243, 241, 234, .96); --top-bg0: rgba(243, 241, 234, 0); --top-dot: var(--green-deep);
}
.top-away { transform: translateY(-100%); }
.top:focus-within { transform: none; }

.logo {
	display: inline-flex; align-items: center; justify-self: start;
	font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em;
	text-decoration: none;
}
.logo-o {
	width: .82em; height: .82em; margin-right: .06em;
	border-radius: 50%; background: currentColor;
	transition: background-color .3s;
}
.logo:hover .logo-o { background: var(--top-dot, var(--green)); }

.top-nav { display: flex; gap: clamp(16px, 3vw, 36px); }
.top-nav a {
	font: 500 .78rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
	text-decoration: none; padding: 10px 0; position: relative;
}
.top-nav a::after {
	content: ''; position: absolute; left: 0; right: 0; bottom: 3px; height: 1px;
	background: currentColor; transform: scaleX(0); transform-origin: 100% 50%;
	transition: transform .4s var(--ease);
}
.top-nav a:hover::after { transform: scaleX(1); transform-origin: 0 50%; }

.top-right { justify-self: end; display: flex; align-items: center; gap: clamp(12px, 2vw, 22px); }

/* language switch: three quiet mono labels, the active one in the accent colour */
.lang { display: flex; gap: 2px; }
.lang button {
	all: unset; cursor: pointer;
	padding: 8px 5px;
	font: 500 .72rem/1 var(--mono); letter-spacing: .08em;
	opacity: .5; transition: opacity .25s, color .25s;
}
.lang button:hover { opacity: .9; }
.lang button[aria-pressed="true"] { opacity: 1; color: var(--top-dot); }
.lang button:focus-visible { outline: 2px solid var(--top-dot); outline-offset: 2px; border-radius: 3px; }

.pill {
	display: inline-flex; align-items: center; gap: 9px;
	padding: 8px 13px; border: 1px solid; border-color: color-mix(in srgb, currentColor 40%, transparent); border-radius: 999px;
	font: 500 .78rem/1 var(--mono); letter-spacing: .04em;
}
.pill .dot { background: var(--top-dot); }
.pill-extra { opacity: .62; }

/* ---------- hero ---------- */

.hero {
	position: relative;
	min-height: 100vh; min-height: 100svh;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	grid-template-rows: 1fr auto;
	align-items: end;
	padding: 110px var(--gutter) 0;
	background: var(--black);
	overflow: hidden;
}

.hero-copy { grid-column: 1; grid-row: 1; align-self: center; position: relative; z-index: 2; padding-bottom: 4vh; }

.hero .eyebrow { font-size: clamp(.9rem, 1.2vw, 1.05rem); color: var(--green); margin-bottom: clamp(10px, 1.6vh, 18px); }

.hero-title {
	font-size: clamp(3.2rem, 7.2vw, 6.4rem);
	font-weight: 700;
	line-height: .96;
	letter-spacing: -.04em;
}
/* the full stop is a hidden switch: it must look like plain text */
.dot-switch {
	all: unset; color: var(--green); cursor: pointer;
	display: inline-block; transition: transform .3s var(--ease);
	/* the glyph hangs below the tight line box, so the hit area is padded out
	   around the visible dot (negative margins keep the layout unchanged) */
	padding: .1em .14em .34em; margin: -.1em -.14em -.34em;
	transform-origin: 50% 78%;
	-webkit-tap-highlight-color: transparent;
}
.dot-switch:hover { transform: scale(1.25); }
.dot-switch:focus-visible { outline: 2px solid var(--green); outline-offset: 6px; border-radius: 4px; }

.hero-lead {
	margin-top: clamp(18px, 3vh, 30px);
	max-width: 25ch;
	font-size: clamp(1.15rem, 1.8vw, 1.5rem);
	line-height: 1.35;
	color: var(--dim);
}
.hero-lead b { color: var(--ink); font-weight: 600; }

.hero-photo {
	grid-column: 2; grid-row: 1;
	align-self: end; justify-self: center;
	width: min(100%, 82vh); width: min(100%, 82svh);
	position: relative; z-index: 1;
}
.hero-photo img {
	width: 100%;
	/* he fades into the page instead of being cut at the waist */
	-webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
	mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
}
/* Tinted lenses: an SVG laid exactly over the photo, the lens shapes traced on his glasses.
   The tint comes down from the top of each lens, like photochromic glass in the sun. */
.tint { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tint path {
	opacity: 0;
	clip-path: inset(0 0 100% 0);
	transition: opacity .35s var(--ease), clip-path .7s var(--ease);
}
.tint .glare { fill: none; stroke: rgba(255, 255, 255, .45); stroke-width: 2.5; stroke-linecap: round; transition-delay: .35s; }
.hero-photo.is-shades .tint path { opacity: .94; clip-path: inset(0 0 0 0); }
.hero-photo.is-shades .tint .glare { opacity: 1; }

.hero-meta {
	grid-column: 1 / -1; grid-row: 2;
	position: relative; z-index: 2;
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
	padding: 20px 0 26px;
	border-top: 1px solid var(--line);
	font-family: var(--mono);
}
.hero-meta dt { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.hero-meta dd { font-size: .92rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero-meta .aside { color: var(--dim); }
.hero-meta a { text-decoration: none; display: inline-flex; gap: 8px; padding: 6px 0; margin: -6px 0; }
.hero-meta a:hover { color: var(--green); }
.hero-scroll { text-align: right; }

/* hero entrance: one soft fade, staggered by --d */
.js .hero-in {
	opacity: 0; transform: translateY(16px);
	animation: rise 1.1s var(--ease) forwards;
	animation-delay: calc(var(--d, 0) * 120ms + 80ms);
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- scroll reveals ---------- */

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

/* ---------- who ---------- */

.who { padding: var(--space) var(--gutter); }

.features { margin-top: clamp(36px, 5vw, 64px); border-top: 1px solid var(--line-paper); }

.feature {
	display: grid;
	grid-template-columns: 5ch minmax(0, 1.2fr) minmax(0, 1fr);
	align-items: baseline;
	gap: clamp(12px, 3vw, 40px);
	padding: clamp(18px, 2.4vw, 30px) 0;
	border-bottom: 1px solid var(--line-paper);
}
.feature-n { font: 500 .8rem var(--mono); color: var(--dim-paper); }
.feature h3 {
	font-size: clamp(1.9rem, 3.8vw, 3.2rem);
	font-weight: 600; line-height: 1; letter-spacing: -.035em;
	transition: color .3s;
}
.feature p { max-width: 32ch; color: var(--dim-paper); }
.feature p b { display: block; color: var(--paper-ink); font-weight: 600; }

@media (hover: hover) {
	.feature:hover h3, .feature:hover .feature-n { color: var(--green-deep); }
}

/* ---------- story ---------- */

.story {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
	gap: clamp(30px, 6vw, 100px);
	padding: var(--space) var(--gutter);
	background: var(--black);
}

/* ---------- story terminal ---------- */

.term-wrap { position: relative; }
.term {
	position: sticky; top: 16vh; top: 16svh;
	margin-top: clamp(80px, 12vw, 170px);
	border: 1px solid var(--line); border-radius: 12px;
	background: #0b0b0b;
	box-shadow: 0 30px 80px -30px rgba(168, 229, 107, .18);
	font: 400 .82rem/1.75 var(--mono);
	overflow: hidden;
}
.term-bar {
	display: flex; align-items: center; gap: 7px;
	padding: 11px 14px; border-bottom: 1px solid var(--line);
	color: var(--dim); font-size: .72rem;
}
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(243, 241, 234, .16); }
.term-bar span { margin-left: auto; margin-right: auto; padding-right: 51px; }
.term-body { padding: 18px 18px 20px; }
.term-body p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.t-ps { color: var(--green); }
.t-cmd { color: var(--ink); margin-bottom: 8px; }
.t-line { display: flex; gap: 12px; color: var(--dim); }
.t-v { width: 3.2ch; flex: none; color: var(--ink); }
.t-k { width: 8.5ch; flex: none; }
.t-rm { color: var(--red); }
.t-now { color: var(--green); }
.t-ok { margin-left: auto; color: var(--green); }

/* lines "install" one by one as the matching changelog entry is read */
.js .t-line { opacity: .14; transition: opacity .5s var(--ease); }
.js .t-line .t-ok { opacity: 0; transition: opacity .3s var(--ease) .2s; }
.js .t-line.on { opacity: 1; }
.js .t-line.on .t-ok { opacity: 1; }
.t-last.on { color: var(--ink); }

.t-progress { display: flex; align-items: center; gap: 12px; margin: 14px 0 8px; color: var(--dim); }
.t-bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(243, 241, 234, .08); overflow: hidden; }
.t-bar span { display: block; height: 100%; background: var(--green); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; }
html:not(.js) .t-bar span { transform: none; }

.js .t-done { opacity: 0; transition: opacity .4s var(--ease); }
.js .term.complete .t-done { opacity: 1; }
.t-cursor { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: var(--green); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.story-photo { position: sticky; top: 12vh; top: 12svh; align-self: start; }
.story-photo img {
	width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 0;
	/* cut-out on black: only the bottom edge needs to dissolve */
	-webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 98%);
	mask-image: linear-gradient(to bottom, #000 62%, transparent 98%);
}

.log { margin-top: clamp(36px, 5vw, 64px); position: relative; padding-left: clamp(22px, 3vw, 40px); --p: 0; }
.log::before, .log::after { content: ''; position: absolute; left: 3px; top: 8px; bottom: 8px; width: 1px; }
.log::before { background: var(--line); }
/* green fill follows the reading position (--p is set by site.js) */
.log::after { background: var(--green); transform: scaleY(var(--p)); transform-origin: 50% 0; }
html:not(.js) .log::after { transform: none; }

.log-item { position: relative; padding-bottom: clamp(32px, 4.4vw, 54px); }
.log-item:last-child { padding-bottom: 0; }
.log-item::before {
	content: ''; position: absolute; z-index: 1; top: 6px; left: calc(clamp(22px, 3vw, 40px) * -1 - 1px);
	width: 9px; height: 9px; border-radius: 50%;
	background: var(--black); border: 1px solid var(--dim);
	transition: background-color .4s, border-color .4s;
}
.log-item.passed::before, html:not(.js) .log-item::before { background: var(--green); border-color: var(--green); }

.log-tag { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.log-tag .v { font: 500 .9rem var(--mono); color: var(--ink); }

.log-item h3 {
	font-size: clamp(1.4rem, 2.4vw, 2rem);
	font-weight: 600; line-height: 1.1; letter-spacing: -.025em;
	margin-bottom: 10px;
}
.log-item > p:last-child { max-width: 44ch; color: var(--dim); }
.log-item del {
	display: block; margin-top: 12px;
	font: 400 .85rem var(--mono); color: var(--red); text-decoration-thickness: 1px;
}
.log-item del::before { content: '- '; content: '- ' / ''; }
.log-now h3 { color: var(--green); }

/* ---------- skills ---------- */

.skills { padding: var(--space) var(--gutter); }

.skill-grid {
	margin-top: clamp(36px, 5vw, 64px);
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
	border-top: 1px solid var(--line-paper);
}
.skill { padding: clamp(22px, 2.6vw, 36px) clamp(20px, 3vw, 44px) 0 0; }
.skill + .skill { padding-left: clamp(20px, 3vw, 44px); border-left: 1px solid var(--line-paper); }
.skill-n { display: block; font: 500 .8rem var(--mono); color: var(--green-deep); margin-bottom: 20px; }
.skill h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 600; line-height: 1.1; letter-spacing: -.025em; margin-bottom: 14px; }
.skill p { color: var(--dim-paper); max-width: 36ch; }
.skill p b { color: var(--paper-ink); }
.skill p i { font-style: italic; color: var(--paper-ink); }
.skill mark { color: inherit; font-weight: 700; background: linear-gradient(var(--green), var(--green)) no-repeat 0 90% / 100% .3em; }

/* ---------- less is more ---------- */

.less {
	display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
	align-items: center; gap: clamp(24px, 5vw, 80px);
	padding: var(--space) var(--gutter);
	background: var(--black);
}
.less .eyebrow { margin-bottom: 16px; }
.less h2 em { font-style: normal; color: var(--green); }
.less-lead { margin-top: 18px; max-width: 30ch; font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.4; color: var(--dim); }

.stats {
	margin-top: clamp(28px, 4vw, 48px);
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
	border-top: 1px solid var(--line);
	max-width: 520px;
}
.stats div { padding: 16px 10px 0 0; }
.stats dt { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 600; line-height: 1; letter-spacing: -.03em; color: var(--green); }
.stats dd { margin-top: 8px; font: 500 .75rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }

.less-photo { justify-self: end; width: min(100%, 480px); }
.less-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 100%; border-radius: 14px; filter: saturate(.9) brightness(.9); }

/* ---------- known issues ---------- */

.issue {
	display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
	align-items: center; gap: clamp(28px, 6vw, 100px);
	padding: var(--space) var(--gutter);
	background: var(--black);
	border-top: 1px solid var(--line);
}
.issue-photo { justify-self: center; width: min(100%, 320px); }
.issue-photo img {
	width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 62% 20%;
	border-radius: 14px;
	transform: rotate(-3deg);
	transition: transform .7s var(--ease);
}
.issue-photo:hover img { transform: rotate(0deg); }
.issue .eyebrow { margin-bottom: 16px; }
.issue h2 { max-width: 16ch; }
.issue-status { margin-top: 22px; display: flex; align-items: center; gap: 12px; font: 400 .9rem var(--mono); color: var(--dim); }

/* ---------- footer ---------- */

.foot { background: var(--black); padding: 0 var(--gutter) 28px; }

.foot-support {
	display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px 40px;
	padding: clamp(40px, 6vw, 72px) 0;
	border-top: 1px solid var(--line);
}
.foot-support .eyebrow { grid-column: 1 / -1; }
.foot-ask { font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.35; color: var(--dim); max-width: 30ch; }
.foot-mail { font-size: clamp(1.3rem, 2.4vw, 2rem); font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
.foot-mail a {
	text-decoration: none; padding: 6px 0;
	background: linear-gradient(var(--green), var(--green)) no-repeat 0 100% / 100% 1px;
	transition: color .3s;
}
.foot-mail a:hover { color: var(--green); }

.foot-row {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 30px;
	padding-top: 22px; border-top: 1px solid var(--line);
	font: 400 .8rem var(--mono); letter-spacing: .04em; color: var(--dim);
}
.foot-row .logo { font-family: var(--display); font-size: 1.05rem; color: var(--ink); }
.wink { color: var(--green); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
	.top { grid-template-columns: 1fr auto; }
	.top-nav { display: none; }

	.hero { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; padding-top: 110px; }
	.hero-copy { grid-row: 1; padding-bottom: 0; }
	.hero-photo { grid-column: 1; grid-row: 2; width: min(100%, 60vh); width: min(100%, 60svh); margin-top: 10px; }
	.hero-meta { grid-row: 3; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hero-scroll { text-align: left; }

	.feature { grid-template-columns: 4ch minmax(0, 1fr); }
	.feature p { grid-column: 2; }

	.story { grid-template-columns: minmax(0, 1fr); }
	/* on a phone the terminal closes the section, as a recap of what was just read */
	.term { position: static; margin-top: 8px; font-size: .72rem; }
	.term-body { padding: 12px 14px 14px; }

	.skill-grid { grid-template-columns: minmax(0, 1fr); }
	.skill, .skill + .skill { padding: 26px 0; border-left: 0; }
	.skill + .skill { border-top: 1px solid var(--line-paper); }
	.skill-n { margin-bottom: 12px; }

	.less { grid-template-columns: minmax(0, 1fr); }
	.less-photo { justify-self: start; width: min(100%, 400px); }
	.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 8px; }

	.issue { grid-template-columns: minmax(0, 1fr); }
	.issue-photo { justify-self: start; width: min(64%, 260px); }

	.foot-support { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
	.pill-extra { display: none; }
	.top-right { gap: 8px; }
	.lang button { padding: 8px 4px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.js .hero-in, .js .reveal { opacity: 1; transform: none; }
}

@media print {
	.top, .progress { display: none; }
	.js .hero-in, .js .reveal { opacity: 1 !important; transform: none !important; animation: none !important; }
}
