/* Global Variables */

/* Theme switcher - https://zerowp.com/how-to-implement-a-light-dark-theme-switcher-with-css-variables/ */

:root {
	--general-background-colour: WhiteSmoke;
	--general-text-colour: MidnightBlue;
	--general-hover-colour: blue;

	--header-background: WhiteSmoke;
	--header-colour: MidnightBlue;

	--nav-background: WhiteSmoke;
	--nav-colour: MidnightBlue;

	--content-background: WhiteSmoke;
	--content-colour: MidnightBlue;

	--list-post-colour: WhiteSmoke;
	--textbox-colour: LightGrey;

	--table-head-colour: #b0b0b0;
	--table-row-colour: #a0a0a0;

	--code-background-colour: WhiteSmoke;
}

body.dark {
	--general-background-colour: #202020;
	--general-text-colour: #fbfbfb;
	--general-hover-colour: #bfbfbf;

	--header-background: #202020;
	--header-colour: #fbfbfb;

	--nav-background: #202020;
	--nav-colour: #fbfbfb;

	--content-background: #202020;
	--content-colour: #fbfbfb;

	--list-post-colour: #202020;
	--textbox-colour: #4f4f4f;

	--table-head-colour: #505050;
	--table-row-colour: #404040;

	--code-background-colour: #202020;
}

/* ================================================================================ */

/* General Layout */

body {
	font-family: ui-rounded, 'Hiragino Maru Gothic ProN', Quicksand, Comfortaa, Manjari, 'Arial Rounded MT', 'Arial Rounded MT Bold', Calibri, source-sans-pro, sans-serif;
	font-weight: normal;
	font-size: 1em;
	color: var(--general-text-colour);
	background: var(--general-background-colour);
	margin: 0;
	padding: 0.5em;
}

.container {
	display: grid;
	grid-template-columns: auto 250px minmax(300px, 1000px) auto;
	grid-template-rows: auto minmax(500px, auto) auto;
	gap: 0.5em;
}

.box_header, .box_nav, .box_content, .box_footer {
	padding: 1em;
	border-radius: 20px;
	border: 1px solid var(--textbox-colour);
}

.box_nav {
	grid-column-start: 2;
	grid-column-end: 3;
	grid-row-start: 1;
	grid-row-end: 3;
	text-align: center;
	background: var(--nav-background);
	color: var(--nav-colour);
}

.box_header {
	grid-column-start: 3;
	grid-column-end: 4;
	grid-row-start: 1;
	grid-row-end: 2;
	text-align: center;
	background: var(--nav-background);
	color: var(--nav-colour);
}

.box_content {
	grid-column-start: 3;
	grid-column-end: 4;
	grid-row-start: 2;
	grid-row-end: 3;
	text-align: left;
	background: var(--content-background);
	color: var(--content-colour);
}

.box_footer {
	grid-column-start: 2;
	grid-column-end: 4;
	grid-row-start: 3;
	grid-row-end: 4;
	text-align: center;
	background: var(--nav-background);
	color: var(--nav-colour);
}

@media (max-width: 750px) {
	.container {
		grid-template-columns: 100%;
		grid-template-rows: auto;
	}
	.box_header, .box_nav, .box_content, .box_footer {
		grid-column-start: 1;
		grid-column-end: 2;
	}
	.box_nav {
		grid-row-start: 1;
		grid-row-end: 1;
	}
	.box_header {
		grid-row-start: 2;
		grid-row-end: 2;
	}
	.box_content {
		grid-row-start: 3;
		grid-row-end: 3;
	}
	.box_footer {
		grid-row-start: 4;
		grid-row-end: 4;
	}
	.box_nav > ul {
		display: inline;
	}
	.box_nav > ul > li {
		display: inline;
	}
}

/* High Level Formatting */

h1 {
	margin: 0em;
	font-size: 3em;
}

h2 {
	margin: 0em;
	font-size: 2em;
}

h3 {
	margin: 0em;
	font-size: 1.6em;
}

h4 {
	margin: 0em;
	font-size: 1.2em;
}

p {
	margin: 0em;
	padding: 0em;
	font-size: 1.2em;
}

a {
	color: var(--general-text-colour);
	text-decoration: none;
	border-bottom: 1px dashed;
}

a:hover {
	color: var(--general-hover-colour);
}

a.aimg {
	border: 0px;
}

/* img {
	opacity: .75;
	transition: opacity .5s ease-in-out;
}

img:hover {
	opacity: 1;
} */

.img-container {
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
}

.img-wrapper {
	position: relative;
	display: inline-block;
}

