/* 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: #eeeeee;
	--color-gray-50: #eeeeee;
	--color-gray-90: #eeeeee;
	--background-color: #000000;
	--text-color: var(--color-gray-90);
	--text-color-link: #eeeeee;
	--text-color-link-active: #eeeeee;
	--text-color-link-visited: #eeeeee;
	--syntax-tab-size: 2;
}

@media (prefers-color-scheme: dark) {
	:root {
		--color-gray-20: #eeeeee;
		--color-gray-50: #eeeeee;
		--color-gray-90: #eeeeee;
		--text-color-link: #eeeeee;
		--text-color-link-active: #eeeeee;
		--text-color-link-visited: #eeeeee;
		--background-color: #000000;
	}
}


* {
	box-sizing: border-box;
}

@view-transition {
	navigation: auto;
}

html,
body {
	padding: 0 0.5rem; 
	margin: 0 auto;
	font-family: var(--font-family);
	color: var(--text-color);
	background-color: var(--background-color);
}

html {
	overflow-y: scroll;
}

body {
	max-width: 40em;
}

img {
	max-width: 100%;
}

img[width][height] {
	height: auto;
}

img[src$=".svg"] {
	width: 100%;
	height: auto;
	max-width: none;
}

video,
iframe {
	width: 100%;
	height: auto;
}

iframe {
	aspect-ratio: 16/9;
}

p:last-child {
	margin-bottom: 0;
}

p {
	line-height: 1.5;
	text-align: justify;
}

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);
}

footer {
	border-bottom: 1px dashed var(--color-gray-20);
	margin-bottom: 10px;
}

main {
	padding-bottom: 20px;
}

main :first-child {
	margin-top: 0;
}

table {
	margin: 1em 0;
}

table td,
table th {
	padding-right: 1em;
}

pre,
code {
	font-family: var(--font-family-monospace);
}

pre:not([class*="language-"]) {
	margin: .5em 0;
	line-height: 1.375;
	/* 22px /16 */
	-moz-tab-size: var(--syntax-tab-size);
	-o-tab-size: var(--syntax-tab-size);
	tab-size: var(--syntax-tab-size);
	-webkit-hyphens: none;
	-ms-hyphens: none;
	hyphens: none;
	direction: ltr;
	text-align: left;
	white-space: pre;
	word-spacing: normal;
	word-break: normal;
	overflow-x: auto;
}

code {
	word-break: break-all;
}

header {
	display: flex;
	gap: 1em;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	padding-top: 1em;
	padding-bottom: 1em;
	margin-top: 1em;
	margin-bottom: 1em;
	border-bottom: 1px dashed var(--color-gray-20);
}

.home-link {
	flex-grow: 1;
	font-size: 1em;
	/* 16px /16 */
	font-weight: 700;
}

.home-link:link:not(:hover) {
	text-decoration: none;
}

.postlist {
	list-style: none;
	padding: 0;
}

.postlist-item {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	margin-bottom: 1em;
}

.postlist-item:before {
	display: inline-block;
	pointer-events: none;
	line-height: 100%;
	text-align: right;
	margin-left: -1.5rem;
}

.postlist-date,
.postlist-item:before {
	font-size: 0.8125em;
	color: var(--color-gray-90);
}

.postlist-date {
	word-spacing: -0.5px;
}

.postlist-link {
	font-size: 1.1875em;
	font-weight: 700;
	flex-basis: calc(100% - 1.5rem);
	padding-right: .5em;
	text-underline-position: from-font;
	text-underline-offset: 0;
	text-decoration-thickness: 1px;
}

.postlist-item-active .postlist-link {
	font-weight: bold;
}

.postlist-item>.post-tag {
	align-self: center;
}
