@import "normalize.css/normalize.css";
@import "./prism-theme.css";

:root {
	--bg-color: #0a0e1f;
	--text-color: #f5f9ff;
	--highlight-color: #daa520;
}

.color-scheme-light {
	--bg-color: #e7f4f5;
	--text-color: #0a0e1f;
	--highlight-color: #daa520;
}

.blur-background {
	@supports (backdrop-filter: blur(4px)) {
		backdrop-filter: blur(4px);
		background-color: rgba(10, 14, 31, 0.5) !important;
	}
}

/* colors have to match background or it looks bad */
.color-scheme-light {
	.blur-background {
		@supports (backdrop-filter: blur(4px)) {
			backdrop-filter: blur(4px);
			background-color: rgba(231, 244, 245, 0.5) !important;
		}
	}
}

.blur-background-2 {
	@supports (backdrop-filter: blur(8px)) {
		backdrop-filter: blur(8px);
		background-color: rgba(10, 14, 31, 0.5) !important;
	}
}

.color-scheme-light {
	.blur-background-2 {
		@supports (backdrop-filter: blur(8px)) {
			backdrop-filter: blur(8px);
			background-color: rgba(231, 244, 245, 0.5) !important;
		}
	}
}

* {
	color: var(--text-color);
	box-sizing: border-box;
}

::selection {
	background: dodgerblue;
}

html {
	scroll-behavior: smooth;
}

body {
	background-color: var(--bg-color);
	color: var(--text-color);
	font-family: sans-serif;
}

p {
	line-height: 1.4;
	margin: 1.5em 0;
}

img {
	display: block;
	margin: 0 auto;
	background: #e1e4ea;
	max-width: 100%;
	@media screen and (min-width: 1100px) {
		max-width: 900px;
	}
}

button {
	background-color: transparent;
	border-radius: 0;
	border: 1px solid currentcolor;
	padding: 0.3em;
}

h1, h2, h3, h4, h5, h6 {
	padding: 0;
	margin: 0 0 1.4em;
	a {
		color: inherit;
		text-decoration: none;
	}
}

h1, h2, h3 {
	color: var(--highlight-color);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.1em;
}

blockquote {
	border-left: 2px solid var(--highlight-color);
	margin: 1.5em 0;
	padding: 0 0 0 .8em;

	p {
		margin: 0;
	}
}

a {
	color: inherit;

	&[aria-current] {
		color: var(--highlight-color);
	}
}

li {
	margin: 0 0 1em;
}

pre {
	margin: 0;
	padding: 5px;
	@media screen and (min-width: 800px) {
		padding: 1em;
	}

	font-size: 14px;
	color: var(--text-color);
	line-height: 1.4;
	tab-size: 2;
	outline: none;
}

code {
	padding: .1em .2em;
	margin: 0;
	font-size: .9em;
	background: var(--coldark01);
}

pre code {
	padding: 0;
	margin: 0;
	font-size: 14px;
	background: none;
}

select, input, textarea {
  background-color: var(--bg-color);
	color: var(--text-color);
	border: 1px solid var(--text-color);
}

.content {
	margin-bottom: 1em;
}

/* Blog preview hover effect */
.blog-preview-link .content {
	border-radius: 8px;
	padding: 8px;
	margin-left: -8px;
	margin-right: -8px;
	transition: background-color 0.2s ease;
}

.blog-preview-link:hover .content {
	background-color: rgba(255, 255, 255, 0.02);
}

.color-scheme-light .blog-preview-link:hover .content {
	background-color: rgba(0, 0, 0, 0.02);
}

/* Table styling */
table {
	width: 100%;
	border-collapse: collapse;
	margin: 2em 0;
	font-size: 0.95em;
	background: rgba(255, 255, 255, 0.02);
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	@media screen and (min-width: 1100px) {
		max-width: 900px;
	}
}

.color-scheme-light table {
	background: rgba(0, 0, 0, 0.02);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

th, td {
	text-align: left;
	padding: 12px 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.color-scheme-light th,
.color-scheme-light td {
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

th {
	background: rgba(255, 255, 255, 0.05);
	font-weight: 600;
	color: var(--highlight-color);
	border-bottom: 2px solid var(--highlight-color);
}

.color-scheme-light th {
	background: rgba(0, 0, 0, 0.05);
}

td {
	vertical-align: top;
}

/* Code in table cells */
th code, td code {
	font-size: 0.9em;
	padding: 2px 4px;
	border-radius: 3px;
}

/* Zebra striping */
tbody tr:nth-child(even) {
	background: rgba(255, 255, 255, 0.02);
}

.color-scheme-light tbody tr:nth-child(even) {
	background: rgba(0, 0, 0, 0.02);
}

/* Hover effect */
tbody tr:hover {
	background: rgba(255, 255, 255, 0.05);
}

.color-scheme-light tbody tr:hover {
	background: rgba(0, 0, 0, 0.05);
}
