/*
	By Jose Nunez on 9/2/2023
	ISTE-240 Web & Mobile II Section 3 Exercise 1
*/

:root {
	/* Color variables. */
	--navbar-bg-color: black;
	--navbar-bg-contrast: hsl(0, 0%, 25%);
	--navbar-text-color: white;
	--navbar-text-color-focus: white;

	/* Positioning variables. */
	--navbar-height: 50px;
	--padding-large: 48px;
	--padding-small: 35px;

	/* Mobile exceptions. */
	--mobile-navbar-height: 96px;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

/* Prevent browsers from overruling text adjustments, else mobile is wonky. */
html,
body {
	text-size-adjust: none;
	-webkit-text-size-adjust: none;
	-ms-text-size-adjust: none;
	-moz-text-size-adjust: none;
}

body {
	background-color: black;
	color: white;
	font-family: Montserrat, Arial, Helvetica, sans-serif;
	height: 100%;
	line-height: 1.6;
}

/* Specify background-image in style tags with Liquid. */
#banner {
	background-attachment: scroll;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	display: table;
	text-align: center;
	height: 60vh;
	width: 100%;
}

#banner-contents {
	display: table-cell;
	font-size: 24px;
	padding-top: var(--navbar-height);
	vertical-align: middle;
	width: 100%;
}

#contentlist {
	font-family: Montserrat;
	font-size: 16px;
	list-style-type: none;
	padding-left: 0 !important;
}

#contentlist li {
	background-attachment: scroll;
	background-position: -128px center;
	background-repeat: no-repeat;
	display: table;
	margin-bottom: var(--padding-small);
	text-align: center;
	height: 72px;
	width: 100%;
}

.contentlist-contents {
	text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
	color: white !important;
	display: table-cell;
	font-size: 28px;
	font-weight: 700;
	padding: 8px;
	vertical-align: middle;
	width: 100%;
}

/* 

Credits to https://christopheraue.net/design/fading-pages-on-load-and-unloadfor the page fader. 
   
*/
#fader {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 10;
	pointer-events: none;
	background: #000000;
	animation-duration: 200ms;
	animation-timing-function: ease-in-out;
}

@keyframes fade-out {
	from {
		opacity: 1
	}

	to {
		opacity: 0
	}
}

@keyframes fade-in {
	from {
		opacity: 0
	}

	to {
		opacity: 1
	}
}

#fader.fade-out {
	opacity: 0;
	animation-name: fade-out;
}

#fader.fade-in {
	opacity: 1;
	animation-name: fade-in;
}

#main {
	padding-top: calc(var(--navbar-height) + var(--padding-small));
	padding-bottom: var(--padding-large);
	margin-left: 15%;
	margin-right: 15%;
}

#main a {
	color: #00CDFF;
	text-decoration: none;
}

#main p {
	font-family: Montserrat;
	font-size: 20px;
	padding-bottom: var(--padding-small);
}

#main h1 {
	font-family: Montserrat;
	font-size: 30px;
	padding-bottom: var(--padding-small);
	text-transform: uppercase;
}

#main h2,
#main h3,
#main h4,
#main h5 {
	padding-bottom: var(--padding-small);
}

#main table {
	border: 1px solid white;
	border-collapse: collapse;
	border-spacing: 4px;
	font-size: 18px;
	margin-bottom: var(--padding-small);
	min-width: 67%;
}

#main table th,
#main table td {
	border: 1px solid white;
	padding-left: 8px;
	padding-right: 8px;
}

#main ul,
#main ol {
	font-size: 20px;
	padding-left: var(--padding-large);
	padding-bottom: var(--padding-small);
}

#portrait {
	border: 4px solid white;
	border-radius: 100%;
}

/* Navbar start. */

#navbar {
	/* Styling. */
	background-color: var(--navbar-bg-color);
	border-bottom: 1px solid;
	border-color: var(--navbar-bg-contrast);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);

	/* Positioning. */
	height: var(--navbar-height);
	position: fixed;
	left: 0;
	right: 0;
	z-index: 2;
}

#navbar.opened .navbar-links {
	border-bottom: 1px solid;
	border-color: var(--navbar-bg-contrast);
	max-height: none;
}

#navbar.opened .navbar-menu {
	opacity: 1;
	visibility: visible;
}

#navbar.opened .navbar-toggle .icon-bar:first-child,
#navbar.opened .navbar-toggle .icon-bar:last-child {
	margin: 0;
	position: absolute;
	width: 30px;
}

#navbar.opened .navbar-toggle .icon-bar:first-child {
	transform: rotate(45deg);
}

