* {
	margin: 0;
	padding: 0;
}

@font-face {
  font-family: 'Berkeley Mono';
  font-style: normal;
  font-weight: 400;
  src: local(''),
	   url('/assets/berkeley_mono/BerkeleyMono-Regular.woff2') format('woff2'),
	   url('/assets/berkeley_mono/BerkeleyMono-Regular.woff') format('woff');
}

@font-face {
  font-family: 'Berkeley Mono';
  font-style: italic;
  font-weight: 400;
  src: local(''),
	   url('/assets/berkeley_mono/BerkeleyMono-Italic.woff2') format('woff2'),
	   url('/assets/berkeley_mono/BerkeleyMono-Italic.woff') format('woff');
}

@font-face {
  font-family: 'Berkeley Mono';
  font-style: normal;
  font-weight: 1000;
  src: local(''),
	   url('/assets/berkeley_mono/BerkeleyMono-Bold.woff2') format('woff2'),
	   url('/assets/berkeley_mono/BerkeleyMono-Bold.woff') format('woff');
}

@font-face {
	font-family: 'bitMatrix A2';
	font-style: normal;
	font-weight: 400;
	src: local(''),
		url('/assets/bitMatrix-A2.ttf') format('truetype');
}

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600;1,700;1,800&display=swap');

.title-bar {
	font-family: "Berkeley Mono", Consolas, monospace;
	border-bottom: 1px solid #ccc;
	font-weight: bold;
	background-color: white;
	display: block;
}

.grid-title-bar {
	display: grid;
	grid-template-columns: 220px auto;
}

.osat-svg-container-container {
	padding: 5px 0 1.5em 0;
}

.osat-svg-container {
	display: inline-block;
	border: 1px solid #ccc;
	box-shadow: -2px 2px 0 0 #aaa;
	padding: 5px;
}

.osat-svg-container:hover {	
	background-color: rgb(24, 114, 253);
	border: 1px solid #05b;
}

.site-intro {
	font-weight: 400;
	color: gray;
	font-family: "Helvetica Neue", Helvetica, "Segoe UI", sans-serif;
	padding: 0 10px;
}

.container {
	padding: 1em;
	max-width: 800px;
}

.post-container {
	padding: 3em;
	padding-bottom: 5em;
	display: flex;
	justify-content: center;
}

.post-container-center {
	max-width: 800px;
}

.top {
	position: sticky;
	left: 0;
	top: 0;
	z-index: 100;
}

h1, h2, h3, h4, h5 {
	font-family: "Helvetica Neue", Helvetica, "Segoe UI", sans-serif;
}


a {
	color: rgb(24, 114, 253);
	text-decoration: none;
}

p > code {
	font-family: "Berkeley Mono", Consolas, monospace;
	font-size: 0.8em;
	display: inline-block;
	padding: 0 10px;
	border: 1px solid gray;
	line-height: 1.5em;
	box-shadow: -1px 1px 0px 0px #aaa;
}

p > code:hover {
	background-color: #ccc;
}

a:hover {
	color: white;
	background-color: rgb(24, 114, 253);
}

pre {
	margin: 10px 0;
	padding: 10px 0;
	margin-bottom: calc(10px + 0.5em);
	border-top: 1px solid #ccc;
	border-bottom: 1px solid #ccc;
	max-width: calc(100vw - 4em);
	overflow-x: auto;
}

pre > code {
	font-family: "Berkeley Mono", Consolas, monospace;
}

ul {
	border: 1px solid #ccc;
	border-bottom: none;
	border-left: 2px solid #07f;
	display: inline-block;
	box-shadow: -2px 2px 0 0 #ccc;
	margin-bottom: 10px;
}

ol {
	border: 1px solid #ccc;
	border-bottom: none;
	border-left: 2px solid #07f;
	display: inline-block;
	box-shadow: -2px 2px 0 0 #ccc;
	margin-bottom: 10px;
}

li {
	font-family: "Helvetica Neue", Helvetica, "Segoe UI", sans-serif;
	font-size: 1.1em;
	padding-left: 5px;
	padding-right: 10px;
	padding-top: 5px;
	padding-bottom: 5px;
	border-bottom: 1px solid #ccc;
}

ul > li {
	list-style: none;
}

ol > li {
	list-style: inside decimal;
}

li:hover {
	background-color: #ddd;
}

