/* Reset default browser spacing for predictable layout. */
* {
	margin: 0;
	padding: 0;
}

/*
	Colors:
	1 - Almost White = #f8f4f8
	2 - #fce5fc
	3 - #ffd6ff
	4 - #f3ceff
	5 - Purply = #e7c6ff
	
*/

/* Global page typography, colors, scrolling, and background. */
body, html {
	height: 100%;
	font-family: "Space Mono", monospace;
	color: rgb(120, 70, 80);
	scroll-behavior: smooth;
	background-color: #f8f4f8;
}

/* Apply the paper texture to the main gallery area. */
main {
	background-color: #ffffff;
	background-image: url("images/papertex2.avif");
	background-repeat: repeat;
	background-size: auto;
}

/* Gallery header and hero artwork. */
#gallery_header {
	background-color: #f8f4f8;
	position: relative;
 	margin: 0;
	padding: 0;
	height: 100%;
	overflow: hidden;
}

#gallery_header_img {
	height: 100%;
	background-color: #f8f4f8;
	background-image: url("https://i.imgur.com/3RKasZm.png");
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center;
	opacity: 0.5;
	animation: hero 3s ease-in-out;
}

#gallery_header h1 {
	margin: 0;
	padding: 0;
	width: 100%;
	position: relative;
	bottom: 50%;
	transform: translate(0, -50%);
	font-size: calc(30px + 5vw);
	font-family: "Shrikhand", cursive;
	text-align: center;
	text-shadow: -1.5px 0 white, 0 1.5px white, 1.5px 0 white, 0 -1.5px white;
	color: rgb(120, 70, 80);
	animation: fadeIn 1.5s ease-in-out;
	line-height: 70%;
}

#gallery_header h1 span {
	font-size: calc(10px + 2.5vw);
	font-family: "Space Mono", monospace;
	text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white;
	color: rgb(120, 70, 80);
	text-decoration: underline;
	line-height: 50%;
}

#gallery_header_links {
	height: 1em;
	width: 100%;
	display: flex;
	flex-direction: column;
	bottom: calc(100% - 1vw);
	font-size: calc(15px + 1vw);
	position: relative;
	justify-content: right;
	text-align: left;
	animation: fadeInLinks 1.5s ease-in-out;
}

#gallery_header_links a {
	text-decoration: none;
	width: 2em;
	justify-content: center;
}

#gallery_header_links a img {
	width: 100%;
	height: auto;
	position: static;
	top: 0%;
	left: 0%;
	background-position: none;
	opacity: 0.3;
	transform: translate(5%, 0%);
}

#gallery_header_links a:hover img {
	opacity: 1;
}

/* Header entrance animations. */
@keyframes fadeInLinks {
	0% {opacity: 0;
	transform: translate(-5%, 0);}
	100% {opacity: 1;
	transform: translate(0, 0);}
}

@keyframes hero {
	0% {opacity: 0;}
	100% {opacity: 0.5;}
}

@keyframes fadeIn {
	0% {opacity: 0;
	transform: translate(0, -60%);}
	100% {opacity: 1;
	transform: translate(0, -50%);}
}

/* Scroll buffer */

#scroll_buffer {
	width: 100%;
	flex-wrap: wrap;
	display: flex;
	justify-content: center;
	align-items: center;
}

#scroll_buffer {
	display: none;
}

#scroll_buffer img {
	display: flex;
	flex-direction: column;
	width: auto;
	height: 45vh;
	margin-bottom: -8%;
	/* animation: fadeInChud 30s ease-in-out; */
}

/* @keyframes fadeInChud {
	0% {opacity: 0;}
	50% {opacity: 0;}
	51% {opacity: 1;}
	52% {opacity: 0;}
	100% {opacity: 0;}
} */

/* Year navigation bar. */
#gallery_nav {
	position: relative;
	z-index: 5;
	background-color: rgb(120, 70, 80);
	width: 100%;
	justify-content: center;
	align-items: center;
	display: flex;
	font-family: "Geo", monospace;
}

#gallery_nav a {
	text-decoration: none;
	color: #f8f4f8;
	font-size: calc(10px + 1.5vw);
	padding: 0 0.5em;
	transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
	height: 100%;
}

#gallery_nav p {
	color: #f8f4f8;
	font-size: calc(10px + 1.5vw);
	position: absolute;
	left: 10%;
}

#gallery_nav a:hover {
	background-color: #f8f4f8;
	color: rgb(120, 70, 80);
}

/* Arrange artwork entries within each year. */
div.gallery_year {
	margin-left: 5%;
	margin-right: 5%;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	text-align: justify;
}

div.entry {
	margin: 2em 2.5%;
	height: 50vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}

div.entry img {
	width: auto;
	height: 93%;
}

div.entry p {
	height: 7%;
	width: 100%;
	font-size: calc(15px + 0.7vw);
	text-align: center;
	align-items: center;
	background-color: rgb(120, 70, 80);
	color: #f8f4f8;
}

/* Sticky heading used to identify each year. */
.year_header_container {
	height: calc(2em + 4vw);
	margin-top: 1em;
	margin-left: 5%;
	margin-right: 5%;
	display: flex;
	justify-content: center;
	align-items: center;
	text-align: center;
	width: 90%;
	border-bottom: 2px solid rgb(120, 70, 80);
	background-color: #f8f4f8;
	position: sticky;
	top: 0;
	z-index: 10;
}

div.year_header_container a {
	text-decoration: none;
	color: rgb(120, 70, 80);
	font-size: calc(12px + 0.3vw);
	position: absolute;
	right: 5%;
	align-items: center;
	text-decoration: underline;
}

/* Constrain the gallery content and provide its paper-colored surface. */
#gallery_container {
	width: 90%;
	margin: 0 auto;
	background-color: #f8f4f8;
}

h2.year_header {
	position: absolute;
	left: 50%;
	transform: translate(-50%, 0%);
	font-size: calc(45px + 1vw);
	/* border-bottom: 1px solid black; */
	font-family: "Cherry Bomb One", system-ui;
}

#top {
	margin-top: 0;
}

/* Tablet layout adjustments. */
@media (max-width: 1080px) {
	div.entry {
		height: 50vh;
	}

	.year_header_container {
		width: 100%;
		margin: 0;
	}

	
	#scroll_buffer img {
		width: 33%;
		height: auto;
	}

	#gallery_container {
		width: 100%;
		margin: 0;
	}

	#gallery_nav p {
		display: none;
	}
}

/* Mobile layout: stack entries and make images fluid. */
@media (max-width: 720px) {
	div.gallery_year {
		flex-direction: column;
		align-items: center;
	}

	div.entry {
		margin: 1em 0;
		height:auto;
	}

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