@font-face {
	font-family: "Iosevka";
	src: url("/static/fonts/Iosevka-400.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Iosevka Aile";
	src: url("/static/fonts/IosevkaAile-300.woff2") format("woff2");
	font-weight: 300;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Iosevka Aile";
	src: url("/static/fonts/IosevkaAile-400.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Iosevka Aile";
	src: url("/static/fonts/IosevkaAile-600.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

@layer tokens, base, layout, print;

@layer tokens {
	:root,
	[data-theme="paper"] {
		color-scheme: light dark;
		--bg: #f4f5f6;
		--surface: #eceef0;
		--ink: #1e2329;
		--ink-muted: #58606a;
		--line: #cdd1d6;
		--line-strong: #868e98;
		--accent: #2b44c8;
		--accent-ink: #ffffff;
		--focus: var(--accent);
		--font-prose: "Iosevka Aile", "Helvetica Neue", Arial, sans-serif;
		--font-mono: "Iosevka", "SF Mono", Menlo, Consolas, monospace;
		--space-1: 0.25rem;
		--space-2: 0.5rem;
		--space-3: 1rem;
		--space-4: 1.5rem;
		--space-5: 2.5rem;
		--space-6: 4rem;
		--space-7: 6.5rem;
		--stroke-hair: 1px;
		--stroke-focus: 2px;
	}

	[data-theme="paper"] {
		color-scheme: light;
	}

	[data-theme="stark"] {
		color-scheme: light;
		--bg: #ffffff;
		--surface: #f5f5f5;
		--ink: #000000;
		--ink-muted: #555555;
		--line: #d9d9d9;
		--line-strong: #8a8a8a;
		--accent: #2b44c8;
		--accent-ink: #ffffff;
	}

	[data-theme="dark"] {
		color-scheme: dark;
		--bg: #15181c;
		--surface: #1c2026;
		--ink: #e4e7ea;
		--ink-muted: #9aa2ac;
		--line: #2c3238;
		--line-strong: #6a727c;
		--accent: #8c9cff;
		--accent-ink: #15181c;
	}

	@media (prefers-color-scheme: dark) {
		:root:not([data-theme]) {
			color-scheme: dark;
			--bg: #15181c;
			--surface: #1c2026;
			--ink: #e4e7ea;
			--ink-muted: #9aa2ac;
			--line: #2c3238;
			--line-strong: #6a727c;
			--accent: #8c9cff;
			--accent-ink: #15181c;
		}
	}
}

@layer base {
	html {
		background: var(--bg);
		color: var(--ink);
		font-family: var(--font-prose);
		font-size: 100%;
		line-height: 1.6;
	}

	body {
		margin: 0;
		text-align: start;
	}

	a {
		color: inherit;
		text-decoration: underline;
		text-decoration-color: var(--line-strong);
		text-decoration-thickness: var(--stroke-hair);
		text-underline-offset: 0.25em;
	}

	a:hover {
		text-decoration-color: var(--ink);
	}

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

@layer layout {
	main {
		max-inline-size: 60rem;
		margin-inline: auto;
		padding-block: clamp(var(--space-5), 6vw, var(--space-6));
		padding-inline: clamp(var(--space-4), 5vw, var(--space-6));
	}

	.doc-header {
		display: grid;
		gap: var(--space-4);
		padding-block-end: var(--space-5);
		border-block-end: var(--stroke-hair) solid var(--line);
	}

	.doc-identity,
	.doc-meta,
	.doc-entries {
		min-inline-size: 0;
	}

	.doc-meta {
		display: flex;
		flex-direction: column;
		gap: var(--space-2);
	}

	.label,
	h2 {
		font-family: var(--font-mono);
		font-size: 0.75rem;
		line-height: 1.33;
		font-weight: 400;
		color: var(--ink-muted);
		margin-block: 0;
	}

	h1 {
		font-weight: 300;
		font-size: clamp(2.5rem, 1.5rem + 3vw, 3.5rem);
		line-height: 1.06;
		letter-spacing: -0.015em;
		margin-block: 0 var(--space-3);
		text-wrap: balance;
	}

	.intro {
		font-weight: 400;
		font-size: 1.125rem;
		line-height: 1.55;
		max-inline-size: 62ch;
		margin-block: 0;
		text-wrap: pretty;
	}

	.contact {
		display: flex;
		flex-direction: column;
		gap: var(--space-1);
		font-family: var(--font-mono);
		font-size: 0.8125rem;
		line-height: 1.5;
		margin-block: 0;
	}

	.doc-section {
		display: grid;
		gap: var(--space-4);
		padding-block: var(--space-5);
	}

	.doc-section:not(:last-child) {
		border-block-end: var(--stroke-hair) solid var(--line);
	}

	footer.doc-section {
		padding-block-end: 0;
	}

	.doc-entries {
		display: flex;
		flex-direction: column;
		gap: var(--space-5);
	}

	.entry-head {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		align-items: baseline;
		gap: var(--space-1) var(--space-4);
		margin-block-end: var(--space-2);
	}

	.entry-head--tight {
		margin-block-end: var(--space-1);
	}

	.entry-head:last-child {
		margin-block-end: 0;
	}

	h3 {
		font-weight: 600;
		font-size: 1.0625rem;
		line-height: 1.4;
		margin-block: 0;
		text-wrap: balance;
	}

	.meta,
	.role-path {
		font-family: var(--font-mono);
		font-size: 0.8125rem;
		line-height: 1.5;
		color: var(--ink-muted);
		margin-block: 0;
	}

	.role-path {
		margin-block-end: var(--space-2);
	}

	.entry p:not(.meta, .role-path) {
		font-size: 0.96875rem;
		line-height: 1.62;
		max-inline-size: 68ch;
		margin-block: 0;
		text-wrap: pretty;
		overflow-wrap: break-word;
	}

	.entry p:not(.meta, .role-path) + p:not(.meta, .role-path) {
		margin-block-start: var(--space-3);
	}

	.oss-list {
		list-style: none;
		padding: 0;
		margin: 0;
		display: flex;
		flex-direction: column;
		gap: var(--space-2);
		max-inline-size: 68ch;
	}

	.oss-list li {
		font-size: 0.96875rem;
		line-height: 1.58;
		text-wrap: pretty;
		overflow-wrap: break-word;
	}

	@media (min-width: 48rem) {
		.doc-header {
			grid-template-columns: minmax(0, 1fr) max-content;
			column-gap: var(--space-6);
			align-items: start;
		}

		.doc-meta {
			text-align: end;
			padding-block-start: var(--space-2);
		}

		.contact {
			align-items: flex-end;
		}

		.doc-section {
			grid-template-columns: 11.5rem minmax(0, 1fr);
			column-gap: var(--space-6);
			align-items: start;
		}

		.doc-section h2 {
			padding-block-start: 0.3rem;
		}
	}
}

@layer print {
	@page {
		size: A4;
		margin: 10mm 13mm;
	}

	@media print {
		:root,
		[data-theme] {
			color-scheme: light;
			--bg: #ffffff;
			--ink: #000000;
			--ink-muted: #555555;
			--line: #d9d9d9;
			--line-strong: #8a8a8a;
		}

		html {
			font-size: 8.5pt;
			line-height: 1.34;
		}

		main {
			max-inline-size: none;
			padding: 0;
		}

		.doc-header {
			grid-template-columns: minmax(0, 1fr) max-content;
			column-gap: 7mm;
			padding-block-end: 3.5mm;
		}

		.doc-meta {
			text-align: end;
			padding-block-start: 0.5mm;
		}

		.contact {
			align-items: flex-end;
		}

		h1 {
			font-size: 21pt;
			margin-block-end: 1.5mm;
		}

		.intro {
			font-size: 9.25pt;
			line-height: 1.35;
			max-inline-size: none;
		}

		.doc-section {
			grid-template-columns: 27mm minmax(0, 1fr);
			column-gap: 7mm;
			padding-block: 3.2mm;
		}

		.doc-section h2 {
			padding-block-start: 0.5mm;
		}

		.doc-entries {
			gap: 2.5mm;
		}

		.entry-head {
			margin-block-end: 0.8mm;
		}

		.entry-head--tight {
			margin-block-end: 0.4mm;
		}

		.role-path {
			margin-block-end: 0.8mm;
		}

		h3 {
			font-size: 9.25pt;
		}

		.entry p:not(.meta, .role-path),
		.oss-list li {
			font-size: 8.35pt;
			line-height: 1.34;
			max-inline-size: none;
		}

		.oss-list {
			max-inline-size: none;
			gap: 0.9mm;
		}

		.entry p:not(.meta, .role-path) + p:not(.meta, .role-path) {
			margin-block-start: 1.4mm;
		}

		.entry {
			break-inside: avoid;
		}

		h2,
		.entry-head {
			break-after: avoid;
		}
	}
}
