/* Blog styles: the home page and /bio look (copied from their inline styles),
   plus styles for content converted from the WordPress blog. */

body {
	margin: auto;
	padding: 15px;
	background: rgb(238, 238, 238);
	width: 70%;
	font-family:
		Seravek, "Gill Sans Nova", Ubuntu, Calibri, "DejaVu Sans",
		source-sans-pro, sans-serif;
	font-size: clamp(1rem, 1.3vw, 1.5rem);
	line-height: 1.45;
}

@media only screen and (max-width: 1024px) {
	body {
		width: 95%;
	}
}

h1,
h2,
h3,
h4 {
	font-family:
		Superclarendon, "Bookman Old Style", "URW Bookman", "URW Bookman L",
		"Georgia Pro", Georgia, serif;
	line-height: 1.2;
}

h1 {
	padding: 10px;
	margin: 0;
	color: black;
}

h2 {
	margin-top: 0;
	color: black;
}

.section {
	border-radius: 5px;
	padding: 30px;
	margin: 15px 0 10px;
	background: white;
}

#footer {
	text-align: right;
	margin: 15px;
}

#header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 25px;
}

#photo {
	position: relative;
	z-index: 1;
}

#photo img {
	border-radius: 50%;
	width: 180px;
	height: 180px;
	margin-bottom: -90px;
	border: 5px solid white;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@media only screen and (min-width: 1024px) {
	#photo {
		order: 2;
		margin-right: 30px;
	}
}

@media only screen and (max-width: 1023px) {
	#photo {
		margin-left: 15px;
	}

	#photo img {
		width: 80px;
		height: 80px;
		margin-bottom: -40px;
		border-width: 3px;
	}
}

a {
	text-decoration: none;
}

a:link,
a:visited {
	color: #0074d9;
}

a:hover {
	text-decoration: underline;
}

a:active {
	color: #ff851b;
}

#title-block {
	flex: 1;
	padding: 10px;
}

/* On blog pages the name is small and the blog title is the main heading */
#title {
	padding: 0;
	font-size: 1.1em;
}

#title .icons svg {
	width: 12px;
	height: 12px;
}

/* Blog title and subtitle under the name */
.blog-title {
	margin: 0.3em 0 0;
	font-family:
		Superclarendon, "Bookman Old Style", "URW Bookman", "URW Bookman L",
		"Georgia Pro", Georgia, serif;
	font-size: 2em;
	font-weight: bold;
	line-height: 1.15;
}

.blog-title a:link,
.blog-title a:visited {
	color: black;
}

.blog-subtitle {
	margin: 0.2em 0 0;
	color: #555;
}

.icons {
	display: inline-block;
	margin-left: 10px;
}

.icons a {
	text-decoration: none;
}

/* Topic tags, like the talk tags on the home page */
.tag {
	display: inline-block;
	padding: 0 0.5em;
	margin: 0 0.5em 0.2em 0;
	font-size: smaller;
	white-space: nowrap;
	border-radius: 3px;
	background: #1f76c2;
}

a.tag:link,
a.tag:visited {
	color: white;
}

a.tag:hover {
	text-decoration: none;
	opacity: 0.85;
}

