/*
 * arkitus.com
 * One column, one typeface, one accent. No framework.
 */

:root {
	--bg: #ffffff;
	--text: #1c1c1c;
	--muted: #555555;
	--faint: #767676;
	--rule: #e3e3e3;
	--tile: #f2f2f2;
	--highlight: #ffd200;
	--highlight-text: #000000;

	--serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
	--mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;

	--measure: 37rem;
	--wide: 50rem;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #141414;
		--text: #e8e6e3;
		--muted: #a3a09b;
		--faint: #8c8984;
		--rule: #2c2c2c;
		--tile: #222222;
	}
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--serif);
	font-size: 1.125rem;
	line-height: 1.6;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	font-kerning: normal;
}

.page {
	max-width: calc(var(--measure) + 2.5rem);
	margin: 0 auto;
	padding: 3.5rem 1.25rem 3rem;
}
.page.wide { max-width: calc(var(--wide) + 2.5rem); }

/* Links: quiet until touched. The yellow highlight has been here since 2013. */

a {
	color: var(--muted);
	text-decoration: none;
}
/* A band that sits on the x-height rather than filling the whole line box. */
a:hover, a:focus-visible, .item-list a:hover .name {
	color: var(--highlight-text);
	background: linear-gradient(transparent 0.2em, var(--highlight) 0.2em, var(--highlight) calc(100% - 0.1em), transparent calc(100% - 0.1em));
	box-shadow: none;
	margin-left: -2px;
	margin-right: -2px;
	padding-left: 2px;
	padding-right: 2px;
	outline: none;
}
a.image:hover, a.image:focus-visible { background: none; margin: 0; padding: 0; }

/* Masthead */

.masthead {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
	margin-bottom: 3.5rem;
}
h1.name { margin: 0; line-height: inherit; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 20; }
.masthead .name {
	color: var(--text);
	font-weight: 700;
	font-size: 1.25rem;
	letter-spacing: -0.005em;
}
.masthead nav { display: flex; gap: 1.25rem; font-size: 1rem; }
.masthead nav a[aria-current="page"], .masthead nav button[aria-current="page"] { color: var(--text); }

/* "More": a quiet menu that opens on hover, focus or tap. */
.menu { position: relative; }
.menu > button {
	font: inherit;
	color: var(--muted);
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}
.menu > ul {
	display: none;
	position: absolute;
	right: 0;
	top: 100%;
	z-index: 10;
	list-style: none;
	margin: 0;
	padding: 0.5rem 0 0;
	background: var(--bg);
	white-space: nowrap;
}
.menu:hover > ul, .menu:focus-within > ul { display: flex; gap: 1.25rem; }
.menu > ul li { margin: 0; }
.menu > ul a { text-decoration: none; color: var(--muted); }
.menu:hover > button, .menu:focus-within > button { color: var(--text); }

/* Type */

h1, h2, h3 {
	font-weight: 700;
	line-height: 1.3;
	color: var(--text);
}
h1 { font-size: 1.25rem; margin: 0 0 0.25rem; letter-spacing: -0.005em; }
h1 + p { margin-top: 0.75rem; }
h1 + .item-list { margin-top: 1.5rem; }
h1.section-title { margin-bottom: 1.5rem; }
h1.section-title a { color: var(--text); text-decoration: none; }
h2.item-title { margin: 0 0 0.25rem; }

h2 {
	font-size: 1.125rem;
	margin: 3rem 0 1rem;
}
h3 { font-size: 1rem; margin: 2rem 0 0.5rem; }

p { margin: 0 0 1.1em; }
strong, b { font-weight: 700; }
em, i { font-style: italic; }

