/**
 * okaidia theme for JavaScript, CSS and HTML
 * Loosely based on Monokai textmate theme by http://www.monokai.nl/
 * @author ocodia
 */

code[class*="language-"],
pre[class*="language-"] {
	color: #f8f8f2;
	background: none;
	text-shadow: 0 1px rgba(0, 0, 0, 0.3);
	font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
	font-size: 1em;
	text-align: left;
	white-space: pre;
	word-spacing: normal;
	word-break: normal;
	word-wrap: normal;
	line-height: 1.5;

	-moz-tab-size: 4;
	-o-tab-size: 4;
	tab-size: 4;

	-webkit-hyphens: none;
	-moz-hyphens: none;
	-ms-hyphens: none;
	hyphens: none;
}

/* Code blocks */
pre[class*="language-"] {
	padding: 1em;
	margin: .5em 0;
	overflow: auto;
	border-radius: 0.3em;
}

:not(pre) > code[class*="language-"],
pre[class*="language-"] {
	background: #272822;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
	padding: .1em;
	border-radius: .3em;
	white-space: normal;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
	color: #8292a2;
}

.token.punctuation {
	color: #f8f8f2;
}

.token.namespace {
	opacity: .7;
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
	color: #f92672;
}

.token.boolean,
.token.number {
	color: #ae81ff;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
	color: #a6e22e;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
	color: #f8f8f2;
}

.token.atrule,
.token.attr-value,
.token.function,
.token.class-name {
	color: #e6db74;
}

.token.keyword {
	color: #66d9ef;
}

.token.regex,
.token.important {
	color: #fd971f;
}

.token.important,
.token.bold {
	font-weight: bold;
}
.token.italic {
	font-style: italic;
}

.token.entity {
	cursor: help;
}
* { box-sizing: border-box; }
/* Defaults */
:root {
	--font-family: -apple-system, system-ui, sans-serif;
	--font-family-monospace: Consolas, Menlo, Monaco, Andale Mono WT, Andale Mono, Lucida Console, Lucida Sans Typewriter, DejaVu Sans Mono, Bitstream Vera Sans Mono, Liberation Mono, Nimbus Mono L, Courier New, Courier, monospace;
}

/* Theme colors */
:root {
	--color-gray-20: #e0e0e0;
	--color-gray-50: #C0C0C0;
	--color-gray-90: #333;
	--background-color: #fff;
	--text-color: var(--color-gray-90);
	--text-color-link: #082840;
	--text-color-link-active: #db4a37;
	--text-color-link-visited: #17050F;
	--syntax-tab-size: 2;
}

/* Global stylesheet */
* {
	box-sizing: border-box;
}

html,
body {
	padding: 0;
	margin: 0 auto;
	font-family: var(--font-family);
	color: var(--text-color);
	background-color: var(--background-color);
}
html {
	overflow-y: scroll;
	background-color: #303030;
	scroll-behavior: smooth;
	/* Stop iOS enlarging text it judges too small; it was scaling up long, scrollable code lines. */
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	max-width: 80em;
}

.visually-hidden {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

p:last-child {
	margin-bottom: 0;
}
p {
	line-height: 1.5;
}

li {
	line-height: 1.5;
}

a[href] {
	color: var(--text-color-link);
}
a[href]:visited {
	color: var(--text-color-link-visited);
}
a[href]:hover,
a[href]:active {
	color: var(--text-color-link-active);
}

main {
	padding: 2rem;
}

main :first-child {
	margin-top: 0;
}

.links-nextprev {
	list-style: none;
	border-top: 1px dashed var(--color-gray-20);
	padding: 1em 0;
}

/* Header */
header {
	display: flex;
	justify-content: center;
	padding: 1em;
	background-color: black;
}

header img {
	max-width: 100%;
	height: auto;
	image-rendering: pixelated;
}

/* Posts list */
.postlist {
	list-style: none;
	padding: 0;
	padding-left: 1.5rem;
}
.postlist-item {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	counter-increment: start-from -1;
	margin-bottom: 1em;
}

.postlist-date,
.postlist-item:before {
	font-size: 0.8125em; /* 13px /16 */
	color: var(--color-gray-90);
}
.postlist-date {
	word-spacing: -0.5px;
}
.postlist-link {
	font-size: 1.1875em; /* 19px /16 */
	font-weight: 700;
	flex-basis: calc(100% - 1.5rem);
	padding-left: .25em;
	padding-right: .5em;
	text-underline-position: from-font;
	text-underline-offset: 0;
	text-decoration-thickness: 1px;
}
.postlist-item-active .postlist-link {
	font-weight: bold;
}

/* Tags */
.post-tag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-style: italic;
}
.postlist-item > .post-tag {
	align-self: center;
}

/* Direct Links / Markdown Headers */
.header-anchor {
	text-decoration: none;
	font-style: normal;
	font-size: 1em;
	margin-left: .1em;
}
a[href].header-anchor,
a[href].header-anchor:visited {
	color: transparent;
}
a[href].header-anchor:focus,
a[href].header-anchor:hover {
	text-decoration: underline;
}
a[href].header-anchor:focus,
:hover > a[href].header-anchor {
	color: #aaa;
}

h2 + .header-anchor {
	font-size: 1.5em;
}

/* custom */
.socials {
	display: flex;
	align-items: center;
	gap: 10px;
	justify-content: end;
	margin-bottom: 1rem;
	background-color: white;
}

.socials a {
	transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
	transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
	transition-duration: 150ms;
}

/* Post List */
.postlist-link {
	font-size: 1.5rem;
	text-decoration: none;
}