.page-categories {
	padding-top: 5px;
}

.sub-viewport {
	display: flex;
	justify-content: center;
}

.sub-viewport-center {
	max-width: 1920px;
	flex: 1;
}

.sub-viewport-grid {
	display: flex;
}

.sidebar {
	min-width: 400px;
	max-width: 420px;
}

.site-title {
	font-size: 6.6vw;
	padding: 0 10px;
	color: black;
	display: flex;
	align-items: center;
}

.site-title:hover {
	background-color: rgb(24, 114, 253);
	color: white;
}

.logo-container {
	padding: 10px;
}

.page-title {
	font-family: "Berkeley Mono", Consolas, monospace;
	/* font-family: "Helvetica Neue", Helvetica, "Segoe UI", sans-serif; */
	color: black;
	font-weight: bold;
	border: 1px solid #ccc;
	box-shadow: -2px 2px 0 0 #aaa;
}

.page-title-content {
	font-size: 2em;
	padding: 5px;
}

.page-title-container {
	padding: 10px;
	min-height: 100px;
	padding-left: 0;
	flex: 1;
}

.page-info-container {
	display: flex;
}

.site-title-small {
	font-size: 1em;
	padding: 0 10px;
	color: black;
}

.site-title-small:hover {
	background-color: rgb(24, 114, 253);
	color: white;
}

.posts {
	display: flex;
	max-width: 800px;
	flex-wrap: wrap;
}

.post {
	position: relative;
	overflow: hidden;
	min-width: 190px;
	max-width: 250px;
	min-height: 2.5em;
	padding: 5px;
	flex: 1;
}

.post-box {
	margin-right: 10px;
	margin-bottom: 10px;
	font-family: "Helvetica Neue", Helvetica, "Segoe UI", sans-serif;
	color: black;
	text-decoration: none;
	border: 1px solid #ccc;
	box-shadow: -2px 2px 0px 0px #aaa;
	display: flex;
	flex-direction: column;
}

.post-date {
	border-top: 1px solid #00000033;
	font-size: 0.9em;
	color: #00000077;
	padding: 1px 5px;
	background: #eee;
	position: relative;
}

.post-box:first-of-type {
	background-color: #def;
	color: #025;
	border: 1px solid #bdf;
}

.post-box:first-of-type > .post-date {
	background: #cde;
}

.post-box:hover {
	background-color: rgb(24, 114, 253);
	border: 1px solid #05b;
	color: white;
}

.post-box:hover > .post-date {
	color: white;
	background-color: rgb(7, 91, 219);
}

/* .featured-box {
	background-color: rgba(255, 215, 0, 0.097);
	border: 1px solid rgba(255, 215, 0, 1);
}

.featured-box > .post-date {
	background-color: rgba(255, 215, 0, 0.297);
} */

.site-items-text {
	padding-bottom: 10px;
}

.padding {
	padding-top: 1em;
}

.category-card {
	min-width: 100px;
	height: 1.5em;
	padding: 5px;
	display: flex;
	justify-content: center;
	align-items: center;
	text-transform: uppercase;
	margin-right: 10px;
	margin-bottom: 10px;
	font-family: "Berkeley Mono", Consolas, monospace;
	color: black;
	text-decoration: none;
	border: 1px solid #ccc;
	box-shadow: -2px 2px 0px 0px #aaa;
	position: relative;
	overflow: hidden;
}

.category-card:hover {
	background-color: orange;
	border: 1px solid #850;
	color: white;
}

.star-card {
	min-width: unset;
	min-width: 1.5em;
	height: 1.5em;
	display: flex;
	justify-items: center;
	align-items: center;
}

.starred {
	background-color: #eee;
	pointer-events: none;
}

.subscribe-card:hover {
	border: 1px solid #050;
	background-color: #080;
}

.footer {
	font-family: "Berkeley Mono", Consolas, monospace;
	border-top: 1px solid #ccc;
	border-bottom: 1px solid #ccc;
	background-color: white;
	display: block;
	font-size: 30px;
	text-align: center;
	color: black;
}

.footer:hover {
	color: white;
	background-color: rgb(24, 114, 253);;
}

.comment-section {
	display: flex;
	flex-direction: row;
}

