:root {
	--bg: #f8f8f8;
	--panel: #eee;
	--panel-alt: #f5f5f5;
	--ink: #333;
	--ink-strong: #111;
	--muted: #555;
	--rule: #ddd;
	--accent: #a35;
	--navy: #2c3e50;
	--lime: #9d5;
	--teal: #2cb;
	--blue: #09c;
	--violet: #639;
	--orange: #e94;
	--green: #282;
	--plum: #817;
	--measure: 945px;
}

* {
	box-sizing: border-box;
	border-radius: 0;
}

html {
	font-size: 112.5%;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0 auto;
	padding: 0 20px 60px;
	max-width: var(--measure);
	background: var(--bg);
	color: var(--ink);
	font-family: "Noto Sans", "Helvetica Neue", sans-serif;
	font-size: 1rem;
	line-height: 1.5;
}

h1, h2, h3 {
	font-weight: bold;
	line-height: 1.4;
	margin: 0 0 10px;
}

h2 {
	font-size: 1.2rem;
	padding-bottom: 8px;
	border-bottom: 6px solid var(--navy);
}

a {
	color: var(--accent);

	&:hover {
		color: var(--ink-strong);
		text-decoration: none;
	}
}

b, strong {
	color: var(--ink-strong);
}

small {
	font-size: 0.8rem;
	color: var(--muted);
}

.icon {
	font-family: "Material Symbols Outlined";
	font-weight: normal;
	font-style: normal;
	line-height: 1;
	letter-spacing: normal;
	white-space: nowrap;
	direction: ltr;
	font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
	-webkit-font-feature-settings: "liga";
	font-feature-settings: "liga";
	-webkit-font-smoothing: antialiased;
	user-select: none;
}

header {
	display: grid;
	grid-template-columns: 90px 1fr;
	column-gap: 24px;
	align-items: start;
	margin: 48px 0 40px;

	img {
		grid-row: 1 / span 3;
		width: 90px;
		height: 90px;
		display: block;
		border-radius: 45px;
	}

	h1 {
		font-family: Georgia, "Times New Roman", serif;
		font-weight: normal;
		font-size: 2.4rem;
		line-height: 1;
		letter-spacing: 1pt;
		margin: 0 0 6px;
		color: var(--ink-strong);
	}

	dl {
		margin: 0;
		font-family: Georgia, "Times New Roman", serif;
		font-size: 0.72rem;
		line-height: 1.5;
		color: var(--muted);

		dt {
			color: #c33;
		}

		dd {
			margin: 0;

			&:first-of-type {
				color: #282;
			}
		}
	}

	> p {
		grid-column: 2;
		margin: 16px 0 0;
		font-size: 0.8rem;
		text-transform: uppercase;
		letter-spacing: 0.12em;
		color: var(--muted);

		span::before {
			content: "";
			display: inline-block;
			width: 6px;
			height: 6px;
			margin: 0 10px 2px 6px;
			background: var(--accent);
		}
	}
}

main > section, main > nav {
	margin-bottom: 48px;
}

#intro p {
	font-family: "Noto Serif", Georgia, serif;
	font-size: 1rem;
	line-height: 1.65;
	max-width: 42em;
}

#numbers {
	> p {
		font-family: "Noto Serif", Georgia, serif;
		line-height: 1.65;
		max-width: 42em;
	}

	dl {
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		gap: 10px;
		margin: 22px 0 14px;
	}

	div {
		background: var(--panel);
		padding: 16px 18px;
		border-bottom: 8px solid var(--navy);
	}

	div:nth-child(1) {
		grid-column: span 2;
		border-color: var(--accent);
	}

	div:nth-child(2) {
		border-color: var(--blue);
	}

	div:nth-child(3) {
		border-color: var(--teal);
	}

	div:nth-child(4) {
		grid-column: span 4;
		border-color: var(--lime);
	}

	dt {
		font-size: 0.7rem;
		text-transform: uppercase;
		letter-spacing: 0.11em;
		color: var(--muted);
	}

	dd {
		margin: 8px 0 0;
		font-weight: bold;
		font-size: 1.6rem;
		line-height: 1.1;
		color: var(--ink-strong);
	}

	div:nth-child(1) dd {
		font-size: 3.4rem;
		letter-spacing: -0.02em;
	}

	div:nth-child(4) dd {
		font-size: 1.2rem;
	}

	div:nth-child(4) span::before {
		content: "";
		display: inline-block;
		width: 6px;
		height: 6px;
		margin: 0 12px 4px 8px;
		background: var(--lime);
	}

	> p:last-child {
		font-family: "Noto Sans", "Helvetica Neue", sans-serif;
		margin: 0;
	}
}

#links, #projects {
	ul {
		list-style: none;
		margin: 20px 0 0;
		padding: 0;
		display: flex;
		flex-wrap: wrap;
		gap: 10px;
	}

	li {
		flex: 1 1 240px;
	}

	a {
		display: grid;
		grid-template-columns: 32px 1fr;
		column-gap: 12px;
		align-items: center;
		height: 100%;
		padding: 16px;
		background: var(--panel);
		border-bottom: 8px solid var(--navy);
		color: var(--ink);
		text-decoration: none;

		&:hover {
			background: var(--panel-alt);
			color: var(--ink-strong);
		}
	}

	.icon {
		grid-row: 1 / span 2;
		font-size: 32px;
		color: var(--navy);
	}

	b {
		font-size: 1rem;
	}

	small {
		overflow-wrap: break-word;
	}
}

