/* vkuikka.com */

:root {
	--ink: #111111;
	--dim: #6b6b6b;
	--paper: #ffffff;
	--line: #e3e3e3;

	--serif: "Iowan Old Style", Charter, "Palatino Linotype", Palatino, Georgia, serif;
	--sans: system-ui, -apple-system, "Segoe UI", sans-serif;

	--pad-top: clamp(3rem, 11vh, 6.5rem);
	--pad-side: clamp(1.5rem, 5vw, 3.5rem);
}

@media (prefers-color-scheme: dark) {
	:root {
		--ink: #ededed;
		--dim: #8d8d8d;
		--paper: #0d0d0d;
		--line: #2a2a2a;
	}
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 1rem/1.65 var(--sans);
	-webkit-font-smoothing: antialiased;
}

.page {
	max-width: 56rem;
	margin-inline: auto;
	padding: var(--pad-top) var(--pad-side) 6rem;
	display: grid;
	gap: 2.5rem;
}

/* Name and contacts. A column of their own once there is room for one. */

h1 {
	margin: 0;
	font: 400 1.65rem/1.2 var(--serif);
}

.role {
	margin: 0.5rem 0 0;
	font-size: 0.9rem;
	color: var(--dim);
}

.contact {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem 1.25rem;
	margin-top: 1.5rem;
	font-size: 0.875rem;
}

.contact a {
	color: var(--dim);
	text-decoration: none;
}

.contact a:hover { color: var(--ink); }

/* Content */

.lead {
	margin: 0;
	max-width: 28rem;
	font: 400 1.3rem/1.5 var(--serif);
	color: var(--ink);
	text-wrap: pretty;
}

section { margin-top: 4rem; }

h2 {
	margin: 0 0 2rem;
	padding-bottom: 0.6rem;
	border-bottom: 1px solid var(--line);
	font-size: 0.7rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--dim);
}

article + article { margin-top: 2.5rem; }

h3 {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
}

h3 a {
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-decoration-color: var(--dim);
	text-decoration-color: color-mix(in srgb, var(--dim) 55%, transparent);
	text-underline-offset: 4px;
	transition: text-decoration-color 120ms ease;
}

h3 a:hover { text-decoration-color: currentColor; }

p { margin: 0.35rem 0 0; color: var(--dim); text-wrap: pretty; }

.label { font-size: 0.8rem; }

.label + p { margin-top: 0.6rem; }

a { color: var(--ink); text-underline-offset: 3px; }

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

@media (min-width: 54rem) {
	.page {
		grid-template-columns: 13rem minmax(0, 32rem);
		gap: 5rem;
		align-items: start;
	}

	.rail {
		position: sticky;
		top: var(--pad-top);
	}

	.contact {
		flex-direction: column;
		gap: 0.4rem;
		margin-top: 2rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}