.comment-failure {
	padding: 5px;
	min-height: 24px;
	box-shadow: -2px 2px 0px 0px #ccc;
	background-color: #f50;
	color: white;
	border: 1px solid #a50;
	margin-bottom: 10px;
	font-family: "Berkeley Mono", Consolas, monospace;
	text-transform: uppercase;
	display: flex;
	align-items: center;
}

.comment-failure-why {
	width: 100%;
	text-align: center;
}

.fill-rest {
	flex: 1;
	border-top: 1px solid #ccc;
	border-left: 1px solid #ccc;
	border-right: 1px solid #ccc;
	padding: 5px;
	z-index: 1;
	position: relative;
}

.fill-rest::before {
	position: absolute;
	left: -3px;
	top: 2px;
	content: " ";
	width: 2px;
	height: calc(100% - 3px);
	background-color: #aaa;
}

.comment-username {
	width: 100%;
	border: 0;
	font-size: 1em;
	height: 36px;
	padding: 5px;
	border: 1px solid #ccc;
	outline: 0;
	font-family: "Berkeley Mono", Consolas, monospace;
	border-radius: 0;
	text-transform: uppercase;
}

.comment-username:hover {
	background-color: #eee;
}

.comment-section-posts {
	border-bottom: 1px solid #ccc;
	display: flex;
	flex-wrap: wrap;
}

.comment-body {
	width: 100%;
	border: 0;
	font-size: 1em;
	padding: 5px;
	border: 1px solid #ccc;
	outline: 0;
	font-family: "Helvetica Neue", Helvetica, "Segoe UI", sans-serif;
	resize: none;
	border-radius: 0;
}

.comment-body:hover {
	background-color: #eee;
}

.comment-block {
	border: 1px solid #aaa;
	box-shadow: -2px 2px 0px 0px #aaa;
	max-width: 600px;
}

.comment-section-container {
	padding-bottom: 1em;
	max-width: 600px;
}

.comment-body-container {
	border: 1px solid #ccc;
	border-top: unset;
	padding: 5px;
	box-shadow: -2px 2px 0px 0px #aaa;
	z-index: 2;
}

.comment-item {
	border-top: 1px solid #ccc;
}

.comment-item:first-of-type {
	border-top: unset;
}

.comment-user {
	font-family: "Berkeley Mono", Consolas, monospace;
	display: flex;
	align-items: center;
	padding: 5px;
	padding-bottom: 0;
	padding-top: 0;
	min-height: 16px;
	text-transform: uppercase;
	background-color: #eee;
	color: #00000077;
	border-bottom: 1px solid #aaa;
}

.comment-date {
	font-family: "Berkeley Mono", Consolas, monospace;
	display: flex;
	align-items: center;
	padding: 5px;
	padding-bottom: 0;
	padding-top: 0;
	min-height: 16px;
	text-transform: uppercase;
	background-color: #ccc;
	color: #000000aa;
	border-bottom: 1px solid #aaa;
	border-top: 1px solid #aaa;
}

.comment-item:first-of-type > .comment-date {
	border-top: unset;
}

.comment-user-strong {
	font-weight: bold;
	color: #000000aa;
	padding-left: 0.5em;
}

.comment-content {
	font-size: 0.95em;
	font-family: "Helvetica Neue", Helvetica, "Segoe UI", sans-serif;
	padding: 10px 5px;
	min-height: 42px;
	line-height: 1.5em;
}

.comment-content:hover {
	background-color: #ddd;
}

.comment-title {
	padding-top: 2em;
	padding-bottom: 0.5em;
}

.verification-bar {
	display: grid;
	grid-template-columns: 100px auto;
	padding-top: 5px;
}

.verification-input {
	width: 100%;
	border: 0;
	font-size: 1em;
	height: 36px;
	padding: 5px;
	border: 1px solid #ccc;
	outline: 0;
	font-family: "Berkeley Mono", Consolas, monospace;
	text-transform: uppercase;
	border-radius: 0;
}

.verification-input:hover {
	background-color: #eee;
}

.verification-image {
	width: 95px;
	height: 36px;
}

.comment-card:hover {
	background-color: rgb(24, 114, 253);
	border: 1px solid #05b;
}

.comment-error {
	min-height: 64px;
	display: flex;
	justify-content: center;
	align-items: center;
	font-family: "Berkeley Mono", Consolas, monospace;
	text-transform: uppercase;
	color: gray;
	padding: 5px;
}

.comment-error-reason {
	text-align: center;
}

.hidden {
	display: none;
}

