/* Globals */

* {
	font-family: inherit;
	line-height: inherit;
	color: inherit;
	margin: 0;
}

* + * {
	margin-top: 1.5em;
}

body, br, dt, dd, th, td, option {
	margin-top: 0;
}

html {
	background-color: lightgray;
	font-family: "Adobe Caslon Pro", "Hoefler Text", Georgia, Times, "Times New Roman", serif;
	font-kerning: auto;
	font-size: 20px;
	line-height: 1.4em;
	text-rendering: optimizeLegibility;
}

body {
	margin-left: auto;
	margin-right: auto;
	padding-top: 2em;
	padding-bottom: 2em;
	max-width: 40em;
}

/* Elements */

p {
	text-align: justify;
}

a:link {
	color: #1456cc;
}

a:visited {
	color: #de3d83;
}

time {
	display: block;
	font-size: smaller;
}

blockquote {
	font-size: smaller;
	font-style: italic;
	margin-left: 1em;
	margin-right: 1em;
}

blockquote footer {
	text-align: right;
}

footer {
	font-size: smaller;
}

hr {
	border: none;
	text-align: center;
}

hr:after {
	content: "⁓ § ⁓";
}

sup, sub {
	vertical-align: 0;
	position: relative;
}

sup {
	bottom: 1ex;
	font-style: italic;
}

sub {
	top: 0.8ex;
}

details.bibliography ul {
	padding: 0;
	list-style: none;
}

details.footnotes div.footnote hr {
	display: none;
}

details li {
	font-size: smaller;
}

code, pre {
	font-family: 'Courier New', Courier, monospace;
	font-size: smaller;
	font-style: normal;
	white-space: pre-wrap;
}

figure {
	clear: both;
	text-align: center;
}

figure img {
	border: 0;
	width: 100%;
}

figcaption {
	font-style: italic;
	font-size: smaller;
	margin-top: 0;
}

li {
	margin-top: 1em;
}

td {
	padding-bottom: 0.5em;
}

/* Alignment Classes */

.left {
	float: left;
	margin-right: 20px;
}

.right {
	float: right;
	margin-left: 20px;
}

.center {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

/* Headers */

h1, h2, h3, h4, h5, h6, #blog-title, #blog-description, .entry-subtitle {
	font-variant-caps: small-caps;
	font-variant-numeric: lining-nums ordinal slashed-zero;

	display: block;
	margin-left: 0;
	margin-right: 0;
	font-weight: bold;
}

h1, #blog-title {
	font-size: 2em;
	margin-top: 0.67em;
	margin-bottom: 0.67em;
}

h2, article h1 {
	font-size: 1.5em;
	margin-top: 0.83em;
	margin-bottom: 0.83em;
}

h3, article h2, #blog-description, .entry-subtitle {
	font-size: 1.17em;
	margin-top: 1em;
	margin-bottom: 1em;
}

h4, article h3 {
	font-size: 1em;
	margin-top: 1.33em;
	margin-bottom: 1.33em;
}

h5 {
	font-size: .83em;
	margin-top: 1.67em;
	margin-bottom: 1.67em;
}

h6 {
	font-size: .67em;
	margin-top: 2.33em;
	margin-bottom: 2.33em;
}

header p, header h1 {
	text-align: right;
}

#breadcrumb {
	font-size: smaller;
	text-align: left;
}

/* Gallery Styles */

ul.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, 30%);
	justify-content: space-between;
	list-style: none;
	margin: 0;
	padding: 0;
}

ul.gallery li {
	display: inline-block;
	height: 200px;
	margin-bottom: 3em;
	margin-top: 0;
	position: relative;
	vertical-align: top;
}

/* Expand the third column to the left instead of the right. */
ul.gallery li:nth-child(3n+3) a {
	right: 0;
}

ul.gallery li a {
	color: black;
	position: absolute;
	text-decoration: none;
	transition-property: width, height;
	transition-duration: 300ms;
	width: 100%;
}

ul.gallery li a:focus {
	position: absolute;
	transition-property: width, height;
	transition-duration: 1s;
	width: 600px;
	z-index: 100;
}

ul.gallery li a:focus figure.expanded {
	display: block;
}

ul.gallery li a:focus figure.thumbnail {
	display: none;
}

ul.gallery li a figure {
	background-color: white;
}

ul.gallery li a figure.thumbnail {
	display: block;
	margin: 0;
}

ul.gallery li a figure.expanded {
	box-shadow: 0 0 15px 2px #000;
	margin: 0;
	padding-bottom: 1em;
	display: none;
}

ul.gallery li a figure img {
	display: block;
}

/* Slideshow styles */

ul.slideshow li {
	display: none;
}

ul.slideshow input {
	opacity: 0;
}

ul.slideshow input:checked + li {
	display: block;
}

ul.slideshow label {
	cursor: pointer;
	font-size: 50px;
	vertical-align: middle;
}

ul.slideshow figure {
	display: inline-block;
	vertical-align: middle;
}

ul.slideshow figure img {
	width: 700px;
}

/* Hieroglyphs */

.stack-top {
	position: relative;
	top: -0.5em;
}

.stack-bottom {
	position: absolute;
	top: 0.5em;
	left: 0;
}

/* Filtered tables */

table.filteredtable tbody tr {
	display: none;
}

.tablefilter ~ label {
	margin-right: 1em;
}

#all.tablefilter:checked ~ table tbody tr,
#movies.tablefilter:checked ~ table tbody tr.movies,
#books.tablefilter:checked ~ table tbody tr.books,
#history.tablefilter:checked ~ table tbody tr.history,
#humor.tablefilter:checked ~ table tbody tr.humor,
#computers.tablefilter:checked ~ table tbody tr.computers,
#misc.tablefilter:checked ~ table tbody tr.misc {
	display: table-row;
}

#all.tablefilter:checked ~ input.tablefilter,
#all.tablefilter:checked ~ input.tablefilter + label {
	color: dimgray;
	pointer-events: none;
}

#all.tablefilter:unchecked ~ input.tablefilter,
#all.tablefilter:unchecked ~ input.tablefilter + label {
	color: inherit;
	pointer-events: auto;
}
