:root {
	--document-margin: 15pt;
}

h1 { font-size: 1.50em; }
h2 { font-size: 1.40em; }
h3 { font-size: 1.20em; }
h4 { font-size: 1.00em; }
h5 { font-size: 0.85em; }
h6 { font-size: 0.75em; }

h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
	text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
	margin-top: 1.5em;
}

@media (hover: hover) {
	/* For devices which support hover, hide the heading URL fragment
	   link/icon until the mouse hovers over the heading */

	h1:hover .heading-anchor,
	h2:hover .heading-anchor,
	h3:hover .heading-anchor,
	h4:hover .heading-anchor,
	h5:hover .heading-anchor,
	h6:hover .heading-anchor {
		visibility: visible;
	}

	h1 .heading-anchor,
	h2 .heading-anchor,
	h3 .heading-anchor,
	h4 .heading-anchor,
	h5 .heading-anchor,
	h6 .heading-anchor {
		visibility: hidden;
	}
}

.heading-anchor {
	/* this is used on an "aside" tag so that it's not shown in the browser's reader mode */
	display: inline;
	color: grey;
	margin-left: 0.5em;
	font-size: 0.75em;
}

.heading-anchor a:hover {
	text-decoration: none;
}

.heading-anchor img {
	height: 1em;
}

a {
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

.dont-show {
	display: none;
}

/* Improvements to Hugo Chroma syntax highlighting */

.highlight {
	margin-top: 1em;
	margin-bottom: 1em;
	/* set the tab size for browsers that support it */
	tab-size: 4;
	-moz-tab-size: 4;
	/* needed for the iPhone so that the two columns (line numbers and code) don't have different font sizes */
	-webkit-text-size-adjust: 100%;
}

.highlight > * {
	padding: 0.5em;
	border-width: 2px;
	border-style: solid;
}

.highlight pre {
	margin: 0px;
	overflow-x: auto;
	word-wrap: normal;
}

.highlight td.lntd pre {
	/* needed to fix an iPhone scrolling bug */
	overflow-x: hidden;
}

.highlight td.lntd:last-child {
	/* needed until this bug is fixed: https://github.com/alecthomas/chroma/issues/225 */
	width: 100%;
}

/* Improvements to inline code blocks */

code {
	font-size: 98%;
}

:not(pre) > code {
	/* inline code elements */
	background-color: rgba(25, 25, 25, 0.05);
	border-radius: 5px;
	font-size: 80%;
	padding-top: 0.2em;
	padding-bottom: 0.2em;
	padding-left: 0.4em;
	padding-right: 0.4em;
}

/* Formatting for "notice" shortcodes */

.notice {
	margin: 1.5em 0;
	width: 70%;
	margin-left: auto;
	margin-right: auto;
	background-color: #E9E9E9;
}

@media only screen and (max-width: 500pt) {
	.notice {
		width: 100%;
	}
}

.notice > hr {
	display: none; /* only want the child hr elements to appear if css is disabled */
}

.notice .notice-title {
	margin: 0;
	padding: 0.4em;
	line-height: 1em;
	background-color: #D5D5D5;
}

.notice .notice-title span {
	vertical-align: -10%; /* we don't want the font descender space to be centered as well */
}

.notice .notice-title .notice-title-icon {
	display: inline-block;
	vertical-align: middle;
	margin-left: 0.15em;
	margin-right: 0.25em;
	height: 0.85em;
}

.notice .notice-body {
	padding: 0.6em;
}

.notice .notice-body p:first-child {
	margin-top: 0;
}

.notice .notice-body p {
	margin: 0.8em 0;
}

/* ************************ */

blockquote {
	color: #404040;
	border-left: 0.25em solid #CCC;
	padding-left: 0.5em;
	margin-left: 1.5em;
}

.title-header {
	margin-top: 1.5em;
	margin-bottom: 1.5em;
}

.title-header > h1{
	margin-top: 0;
	margin-bottom: 0.3em;
}

.title-header-date {
	color: rgb(90, 90, 90);
	font-size: 80%;
}

.title-list > h2, .title-list > h3, .title-list > h4, .title-list > h5, .title-list > h6{
	margin-bottom: 0.1em;
}

.body-list p {
	margin-top: 0.5em;
	margin-bottom: 0.5em;
}

/*This is the edit I, TC119, made to correct the floating images in summary divs.*/
.all-list .body-list::after {
    content: "";
    display: table;
    clear: both;
}

.title-list-date {
	color: rgb(90, 90, 90);
	font-size: 80%;
}

.table-of-contents {
	border-width: 2px;
	border-style: solid;
	padding: 1em;
	margin-bottom: 2em;
	font-size: 0.9em;
}

.table-of-contents nav > ul {
	/* only the most-parent ul element */
	margin-bottom: 0;
}

.table-of-contents ul {
	list-style: none;
	padding-left: 0;
}

.table-of-contents li {
	margin-top: 0.5em;
}

.table-of-contents ul ul {
	list-style: none;
	padding-left: 1.0em;
}

.table-of-contents-title {
	font-size: 1.2em;
	font-weight: bold;
}

.section-list {
	padding-left: 0;
}

.section-list li {
	display: inline-block;
	margin-right: 0.5em;
}

.section-list li:last-child {
	margin-right: 0em;
}

.section-list li > * {
	background-color: rgba(25, 25, 25, 0.05);
	border-radius: 5px;
	font-size: 90%;
	padding-top: 0.2em;
	padding-bottom: 0.2em;
	padding-left: 0.4em;
	padding-right: 0.4em;
}

.links {
	/*font-size: 120%;*/
	list-style-type: none;
	line-height: 1;
	padding: 0;
	margin: 0;
	margin-top: 15pt;
	display: flex;
	flex-direction: row;
	/* Not sure what we can do other than continue the links on the next line.
	 * It's ugly, but probably better than hiding them altogether. */
	flex-wrap: wrap;
	row-gap: 0.3em;
}

.links li {
	margin-right: 1em;
}

.links li > * {
	display:inline-block;
}

.links li:last-child {
	margin-right: 0;
}

.links a {
	text-decoration: none;
	color: inherit;
}

.links a:hover {
	color: #e4741f;
}

.overlay {
	position: fixed;
	visibility: hidden;
	opacity: 0;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.7);
	z-index: 2;
	/* for iOS: https://stackoverflow.com/a/11885330 */
	/*-webkit-tap-highlight-color: rgba(0, 0, 0, 0);*/
}

