@font-face {
	font-family: "Staresso";
	src: url("../assets/fonts/Staresso/StaressoDemo.otf") format("opentype");
	font-display: swap;
}

@font-face {
	font-family: "Maple Mono NF";
	src: url("../assets/fonts/MapleMono/MapleMono-NF-Regular.ttf") format("truetype");
	font-display: swap;
}

@font-face {
	font-family: "Maple Mono NF";
	src: url("../assets/fonts/MapleMono/MapleMono-NF-Italic.ttf") format("truetype");
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "Maple Mono NF";
	src: url("../assets/fonts/MapleMono/MapleMono-NF-Bold.ttf") format("truetype");
	font-weight: 700;
	font-display: swap;
}

:root {
	--base: #191724;
	--text: #e0def4;
	--surface: #1f1d2e;
	--overlay: #26233a;
	--subtle: #908caa;
	--dim: #6e6a86;
	--red: #eb6f92;
	--green: #31748f;
	--yellow: #f6c177;
	--blue: #9ccfd8;
	--magenta: #c4a7e7;
	--cyan: #ebbcba;
	--accent: #ea9a97;
	--link: #9ccfd8;
	--mono: "Maple Mono NF", ui-monospace, monospace;
	--gap: clamp(32px, 5vw, 56px);
	--name: "Staresso", Georgia, serif;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--base);
	color: var(--text);
	font: 15px/1.65 var(--mono);
	transition: background-color 0.3s, color 0.3s;
}

a {
	color: var(--link);
	text-decoration: underline wavy;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

a:hover {
	color: var(--accent);
}

:focus-visible {
	outline: 2px solid var(--magenta);
	outline-offset: 2px;
}

.wrap {
	max-width: 1000px;
	margin: 0 auto;
	padding: clamp(40px, 8vw, 96px) max(16px, env(safe-area-inset-right, 0px)) 64px max(16px, env(safe-area-inset-left, 0px));
}

main {
	margin-top: var(--gap);
}

.lig {
	font-family: "Maple Mono NF", var(--mono);
	font-variant-ligatures: contextual;
}

.bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	background: var(--surface);
	border-radius: 8px;
	padding: 4px;
}

.bar a {
	min-height: 32px;
	display: flex;
	align-items: center;
	padding: 0 16px;
	border-radius: 5px;
	color: var(--subtle);
	text-decoration: none;
}

.bar a[aria-current="page"] {
	background: var(--accent);
	color: var(--base);
	font-weight: 700;
}

.bar .r {
	margin-left: auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

.bar button,
.bar select {
	min-height: 28px;
	padding: 0 10px;
	border-radius: 5px;
	border: 0;
	background: var(--overlay);
	color: var(--text);
	font: 13px var(--mono);
	cursor: pointer;
}

.bar select {
	width: 25ch;
	max-width: 100%;
}

#modeBtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	padding: 0;
	font-size: 16px;
	line-height: 1;
}

.bar .clk {
	padding: 0 8px;
	color: var(--dim);
	font-variant-numeric: tabular-nums;
}

.ps {
	color: var(--red);
	font-weight: 700;
}

.ps b {
	color: var(--magenta);
}

.blk {
	margin: 0 0 24px;
}

.out {
	margin: 6px 0 0;
	padding-left: 16px;
	border-left: 2px solid var(--overlay);
	min-width: 0;
}

.out p {
	margin: 4px 0;
	color: var(--subtle);
	max-width: 72ch;
}

.out h3 {
	margin: 14px 0 2px;
	font-size: 15px;
	color: var(--blue);
}

.tag {
	color: var(--dim);
}

.ls {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
}

.ls a:nth-child(3n + 1) { color: var(--magenta); }
.ls a:nth-child(3n + 2) { color: var(--blue); }
.ls a:nth-child(3n) { color: var(--yellow); }

.cur {
	display: inline-block;
	width: 9px;
	height: 17px;
	background: var(--accent);
	vertical-align: -3px;
	animation: blink 1s steps(1) infinite;
}

