/* -*- tab-width: 8; indent-tabs-mode: nil; -*- */

@font-face {
        font-family: "JetBrains Mono";
        src: url("/static/jetbrains-mono.woff2") format("woff2");
        font-style: normal;
        font-weight: 100 800;
        font-display: swap;
}

@font-face {
        font-family: "Iosevka Slab";
        src: url("/static/iosevka-slab-regular.woff2") format("woff2");
        font-weight: 400;
        font-style: normal;
        font-display: swap;
}

@font-face {
        font-family: "Iosevka Slab";
        src: url("/static/iosevka-slab-bold.woff2") format("woff2");
        font-weight: 700;
        font-style: normal;
        font-display: swap;
}

:root {
	--bg:		#10100E;
	--fg:		#FFFFE6;
	--line:		#30302B;
	--link:		#8AA499;
	--link-active:	#C8899B;
	--bright-red:   #BF281B;
	--red:          #981E13;
	--off-white:    #FAF7F1;
        --off-black:    #0c0c0b;
        --shadow:       transparent;
	--border-width: 0.25ex;
}

html, body {
	min-height: 100%;
}

body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        
        font-family: "Jetbrains Mono", monospace;
	font-size: 135%;
	max-width: 900px;
	margin: 0 auto;
	padding: 0 1em;
	line-height: 1.6;
	color: var(--fg);
	background-color: var(--bg);
}

.site-title {
        font-family: "Iosevka Slab";
        font-size: clamp(1.25em, 5vw, 2em);
	color: var(--fg);
	border-bottom: 2px solid var(--fg);
}

.cursor {
    	color: var(--fg);
        animation: blink 1s steps(1) infinite;
}

@keyframes blink {
	50% {
	        visibility: hidden;
	}
}

@media (prefers-reduced-motion: reduce) {
        .cursor {
                animation: none;
        }
}

#site-header {
	flex-shrink: 0;
}

#site-nav {
	display: flex;
	align-items: center;

        font-family: "Iosevka Slab";
        font-size: 110%;
        margin-top: 0.5rem;
        padding-bottom: 1rem;
}

@media (max-width: 600px) {
	#site-nav {
		font-size: 90%;
		flex-wrap: wrap;
		gap: 0.25em 0.75em;
	}
}

#site-nav a {
        color: var(--link);
        text-decoration: none;
}

#site-nav a:hover {
        color: var(--bright-red);
}

#site-nav .bracket {
        color: var(--fg);
}

.blog-compact ul, .blog-full ul { list-style: none; padding-left: 0; }
.blog-compact a:link, .blog-compact a:visited,
.blog-full a:link, .blog-full a:visited { text-decoration: none; }

/* HOME blog index */
.blog-compact li { font-size: 1.2em; display: flex; gap: 1ch; margin-bottom: 0; }
.blog-compact .post-date { order: -1; font-size: 1em; }

/* BLOG index */
.blog-full li { margin-bottom: 1.2em; }
.blog-full .entry-title { display: block; font-size: 1.5em; line-height: 1.3; }
.blog-full .post-date { display: block; font-size: 0.8em; }
.blog-full .post-date::before { content: "posted on "; }

.theme-toggle {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.theme-label {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	margin-left: auto;

	width: 1.5em;
	height: 1.5em;

	color: var(--link);
	cursor: pointer;
}

.theme-label:hover {
	color: var(--bright-red);
}

.icon {
	width: 1em;
	height: 1em;

	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.icon-moon {
	display: none;
}

.theme-toggle:checked + .theme-label .icon-sun {
	display: none;
}

.theme-toggle:checked + .theme-label .icon-moon {
	display: block;
}

.theme-toggle:focus-visible + .theme-label {
	outline: 1px dotted var(--fg);
	outline-offset: 0.2em;
}

body:has(.theme-toggle:checked) {
	--bg: #FFFFE6;
	--fg: #10100E;
        --shadow: #10100E59;
}

.sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

#content {
	flex: 1;
}

.title {
        font-family: "Iosevka Slab";
	font-size: 2.8em;
	margin-top: 0;
        color: var(--fg);
}

.content h1 {
        /* border-bottom: 2px solid var(--fg); */
        margin: 0;
        border-bottom: none;
}

.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
        font-family: "Iosevka Slab";
	border-bottom: 1px solid var(--fg);
	padding-bottom: 0.4ex;
}

.post-date {
	font-family: "Iosevka Slab";
	font-size: 0.90em;
	color: var(--fg);
	opacity: 0.75;
}

p.post-date {
	margin: 0.25em 0 1.5em;
}

#content li {
	margin-bottom: 0.6em;
}

li .post-date {
	display: block;
}

a:link,
a:visited {
	color: var(--link);
}

a:hover,
a:active {
	color: var(--bright-red);
	text-decoration: none;
}

table {
	border-collapse: collapse;
	border: var(--border-width) solid var(--fg);
	box-shadow: 4px 4px 6px var(--shadow);        
}

th {
	color: var(--fg);
	background-color: var(--bg);
	border: 1px solid var(--fg);
	padding: 0.25em;
}

td {
	border: 1px solid var(--fg);
	padding: 0.25em;
}

pre {
	font-family: "Iosevka Slab";
	overflow: auto;
	scrollbar-color: var(--line) var(--bg);
	scrollbar-width: thin;
	border: var(--border-width) solid var(--fg);
	box-shadow: 4px 4px 6px var(--shadow);
	padding: 1em;
}

pre,
code { font-family: "Iosevka Slab"; }

.todo { font-family: "Iosevka Slab"; color: var(--bright-red); }
.done { font-family: "Iosevka Slab"; color: var(--link); }

.underline { text-decoration: underline; }

footer {
        margin-top: auto;
        font-size: 90%;
        line-height: 1.5em;
}

.cc-icons {
	display: inline-flex;
	gap: 0.12em;
	vertical-align: center;
	margin-right: 0;
}

.cc-icon {
	display: inline-block;
	width: 1.1em;
	height: 1.1em;
	background-color: var(--fg);
	-webkit-mask-repeat: no-repeat;
	        mask-repeat: no-repeat;
	-webkit-mask-position: center;
	        mask-position: center;
	-webkit-mask-size: contain;
	        mask-size: contain;
}

.cc-icon.cc {
	-webkit-mask-image: url("/static/cc.svg");
	        mask-image: url("/static/cc.svg");
}

.cc-icon.by {
	-webkit-mask-image: url("/static/by.svg");
	        mask-image: url("/static/by.svg");
}
