:root {
	--text-padding: 1rem;
	--nav-height: 4rem;
	--footer-bg: rgb(200, 200, 200);
	--hyperlink-color: blue;
	--page-bg: rgb(250, 245, 240);
	--title-bg: #555555;
}

* {
	box-sizing: border-box;
	font-family: Arial, Helvetica, sans-serif;
}

	html { scroll-behavior: smooth; }

a {
	color: black;
	text-decoration: none;
}
.hyperlink:hover {
	text-decoration: underline;
	color: var(--hyperlink-color);
}

.chapter-positioner {
	position: relative;
	top: calc((var(--nav-height) + 1rem) * -1);
}

html {
	min-height: 100vh;
}
body {
	margin: 0;
	min-height: 100vh;
}
.page-wrp {
	padding-top: 1rem;
}
.page:first-child {
	min-height: calc(90vh - 2rem);
	border-top-left-radius: 0.3rem;
	border-top-right-radius: 0.3rem;
}
.page {
	background-color: var(--page-bg);
	padding-bottom: 5rem;
	z-index: 70;
	margin-bottom: 1rem;
	/*box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);*/
	box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.15), 0 6px 20px 0 rgba(0, 0, 0, 0.1);
}

.title-page {
	display: none
}

@keyframes fade-visible {
	from {opacity: 0;}
	to {opacity: 1;}
}

.header-wrp {
	width: 100%;
	position: sticky;
	top: 0;
	background-color: white;
	z-index: 99;
	
	.header {
		width: 100%;
		display: grid;
		grid-template-columns: 1fr 4fr 1fr;
		align-items: center;
		gap: 0.8rem;
		padding-left: 0.5rem;
		height: var(--nav-height);

		.logo {
			display: inline-block;
			width: 100%;
			min-width: 0;
			max-height: var(--nav-height);
		}
		
		.logo-text {
			display: inline-block;
			width: 100%;
			min-width: 0;
			opacity: 1;
			animation-name: fade-visible;
			animation-duration: 0.6s;
			padding-left: 1rem;
			padding-right: 1rem;
			height: var(--nav-height);
		}
		.menu-icon {
			display: inline-block;
			width: 100%;
			height: 100%;
			min-width: 0;
			border-radius: 0.5rem;
			/*outline: 1px solid #eeeeee;*/
			padding: 1rem;
			height: var(--nav-height);
		}
		.menu-icon:hover {
			cursor: pointer;
		}
		
	}
}

.nav {
	display: none;
	z-index: 99;
	position: relative;
}
.nav-drop {
	.nav {
		display: block;
		width: 100%;
		background-color: #fff2e6;
		font-size: 1.2rem;
		color: rgb(70, 70, 70);

		a {
			display: inline-block;
			width: 100%;
			border-bottom: 1px solid black;
			padding: 1rem;
		}
		a:hover {
			cursor: pointer;
		}
	}
}

@keyframes fade-invisible {
	from {opacity: 1;}
	to {opacity: 0;}
}
.mod {
	.header .logo-text {
		opacity: 0;
		animation-name: fade-invisible;
		animation-duration: 0.6s;
	}
}

.layout-container {
	display: grid;
	grid-template-columns: repeat(12, [col-start] 1fr);
	gap: 20px;
	padding-top: 1rem;
}
.layout-container > * {
	padding: 0.8rem 1.2rem;
	grid-column: col-start / span 12;
}

.text-section {
	grid-column: col-start / span 12;
}

.section-profile {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;

  .image-section-profile {
    background-image: url("../media/images/profile_fhd.jpg");
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    height: 300px;
    width: 100%;
  }

  .text-section-profile {
    /* 1. Make the container a flex column */
    display: flex;
    flex-direction: column;
    
    /* 2. Center this entire block within its grid cell */
    justify-content: center; 
    align-items: center; /* Centers the text inside the block if you want text-align center too */
    
    /* 3. Make the block only as wide as its content */
    width: fit-content; 
    
    /* 4. Center the block itself in the parent grid cell */
    margin: 0 auto; 
    
    padding-top: 1rem;
    padding-bottom: 2rem;
    /*text-align: center; /* Optional: centers the text lines themselves */
  }
}

