/* Styled after the //resume PDF: white page, one blue, pixel-font headings, circuit-trace accents. */
:root {
	--bg: #ffffff;
	--surface: #ffffff;
	--text: #231f20;
	--muted: #66686e;
	--accent: #3971c1;
	--accent-strong: #2b5a9e;
	--border: #dcdde0;
	--media-bg: #000;
	--trace: 4px;
	--pixel: 'VT323', ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #14161a;
		--surface: #1b1e23;
		--text: #e7e7e9;
		--muted: #a2a5ac;
		--accent: #6d9be0;
		--accent-strong: #93b6ea;
		--border: #2e3239;
	}
}

* { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: 'Source Sans 3', 'Myriad Pro', system-ui, sans-serif;
	font-size: 1.0625rem;
	line-height: 1.6;
}

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

.wrap {
	max-width: 768px;
	margin: 0 auto;
	padding: 0 16px;
}

/* Header: brand and nav sit on a blue trace that ends in a solder pad at each side. */
.site-header { padding: 28px 0 0; }

.site-header .wrap {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 18px;
}

.site-header .wrap::before {
	content: '';
	position: absolute;
	left: 16px;
	right: 30px;
	bottom: 0;
	height: var(--trace);
	background: var(--accent);
	border-radius: var(--trace);
}

.site-header .wrap::after {
	content: '';
	position: absolute;
	right: 12px;
	bottom: calc(var(--trace) / 2 - 10px);
	width: 20px;
	height: 20px;
	border: 5px solid var(--accent);
	border-radius: 50%;
	background: var(--bg);
}

.site-header a { text-decoration: none; }

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--accent);
	font-family: var(--pixel);
	font-weight: 700;
	font-size: clamp(1.35rem, 6vw, 1.9rem);
	line-height: 1;
	letter-spacing: 0.04em;
}

.brand:hover { color: var(--accent-strong); }

.power { flex: none; width: 1.15em; height: 1.15em; }
.power circle { fill: currentColor; }
.power path { fill: none; stroke: var(--bg); stroke-width: 2.4; stroke-linecap: round; }

.site-header nav {
	display: flex;
	gap: 20px;
	padding-right: 24px;
	font-family: var(--pixel);
	font-size: 1.35rem;
	letter-spacing: 0.04em;
}

.site-header nav a { color: var(--muted); }
.site-header nav a:hover { color: var(--accent); }

main.wrap { padding-top: 36px; padding-bottom: 56px; }

h1, h2, h3 {
	font-family: var(--pixel);
	font-weight: 700;
	line-height: 1.1;
	color: var(--accent);
	letter-spacing: 0.06em;
}

h1 { font-size: 2.6rem; margin: 0.3em 0 0.25em; }
h1::before { content: '//'; margin-right: 0.15em; }

/* Reads like the italic job titles in the resume. */
.skills {
	color: var(--muted);
	font-style: italic;
	margin: 0 0 1em;
}

.intro {
	font-size: 1.2rem;
	color: var(--muted);
	margin-bottom: 32px;
}

.intro p { margin: 0; }

.project-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.project-card {
	display: block;
	position: relative;
	background: var(--surface);
	border: 2px solid var(--border);
	border-radius: 4px;
	padding: 18px 24px 18px 28px;
	color: inherit;
	text-decoration: none;
	transition: border-color 0.15s;
}

/* Status LED on the card edge, lit on hover. */
.project-card::before {
	content: '';
	position: absolute;
	left: 10px;
	top: 30px;
	width: 6px;
	height: 6px;
	background: var(--border);
	transition: background 0.15s;
}

.project-card:hover {
	color: inherit;
	border-color: var(--accent);
}

.project-card:hover::before { background: var(--accent); }

.project-card h2 { margin: 0 0 2px; font-size: 1.7rem; }
.project-card .skills { font-size: 0.95rem; margin-bottom: 6px; }
.project-card .summary { margin: 0; }

.back {
	font-family: var(--pixel);
	font-size: 1.25rem;
	text-decoration: none;
}

.content h2 {
	font-size: 2rem;
	margin-top: 1.4em;
	margin-bottom: 0.5em;
}

.content ul { list-style: square; padding-left: 1.4em; }
.content li::marker { color: var(--accent); }

.content img,
.content video {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 16px auto;
	border-radius: 4px;
	background: var(--media-bg);
}

/* Opt-in smaller media, e.g. portrait phone screenshots: $image.asset('x').attrs('small') or .attrs('tiny') */
.content img.small,
.content video.small {
	max-width: min(100%, 320px);
}

.content img.tiny,
.content video.tiny {
	max-width: min(100%, 220px);
}

/* Consecutive media directives land in one paragraph: lay them out as a gallery. */
.content p:has(> img + img, > video + video, > img + video, > video + img) {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px;
}

.content p:has(> img + img, > video + video, > img + video, > video + img) > * {
	margin: 0;
	width: 100%;
}

.content .yt {
	aspect-ratio: 16 / 9;
	margin: 16px 0;
	border-radius: 4px;
	overflow: hidden;
	background: var(--media-bg);
}

.content .yt iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.content blockquote {
	margin: 1em 0;
	padding: 8px 16px;
	border-left: var(--trace) solid var(--accent);
	background: color-mix(in srgb, var(--accent) 8%, transparent);
	border-radius: 0 4px 4px 0;
}

.content code {
	font-size: 0.9em;
	background: color-mix(in srgb, var(--muted) 15%, transparent);
	padding: 1px 5px;
	border-radius: 4px;
}

.site-footer {
	color: var(--muted);
	padding: 0 0 36px;
	font-family: var(--pixel);
	font-size: 1.3rem;
}

.site-footer .wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	padding-top: 20px;
	border-top: 2px solid var(--border);
}

@media (max-width: 600px) {
	h1 { font-size: 2.1rem; }
	.site-header nav { gap: 16px; }
}

/* Home: every project in full, each in its own panel. */
.project-feed {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.project-full {
	background: var(--surface);
	border: 2px solid var(--border);
	border-top: var(--trace) solid var(--accent);
	border-radius: 4px;
	padding: 24px 32px 28px;
}

.project-full > h2 { font-size: 2.3rem; margin: 0 0 0.15em; }
.project-full > h2 a { color: inherit; text-decoration: none; }
.project-full > h2 a:hover { color: var(--accent-strong); }
.project-full > h2::before { content: '//'; margin-right: 0.15em; }
.project-full .content h2 { font-size: 1.6rem; }

@media (max-width: 600px) {
	.project-full { padding: 18px 18px 22px; }
	.project-full > h2 { font-size: 1.9rem; }
}