.postlist-readmore {
	margin-top: 5px;
	padding: 5px 15px 5px 15px;
	border: 1px solid black;
	text-transform: uppercase;
	text-decoration: none;
	transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
	transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
	transition-duration: 150ms;
}

.postlist-readmore:hover {
	background-color: black;
	color: white !important;
}

/* Post List */
.posts-list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 50px;
}

@media only screen and (max-width: 1280px) {
	.posts-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media only screen and (max-width: 768px) {
	.posts-list {
		grid-template-columns: repeat(1, minmax(0, 1fr));
	}
}

.posts-list article h2 {
	line-height: 1;
}

.posts-list-body {
	padding: 1.5rem;
	box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.posts-list-body h2 {
	margin-bottom: 1rem;
}

.posts-list-metadata {
	display: inline-flex;
	flex-wrap: wrap;
	font-size: 0.75rem;
	font-weight: bold;
	text-transform: uppercase;
}

.posts-list-metadata > * + * {
	margin-left: 0.5rem;
}

/* Tags list */
.post-metadata {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 1rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

.img-hover-zoom {
	height: 250px;
	overflow: hidden;
}

.img-hover-zoom picture {
	transition: transform .5s ease;
}

.img-hover-zoom:hover picture {
	transform: scale(1.05);
}

.posts-list article img {
	width: 100%;
	height: auto;
}

.posts-list-body {
	position: relative;
	background: white;
	margin-top: -2rem;
	margin-left: 1.5rem;
	margin-right: 1.5rem;
}

.posts-list-title {
	font-size: 1.5rem;
	text-decoration: none;
}

/* Post Header */
.post-header {
	margin-bottom: 2rem;
	padding-bottom: 10px;
	border-top: 3px solid black;
	border-bottom: 2px solid black;
}

.post-metadata {
	text-transform: uppercase;
}

/* Post Body */
main h1 {
	font-size: 3rem;
	text-align: center;
	margin-bottom: 0;
}

main h2 {
	font-size: 2rem;
}

@media only screen and (max-width: 768px) {
	main h1 {
		font-size: 2rem;
	}

	main h2 {
		font-size: 1.5rem;
	}
}

main ul {
	list-style-type: square;
}

main picture {
	display: block;
	text-align: center;
}

main img {
	max-width: 100%;
	height: auto;
}

main figcaption {
	text-align: center;
}

main table {
	margin-left: auto;
	margin-right: auto;
	border-collapse: collapse; /* remove spacing between cells */
}

main td {
	border: 1px solid;
	padding: 10px;
}

main hr {
	margin-top: 32px;
	border: 1px solid black;
}

main ol > li {
	margin-bottom: 0.5rem;
}

.post-box {
	text-align: center;
}

.post-tag {
	font-style: normal;
	text-decoration: none;
}

/* Post tags */
.post-tags-box {
	display: flex;
	justify-content: center;
	margin-top: 2rem;
	margin-bottom: 2rem;
	gap: 5px;
}

.post-tags {
	padding: 5px;
	border: 1px solid black;
	font-size: 0.8rem;
	text-transform: uppercase;
	text-decoration: none;
	transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
	transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
	transition-duration: 150ms;
}

.post-tags:hover {
	background-color: black;
	color: white !important;
}

.socials-share {
	display: flex;
	width: 100%;
	justify-content: space-between;
}

.socials-share a {
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 5px;
	padding: 8px 5px 8px 5px;
	color: white;
	font-size: 0.7rem;
	text-transform: uppercase;
	text-decoration: none;
	letter-spacing: 1px;
}

.socials-share a:hover, .socials-share a:visited {
	color: white;
}

.socials-share .facebook {
	background-color: rgb(59, 89, 152);
}

.socials-share .twitter {
	background-color: rgb(85, 172, 238);
}

.socials-share .pinterest {
	background-color: rgb(204, 33, 39);
}

.socials-share .linkedin {
	background-color: rgb(0, 119, 181);
}

.socials-share .whatsapp {
	background-color: rgb(18, 140, 126);
}

.socials-share .email {
	background-color: black;
}

@media only screen and (max-width: 768px) {
	.socials-share .name {
		display: none;
	}
}

/* code line numbering */
pre {
	counter-reset: lineNumber;
}

code {
	font-size: 0.85rem !important;
}

/* Each line is its own inline-block with the line number absolutely positioned in its padding,
   so tab stops are measured from where the code starts rather than from the left of the gutter. */
code .highlight-line {
	display: inline-block;
	position: relative;
	padding-left: 3.6em;
	vertical-align: top;
	min-height: 1.5em; /* keeps blank lines one line tall, matching the theme's line-height */
}

code .highlight-line:before {
	position: absolute;
	left: 0;
	-webkit-user-select: none;
	border-right: 1px solid #404040;
	color: #858585;
	content: counter(lineNumber);
	counter-increment: lineNumber;
	display: inline-block;
	font-variant-numeric: tabular-nums;
	margin-right: 1.2em;
	padding-right: 1.2em;
	text-align: right;
	width: 2.4em;
}

/* scroll to top */
#scroll-to-top-button {
	position: fixed;
	transform: translateY(70px);
	bottom: 20px;
	right: 30px;
	z-index: 99;
	border: none;
	outline: none;
	cursor: pointer;
	padding: 5px;
	transition-property: all;
	transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
	transition-duration: 150ms;
}

/* /search */
#search-box {
	display: flex;
	flex-direction: column;
}

#search {
	padding: 10px;
	font-size: 1.2rem;
}

#results {
	font-size: 1.2rem;
}

/* let long inline identifiers wrap instead of widening the page on phones */
:not(pre) > code {
	overflow-wrap: anywhere;
}