/* www.maartenbaert.be: simple light theme, no JavaScript */

:root {
	color-scheme: light;
	--text: #1f2328;
	--muted: #59636e;
	--bg: #ffffff;
	--bg-soft: #f6f8fa;
	--border: #d1d9e0;
	--accent: #1f5f9e;
	--accent-soft: #e6eef7;
	--header-bg: #1d3a5c;
	--code-bg: #f2f4f7;
	--note: #1f5f9e;
	--hint: #2a7d4f;
	--warning: #b35c00;
	--wide: 76rem;
	--text-width: 48rem;
}

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
	line-height: 1.6;
}

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

a:hover {
	text-decoration-thickness: 2px;
}

/* header */

.site-header {
	background: var(--header-bg);
}

.site-header-inner {
	max-width: var(--wide);
	margin: 0 auto;
	padding: 0.75rem 1rem;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.4rem 1.75rem;
}

.site-title {
	color: #ffffff;
	font-size: 1.25rem;
	font-weight: 700;
	text-decoration: none;
}

.projects {
	display: flex;
	flex-wrap: wrap;
	gap: 0.2rem 1.1rem;
}

.projects a {
	color: #cbdcef;
	text-decoration: none;
	border-bottom: 2px solid transparent;
}

.projects a:hover {
	color: #ffffff;
}

.projects a.active {
	color: #ffffff;
	border-bottom-color: #8fbcea;
}

/* layout */

.layout {
	max-width: var(--wide);
	margin: 0 auto;
	padding: 1.75rem 1rem 2.5rem;
	display: grid;
	grid-template-columns: 15rem minmax(0, 1fr);
	gap: 2.5rem;
}

main {
	min-width: 0;
}

main.home {
	grid-column: 1 / -1;
}

article, .comments {
	max-width: var(--text-width);
}

.site-footer {
	max-width: var(--wide);
	margin: 0 auto;
	padding: 1rem;
	border-top: 1px solid var(--border);
	color: var(--muted);
	font-size: 0.9rem;
}

/* navigation tree */

.sidebar {
	font-size: 0.95rem;
}

.sidebar .tree {
	position: sticky;
	top: 1rem;
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
}

.tree-root {
	display: block;
	margin-bottom: 0.4rem;
	padding: 0.1rem 0.4rem;
	border-radius: 4px;
	color: var(--text);
	font-weight: 700;
	text-decoration: none;
}

.tree ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tree ul ul {
	margin-left: 0.5rem;
	padding-left: 0.5rem;
	border-left: 1px solid var(--border);
}

.tree li {
	margin: 0.1rem 0;
}

.tree li a {
	display: block;
	padding: 0.1rem 0.4rem;
	border-radius: 4px;
	text-decoration: none;
}

.tree a:hover {
	background: var(--bg-soft);
}

.tree a[aria-current="page"] {
	background: var(--accent-soft);
	color: var(--text);
	font-weight: 600;
}

.tree-mobile {
	display: none;
}

/* article */

h1, h2, h3, h4, h5, h6 {
	line-height: 1.3;
	scroll-margin-top: 1rem;
}

h1 {
	margin: 0 0 0.2rem;
	font-size: 2rem;
}

h2 {
	margin: 2.25rem 0 0.75rem;
	padding-bottom: 0.25rem;
	border-bottom: 1px solid var(--border);
	font-size: 1.5rem;
}

h3 {
	margin: 1.75rem 0 0.5rem;
	font-size: 1.2rem;
}

h4 {
	margin: 1.5rem 0 0.5rem;
	font-size: 1.05rem;
}

h6 {
	margin: 1.25rem 0 0.25rem;
	font-size: 0.95rem;
}

.updated {
	margin: 0 0 1.5rem;
	color: var(--muted);
	font-size: 0.9rem;
}

img, video {
	max-width: 100%;
	height: auto;
}

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

code, pre {
	font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;
	font-size: 0.88em;
}

code {
	padding: 0.1em 0.3em;
	border-radius: 4px;
	background: var(--code-bg);
}

