:root {
	--tiny: 2px;
	--small: 4px;
	--medium: 6px;
	--large: 8px;
}

@media (prefers-color-scheme: light) {
	:root {
		--primary: #000000;
		--secondary: #646464;
		--accent: #946621;
		--background: #F6F6F6;
		--secondaryBackground: #FFFFFF;
		--accentBackground: #fffbf2;
		--shadow: 0px 2px 12px #00000016;
		--border: 1px solid #E7E7E7;
	}
}

@media (prefers-color-scheme: dark) {
	:root {
		--primary: #ffffff;
		--secondary: #bbbbbb;
		--accent: #c68d57;
		--background: #0E0F09;
		--secondaryBackground: #1D1D1F;
		--accentBackground: #21211c;
		--shadow: 0px 2px 32px #00000040;
		--border: 1px solid #282828;
	}
}

@font-face {
	font-family: "Commit Mono";
	src: url("/fonts/commit_mono.woff2") format("woff2");
	font-weight: 200 700;
}

@font-face {
	font-family: "Libertinus";
	src: url("/fonts/libertinus_display.woff2") format("woff2");
	font-weight: 400;
}

svg {
	width: 1.2em;
	height: 1.2em;
	transform: translateY(0.2em);
	fill: currentColor;
}

a {
	color: var(--accent);
	text-decoration: none;
	&:hover {
		text-decoration: underline;
	}
}

body {
	-webkit-text-size-adjust: 100%;
	background-color: var(--background);
	color: var(--primary);
	font-family: "Commit Mono", monospace;
	font-feature-settings: 'ss05' 1;
	padding: var(--large);
	margin: 0 auto;
	tab-size: 4;
	line-height: 1.6em;
	max-width: 640px;
}

blockquote {
	background-color: var(--secondaryBackground);
	border: var(--border);
	border-left: var(--tiny) solid var(--accent);
	border-radius: 0 var(--large) var(--large) 0;
	box-shadow: var(--shadow);
	margin: var(--large) 0;
	padding: var(--large);
}


blockquote > p {
	margin: 0;
}

code {
	font-family: "Commit Mono", monospace;
	font-feature-settings: 'ss05' 1;
	background: var(--accentBackground);
	border-radius: var(--small);
	color: var(--secondary);
	font-weight: normal;
	padding: var(--tiny) var(--small);
	box-shadow: var(--shadow);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	line-height: 1.2em;
	margin-bottom: var(--large);
	font-family: Libertinus, serif;
}

h1 {
	font-size: 3em;
}

h2 {
	font-size: 2em;
}

h3 {
	font-size: 1.5em;
}

h4 {
	font-size: 1.2em;
}

h5 {
	font-size: 1.1em;
}

h6 {
	font-size: 1.0em;
}

html {
  scroll-behavior: smooth;
}

hr {
	background-color: var(--accent);
	border: none;
	height: 1px;
}

img,
video {
	border: var(--border);
	display: block;
	margin: 0 auto;
	box-shadow: var(--shadow);
	border-radius: var(--large);
	max-width: 100%;
}

pre {
	/* Prevent giallo styling from showing */
	border-radius: 99px;?
}

span {
  filter: brightness(0.9);
}


pre > code {
	border: var(--border);
	border-radius: var(--large);
	box-shadow: var(--shadow);
	display: block;
	line-height: 140%;
	overflow-x: auto;
	padding: var(--large);
}

@media only screen and (max-width: 480px) {
	pre > code {
		border-radius: 0;
		font-size: small;
		margin-left: calc(var(--large) * -1);
		margin-right: calc(var(--large) * -1);
	}
}

table {
	background-color: var(--secondaryBackground);
	border: var(--border);
	border-radius: var(--large);
	border-spacing: var(--small);
	box-shadow: var(--shadow);
	display: inline-block;
	max-width: 100%;
	overflow-x: auto;
}

table th {
	color: var(--secondary);
	padding: var(--small) var(--medium);
}

table td {
	background-color: var(--background);
	padding: var(--small) var(--medium);
}

table tbody > tr:last-child td:first-child {
	border-bottom-left-radius: calc(var(--large) - var(--small));
}

table tbody > tr:last-child td:last-child {
	border-bottom-right-radius: calc(var(--large) - var(--small));
}

/* MARK: Index */

.hero {
	border: none;
	box-shadow: none;
	max-width: 66%;
}

@media (prefers-color-scheme: light) {
	.hero {
		filter: invert(1) hue-rotate(180deg);
	}
}

.description {
	color: var(--primary);
}

.date {
	color: var(--secondary);
	text-align: right;
}