.img-wrapper picture,
.img-wrapper img {
	display: block;
	max-width: 100%;
	height: auto;
}

.img-wrapper .popover {
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 100%;
	padding: 10px;
	text-align: center;
	background-color: rgba(0, 0, 0, 0.6);
	color: white;
	font-size: 14px;
	opacity: 0;
	transition: opacity 0.3s ease;
	box-sizing: border-box;
}

.img-wrapper:hover .popover {
	opacity: 1;
}

img.centered {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

figure.video > video {
	border: 1px black solid;
}


/* ================================================================================ */
/* ================================================================================ */
/* ================================================================================ */

/* Nav Formatting */

.box_nav > h1 {
	font-size: 6em;
}

.box_nav > p {
	padding: 0.25em 0em 0.25em 0em;
}

.box_nav > ul {
	list-style: none;
	margin: 0em;
	padding: 0em;
}

.box_nav > ul > li {
	padding-left: 5px;
	padding-right: 5px;
	font-size: 1.2em;
	padding: 0.25em;
}

.box_nav > ul > li a {
	border-bottom: 1px dashed;
}

.box_nav > hr {
	border: 0;
    height: 1px;
    background-image: linear-gradient(to right, var(--list-post-colour), var(--general-text-colour), var(--list-post-colour));
}

/* Header Formatting - Breadcrumb */

.box_header > ul.breadcrumb {
	display: inline;
	list-style: none;
	margin: 0em;
	padding: 0em;
	float: right;
}

/*
.box_header > ul.breadcrumb::before {
  content: "Current page » ";
}
*/

.box_header > ul.breadcrumb li {
	display: inline;
	font-size: 1em;
	margin: 0em;
	padding: 0em;
}

.box_header > ul.breadcrumb li:not(:last-child)::after {
  content: "/";
}

.box_header > ul.breadcrumb li a {
	border-bottom: 1px dashed;
}

/* Content Formatting */

.box_content > h1 {
	padding: 0em 0em 0.5em 0em;
}

.box_content > h2 {
	padding: 1em 0em 0.5em 0em;
}

.box_content > h3 {
	padding: 1em 0em 0.5em 0em;
}

.box_content > h4 {
	padding: 1em 0em 0.5em 0em;
}

.box_content > p {
	line-height: 150%;
	padding: 0.25em 0em 0.25em 0em;
}

.box_content > ul {
	list-style: circle;
	padding-left: 5px;
	margin-left: 5px;
	margin: 0em;
	padding: 0em;
}

.box_content > ul > li {
	padding-left: 5px;
	margin-left: 15px;
	font-size: 1.2em;
	padding: 0.25em;
	line-height: 150%;
}

.box_content > table {
	border-collapse: collapse;
	margin-left: auto;
    margin-right: auto;
}

.box_content > table, th, td {
	border: 1px solid var(--textbox-colour);
	padding: 0.5em;
}

.box_content > table > thead {
	background-color: var(--table-head-colour);
	color: var(--general-text-colour);
}

.box_content > table > tbody tr:nth-child(odd) {
	background: var(--table-row-colour);
}
.box_content > table > tbody tr:nth-child(even) {
	background: var(--table-row-colour);
}

/* Content Formatting - List */

.box_content div.list-post {
	margin: 1em;
	padding: 0em 0em 1em 0em;
	background-color: var(--list-post-colour);
}

.box_content div.list-post-short {
	margin: 1em;
	padding: 0em;
}

.box_content > div.list-post > p.list-title {
	margin: 0.5em 0em 0.5em 0em;
	font-size: 1.2em;
}

.box_content > div.list-post > p.list-description {
	margin: 0.5em 0em 0.5em 0em;
	padding-left: 0.6em;
	font-size: 1.2em;
}

.box_content > div.list-post > p.list-meta {
	margin: 0.5em 0em 0em 0em;
	padding-left: 1em;
	font-size: 0.8em;
}

.box_content > div.list-post > p.draft-label {
	margin: 0.5em 0em 0em 0em;
	padding-left: 1em;
	font-size: 1em;
}

/* Content Formatting - Single */

.box_content > p.single-description {
	margin: 0.5em;
	font-size: 1em;
}

.box_content > hr {
	border: 0;
    height: 1px;
    background-image: linear-gradient(to right, var(--list-post-colour), var(--general-text-colour), var(--list-post-colour));
}

.box_content > p.single-meta, p.single-tags, p.single-borrowed-from {
	font-size: 0.75em;
	font-style: italic;
}

.box_content > blockquote {
	border-left: 3px solid var(--content-colour);
	background: var(--textbox-colour);
	color: var(--content-colour);
	padding: 0.75em 0.75em 0.75em 1em;
	line-height: 150%;
  }

/* Content Formatting - Terms */


/* Content Formatting - Term */


/* ================================================================================ */

/* Specific text formatting */

.email-inject {
	text-decoration: none;
	padding: 2px 4px;
	border-radius: 6px;
	background-color: var(--textbox-colour);
}

.draft-label {
	color: #f00000;
	font-size: 0.75em;
	text-decoration: none;
	padding: 2px 4px;
	border-radius: 4px;
	background-color: var(--textbox-colour);
}


/* ================================================================================ */

/* Specific text formatting */

.switch {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
}
.switch input {
	opacity: 0;
	width: 0;
	height: 0;
}
.switch input:checked + .slider {
	background-color: #476173;
}
.switch input:checked + .slider:before {
	transform: translateX(20px);
	background-color: transparent;
	border-radius: 50%;
	border-top-color: transparent;
	border-left-color: transparent;
	border-right-color: transparent;
	box-shadow: inset -5px -3px 0 #d8e9ef;
}
.switch .slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #7bb9f5;
	transition: 0.4s;
	border-radius: 20px;
	box-shadow: 0 0 0.25em rgba(67, 71, 85, 0.27), 0.2px 0.2em 24px 0 rgba(1, 29, 77, 0.15);
}
.switch .slider:before {
	position: absolute;
	content: "";
	height: 16px;
	width: 16px;
	left: 4px;
	bottom: 4px;
	background-color: yellow;
	transition: 0.4s;
	border-radius: 50%;
	text-align: center;
	line-height: 16px;
}