.header-right {
	/* want the images to have padding to make them easier to click, but we still want them aligned correctly */
	--label-padding: 0.3em;

	position: absolute;
	top: calc(var(--document-margin) - var(--label-padding));
	right: calc(var(--document-margin) - var(--label-padding));
	display: flex;
}

.header-right > * {
	margin-left: 0.4em;
}

.clickable-header-label {
	cursor: pointer;
	padding: var(--label-padding);
}

.clickable-header-label img {
	height: 1em;
	width: auto; /* to override the <img width="__"> attribute when css is supported */
}

#show-hide-menu-label {
	display: none;
}

#show-hide-menu-label * {
	/* duration for the rotation transition of the hamburger image */
	transition-duration: 100ms;
}

body {
	font-size: 13pt;
	font-family: Arial, Helvetica, Verdana, sans-serif;
	line-height: 1.3;
	margin: 0;
}

.title {
	font-weight: bold;
	font-size: 140%;
	line-height: 1em;
}

.title a {
	text-decoration: none;
	color: inherit;
}

.header {
	background-color: lightgray;
	background-size: cover;
	background-position: bottom;
	width: 100%;
	/* header must be above the overlay */
	/* this also prevents images with css filters from appearing above the header when in portrait mode */
	z-index: 3;
	/* z-index doesn't apply to the default 'static' position */
	position: relative;
}

.header-content {
	padding: var(--document-margin);
	position: relative; /* so that "position: absolute" works for the menu label */
}

.body {
	display: inline-block;
	width: 100%;
}

.body-content {
	margin: var(--document-margin);
	word-wrap: break-word;
}

/* Image/Figure formatting */

.body-content :not(figure) img {
	/* regular image elements should be inline elements */
	max-width: 100%;
	max-height: 60vw; /* if the image is really tall, we don't want the width to be 100% */
}

.body-content figure {
	margin-left: auto;
	margin-right: auto;
	max-width: 70%;
}

.body-content figure img {
	display: block;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 0.5em;
	max-width: 100%;
	max-height: 40vw; /* if the image is really tall, we don't want the width to be 70% */
}

.body-content figure:not(.color-adapting-image) img {
	/* if the image is designed to adapt to the theme, then don't use a background */
	background-color: rgb(255, 255, 255); /* images with transparent backgrounds typically assume a light background */
}

.body-content figure figcaption {
	font-size: 90%;
	line-height: 1.5em;
	padding-bottom: 0.3em;
	border-bottom: 2px solid lightgray;
}

.body-content figure figcaption * {
	margin: 0;
}

@media only screen and (orientation: portrait) {
	.body-content :not(figure) img,
	.body-content figure img {
		/* need to target both so that they're more specific */
		max-height: 100vw;
	}
}

@media only screen and (max-width: 400pt) {
	.body-content figure {
		max-width: 100%;
	}

	.body-content figure figcaption {
		margin-left: 5%;
		margin-right: 5%;
	}
}

/* ************************ */

.main {
	width: 700pt; /* make sure to also change this in the media query */
	margin: 0 auto;
	margin-top: 10pt;
	margin-bottom: 10pt;
	box-sizing: border-box;
	box-shadow: 0 0 10px rgba(50, 50, 50, .17);
}