p a, li a, td a { color: var(--text); text-decoration: underline; text-decoration-color: var(--rule); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
p a:hover, li a:hover, td a:hover { text-decoration: none; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }

img, video, iframe, canvas { max-width: 100%; }
main iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
img { height: auto; }
figure { margin: 0 0 1.5rem; }

blockquote { margin: 0 0 1.1em; padding-left: 1rem; border-left: 2px solid var(--rule); color: var(--muted); }

code, pre { font-family: var(--mono); font-size: 0.85em; }
pre { overflow-x: auto; padding: 1rem; background: var(--tile); }
.highlight { background: var(--tile) !important; }

table { border-collapse: collapse; }

.date, .meta, .crumb {
	font-family: var(--mono);
	font-size: 0.75rem;
	letter-spacing: 0.01em;
	color: var(--faint);
	margin: 0 0 1.5rem;
}
.crumb { margin-bottom: 1rem; }
.crumb a, .date a { color: var(--faint); text-decoration: none; }
.pager { margin-top: 2rem; display: flex; gap: 1.25rem; }
.pager a { text-decoration: none; color: var(--muted); }

.lede { font-size: 1.3rem; line-height: 1.45; letter-spacing: -0.005em; margin-bottom: 1.5rem; }
.note { color: var(--muted); }
.small { font-size: 0.9rem; }

/* Home */

.intro { display: flow-root; }
.portrait {
	float: right;
	width: 7rem;
	height: 7rem;
	margin: 0.4rem 0 1rem 2rem;
	object-fit: cover;
	border: 1px solid var(--rule);
}
@media (max-width: 34rem) {
	.portrait { float: none; display: block; margin: 0 0 1.5rem; width: 5.5rem; height: 5.5rem; }
}

/* Selected work */

.theme { margin-bottom: 1.75rem; }
.theme > h3 { margin: 0 0 0.4rem; }

.works { list-style: none; margin: 0; padding: 0; }
.works li {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: baseline;
	gap: 0 1.5rem;
	margin: 0 0 0.4rem;
	line-height: 1.45;
}
.works li > a, .works li > span:first-child { justify-self: start; max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.works li a { text-decoration: none; color: var(--text); }
.works li a:hover { color: var(--highlight-text); }
.venue { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); white-space: nowrap; text-align: right; }
@media (max-width: 34rem) {
	.works li > a, .works li > span:first-child { white-space: normal; }
	.works li { grid-template-columns: 1fr; margin-bottom: 0.7rem; }
	.works .venue { text-align: left; }
}

.inline-list { list-style: none; padding: 0; margin: 0 0 1.1em; }
.inline-list li { display: inline; }
.inline-list li:not(:last-child)::after { content: " · "; color: var(--faint); }

/* Research: full record */

.records { list-style: none; margin: 0; padding: 0; }
.records > li {
	display: grid;
	grid-template-columns: 3.25rem 1fr;
	gap: 0 1.1rem;
	margin: 0 0 1.75rem;
	font-size: 0.95rem;
	line-height: 1.5;
}
.records .thumb img {
	display: block;
	width: 3.25rem;
	height: 3.25rem;
	object-fit: cover;
	border: 1px solid var(--rule);
	background: #fff;
}
.records .title { display: block; color: var(--text); font-weight: 600; text-decoration: none; margin-bottom: 0.15rem; }
.records a.title:hover { color: var(--highlight-text); }
.records .authors { display: block; color: var(--muted); }
.records .venue { display: block; font-family: inherit; font-size: inherit; white-space: normal; text-align: left; color: var(--muted); font-style: italic; }
.records .authors .me { color: var(--text); }
.records .authors .count { color: var(--faint); white-space: nowrap; }
.records .resources { display: block; font-family: var(--mono); font-size: 0.72rem; margin-top: 0.3rem; }
.records .resources a { color: var(--faint); margin-right: 0.75rem; text-decoration: none; }
.records .resources a:hover { color: var(--highlight-text); }
.records .flag { font-family: var(--mono); font-size: 0.72rem; color: var(--text); background: var(--tile); padding: 0 0.3rem; margin-left: 0.25rem; }
@media (max-width: 34rem) {
	.records > li { grid-template-columns: 1fr; }
	.records .thumb { display: none; }
}

.records > li.year-mark { display: block; }
.year-mark { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); margin: 2.25rem 0 0.9rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--rule); }

/* Speaking */

.bio {
	border-left: 2px solid var(--rule);
	padding: 0.1rem 0 0.1rem 1rem;
	margin: 0 0 1.75rem;
}
.bio p:last-child { margin-bottom: 0; }
.bio-label { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); margin: 0 0 0.4rem; }

.photos { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1.1em; }
.photos figure { margin: 0; }
.photos img { width: 9rem; height: 9rem; object-fit: cover; display: block; }
.photos figcaption { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); margin-top: 0.4rem; }

/* Elsewhere, lab, illustrations, investments */

.item-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
	gap: 1.75rem 1.25rem;
}
.item-list a { display: block; text-decoration: none; }
.item-list a:hover { background: none; margin: 0; padding: 0; }
.item-list .box {
	aspect-ratio: 2 / 1;
	background-color: var(--tile);
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
}
.item-list .name { display: inline-block; margin-top: 0.45rem; font-size: 0.9rem; color: var(--text); line-height: 1.35; }
.item-list .date { display: block; margin: 0.1rem 0 0; }
#illustrations .item-list .date { margin-top: 0.45rem; }

#lab .box, #illustrations .box { border: 1px solid var(--rule); }
#investments .box { background-color: #fff; background-size: contain; background-origin: content-box; padding: 0.6rem; border: 1px solid var(--rule); }


/* Lab */

#lab #experiment { margin-bottom: 1.75rem; }
#lab #experiment canvas.lab-canvas {
	display: block;
	width: 100%;
	max-width: 800px;
	height: auto;
	aspect-ratio: 800 / 420;
	background: #fff;
	border: 1px solid var(--rule);
	touch-action: none;
	outline: none;
}

/* Illustrations */

#illustrations #image img { display: block; margin: 0; max-height: 80vh; width: auto; }

/* Footer */

footer {
	margin-top: 5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--rule);
	font-size: 0.9rem;
	color: var(--faint);
}
footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.5rem 1.5rem;
}
footer .links a { text-decoration: none; color: var(--muted); }
footer .links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; justify-content: flex-end; }
footer .since { font-family: var(--mono); font-size: 0.72rem; }

/* Print: a clean one-pager */

@media print {
	.masthead nav, footer .since { display: none; }
	a { color: inherit; }
	.page { padding: 0; max-width: none; }
}