.image-section, .image-section-text {
	width: 100%;
	img {
		width: 100%;
	}
}


footer {
	position: relative;
	bottom: 0px;
	width: 100%;
	background-color: var(--footer-bg);
	min-height: 10vh;
	padding-bottom: 1rem;

	p {
		padding-top: 1rem;
		text-align: center;
	}

	.footer-section {
		height: 100%;
		display: flex;
		justify-content: space-evenly;
		align-items: center;

		a {
			display: block;
			img {
				width: 3rem;
			}
		}
		a:hover {
			filter: brightness(0.5);
		}
	}
}


/*-=-=-=-=-=-=-=-=-=-=-*/

/*QUERIES*/

@media screen and (min-width: 576px) {
	.page {
		margin-left: 1rem;
		margin-right: 1rem;


		/*width: 100%;
		padding: 0.3rem 0rem;
		z-index: 80;
		background-color: #555555;
		color: #dedede;
		h1 {
			margin-left: 3rem;
			font-size: 1em;
		} */
		.title-page {
			display: block;
			/*position: relative;*/
			width: 100%;
			padding: 0.3rem 0rem;
			border-top-left-radius: 0.3rem;
			border-top-right-radius: 0.3rem;
			z-index: 80;
			background-color: var(--title-bg);
			color: #dedede;
			/*box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.2), 0 3px 16px 0 rgba(0, 0, 0, 0.19);*/

			h1 {
				margin-left: 3rem;
			} 
		}
	}

	.header-wrp {
		display: grid;
		grid-template-columns: repeat(6, 1fr);
		padding-top: 0.3rem;

		.header {
			grid-template-columns: 1fr;
			padding: 1rem;
			

			.logo {
				display: block;
				max-height: calc(var(--nav-height) - 2rem);
				width: auto;
			}

			.logo-text, .menu-icon {
				display: none;
			}
		}
		.nav {
			display: flex;
			justify-content: space-between;
			height: 100%;
			width: 100%;
			font-size: 1.2rem;
			background-color: white;
			grid-column: 2 / span 6;
			gap: 0.3rem;

			a {
				color: #444444;
				height: 100%;
				flex-grow: 1;
				flex-shrink: 1;
				text-decoration: none;
				border: none;

				div {
					position: relative;
					top: 50%;
					transform: translate(0, -50%);
					text-align: center;
				}
			}
			a:hover {
				cursor: pointer;
				color: #000000;
				/*border-bottom: 1px solid #000;*/
			}
		}
	}

	.layout-container > * {
		grid-column: col-start  2 / span 10;
	}
}
@media (min-width: 768px) {
	.page {
		margin-left: 5%;
		width: 90%;
	}
	.header-wrp {
		padding-left: 5%;
		padding-right: 5%;
	}
	* {
		font-size: 1.2rem;
	}

	.section-profile {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 1rem;

		.image-section-profile {
			background-image: url("../media/images/profile_fhd.jpg");
			background-position: center;
			background-size:contain;
			background-repeat: no-repeat;
			height: 100%;
			width: 100%;

		}
		.text-section-profile {
			padding-top: 1rem;
			padding-bottom: 2rem;
		}
	}
}
@media (min-width: 1200px) {
	.header-wrp {
		.nav {
			grid-column: 2 / span 4;
		}
	}
	.page {
		margin-left: 13%;
		width: 74%;
	}
	.header-wrp {
		padding-left: 13%;
		padding-right: 13%;
	}
	.layout-container > * {
		padding: 0.8rem 1.2rem;
		grid-column: col-start 3 / span 8;
	}
	.text-section-image {
		grid-column: col-start 3 / span 8;
	}
	.image-section-text {
		grid-column: col-start 3 / span 8;

		img {
			position: relative;
			top: 0;
			transform: none;
			width: 100%;
		}
	}

	.section-profile {
		margin-top: 1rem;
		.image-section-profile {
			background-position: right;
		} 
	}
}
@media (min-width: 1700px) {
	.page {
		margin-left: 20%;
		width: 60%;
	}
	.header-wrp {
		padding-left: 20%;
		padding-right: 20%;
	}
	.layout-container > * {
		grid-column: 4 / span 6;
	}
}