#links {
	li:nth-child(1) a { border-color: var(--accent); .icon { color: var(--accent); } }
	li:nth-child(2) a { border-color: var(--violet); .icon { color: var(--violet); } }
	li:nth-child(3) a { border-color: var(--navy); }
	li:nth-child(4) a { border-color: var(--teal); .icon { color: var(--teal); } }
	li:nth-child(5) a { border-color: var(--orange); .icon { color: var(--orange); } }
}

#projects {
	li:nth-child(1) a { border-color: var(--blue); .icon { color: var(--blue); } }
	li:nth-child(2) a { border-color: var(--green); .icon { color: var(--green); } }
	li:nth-child(3) a { border-color: var(--plum); .icon { color: var(--plum); } }
}

#gallery {
	ul {
		list-style: none;
		margin: 20px 0 0;
		padding: 0;
		display: grid;
		grid-template-columns: repeat(12, 1fr);
		gap: 10px;
	}

	li:nth-child(-n+3) {
		grid-column: span 4;
	}

	li:nth-child(n+4) {
		grid-column: span 3;
	}

	figure {
		margin: 0;
		height: 100%;
		display: flex;
		flex-direction: column;
		background: var(--panel);
	}

	img {
		display: block;
		width: 100%;
		height: 220px;
		object-fit: cover;
		object-position: 50% 40%;
	}

	li:nth-child(-n+3) img {
		height: 320px;
	}

	li:nth-child(1) img {
		object-position: 50% 65%;
	}

	figcaption {
		margin: 0;
		padding: 12px 14px;
		border-left: 6px solid var(--lime);
		font-size: 0.75rem;
		line-height: 1.45;
		color: var(--muted);
		flex: 1 1 auto;
	}

	li:nth-child(2n) figcaption {
		border-left-color: var(--blue);
	}

	li:nth-child(3n) figcaption {
		border-left-color: var(--orange);
	}
}

#arrangement {
	p {
		font-family: "Noto Serif", Georgia, serif;
		line-height: 1.65;
		max-width: 42em;
	}

	dl {
		margin: 28px 0 0;
		columns: 2;
		column-gap: 40px;
	}

	div {
		break-inside: avoid;
		-webkit-column-break-inside: avoid;
		margin-bottom: 20px;
	}

	dt {
		font-weight: bold;
		color: var(--ink-strong);
		font-size: 0.85rem;
	}

	dd {
		margin: 4px 0 0;
		padding-left: 14px;
		border-left: 5px solid var(--rule);
		font-family: "Noto Serif", Georgia, serif;
		font-size: 0.82rem;
		line-height: 1.55;
		color: var(--muted);
	}
}

footer {
	border-top: 6px solid var(--navy);
	padding-top: 20px;

	h2 {
		border: none;
		padding: 0;
	}

	address {
		font-style: normal;
		display: flex;
		flex-wrap: wrap;
		gap: 10px;
		margin: 20px 0;
	}

	a {
		flex: 1 1 220px;
		display: grid;
		grid-template-columns: 28px 1fr;
		column-gap: 12px;
		align-items: center;
		padding: 14px 18px;
		background: var(--panel);
		color: var(--ink-strong);
		text-decoration: none;
		border-bottom: 8px solid var(--navy);

		&:hover {
			background: var(--panel-alt);
		}
	}

	.icon {
		grid-row: 1 / span 2;
		font-size: 28px;
		color: var(--navy);
	}

	address b {
		font-size: 0.95rem;
		line-height: 1.3;
	}

	address small {
		display: block;
		font-size: 0.7rem;
		line-height: 1.4;
	}

	address a:nth-child(1) { border-color: var(--accent); .icon { color: var(--accent); } }
	address a:nth-child(2) { border-color: var(--violet); .icon { color: var(--violet); } }
	address a:nth-child(3) { border-color: var(--blue); .icon { color: var(--blue); } }
}

@media only screen and (max-width: 860px) {
	#numbers {
		dl {
			grid-template-columns: repeat(2, 1fr);
		}

		div:nth-child(1), div:nth-child(4) {
			grid-column: span 2;
		}
	}

	#gallery {
		ul {
			grid-template-columns: repeat(2, 1fr);
		}

		li:nth-child(-n+3), li:nth-child(n+4) {
			grid-column: span 1;
		}

		li:nth-child(-n+3) img {
			height: 220px;
		}
	}

	#arrangement dl {
		columns: 1;
	}
}

@media only screen and (max-width: 560px) {
	header {
		grid-template-columns: 64px 1fr;
		column-gap: 16px;
		margin: 28px 0;

		img {
			width: 64px;
			height: 64px;
		}

		h1 {
			font-size: 1.9rem;
		}
	}

	#gallery ul {
		grid-template-columns: 1fr;
	}

	#numbers {
		div:nth-child(1) dd {
			font-size: 2.6rem;
		}
	}

	#gallery li:nth-child(-n+3), #gallery li:nth-child(n+4) {
		grid-column: span 1;
	}
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #000;
		--panel: #18222d;
		--panel-alt: #1f2934;
		--ink: #f8f8f8;
		--ink-strong: #fff;
		--muted: #a8b0b8;
		--rule: #22303e;
		--accent: #e35d6a;
		--navy: #2f3e4f;
		--green: #6c6;
		--plum: #b07cc0;
	}

	header {
		dl dt {
			color: #e05a5a;
		}

		dl dd:first-of-type {
			color: #6c6;
		}
	}

	#links li:nth-child(3) a .icon {
		color: var(--muted);
	}

	footer a {
		color: var(--ink);
	}
}

@media print {
	body {
		max-width: none;
		background: #fff;
		color: #000;
	}

	#gallery li:nth-child(n+5) {
		display: none;
	}

	#links a, #projects a, #gallery figure, footer a {
		background: #fff;
	}

	main > section, main > nav {
		break-inside: avoid;
	}
}