#navbar.opened .navbar-toggle .icon-bar:nth-child(2) {
	opacity: 0;
}

#navbar.opened .navbar-toggle .icon-bar:last-child {
	transform: rotate(-45deg);
}

.container {
	margin-left: 7%;
	margin-right: 7%;
	max-width: 100%;
}

/* Navbar end. */

/* Navbar elements start. */

.home-link {
	/* Styling and display. */
	align-items: center;
	color: var(--navbar-text-color);
	display: flex;

	/* Fonts and text. */
	font-size: 18px;
	font-weight: 900;
	text-decoration: none;
	text-transform: uppercase;
}

.navbar-link {
	/* Styling and display. */
	align-items: center;
	color: var(--navbar-text-color);
	display: flex;
	transition:
		background-color 0.2s ease-in-out,
		color 0.2s ease-in-out;

	/* Fonts and text. */
	font-size: 14px;
	font-weight: 550;
	text-decoration: none;
}

.home-link:focus,
.home-link:hover {
	color: var(--navbar-text-color-focus);
}

.icon-bar {
	/* Styling. */
	background-color: var(--navbar-text-color);
	transition:
		background-color 0.2s ease-in-out,
		opacity 0.2s ease-in-out,
		transform 0.2s ease-in-out;

	/* Display and positioning. */
	display: block;
	margin: 2px;
	height: 4px;
	width: 25px;
}

.navbar-container {
	align-items: center;
	display: flex;
	height: 100%;
	justify-content: space-between;
}

.navbar-item {
	width: 100%;
}

.navbar-link {
	justify-content: center;
	letter-spacing: 0.1em;
	padding: 1.0em 1.25em 1.0em 1.25em;
	text-transform: uppercase;
	width: 100%;
}

.navbar-link:focus,
.navbar-link:hover {
	background-color: var(--navbar-bg-contrast);
	color: var(--navbar-text-color-focus);
}

.navbar-links {
	/* Styling. */
	align-items: center;
	background-color: var(--navbar-bg-color);
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
	list-style-type: none;

	/* Display and positioning. */
	display: flex;
	flex-direction: column;
	max-height: 0;
	overflow: hidden;
	position: absolute;
	left: 0;
	right: 0;
}

.navbar-menu {
	/* Styling. */
	opacity: 0;
	transition:
		opacity 0.2s ease-in-out,
		visibility 0.2s ease-in-out;

	/* Display and positioning. */
	position: fixed;
	visibility: hidden;
	top: var(--navbar-height);
	bottom: 0;
	left: 0;
	right: 0;
}

.navbar-toggle {
	/* Styling. */
	align-items: center;
	background-color: transparent;
	border: none;
	cursor: pointer;
	justify-content: center;

	/* Display and positioning. */
	width: 40px;
	height: 40px;
	display: flex;
	flex-direction: column;
}

.navbar-toggle:focus .icon-bar,
.navbar-toggle:hover .icon-bar {
	background-color: var(--navbar-text-color-focus);
}

/* Navbar elements end. */

/* Desktop exceptions start. */

@media screen and (min-width: 1200px) {
	.navbar-toggle {
		display: none;
	}

	#contentlist li {
		opacity: 50%;
		transition: opacity 0.25s;
	}

	#contentlist li:hover {
		opacity: 100%;
	}

	#navbar .navbar-menu,
	#navbar.opened .navbar-menu {
		display: block;
		height: 100%;
		opacity: 1;
		position: static;
		visibility: visible;
	}

	#navbar .navbar-links,
	#navbar.opened .navbar-links {
		/* Styling. */
		box-shadow: none;
		list-style-type: none;

		/* Display and positioning. */
		flex-direction: row;
		max-height: max-content;
		margin: 0;
		padding: 0;
		position: static;
		width: 100%;
		height: 100%;
	}

	#navbar .navbar-link:last-child {
		margin-right: 0;
	}

	#main p {
		text-align: justify;
	}
}

/* Desktop exceptions end. */

/* Mobile exceptions start. */

@media screen and (max-width: 1000px) {
	#banner-contents {
		padding-top: var(--mobile-navbar-height);
	}

	#main {
		margin-left: 5%;
		margin-right: 5%;
		padding-top: calc(var(--mobile-navbar-height) + var(--padding-small));
	}

	#navbar {
		height: var(--mobile-navbar-height);
	}

	.home-link {
		font-size: 30px;
	}

	.icon-bar {
		margin: 4px;
		height: 8px;
		width: 50px;
	}

	.navbar-link {
		font-size: 32px;
	}

	.navbar-menu {
		top: var(--mobile-navbar-height);
	}
}

/* Mobile exceptions end. */