.footer {
	text-align: center;
	font-size: 80%;
	padding-left: 15px;
	padding-right: 15px;
}

@media only screen and (orientation: portrait) {
	.header {
		top: 0;
		position: sticky;
		position: -webkit-sticky; /* needed for iOS */
		box-shadow: 0 0 1em rgba(30, 30, 30, .3);
	}

	.body-content :target::before {
		/* When linking to tags with 'id's (example:
		   'website.com/post/#heading'), make them
		   appear lower down the page so that they
		   don't appear under the sticky header set
		   above.
		   See: https://stackoverflow.com/a/24298427
		   Note that this causes the cursor text
		   selection of the target to behave
		   undesirably.
		*/
		content: '';
		display: block;
		height: 3em;
		margin-top: -3em;
		visibility: hidden;
		pointer-events: none;
	}
}


@media only screen and (max-width: 700pt) {
	.main {
		width: 100%;
		margin-top: 0;
		margin-bottom: 0;
	}

	body {
		font-size: 12pt;
		background-color: white;
	}
}

@media only screen and (max-width: 400pt) {
	:root {
		--document-margin: 10pt;
	}

	.header-right {
		top: 0;
		height: 100%;
		align-items: center;
	}

	.clickable-header-label {
		display: inline-flex;
	}

	.clickable-header-label * {
		vertical-align: middle;
	}

	#show-hide-menu-label {
		display: inherit;
	}

	.show-hide-menu-input:checked ~ .main .links {
		display: inherit;
	}

	.show-hide-menu-input:checked ~ .main #show-hide-menu-label > img {
		transform: rotate(90deg);
	}

	.show-hide-menu-input:checked ~ .overlay {
		visibility: visible;
		opacity: 1;
	}

	/* prevent scrolling the main body; must be on html element and not body for iOS */
	html:has(.show-hide-menu-input:checked) {
		overflow: hidden;
		height: 100%;
		/* prevent scrolling (of everything) on iOS */
		/* any element with 'overflow-y: scroll' will allow the body to scroll for some reason */
		/* use 'pan-zoom' to allow users to zoom if they need to, even though it makes scrolling weird */
		touch-action: pan-zoom;
	}

	.links {
		/* vertical padding between list items */
		--entry-padding: 9pt;

		display: none;
		position: absolute;
		left: 0;
		right: 0;
		padding-left: var(--document-margin);
		padding-right: var(--document-margin);
		padding-top: calc(var(--document-margin) - var(--entry-padding));
		padding-bottom: calc(var(--document-margin) - var(--entry-padding));

		font-size: 100%;
		background-color: rgb(247, 247, 247);
		border-top: solid 1px;
		border-bottom: solid 1px;
	}

	.links li {
		border-bottom: solid 1px;
		/* override all previously set margins */
		margin: 0;
	}

	.links li:last-child {
		border-bottom: none;
	}

	.links li > * {
		/* make the links easily clickable */
		width: 100%;
		padding-top: var(--entry-padding);
		padding-bottom: var(--entry-padding);
	}
}

@media print {
	:root {
		--document-margin: 0pt;
	}

	body {
		background-color: initial !important;
	}

	.main {
		margin-top: 0;
		margin-bottom: 0;
		width: 100%;
		box-shadow: none !important;
	}

	.header {
		background-color: initial !important;
		background-image: none !important;
	}

	.header-right {
		display: none;
	}

	.links {
		display: none;
	}
}

p img {
    max-width: 100%;
    width: auto;
    height: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Styling for post_list shortcode. */
.archive-container {
    max-width: 900px;
    margin: 3rem auto;
}

.archive-year {
    font-size: 1.4rem;
    border-bottom: 2px solid #333;
    padding-bottom: 5px;
    margin-top: 3rem;
}

.menu-row {
    display: flex;
    align-items: baseline;
    width: 100%;
    margin-bottom: 12px;
}

.post-date {
    flex-shrink: 0;
    /*color: #aaa;*/
    margin-right: 8px;
}

.menu-link {
    flex-shrink: 0;
    text-decoration: none;
    color: #e4741f;
    font-weight: 500;
}

.menu-link:hover {
    text-decoration: underline;
}

.dot-leader {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    letter-spacing: 6px;
    font-size: 1.2rem;
    color: #ffffff;
    opacity: 0.4; 
    margin: 0 10px;
}

.menu-desc {
    flex-shrink: 0;
    font-size: 0.9rem;
    /*color: #ccc;*/
    text-align: right;
}

@media (max-width: 600px) {
    .menu-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .dot-leader {
        display: none;
    }
    .menu-desc {
        text-align: left;
        padding-left: 0;
        margin-top: 4px;
    }
}

/* Styling for post_navigation */

  .post-navigation {
    display: flex;
    justify-content: flex-start;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #333;
    gap: 15px;
	max-width: 100%;
	width: 100%;
	box-sizing: border-box;
  }

  .nav-button {
    padding: 8px 12px;
    text-decoration: none;
    color: #e4741f;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 0.9em;
    min-width: 140px;
	max-width: 100%;
	box-sizing: border-box;
  }

  .nav-button:hover {
    background: #3a3a3a;
    border-color: #666;
    color: #e4741f;
	text-decoration: none;
  }

  .nav-button small {
    display: block;
    font-size: 0.8em;
    color: #aaaaaa;
    margin-top: 2px;
  }

  .nav-button.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #1a1a1a;
    border-color: #222;
  }
  
