/* Shared stylesheet for writing.madehaven.net.
   Served from /common/style.css, so every page links it absolutely. */

:root {
	--bg:      #fdfdfb;
	--fg:      #1c1b19;
	--muted:   #6b6862;
	--rule:    #e0ddd6;
	--link:    #7a3b2e;
	--measure: 34rem;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg:    #16171a;
		--fg:    #e4e2dd;
		--muted: #94918a;
		--rule:  #33343a;
		--link:  #d59a86;
	}
}

html {
	background: var(--bg);
	color: var(--fg);
	font: 1.0625rem/1.65 Georgia, "Liberation Serif", Times, serif;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0 auto;
	padding: 2rem 1.25rem 4rem;
	max-width: var(--measure);
}

a         { color: var(--link); }
a:hover   { text-decoration: none; }

/* ------------------------------------------------------------- chrome */

header.site {
	padding-bottom: 1.5rem;
	margin-bottom: 2.5rem;
	border-bottom: 1px solid var(--rule);
}

.site-name {
	font-size: 0.9rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--muted);
}

.site-name:hover { color: var(--fg); }

/* ---------------------------------------------------------- front page */

.intro {
	margin: 0 0 2.5rem;
}

ul.entries {
	list-style: none;
	margin: 0;
	padding: 0;
}

ul.entries li {
	margin-bottom: 2rem;
}

ul.entries time {
	display: block;
	font-size: 0.8rem;
	letter-spacing: 0.04em;
	color: var(--muted);
}

ul.entries a {
	font-size: 1.25rem;
	text-decoration: none;
}

ul.entries a:hover { text-decoration: underline; }

.summary {
	margin: 0.25rem 0 0;
	color: var(--muted);
}

/* --------------------------------------------------------------- posts */

h1 {
	font-size: 1.9rem;
	line-height: 1.2;
	font-weight: normal;
	margin: 0;
}

h2 {
	font-size: 1.25rem;
	font-weight: normal;
	font-style: italic;
	margin: 2.5rem 0 0.75rem;
}

.dateline {
	margin: 0.5rem 0 2.5rem;
	font-size: 0.8rem;
	letter-spacing: 0.04em;
	color: var(--muted);
}

p { margin: 0 0 1.15rem; }

blockquote {
	margin: 1.5rem 0;
	padding-left: 1.25rem;
	border-left: 2px solid var(--rule);
	color: var(--muted);
	font-style: italic;
}

hr {
	border: 0;
	border-top: 1px solid var(--rule);
	margin: 2.5rem 0;
}

img {
	max-width: 100%;
	height: auto;
}

figure {
	margin: 2rem 0;
}

figcaption {
	font-size: 0.85rem;
	color: var(--muted);
	margin-top: 0.5rem;
}

code, pre {
	font-family: "DejaVu Sans Mono", monospace;
	font-size: 0.85em;
}

pre {
	overflow-x: auto;
	padding: 0.9rem 1rem;
	background: rgba(127, 127, 127, 0.09);
	line-height: 1.45;
}