.category-card:hover > .permalink {
	filter: invert(1);
}

.permalink {
	height: 16px;
	width: 16px;
	padding-right: 2px;
}

.star-card:hover > svg {
	filter: invert(1);
}

.starred:hover {
	background-color: #eee;
	border: 1px solid #ccc;
	color: black;
}

.starred:hover > svg {
	filter: none;
}

.star-count {
	padding-left: 5px;
	padding-right: 2px;
}

p {
	font-family: "EB Garamond", "SF Sans", "PingFang SC", "Segoe UI", sans-serif;
	font-size: 1.3em;
	padding-bottom: 0.5em;
}

p > img {
	max-width: 100%;
	box-shadow: -3px 3px 0px 0px #ccc;
	border: 1px solid #ccc;
	background-color: white;
}

video {
	max-width: 100%;
	box-shadow: -3px 3px 0px 0px #ccc;
	border: 1px solid #ccc;
	margin: 0.5em 0 1em 0;
}

.gray {
	color: gray;
}

.post-container-center > h1, .post-container-center > h2, .post-container-center > h3, .post-container-center > h4, .post-container-center > h5 {
	padding-bottom: 0.3em;
	padding-top: 1em;
}

.uppercase-first {
	text-transform: capitalize;
}

.post-container-center > mjx-container, p > mjx-container {
	overflow-x: auto;
	overflow-y: hidden;
}

.post-container-center > mjx-container mjx-math, p > mjx-container mjx-math {
	max-width: calc(100vw - 6em);
}

.copy {
	color: gray;
	padding: 1em;
	padding-top: 2em;
	font-family: "Helvetica Neue", Helvetica, "Segoe UI", sans-serif;
}

.copy-in-article {
	color: gray;
	padding-top: 2em;
	font-family: "Helvetica Neue", Helvetica, "Segoe UI", sans-serif;
}

.svg {
	max-width: 16px;
	max-height: 100%;
	margin-right: 3px;
	color: #ba0;
}

.category-name {
	position: relative;
	z-index: 2;
}

.featured {
	width: 16px;
	margin-right: 2px;
}

.featured-no-margin {
	width: 16px;
}

.category-card:hover > .svg {
	filter: invert(1);
}

.shadertoy {
	max-width: 100%;
}

/* Syntax highlights */
.kt {
	font-weight: bold;
	color: rgb(24, 114, 253);
}

.k {
	color: rgb(24, 114, 253);
}

.kd {
	color: rgb(24, 114, 253);
}

.c1 {
	color: #777;
}