.switch .switch-auto:before {
	content: "A";
}

.switch .switch-auto {
	color: black;
	text-shadow: 0px 0px 5px white;
	font-size: 10px;
}

.switch input:checked + .switch-auto {
	color: whitesmoke;
	text-shadow: 0px 0px 5px black;
}


/* ================================================================================ */
/* ================================================================================ */
/* ================================================================================ */
/* ================================================================================ */
/* ================================================================================ */

/* Code blocks */
code {
  background-color: var(--code-background-colour);
  padding: .1em .2em;
}

pre {
  background-color: #ececec;
  line-height: 1.4;
  overflow-x: auto;
  padding: 1em;
  border: 1px dashed var(--general-text-colour);
  border-radius: 0.5em;
}

pre code {
  background-color: transparent;
  color: inherit;
  font-size: 100%;
  padding: 0;
}

/* The following configures the small code 'tags' */

.highlight {
  position: relative;
  -webkit-overflow-scrolling: touch;
  margin: 1em
}
.highlight pre code[class*="language-"] {
  -webkit-overflow-scrolling: touch;
}
.highlight pre code[class*="language-"]::before {
  background: black;
  border-radius: 0 0 0.25rem 0.25rem;
  color: white;
  font-size: 12px;
  letter-spacing: 0.025rem;
  padding: 0.1rem 0.5rem;
  position: absolute;
  right: 1rem;
  text-align: right;
  text-transform: uppercase;
  top: 0;
}

.highlight pre code[class=language-javascript]::before,
.highlight pre code[class="language-js"]::before {
	content: "JavaScript";
	background: #f7df1e;
	color: black;
}

.highlight pre code[class*='language-yml']::before,
.highlight pre code[class*='language-yaml']::before {
	content: 'YAML';
	background: #f71e6a;
	color: white;
}

.highlight pre code[class*='language-shell']::before,
.highlight pre code[class*='language-bash']::before,
.highlight pre code[class*='language-sh']::before {
	content: 'Shell';
	background: green;
	color:white
}

.highlight pre code[class*='language-json']::before{
	content: 'JSON';
	background: dodgerblue;
	color: #000000
}

.highlight pre code[class*='language-python']::before,
.highlight pre code[class*='language-py']::before {
	content: 'Python';
	background: blue;
	color: yellow;
}

.highlight pre code[class*='language-html']::before{
	content: 'HTML';
	background: cyan;
	color: black;
}

.highlight pre code[class*='language-css']::before{
	content: 'CSS';
	background: cyan;
	color: black;
}

.highlight pre code[class*='language-dockerfile']::before{
	content: 'DockerFile';
	background: cyan;
	color: black;
}

.highlight pre code[class*='language-go']::before{
	content: 'Go';
	background: cyan;
	color: royalblue;
}

.highlight pre code[class*='language-md']::before{
	content: 'Markdown';
	background: royalblue;
	color: whitesmoke;
}