pre {
	padding: 0.75rem 1rem;
	overflow-x: auto;
	border-radius: 6px;
	background: var(--code-bg);
	line-height: 1.45;
}

pre code {
	padding: 0;
	background: none;
	font-size: 1em;
}

blockquote {
	margin: 1rem 0;
	padding: 0.5rem 1rem;
	border-left: 4px solid var(--border);
	background: var(--bg-soft);
}

blockquote > :first-child, .box > :first-child, td > :first-child, th > :first-child, li > :first-child {
	margin-top: 0;
}

blockquote > :last-child, .box > :last-child, td > :last-child, th > :last-child, li > :last-child {
	margin-bottom: 0;
}

li {
	margin: 0.25rem 0;
}

/* tables: data tables scroll sideways if needed, image galleries stack on small screens */

table {
	margin: 1rem 0;
	border-collapse: collapse;
}

table.data {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}

table.data th, table.data td {
	padding: 0.3rem 0.6rem;
	border: 1px solid var(--border);
	text-align: left;
	vertical-align: top;
}

table.data th {
	background: var(--bg-soft);
}

table.gallery th, table.gallery td {
	padding: 0.4rem;
	text-align: left;
	vertical-align: top;
}

table.gallery p {
	margin: 0.25rem 0;
}

/* note / hint / warning boxes */

.box {
	margin: 1rem 0;
	padding: 0.6rem 1rem;
	border-left: 4px solid;
	border-radius: 4px;
}

.box-title {
	margin: 0 0 0.25rem;
	font-weight: 700;
}

.box.note {
	border-color: var(--note);
	background: #eef4fb;
}

.box.hint {
	border-color: var(--hint);
	background: #edf7f0;
}

.box.warning {
	border-color: var(--warning);
	background: #fdf3e6;
}

/* table of contents, child pages */

.toc {
	display: inline-block;
	min-width: 16rem;
	margin: 0 0 1.25rem;
	padding: 0.6rem 1.2rem 0.6rem 1rem;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--bg-soft);
}

.toc-title {
	margin: 0 0 0.25rem;
	font-weight: 700;
}

.toc ul {
	margin: 0;
	padding-left: 1.2rem;
}

.toc li {
	margin: 0.1rem 0;
}

.children {
	margin-top: 2rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--border);
}

.video-embed {
	max-width: 40rem;
	aspect-ratio: 16 / 9;
	margin: 1rem 0;
}

.video-embed iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

/* comments */

.comments {
	margin-top: 3rem;
}

.comments-note {
	color: var(--muted);
	font-size: 0.95rem;
}

.comment {
	margin: 1rem 0;
	padding: 0.5rem 1rem;
	border: 1px solid var(--border);
	border-radius: 6px;
}

.comment.admin {
	border-color: #b7cde5;
	background: #f6f9fd;
}

.comment:target {
	outline: 2px solid var(--accent);
}

.comment-meta {
	margin: 0 0 0.5rem;
	color: var(--muted);
	font-size: 0.9rem;
}

.comment-meta a {
	color: var(--muted);
}

.badge {
	padding: 0.05rem 0.4rem;
	border-radius: 3px;
	background: var(--accent);
	color: #ffffff;
	font-size: 0.75rem;
}

/* home */

.project-list {
	font-size: 1.1rem;
}

/* small screens */

@media (max-width: 50rem) {
	.layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 1rem;
		padding-top: 1rem;
	}
	.sidebar {
		display: none;
	}
	.tree-mobile {
		display: block;
		margin-bottom: 1.25rem;
		padding: 0.5rem 0.75rem;
		border: 1px solid var(--border);
		border-radius: 6px;
		background: var(--bg-soft);
	}
	.tree-mobile summary {
		cursor: pointer;
		font-weight: 600;
	}
	.tree-mobile .tree {
		margin-top: 0.5rem;
	}
	h1 {
		font-size: 1.6rem;
	}
	table.gallery, table.gallery tbody, table.gallery tr, table.gallery th, table.gallery td {
		display: block;
	}
}
