*,
*::before,
*::after {
	box-sizing: border-box;
}

:root {
	--color-light: hsl(220, 80%, 90%);
	--color-dark: hsl(220, 80%, 10%);
	--color-primary: hsl(220, 80%, 50%);
	--color-secondary: hsl(220, 80%, 30%);
	--color-tertiary: hsl(220, 80%, 70%);
	--color-background: hsl(220, 30%, 10%);
	--color-header: hsl(220, 50%, 30%);
	--color-header-hover: hsl(220, 50%, 20%);
	--color-error: hsl(0, 80%, 70%);

	scroll-behavior: smooth;
}

html,
body {
	height: 100%;
	margin: 0;
	font-family: "Lato", sans-serif;
	color: var(--color-light);
	background-color: var(--color-background);
	display: flex;
	flex-direction: column;
}

header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	background-color: var(--color-header);
}

header .logo {
	height: 100%;
	width: 100%;
}

.pages {
	height: 3rem;
}

.pages ul {
	display: flex;
	flex-wrap: nowrap;
	list-style: none;
	padding: 0;
	margin: 0;
	height: 100%;
}

.pages .icon {
	display: flex;
	gap: 1ch;
}

.pages a {
	display: flex;
	align-items: center;
	text-align: center;
	text-decoration: none;
	color: var(--color-light);
	transition: 250ms ease-in-out;
	height: 100%;
	padding-inline: 1rem;
}

.pages a:hover,
.pages a:focus {
	background-color: var(--color-header-hover);
}

.pages:first-child li:first-child a {
	padding-left: 0;
}

.pages [data-page="profile"] {
	display: none;
}

.pages [data-page="profile"] img {
	object-fit: cover;
	height: 100%;
	padding-block: 0.5ch;
	vertical-align: middle;
	border-radius: 50%;
}

main {
	display: flex;
	flex-direction: column;
	gap: 3rem;
}

#header {
	color: var(--color-light);
	text-align: center;
	font-size: 4vmin;
}

#header p {
	width: clamp(20rem, 60%, 50rem);
	margin: auto;
}


.grid {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 1rem;
	width: fit-content;
	margin: auto;
}

.grid section {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	border-radius: 1ch;
	gap: 2rem;
	padding: 2rem;
	font-size: 1.5rem;
	background-color: var(--color-header);
	color: var(--color-light);
	text-align: center;
}

.grid h2 {
	margin-block: 0;
}

.grid ul {
	text-align: left;
	margin: auto;
	width: fit-content;
}

.grid button {
	width: calc(100% - 2ch);
	border: none;
	border-radius: 1ch;
	margin-block: 0;
	padding: 1rem;
	font-size: inherit;
	background-color: var(--color-primary);
	color: var(--color-light);
	cursor: pointer;
}

.grid button:hover {
	background-color: var(--color-secondary);
}

footer {
	padding: 1ch;
	font-size: 0.8em;
	padding: 1rem;
	background: var(--color-dark);
	color: var(--color-light);
	text-align: center;
	margin-top: auto;
}

footer p {
	margin: 0;
}

footer a {
	color: inherit;
}

@media screen and (max-width: 455px) {
	header {
		justify-content: center;
	}
}

@media screen and (max-width: 900px) {
	.grid {
		grid-template-columns: 1fr;
		padding-bottom: 3rem;
	}
}