.tag.c0 { background: #1f76c2; }
.tag.c1 { background: #8956fb; }
.tag.c2 { background: #146500; }
.tag.c3 { background: #008080; }
.tag.c4 { background: #dc143c; }
.tag.c5 { background: #3b5999; }
.tag.c6 { background: #a0522d; }
.tag.c7 { background: #6b6b6b; }

/* Post lists, like the talk list on the home page */
.post-list-year {
	margin: 1.5em 0 0.75em;
}

.post-list-year:first-of-type {
	margin-top: 0.5em;
}

.post-item {
	display: flex;
	gap: 0.75em;
	margin: 0 0 1em 1.5em;
}

.post-item .info {
	flex: 1;
}

.post-item .tags {
	margin-top: 0.2em;
}

/* Excerpt under each title, at most three lines */
.post-item .excerpt {
	margin: 0.2em 0 0.3em;
	color: #555;
	font-size: 0.9em;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}

.post-item .comments {
	font-size: smaller;
	color: #666;
}

/* Keep the first card's heading clear of the round photo that overlaps it */
#content > .section:first-child > :first-child {
	padding-right: 190px;
}

@media only screen and (max-width: 1023px) {
	#content > .section:first-child > :first-child {
		padding-right: 70px;
	}
}

/* Post dates: plain text (the home page's calendar badges are for event dates) */
.post-date:link,
.post-date:visited {
	color: #666;
}

.post-item .post-date {
	flex: 0 0 3.5em;
	font-size: 0.9em;
	padding-top: 0.05em;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.post-meta {
	margin: 0.5em 0 1.5em;
	color: #666;
}

.post-meta .tags {
	margin-left: 0.5em;
	font-size: 0.9em;
}

.section h1 {
	padding: 0;
}

.subtitle {
	color: #555;
	margin: 0.3em 0 0;
}

.feed-link {
	font-size: smaller;
}

/* Converted WordPress post content */
.post-content {
	overflow-wrap: break-word;
}

.post-content img {
	max-width: 100%;
	height: auto;
}

.post-content .alignright,
.post-content img[align="right"] {
	float: right;
	margin: 0.3em 0 1em 1.5em;
}

.post-content .alignleft,
.post-content img[align="left"] {
	float: left;
	margin: 0.3em 1.5em 1em 0;
}

.post-content .aligncenter {
	display: block;
	margin: 1em auto;
}

.post-content .caption {
	max-width: 100%;
	text-align: center;
}

.post-content .caption-text {
	font-size: smaller;
	color: #555;
	margin: 0.3em 0 0;
}

.post-content blockquote {
	margin: 1em 0;
	padding: 0.2em 1em;
	border-left: 4px solid #ccc;
	color: #444;
	font-style: italic;
}

.post-content pre {
	overflow-x: auto;
	padding: 1em;
	background: #f6f6f6;
	border-radius: 5px;
	font-size: 0.85em;
	line-height: 1.4;
}

.post-content code,
.post-content tt {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.9em;
}

.post-content :not(pre) > code {
	background: #f3f3f3;
	padding: 0.1em 0.3em;
	border-radius: 3px;
}

.post-content table {
	border-collapse: collapse;
	margin: 1em 0;
}

.post-content th,
.post-content td {
	border: 1px solid #ddd;
	padding: 0.3em 0.6em;
}

.post-content iframe,
.post-content object,
.post-content embed,
.post-content video {
	max-width: 100%;
}

.post-content::after {
	content: "";
	display: block;
	clear: both;
}

/* Comments (read-only) */
.comment-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.comment-list li {
	padding: 1em 0;
	border-top: 1px solid #eee;
}

.comment-list li:first-child {
	border-top: 0;
	padding-top: 0;
}

.comment-meta {
	color: #666;
	font-size: smaller;
}

.comment-author {
	font-weight: bold;
	color: black;
}

.comment-content p {
	margin: 0.5em 0;
}

.pingback {
	font-size: smaller;
	color: #666;
}

.comments-closed {
	color: #666;
	font-size: smaller;
	margin-bottom: 0;
}

/* Previous / next post */
.post-navigation {
	display: flex;
	justify-content: space-between;
	gap: 1em;
}

.post-navigation .next {
	margin-left: auto;
	text-align: right;
}

.post-navigation .label {
	display: block;
	font-size: smaller;
	color: #666;
}

/* Pagination: newer / page numbers / older */
.pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5em 1em;
	margin-top: 1.5em;
	padding-top: 1em;
	border-top: 1px solid #eee;
}

/* Top bar (page 2 onwards): separated from the list below instead of above */
.pagination.top {
	margin: 1em 0;
	padding: 0 0 1em;
	border-top: 0;
	border-bottom: 1px solid #eee;
}

.pagination .pages {
	display: flex;
	gap: 0.6em;
}

.pagination .current {
	font-weight: bold;
}

.pagination .gap {
	color: #999;
}

.pagination .older {
	margin-left: auto;
}