.s2 {
	color: rgb(207, 135, 1);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
	html {
		background-color: #111;
		color: white;
	}
	
	a {
		color: #c8f;
	}
	
	a:hover {
		background-color: #70f;
	}
	
	ol {
		border: 1px solid #555;
		border-left: 2px solid #70f;
		box-shadow: -2px 2px 0 0 #555;
		
	}
	
	ul {
		border: 1px solid #555;
		border-left: 2px solid #70f;
		box-shadow: -2px 2px 0 0 #555;
	}
	
	p > img {
		box-shadow: -3px 3px 0px 0px #555;
	}
	
	video {
		box-shadow: -3px 3px 0px 0px #555;
	}
	
	li {
		border-bottom: 1px solid #555;
	}
	
	li:hover {
		background-color: #444;
	}
	
	.page-title {
		border: 1px solid #666;
		box-shadow: -2px 2px 0 0 #555;
	}
	
	.osat-svg-container {
		box-shadow: -2px 2px 0 0 #555;
		border: 1px solid #666;
	}
	
	.osat-svg-container:hover {
		background-color: #70f;
		border: 1px solid #caf;
	}
	
	.category-card:hover > .permalink {
		filter: unset;
	}
	
	.title-bar {
		background-color: #333;
		border-bottom: 1px solid #555;
	}
	
	.site-title:hover {
		background-color: #70f;
	}
	
	.page-title-content {
		color: white;
	}
	
	.site-title {
		color: white;
	}
	
	.site-items-text {
		color: white;
	}
	
	.site-title-small {
		color: white;
	}
	
	.site-title-small:hover {
		background-color: #70f;
	}
	
	.footer {
		background-color: #333;
		color: white;
		border-top: 1px solid #555;
		border-bottom: 1px solid #555;
	}
	
	.footer:hover {
		background-color: #70f;
	}
	
	.post-box {
		color: white;
		border: 1px solid #666;
		box-shadow: -2px 2px 0 0 #555;
	}
	
	.post-date {
		border-top: 1px solid #ffffff33;
		color: #ffffff77;
	}
	
	.category-card {
		color: white;
		box-shadow: -2px 2px 0 0 #555;
		border: 1px solid #666;
	}
	
	.category-card:hover {
		background-color: #b60;
		border: 1px solid #fb6;
	}
	
	.post-box:first-of-type {
		background-color: #213;
		color: #c8f;
		border: 1px solid #60d;
	}
	
	.post-box:hover {
		background-color: #70f;
		border: 1px solid #caf;
		color: white;
	}
	
	.post-date {
		background-color: #333;
	}
	
	.post-box:first-of-type > .post-date {
		background-color: #103;
	}
	
	.post-box:hover > .post-date {
		background-color: #409;
	}
	
	.svg {
		filter: invert(1);
	}
	
	pre {
		border-top: 1px solid #555;
		border-bottom: 1px solid #555;
	}
	
	p > code {
		box-shadow: -1px 1px 0px 0px #555;
	}
	
	p > code:hover {
		background-color: #555;
	}
	
	.kt {
		color: #c8f;
	}
	
	.k {
		color: #c8f;
	}
	
	.kd {
		color: #c8f;
	}
	
	.s2 {
		color: rgb(253, 189, 24);
	}
	
	.subscribe-card:hover {
		border: 1px solid #3c3;
		background-color: #080;
	}
	
	/* Dark mode for comment system */
	.star-card:hover > svg {
		filter: none;
	}
	
	.comment-card:hover {
		background-color: #70f;
		border: 1px solid #caf;
	}
	
	.comment-body-container {
		box-shadow: -2px 2px 0 0 #555;
		border-top: unset;
	}
	
	.fill-rest {
		border-bottom: unset;
		box-shadow: unset;
		position: relative;
	}
	
	.fill-rest::before {
		position: absolute;
		left: -3px;
		top: 2px;
		content: " ";
		width: 2px;
		height: calc(100% - 3px);
		background-color: #555;
	}
	
	.comment-username {
		background-color: #111;
		color: white;
		border: 1px solid #777;
	}
	
	.comment-username:hover {
		background-color: #444;
	}
	
	.comment-body {
		background-color: #111;
		color: white;
		border: 1px solid #777;
	}
	
	.comment-body:hover {
		background-color: #444;
	}
	
	.verification-input {
		background-color: #111;
		color: white;
		border: 1px solid #777;
	}
	
	.verification-input:hover {
		background-color: #444;
	}
	
	.comment-block {
		border: 1px solid gray;
		box-shadow: none;
		box-shadow: -2px 2px 0px 0px #333;
	}
	
	.star-count {
		color: white;
	}
	
	.starred {
		background-color: #333;
	}
	
	.comment-date {
		background-color: #444;
		color: #ffffffaa;
	}
	
	.comment-user {
		background-color: #333;
		color: #ffffff77;
	}
	
	.comment-user-strong {
		color: #ffffff;
	}
	
	.comment-content:hover {
		background-color: #333;
	}
	
	.comment-item {
		border-top: unset;
	}
	
	.comment-body-container {
		border: 1px solid #999;
		border-top: unset;
	}
	
	.comment-section-posts {
		border-bottom: 1px solid #999;
	}
	
	.fill-rest {
		border: 1px solid #999;
		border-bottom: none;
	}
	
	.comment-failure {
		box-shadow: -2px 2px 0 0 #555;
		border: 1px solid #f84;
	}
	
	.verification-image {
		filter: invert(1);
	}
}

@media screen and (max-width: 650px) {
	.page-info-container {
		display: block;
	}
	
	.page-title-container {
		padding: 10px;
		padding-top: 0;
	}
	
	.permalink-card {
		display: none;
	}
}

@media screen and (max-width: 500px) {
	.post {
		min-width: 100px;
		max-width: 150px;
		display: flex;
	}
}

@media screen and (max-width: 900px) {
	.sub-viewport-grid {
		display: block;
	}
	
	.sidebar {
		min-width: unset;
		max-width: unset;
	}
}

@media screen and (max-width: 700px) {
	.post-container {
		padding-top: 2em;
		padding-bottom: 2em;
	}
}

