/* Martian Mono (SIL OFL 1.1, see fonts/OFL.txt), served from this site */
@font-face {
	font-family: "Martian Mono"; font-style: normal; font-weight: 400 800; font-stretch: 75% 112.5%; font-display: swap;
	src: url("fonts/martian-mono-latin.woff2") format("woff2");
	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: "Martian Mono"; font-style: normal; font-weight: 400 800; font-stretch: 75% 112.5%; font-display: swap;
	src: url("fonts/martian-mono-latin-ext.woff2") format("woff2");
	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;
}

:root {
	--red: #ff2c20;
	--cherry: #351e28;
	--blue: #d7efff;

	--bg: var(--blue);
	--ink: var(--cherry);
	--muted: #5d4650;
	--on-accent: #1f0f16;
	--ascii: rgba(53, 30, 40, .22);
	--scan: rgba(53, 30, 40, .06);
	--band: rgba(255, 44, 32, .1);

	--display: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: var(--cherry); --ink: var(--blue); --muted: #adc3d3; --ascii: rgba(215, 239, 255, .16); --scan: rgba(215, 239, 255, .045); --band: rgba(255, 44, 32, .1); color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--bg: var(--cherry); --ink: var(--blue); --muted: #adc3d3; --ascii: rgba(215, 239, 255, .16); --scan: rgba(215, 239, 255, .045); --band: rgba(255, 44, 32, .1); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
	font-family: var(--display);
	background: var(--bg);
	color: var(--ink);
	-webkit-font-smoothing: antialiased;
	caret-color: var(--red);
}
::selection { background: var(--red); color: var(--on-accent); }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
svg { display: block; }

.page {
	position: relative; isolation: isolate; overflow: hidden;
	min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
	padding: calc(4rem + env(safe-area-inset-top, 0px)) 0 calc(4rem + env(safe-area-inset-bottom, 0px));
}
/* ASCII halftone: characters get denser toward the top-right corner */
.ascii { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; pointer-events: none; }
/* Scanlines over the characters, and the refresh band the script rolls down the screen */
.page::before { content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none; background: repeating-linear-gradient(to bottom, var(--scan) 0 1px, transparent 1px 4px); }
.band {
	position: absolute; left: 0; right: 0; top: 0; height: 35vh; z-index: -1; pointer-events: none;
	background: linear-gradient(to bottom, transparent, var(--band) 50%, transparent);
	transform: translateY(-100%); will-change: transform;
}

.wrap { width: min(100% - 2.5rem, 72rem); margin-inline: auto; }

.name {
	font-weight: 800; font-stretch: 112.5%;
	font-size: clamp(2.5rem, 13.5vw, 6.5rem); line-height: 1; letter-spacing: -.035em;
}
@media (min-width: 900px) { .name { font-size: calc(min(100vw - 2.5rem, 72rem) / 10.1); } }
.name .last { white-space: nowrap; }
.cursor {
	display: inline-block; width: .52em; height: .8em; margin-left: .1em; vertical-align: -.04em;
	background: var(--red);
	animation: blink 1.15s steps(1, end) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.role { margin-top: clamp(1.25rem, 3vw, 2rem); font-weight: 600; font-size: clamp(1rem, 2.6vw, 1.6rem); }
.role span { background: var(--red); color: var(--on-accent); padding: .25em .55em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Links as icons only: thin strokes in the muted ink, the service's name shows under the icon on hover or focus */
.links { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; margin: clamp(2.5rem, 6vw, 4rem) 0 0 -.7rem; }
.links a {
	position: relative; display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
	color: var(--muted); text-decoration: none; transition: color .25s;
}
.links a:hover, .links a:focus-visible { color: var(--ink); }
.links svg { width: 1.3rem; height: 1.3rem; }
.links .label {
	position: absolute; top: 100%; left: 50%; translate: -50% -.25rem;
	font-size: .62rem; font-weight: 500; letter-spacing: .02em; white-space: nowrap; color: var(--muted);
	opacity: 0; pointer-events: none; transition: opacity .25s, translate .35s cubic-bezier(.16, 1, .3, 1);
}
.links a:hover .label, .links a:focus-visible .label { opacity: 1; translate: -50% 0; }
/* a hairline of red under the icon in place of the old underline */
.links a::after {
	content: ""; position: absolute; left: 50%; bottom: .3rem; width: 1rem; height: 1px; margin-left: -.5rem;
	background: var(--red); transform: scaleX(0); transition: transform .35s cubic-bezier(.16, 1, .3, 1);
}
.links a:hover::after, .links a:focus-visible::after { transform: scaleX(1); }
/* On phones the icons sit close together in one row under the role, as on desktop */
@media (max-width: 600px) {
	.links { gap: 0 .35rem; }
	/* no hover on touch: the name stays for screen readers only */
	.links .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 1; }
}

.theme-toggle {
	position: fixed; top: 0; right: 0; z-index: 10;
	padding: calc(1rem + env(safe-area-inset-top, 0px)) calc(1rem + env(safe-area-inset-right, 0px)) 1rem 1rem;
	background: none; border: 0; cursor: pointer; color: var(--muted); transition: color .2s;
}
.theme-toggle:hover { color: var(--red); }
.theme-toggle:focus-visible { outline-offset: -6px; }
.theme-toggle svg { width: 1.3rem; height: 1.3rem; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
	:root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.cursor { animation: none; }
	.band { display: none; }
}
