/*
The aggressive.se blog (AggressiveBlogPage.swift renders it, blog.js redraws it). The same look as the old blog, whose scripts created these rules
at runtime (setupStandardCSS, setDefaults, articleTemplateCSS and the blog's setupFunction). Now they are a file, so the page looks right before
any script runs.
*/

* { box-sizing: border-box; }

body {
	margin: 0;
	padding: 0;
	border: 0;
	vertical-align: baseline;
	font-family: "San Francisco", Helvetica, Roboto, HelveticaNeueLight, "Helvetica Neue Light", "Helvetica Neue", sans-serif;
	font-weight: 200;
	font-size: 1.2em;
	line-height: 1.5em;
	background-color: rgb(240, 240, 240);
}

img { max-width: 100%; }
a { cursor: pointer; color: red; }
a:visited { color: grey; }
a:hover { color: blue; }
a img { display: block; }
strong { color: red; }
h1 { font-weight: 200; color: black; text-align: center; font-size: 2.8em; line-height: 1em; -webkit-hyphens: none; hyphens: none; }
h2 { font-weight: 200; text-align: center; -webkit-hyphens: none; hyphens: none; }
h3 { -webkit-hyphens: none; hyphens: none; }
li, ul, ol { text-indent: 0; }

/* header */

.navigation { padding-bottom: 20px; }
#image_header { position: relative; margin: 0 auto 20px; display: block; }
#cold_image { max-height: 260px; display: block; margin: auto; }
#image_header_caption { text-align: center; font-size: small; }
.navBarLinks { font-size: 1.5em; max-width: 650px; margin: auto; padding: 0 20px; }

/* the list */

.mainBlogContent { line-height: 1.3em; padding-bottom: 20px; text-align: justify; text-justify: newspaper; -webkit-hyphens: auto; hyphens: auto; }
.panelItem { display: block; margin: auto; max-width: 650px; padding-left: 10px; padding-right: 10px; cursor: pointer; }
.panelItemTitle, .panelItemTitle:visited, .panelItemTitle:hover { display: block; padding: 0 10px; color: inherit; text-decoration: inherit; }
.panelItemImage { max-height: 400px; max-width: 100%; margin: auto; display: block; }
.panelItemText { padding: 0 10px; margin-bottom: 20px; }
.storyName { margin: 0.5em 10px; }
.closeButton { display: inline-block; margin: 10px; font-family: HelveticaNeueLight, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 0.9em; }
.blogMessage { max-width: 650px; margin: 20px auto; padding: 0 20px; }
.blogMore { max-width: 650px; margin: 20px auto; padding: 0 20px; font-weight: bold; }
.blogMore::before {
	content: "";
	display: inline-block;
	width: 0.8em;
	height: 0.8em;
	margin-right: 10px;
	border: 2px solid #8898aa;
	border-right-color: transparent;
	border-radius: 50%;
	vertical-align: -0.05em;
	animation: blogSpin 0.6s linear infinite;
}
@keyframes blogSpin { to { transform: rotate(360deg); } }

/* an open article */

.articleDiv { font-family: georgia, "athelas serif", serif; padding: 0 10px 10px; max-width: 650px; margin: auto; display: block; }
.articleDiv h1, .articleDiv h2, .articleDiv h3, .articleDiv h4 { font-weight: 100; color: inherit; font-family: HelveticaNeueLight, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; text-indent: 0; }
.articleDiv h1 { font-size: 3em; line-height: 1em; }
.articleTitle, .articleTitle:visited, .articleTitle:hover { display: block; padding: 0 5px; color: inherit; text-decoration: inherit; }
.articleTitleImage { max-height: 400px; margin: auto; display: block; }
.articleSeries { float: left; font-size: 1.1em; margin: 1px; padding: 3px; color: inherit; border: 1px dashed; cursor: pointer; text-decoration: none; }
.articleSeries:hover { color: white; background-color: black; }
.articleTags { float: right; padding-left: 5px; max-width: 50%; }
.articleTag { float: right; padding: 3px; margin: 1px; border: 1px solid; cursor: pointer; color: inherit; text-decoration: none; }
.articleTag:hover { color: white; background-color: black; }
.articleDate { clear: both; font-size: 0.85em; padding: 0 5px; }
.articleLead { font-weight: bold; padding: 0 5px; }
.articleText { padding: 0; text-indent: 1em; font-weight: 100; font-size: 1.2em; line-height: 1.5em; }
.articleText p:first-child, .articleText h2 + p, .articleText h3 + p { text-indent: 0; }
.articleText > p:first-child::first-letter { float: left; text-indent: 0; padding: 4px 8px 0 3px; font-size: 5.4em; line-height: 0.7em; }
.articleText img { max-width: 100%; }
.articleText figcaption { font-style: italic; font-size: 0.8em; }
.articleText pre { overflow: scroll; -webkit-overflow-scrolling: touch; }
.articleText table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 0.85em; line-height: 1.4em; }
.articleText td, .articleText th { text-align: left; text-indent: 0; vertical-align: top; padding: 6px 8px; border-bottom: 1px solid rgba(128, 128, 128, 0.35); -webkit-hyphens: manual; hyphens: manual; }
.articleText th { font-family: HelveticaNeueLight, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; font-weight: bold; border-bottom: 2px solid rgba(128, 128, 128, 0.6); }
.articleText tr:last-child td { border-bottom: none; }
.articleText ::-webkit-scrollbar { -webkit-appearance: none; width: 7px; height: 8px; }
.articleText ::-webkit-scrollbar-thumb { border-radius: 5px; background-color: rgba(0, 0, 0, 0.5); box-shadow: 0 0 1px rgba(255, 255, 255, 0.5); }

/* the about box, over the page */

.aboutPage { position: fixed; top: 0; right: 0; bottom: 0; left: 0; overflow: auto; background-color: rgba(0, 0, 0, 0.7); z-index: 10; }
.aboutPage[hidden] { display: none; }
.aboutBox { width: 80%; max-width: 650px; min-height: 200px; margin: 50px auto; padding: 1px 20px 10px; border-radius: 5px; background-color: rgba(250, 250, 250, 0.9); }
.aboutProfileImage { float: right; padding: 0 20px; max-width: 200px; }
.aboutText { margin: 20px; text-align: justify; -webkit-hyphens: auto; hyphens: auto; }

/* dark mode for visitors who have it on */

@media (prefers-color-scheme: dark) {
	:root { color-scheme: dark; }
	body { background-color: #1b1b1d; color: #e3e3e6; }
	h1 { color: #f2f2f4; }
	a { color: #ff6b6b; }
	a:visited { color: #a0a0a6; }
	a:hover { color: #7aa7ff; }
	strong { color: #ff6b6b; }
	.panelItemTitle, .panelItemTitle:visited, .panelItemTitle:hover, .articleTitle, .articleTitle:visited, .articleTitle:hover { color: inherit; }
	.articleSeries:hover, .articleTag:hover { color: #1b1b1d; background-color: #e3e3e6; }
	.articleText ::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, 0.4); }
	.aboutBox { background-color: rgba(40, 40, 44, 0.95); }
}
