/* Variables, Resets and Typography */

:root {
	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans,
		Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	--serif: "Iowan Old Style", "Apple Garamond", Baskerville, "Times New Roman",
		"Droid Serif", Times, serif;
}

html {
	font-size: 10px;
	-webkit-text-size-adjust: none;
	text-size-adjust: none;
	box-sizing: border-box;
}

body {
	background: white;
	color: #333;
	font-family: var(--sans);
	font-weight: normal;
	margin: 0;
	padding: 0;
}

a {
	color: #666;
	text-decoration: underline;
}

a.active {
	text-decoration: none;
}

a:hover {
	color: #666;
	text-decoration: none;
}

h1,
h2,
p,
ul,
ol,
img,
table {
	font-size: 2.2rem;
	font-weight: normal;
	line-height: 3.6rem;
	margin: 0 0 3.6rem;
	padding: 0;
}

ul,
ol {
	margin-left: 3.6rem;
}

li {
	margin-bottom: 1.4rem;
}

img {
	background: #eee;
}

/* Header */

header {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	margin: 1rem auto 0;
	max-width: 800px;
	padding: 0 1.6rem;
}

header .brand {
	font-family: var(--serif);
	font-size: 2.4rem;
	line-height: 2.4rem;
	margin: 0 2rem 1rem 0;
	text-decoration: none;
}

header a.brand {
	color: #333;
}

header a.brand:hover {
	text-decoration: underline;
}

header nav ul {
	display: flex;
	font-size: 1.8rem;
	flex-direction: row;
	flex-wrap: nowrap;
	line-height: 1.8rem;
	list-style: none;
	margin: 0 0 1.4rem;
	text-align: right;
}

header nav ul li {
	margin: 0 2rem 0 0;
	text-decoration: none;
}

header nav li:last-child {
	margin-right: 0;
}

/* Posts */

article,
main {
	display: flex;
	flex-direction: column;
}

.photo-area {
	align-items: center;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	order: -1;
	position: relative;
	width: 100%;
}

.photo img {
	border: 0;
	display: block;
	height: auto;
	margin: 0 auto;
	max-height: calc(100vh - 4.7rem);
	max-height: calc(100dvh - 4.7rem);
	max-width: 100%;
	width: auto;
}

.photo-area .photo {
	order: 1;
	flex-shrink: 1;
}

.photo-area .previous {
	order: 0;
}

.photo-area .next {
	order: 2;
}

.photo-area .photo-nav {
	flex-grow: 1;
	flex-shrink: 0;
	text-align: center;
	width: 1.6rem;
}

.photo-nav a {
	display: block;
	margin: 0 auto;
	width: 1.6rem;
	height: 1.6rem;
}

.photo-nav.previous .arr {
	left: 0.2rem;
	transform: rotate(135deg);
}

.photo-nav.next .arr {
	right: 0.2rem;
	transform: rotate(-45deg);
}

.photo-nav a .arr {
	border: solid #767676;
	border-width: 0 1px 1px 0;
	display: inline-block;
	height: 0.8rem;
	position: relative;
	top: 0.4rem;
	width: 0.8rem;
}

.photo-nav a:hover .arr {
	border-color: #333;
}

.o {
	display: block;
	height: 100%;
	position: absolute;
	top: 0;
	width: 50%;
}

.previous .o {
	left: 0;
}

.next .o {
	right: 0;
}

.photo-title,
.content-area {
	align-self: center;
	font-family: var(--serif);
	margin: 0 1.6rem 0;
	max-width: 600px;
}

h1 {
	font-family: var(--serif);
	font-size: 3.6rem;
	line-height: 5.5rem;
	text-align: center;
	margin-top: 2.2rem;
	margin-bottom: 2.2rem;
}

.date {
	font-style: italic;
	font-size: 1.8rem;
	line-height: 3.6rem;
	margin-bottom: 3.6rem;
	text-align: right;
}

.tags {
	display: block;
	font-family: var(--sans);
	font-size: 1.8rem;
	list-style-type: none;
	margin: 0 0 3.6rem;
	text-align: center;
}

.tags li {
	display: inline-block;
	margin: 0 1rem;
}

.tags li a:after {
	content: ",";
}

.tags li:last-child a:after {
	content: "";
}

.diamond {
	font-family: var(--serif);
	font-size: 3.6rem;
	line-height: 3.6rem;
	margin-bottom: 3.6rem;
	text-align: center;
	width: 100%;
}

.imgno {
	color: #767676;
	font-family: var(--sans);
	font-weight: 300;
	font-size: 1.6rem;
	text-align: center;
	width: 100%;
	margin-bottom: 1.8rem;
}

@media (min-width: 640px) {
	header {
		padding: 0 3.2rem;
	}
	.photo-area .photo-nav {
		width: 3.2rem;
	}
	.photo-nav a {
		width: 3.2rem;
		height: 3.2rem;
	}
	.photo-nav a .arr {
		height: 1.6rem;
		top: 0.8rem;
		width: 1.6rem;
	}
	.photo-nav.previous .arr {
		left: 0.4rem;
	}
	.photo-nav.next .arr {
		right: 0.4rem;
	}
	.photo-title,
	.content-area {
		margin: 0 3.2rem;
	}
}

@media (min-width: 640px) and (min-height: 640px) {
	.photo img {
		max-height: calc(100dvh - 5.5rem);
	}
}

@media (min-height: 1024px) {
	.photo img {
		max-height: calc(100dvh - 12.5rem);
	}
}

@media (min-height: 1200px) {
	.photo img {
		max-height: calc(100dvh - 18.7rem);
	}
}

/* Footer */

footer {
	color: #767676;
	font-size: 1.6rem;
	font-weight: 300;
	margin: 0 auto 3.6rem;
	text-align: center;
}

/* Dark Colour Scheme */

@media (prefers-color-scheme: dark) {
	body {
		background: #1e1e1e;
		color: #ccc;
	}
	a {
		color: #858585;
	}
	a:hover {
		color: #858585;
	}
	img {
		background: #333;
	}
	header a.brand {
		color: #858585;
	}
	.photo-nav a .arr {
		border-color: #858585;
	}
	.photo-nav a:hover .arr {
		border-color: #aaa;
	}
	.imgno {
		color: #ccc;
	}
	footer {
		color: #ccc;
	}
}
