html {
	font-family: "Times New Roman", serif;
	box-sizing: border-box;
	min-width: 360px;
}

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

body {
	margin: 0;
	min-height: 100vh;
	background-image: url("../images/header-background-small.jpeg");
	background-size: calc(20em * 1.09);
	background-position: top -11em left 20em;
}

a {
	color: inherit;
}

a:hover {
	text-decoration: none;
}

h3 {
	margin: 0;
}

/* header */

header {
	display: flex;
	align-items: center;
}

#header-image {
	height: 13em;
	width: 20em;
	position: relative;
}

#header-image img {
	position: absolute;
	bottom: 0;
	width: 100%;
	z-index: 0;
}

#header-content {
	margin-left: -7em;
	z-index: 1;
	color: black;
}

#header-content div {
	padding: 1em;
	background-color: #ffedd6;
}

#site-title {
	font-weight: 600;
	font-size: 40pt;
	margin: 0;
}

#site-title a {
	text-decoration: none;
}

header p {
	max-width: 35em;
	margin: 0;
}

/* main layout */

#diamond {
	position: absolute;
	top: 12em;
	width: 2em;
	height: 2em;
	color:#5292a0;
}

main {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 2em;
	padding: 0 2em;
}

section {
	padding: 0 2em 2em;
}

.section-header {
	margin: 0.5em auto;
	text-align: center;
	font-size: 20pt;
	font-weight: bolder;
	color: black;
}

/** selected works **/

.selected-works {
	background-color: #3a5076;
}

.selected-works > div {
	max-width: 40em;
	margin: 0 auto;
}

.work {
	display: flex;
	border: 0.5em solid #081b3a;
	margin: 1em auto;
	padding: 1em;
	background-color: #ffedd6;
}

.work .main-image {
	width: 8em;
	padding-right: 1.5em;
}

.work a {
	text-decoration: none;
}

.work a:hover {
	text-decoration: underline;
}

.work p {
	margin-top:0;
	padding-left: 0.75em;
}

.blurb {
	font-style: italic;
}

/** substack **/

.substack-posts {
	background-color: #537a5a;
}

.substack-posts > div {
	max-width: 50em;
	margin: 1em auto;
}

/*** latest ***/

.latest-substack {
	display: flow-root;
	border: 0.5em solid #1a2d14;
	padding: 1em;
	background-color: #ffedd6;
}

.latest-substack img {
	max-width: 20%;
	min-width: 8em;
	float: left;
	padding: 1em 1em 0 0;
}

.truncated-container {
	display: flex;
}

.truncated {
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
}

.read-more {
	color: rgb(32, 129, 175);
	flex-shrink: 0;
}

.read-more::after {
	content: "→";
	padding-left: 0.1em;
	display: inline-block;
	vertical-align: top;
}

.substack-pub-date {
	text-align: right;
	padding-right: 4em;
	font-style: italic;
}

/*** list ***/

.substack-list {
	display: flex;
	margin: 1em auto;
}

.substack-list article {
	flex: 1;
	margin: 0 0.75em;
}

.substack-list h3 {
	margin: 0;
}

.substack-subscribe {
	display: block;
	margin: 4em auto 0;
	border: 0.5em solid #1a2d14;
}

.mobile-substack-button {
	display: none;
}

/* footer */

footer {
	padding: 2em;
}

footer p {
	margin: 0;
}

footer div {
	padding: 0.5em;
	width: fit-content;
	background-color: #ffedd6; 
}

/* mobile */

@media screen and (width < 1180px) {
	.substack-subscribe {
		display: none;
	}
	
	.mobile-substack-button {
		display: block;
		text-decoration: none;
		background-color: #FF6719;
		color: white;
		padding: 1em 1.25em;
		margin: 4em auto 0;
		text-wrap: nowrap;
		width: min-content;
		border-radius: 10px;
		font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, sans-serif;
	}
}

@media screen and (width < 800px) {
	#diamond {
		display: none;
	}
	
	main {
		grid-template-columns: 100%;
		gap: 1em;
		padding: 0 1em;
	}
	
	header {
		flex-wrap: wrap;
	}
	
	section {
		padding: 0 1em 1em;
	}
	
	#header-content {
		margin: 0 1em 1em 0;
	}
	
	.substack-list {
		display: revert;
		margin: 1em auto;
	}
	
	.substack-list article {
		margin: 1em 0.5em;
	}
}