@media (max-width: 600px) {
  .post-navigation {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .nav-button {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Float left and right image wrapper*/
.img-wrapper {
    display: block;
    overflow: hidden;
}

.shortcode-img {
    display: block;
    width: auto;
    height: auto;
}

.shortcode-caption {
    text-align: left;
    font-style: italic;
    font-size: 0.9em;
    margin-top: 5px;
	color: #9f9f9f;
}

.is-left {
    float: left;
    margin: 0 20px 20px 0;
}

.is-right {
    float: right;
    margin: 0 0 20px 20px;
}

@media (max-width: 500px) {
    .img-wrapper {
        float: none !important;
        display: block;
        margin: 20px auto !important;
        max-width: 100% !important;
        text-align: center;
    }

    .shortcode-img {
        margin: 0 auto;
    }

    .shortcode-caption {
        text-align: center;
    }
}

/* Paginatin Styling*/
.pagination {
    display: flex !important;
    list-style: none !important;
    padding: 0 !important;
    /*margin: 40px 0 !important;*/
    justify-content: center;
    gap: 8px;
}

.page-item {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.page-item a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
    background-color: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #3d3d3d;
    box-sizing: border-box;
}

.page-item a:hover {
    background-color: #3f3f3f;
    color: #ffffff;
    border-color: #555555;
}

.page-item.active a {
    background-color: #2a2a2a !important;
    color: #e4741f !important;
    border-color: #e4741f !important;
    font-weight: 600;
}

.page-item.disabled a {
    background-color: #1a1a1a !important;
    color: #555555 !important;
    border-color: #222222 !important;
    cursor: not-allowed;
    opacity: 0.6;
}

@media (max-width: 600px) {
    .pagination {
        gap: 5px;
		flex-wrap: wrap;
    }
    
    .page-item a {
        min-width: 44px;
        height: 44px;
        padding: 0 10px;
    }
}

/* Tag List Styling for Taxonomy Pages */
.tag-list {
	padding: 10px;
}

.tag-list li a {
	display: flex;
	height: 15px;
	align-items: center;
	text-align: left;
	white-space: nowrap;
	text-decoration: none;
	color: #e4741f;
  /*background: #2a2a2a;
	border: 1px solid #3d3d3d;*/
	padding: 7px 10px;
	/*border-radius: 6px;*/
	font-size: 1rem;
	/*letter-spacing: 0.5px;
	transition: all 0.2s ease-in-out;*/
}

/*.tag-list li a:hover {
	background: #3f3f3f;
	color: #ffffff;
	border-color: #555555;
}*/

.tag-list ul {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (max-width: 600px) {
	.tag-list ul {
		grid-template-columns: 1fr;
	}
	
	.tag-list li a {
		white-space: normal;
		text-overflow: clip;
		height: auto;
		min-height: 27px;
		padding: 3px 5px;
	}
}

/* Gallery Styling */

.strict-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
	align-items: center;
}

.strict-gallery img {
    width: 100%;
}

.gallery-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

.gallery-item img {
	width: 100%;
    height: auto;
    display: block;
	object-fit: contain;
}

.strict-gallery img.wide {
    grid-column: 1 / span 2;
}

.gallery-item.wide {
    grid-column: 1 / span 2;
}

@media (max-width: 600px) {
    .strict-gallery {
		grid-template-columns: 1fr;
    }
	
	.gallery-item {
		grid-template-columns: 1fr;
	}
	
	.gallery-item.wide {
		grid-column: span 1;
	}
}

.post-tags ul {
	list-style: none;
	display: flex;
	padding: 0;
	gap: 10px;
}

.post-tags li a {
	background: #2a2a2a;
	padding: 5px 10px;
	border-radius: 4px;
	border: 1px solid #444;
	text-decoration: none;
	color: #e4741f;
	transition: all 0.2s ease;
	display: inline-block;
	white-space: nowrap;
}

.post-tags li a:hover {
	background: #3a3a3a;
    border-color: #666;
}

@media (max-width: 750px) {
    .post-tags ul {
        gap: 10px;
		flex-wrap: wrap;
    }
}