:root {
	--main: #ffc;
	--accent: #fc8;
	--caps-spacing: 0.05em;
	--sidebar: #fc8;
	--sidebarbg: #0008;
	font-size: 1.225rem;
}

@font-face {
	font-family: "EBGaramond-Regular";
	src: url("/fonts/EBGaramond-Regular.ttf");
}

@font-feature-values "EBGaramond-Regular" {
	@styleset {
		tailed-q: 6;
	}
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	line-height: 1.45;
	background-image: url("/images/bgwooden.jpg");
	background-size: cover;
	background-repeat: no-repeat;
	background-attachment: fixed;
	color: var(--main);
	font-family: "EBGaramond-Regular";
	font-variant-alternates: styleset(tailed-q);
	font-variant-numeric: oldstyle-nums proportional-nums;
	hyphens: auto;
}

#body-container {
	display: grid;
	grid-template-columns: 37px 1fr 37px;
	grid-template-rows: 30px 1fr;

	margin: auto;
	max-inline-size: 80ch;

	min-height: 100vh;
}

#sidebar {
	position: fixed;
	top: 50%;
	left: calc(50% - 40ch - 9rem);
	transform: translateY(-50%);
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	padding: 1rem;
	background: var(--sidebarbg);
	border: 1px solid #fc84;
}

#sidebar h2 {
	margin: 0 0 0.75rem;
	font-size: 1.3rem;
	font-weight: normal;
	text-align: center;
  color: var(--sidebar);
	line-height: 1.1;
}

#sidebar a {
	display: block;
	color: var(--sidebar);
	text-decoration: none;
	font-variant-caps: all-small-caps;
	letter-spacing: var(--caps-spacing);
}

#sidebar a:hover {
	color: #fff;
}

main {
	grid-area: 1 / 2 / 3 / 3;

	margin: 0;
	padding: 2rem 2rem 0.75rem;

	max-inline-size: calc(min(80ch, 100vw) - 74px);

	background:
		linear-gradient(to right, #0006, #0006, #0006),
		url("/images/bgwood.png");
}

p {
	text-align: justify;
	hyphens: auto;
}

img {
	display: block;
	max-inline-size: 100%;
	margin: 1ch auto;
}

h1,
h2 {
	margin: 0;
	padding: 0;

	font-size: 2.5rem;
	font-weight: normal;
	text-align: center;

	color: var(--accent);
	line-height: 1.1;
	text-wrap: balance;
}

h3 {
	margin: 0;
	padding: 0;

	font-size: 1rem;
	font-weight: normal;
	text-align: center;

	color: var(--main);
	line-height: 1.1;
	text-wrap: balance;
}

a {
	color: var(--accent);
	text-decoration: none;
	cursor: pointer;
}

a:hover {
	color: #fff;
}

b,
strong {
	color: var(--accent);
	font-weight: bold;
}

#top-left {
	grid-area: 1 / 1 / 2 / 2;
	background-image: url("/images/pinecone_left.png");
}

#bottom-left {
	grid-area: 2 / 1 / 3 / 2;
	background-image: url("/images/pineborder_left.png");
}

#top-right {
	grid-area: 1 / 3 / 2 / 4;
	background-image: url("/images/pinecone_right.png");
}

#bottom-right {
	grid-area: 2 / 3 / 3 / 4;
	background-image: url("/images/pineborder_right.png");
}

.page-footer {
	margin-block-start: 0.5rem;
	text-align: center;
}

.dropcap::first-letter {
	float: left;
	font-size: 3em;
	margin: 0.167em 0.083em 0 0;
	line-height: 0.67;
	font-style: normal;
	font-variant-caps: normal;
	color: var(--accent);
}

.dropcap::first-line {
	font-variant-caps: all-small-caps;
	letter-spacing: var(--caps-spacing);
	color: var(--accent);
}