/* kyne.au/~mark — modernised port of the 2001 site.css
   Palette and layout language preserved: grey page, blue navbar,
   sitemap sidebar, articles column. */

* { box-sizing: border-box; }

body {
	margin: 0;
	padding: 0;
	background-color: #f0f0f0;
	color: #000000;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	line-height: 1.45;
}

a { color: #0000cc; }
a:visited { color: #551a8b; }

/* --- Top navigation bar: trail left, siblings right --- */

.navbar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em 2em;
	justify-content: space-between;
	width: 100%;
	background-color: #90b0f0;
}

.navloc {
	padding: 0.5em;
}

.navsib {
	padding: 0.5em;
	text-align: right;
}

/* --- Layout: sitemap sidebar + articles column --- */

.content {
	display: flex;
	align-items: flex-start;
	margin: 0 0.5em;
	min-height: 20em;
	gap: 0.5em;
}

.sitemap {
	flex: 0 0 12em;
	position: sticky;
	top: 0.5em;
	margin-top: 0.5em;
}

.articles {
	flex: 1;
	min-width: 0;
	padding: 0 0.5em 0 0.5em;
}

.page {
	max-width: 50em;
}

/* --- Footer --- */

.separator {
	background-color: #909090;
	height: 0.1em;
}

.footer {
	padding: 0.2em 0 0 0.5em;
}

/* --- Weblog entries --- */

.entry-head {
	margin: 0.8em 0 0.2em 0;
}

.entry-head .date {
	font-size: 75%;
}

.entry-body {
	margin: 0.2em 0 0.6em 0;
}

.more {
	font-size: 75%;
}

.topic_icon {
	float: left;
	margin: 0 0.2em 0.2em 0;
	border: 0;
}

.nav_icon {
	border: 0;
	vertical-align: middle;
}

.wseparator {
	height: 0.1em;
}

.weblog_nav {
	display: flex;
	align-items: baseline;
	padding: 0.8em 0;
	text-align: center;
}

.weblog_nav_left {
	margin-right: auto;
}

.weblog_nav_right {
	margin-left: auto;
}

.weblog_nav_topics {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}

/* --- Photo galleries --- */

.photo-grid {
	list-style: none;
	margin: 1em 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 1em;
}

.photo {
	margin: 0;
	padding: 0;
}

.photo img {
	display: block;
	border: 0;
	max-width: 100%;
	height: auto;
}

.photo-title {
	display: block;
	font-weight: bold;
	font-size: 90%;
}

.photo-desc {
	display: block;
	font-size: 85%;
}

/* --- Generic pages --- */

.page h1 { font-size: 1.4em; }
.page h2 { font-size: 1.2em; }
.page h3 { font-size: 1.05em; }

.page pre {
	background-color: #e8e8e8;
	padding: 0.6em;
	overflow-x: auto;
}

.page img { border: 0; }

/* Gallery index entries: thumbnail left, description top-aligned beside it,
   never wrapping underneath. The galleryentry shortcode provides the structure
   (do NOT rely on p:has(img): flex makes every inline element its own item). */
.gallery-entry {
	display: flex;
	align-items: flex-start;
	gap: 1em;
}

.gallery-entry > a {
	flex: none;
}

/* --- Lists (sitemap and content) --- */

ul {
	margin: 0 0 0 1em;
	padding: 0;
}

li {
	margin: 0;
	padding: 0;
}

/* --- Small screens: stack the sidebar above the content --- */

@media (max-width: 42em) {
	.content {
		flex-direction: column;
	}
	.sitemap {
		position: static;
		flex: none;
		width: 100%;
	}
	.weblog_nav_topics {
		position: static;
		transform: none;
	}
}
