/* Corrections */
a{
	color: #369;
	text-decoration: none;
}
h1, h2, h3, h4, h5, h6{
	font-weight: normal;
	margin-bottom: 5px;
}
h1{
	font-size: 130%;
}
h2{
	font-size: 120%;
}
hr{
	margin: 0px 0px 20px 0px;
}
ul{
	padding-left: 20px;
}

/* Body */
body{
	/* Background */
	background: #11274A;
	background: radial-gradient(at top, #844767 0%, #11274A 75%);
	background-attachment: fixed;

	/* Text Color */
	color: #ffffff;

	/* External spacing */
	max-width: 1200px;
	margin: 30px auto;
	padding: 20px;

	/* Layout */
	display: grid;
	grid-row-gap: 10px;
	grid-template-areas:
			"nav"
			"aside"
			"main"
			"footer";

	/* Font */
	font-family: 'Open Sans', sans-serif;
	text-align: center;
}

body.alert{
	grid-template-areas:
	"header"
	"main"
	"footer";
}

/* Components */
header{
	grid-area: header;
}
nav{
	/* Grid Metadata */
	grid-area: nav;

	/* Layout */
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 5px 15px;
}
nav p{
	margin: 0px;
}

/* Profile Photo */
nav > #photo{
	width: 230px;
	border-radius: 5px;
	align-self: center;
}

/* Profile Name */
nav > #name{
	font-size: 110%;
	font-weight: normal;
	margin-bottom: 5px;
}

/* Description */
nav > #description{
	margin-bottom: 20px;
}

/* Metadata */
nav > #metadata{
	/* Layout */
	display: grid;
	margin: 0 auto;
	width: fit-content;
	margin-bottom: 20px;

	/* Grid internal layout */
	grid-row-gap: 5px;
	grid-column-gap: 5px;

	/* Grid auto setting */
	grid-template-columns: repeat(2, auto);

	/* Text style */
	text-align: initial;
	font-size: 90%;
}

/* Links */
nav > #links{
	/* Layout */
	display: flex;

	/* Internal layout */
	justify-content: space-between;
	align-items: flex-end;
}

/* Blog Aside */
aside{
	/* Resetting styles */
	text-align: initial;

	/* Grid Metadata */
	grid-area: aside;

	/* Layout */
	padding: 5px 15px;
}
aside > h2{
	/* Centering Header */
	text-align: center;
}
aside > a{
	/* Centering Footer */
	display: block;
	text-align: center;
	padding: 10px 0px;
}
aside ul{
	font-size: 95%;
}
aside li{
	/* Padding from each item */
	padding: 2px 0px;
}

/* Content */
main{
	/* Grid Metadata */
	grid-area: main;

	/* Layout */
	padding: 15px;
	text-align: initial;
	line-height: 1.5;

	/* Grid shink fix */
	min-width: 0;
}

/* Post */
main article{
	margin-bottom: 50px;
}
main article > header{
	/* Title and Date side by side */
	display: flex;

	/* Aligning items together */
	align-items: baseline;

	/* Putting all space between title and date */
	justify-content: space-between;
}
main > section > article > header > h1{
	font-size: 120%;
}

main .project{
	margin-bottom: 15px;
}

body.alert > header{
	color: #ffffff;
	background: repeating-linear-gradient(135deg, #ebd007, #ebd007 30px, #555 30px, #555 60px);
	margin-bottom: 10px;
	font-size: 800%;
}
body.alert > main{
	text-align: center;
	line-height: 1;
}

/* Footer and Copyright */
footer{
	/* Grid Metadata */
	grid-area: footer;

	/* Layout */
	margin-top: 10px;
	color: white;
}

/* Paper */
.paper {
	background-color: #ffffff;
	color: black;
	border-radius: 5px;
}

/* Responsive Design (Desktop) */
@media screen and (min-width: 900px) {
	body{
		grid-template-columns: 2fr 7fr;
		grid-column-gap: 10px;
		grid-template-areas:
			"nav    main"
			"aside  main"
			".      main"
			"footer footer"
	}
	body.alert{
		grid-template-columns: 1fr 500px 1fr;
		grid-template-rows: 1fr 2fr 2fr auto;
		grid-template-areas:
		". .      ."
		". header    ."
		". main   ."
		". footer .";
	}

	nav{
		/* Sizing */
		height: 430px;
		width: 235px;

		/* Sticky Positioning */
		position: -webkit-sticky;
		position: sticky;

		/* Position (margin + padding) */
		top: 50px;
	}

	aside{
		/* Sizing */
		width: 235px;

		/* Sticky Positioning */
		position: relative;
		position: -webkit-sticky;
		position: sticky;

		/* Position (margin + padding + nav) */
		/* NOTE: This will only work for screens greater than 768px tall */
		top: 501px;
	}
}

@media(prefers-color-scheme: dark){
	a{
		color: #8BE;
	}

	.paper {
		color: #ddd;
		background-color: #222;
	}
}