@keyframes blink {
	50% { opacity: 0; }
}

.hero {
	padding-block: 0 var(--gap);
}

.name {
	margin: 0;
	font: 400 clamp(52px, 11vw, 120px) / 1 var(--name);
	background: linear-gradient(90deg, var(--red), var(--yellow), var(--blue), var(--magenta), var(--red));
	background-size: 300% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	animation: aurora 12s linear infinite;
	padding: 0.25em 0.15em 0.35em;
	margin: -0.25em -0.15em -0.35em;
}

.name a {
	color: inherit;
	text-decoration: none;
}

@keyframes aurora {
	from { background-position: 300% 0; }
	to { background-position: 0 0; }
}

.byline {
	margin: 14px 0 0;
	color: var(--subtle);
	font-style: italic;
}

.ff {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 2px 18px;
	margin: 26px 0 30px;
	max-width: 640px;
}

.ff.skills {
	margin: 4px 0;
	max-width: none;
	color: var(--subtle);
}

.ff dt {
	color: var(--yellow);
	font-style: italic;
}

.ff dd {
	margin: 0;
}

.sw {
	grid-column: 1 / -1;
	margin-top: 10px;
	font: 20px/1.3 "Maple Mono NF", var(--mono);
	letter-spacing: 0.02em;
	white-space: pre;
}

.tools {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin: 10px 0 16px;
}

.tools input,
form input,
form textarea {
	background: var(--surface);
	color: var(--text);
	border: 1px solid var(--overlay);
	border-radius: 6px;
	min-height: 40px;
	padding: 8px 10px;
	font: inherit;
}

.tools input {
	flex: 1 1 220px;
	max-width: 420px;
}

.tools button,
form button {
	min-height: 40px;
	padding: 0 14px;
	border-radius: 6px;
	border: 1px solid var(--overlay);
	background: var(--surface);
	color: var(--text);
	font: inherit;
	cursor: pointer;
}

.tools button[aria-pressed="true"] {
	background: var(--magenta);
	color: var(--base);
	border-color: var(--magenta);
}

.crate {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 16px;
}

.rec {
	min-width: 0;
	color: var(--text);
	text-decoration: none;
}

.disc {
	position: relative;
	border-radius: 50%;
	overflow: hidden;
}

.disc img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 50%;
	background: var(--surface);
}

.disc::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: repeating-radial-gradient(#706f6e 0 3px, #ada9a0 4px, #2a2928 5px);
	opacity: 0.12;
	z-index: 1;
	pointer-events: none;
}

.disc::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 13%;
	aspect-ratio: 1;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: var(--base);
	z-index: 2;
}

.rec p {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.note {
	margin: 0 0 16px;
	color: var(--dim);
	font-style: italic;
}

.note p {
	margin: 0;
}

.rec p span {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}

.rec p .a {
	color: var(--subtle);
}

.rec p .y {
	color: var(--dim);
	-webkit-line-clamp: 1;
	line-clamp: 1;
}

form {
	display: grid;
	gap: 8px;
	max-width: 520px;
}

form label {
	color: var(--yellow);
}

form button {
	justify-self: start;
	background: var(--red);
	color: var(--base);
	border-color: var(--red);
	font-weight: 700;
}

.vh {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.fig {
	margin: 12px 0 0;
	font: 700 clamp(9px, 1.9vw, 16px) / 1.15 var(--mono);
	white-space: pre;
	overflow-x: auto;
	max-width: 100%;
	background: linear-gradient(90deg, var(--red), var(--yellow), var(--blue), var(--magenta), var(--red));
	background-size: 300% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	animation: aurora 12s linear infinite;
}

.err {
	color: var(--red) !important;
}

.hint {
	color: var(--yellow) !important;
}

@media (prefers-reduced-motion: reduce) {
	.name, .cur, .fig { animation: none; }
}
