@import "_font.scss";

$borderRadius: 8px;
$textColor: #0f0f0f;
$linkColor: #717171;
$lightGray: #e6e6e6;
$highlight: #c0d9f0;

* {
	box-sizing: border-box;
	font-family: "Open Sans", sans-serif;
	font-size: 18px;
	line-height: 2;
	color: $textColor;

	@media screen and (max-width: 890px) {
		font-size: 16px;
	}
}

body {
	margin: 0;
	padding: 0 0 160px 0;
}

h1, h2 {
	font-size: 32px;
	margin: 0 0 40px 0;
	font-weight: normal;

	a {
		font-size: 32px;

		@media screen and (max-width: 890px) {
			font-size: 26px;
		}
	}

	@media screen and (max-width: 890px) {
		font-size: 26px;
		margin: 0 0 20px 0;
	}
}

h2 {
	margin: 40px 0;
	font-size: 26px;

	@media screen and (max-width: 890px) {
		font-size: 20px;
		margin: 20px 0;
	}
}

a {
	text-decoration: none;
	transition: all 0.3s;
	color: $linkColor;

	&:hover {
		color: $textColor;
	}
}

p, ul {
	margin: 20px 0;
}

img {
	display: block;
	max-width: 80%;
	margin: 40px auto;
}

pre {
	max-width: 80%;
	margin: 40px auto;
	padding: 20px;
	border-width: 1px 1px 1px 2px;
	border-style: solid;
	border-color: $highlight;
	border-radius: $borderRadius;
	overflow-x: auto;
	font-size: 14px;
}

code {
	font-family: 'Courier New', Courier, monospace;
}

hr {
	margin: 40px 0;
	height: 2px;
	background: $lightGray;
	border-width: 0;
}

blockquote {
	margin: 40px 0 40px 40px;
	padding: 10px 20px;
	border-width: 0 0 0 2px;
	border-style: solid;
	border-color: $highlight;
}

nav {
	padding: 80px 40px;
	background: $highlight;

	.content {
		display: flex;
		justify-content: space-between;
		align-items: center;
		max-width: 1000px;
		margin: 0 auto;

		ul {
			display: flex;
			gap: 20px;
			margin: 0;
			padding: 0;
			overflow: hidden;
			transition: all .5s;

			li {
				list-style: none;
				margin: 0;
				padding: 0;

				a {
					color: $textColor;

					svg {
						fill: $textColor;
						transition: all 0.3s;
					}

					&:hover {
						color: $linkColor;

						svg {
							fill: $linkColor;
						}
					}
				}
			}

			@media screen and (max-width: 890px) {
				gap: 10px;
			}

			@media screen and (max-width: 580px) {
				flex-direction: column;
				max-height: 0;
			}
		}

		.open {
			max-height: 220px;
		}

		.burger {
			display: none;
			width: 42px;
			height: 42px;
			cursor: pointer;

			@media screen and (max-width: 580px) {
				display: inline;
			}
		}

		.contact {
			display: inline-block;
			padding: 8px 16px;
			border-radius: $borderRadius;
			border: 3px solid $textColor;
			color: $textColor;
			transition: all 0.3s;
			font-weight: 600;

			&:hover {
				background: $textColor;
				color: #fff;
			}

			@media screen and (max-width: 890px) {
				padding: 4px 8px;
			}
		}

		@media screen and (max-width: 890px) {
			padding: 40px;
			align-items: flex-start;
		}

		@media screen and (max-width: 420px) {
			padding: 20px 0;
		}
	}

	@media screen and (max-width: 890px) {
		padding: 0;
	}

	@media screen and (max-width: 420px) {
		padding: 0 20px;
	}
}

section {
	max-width: 1080px;
	margin: 80px auto 0 auto;
	padding: 0 40px;

	@media screen and (max-width: 890px) {
		margin: 40px auto 0 auto;
	}

	@media screen and (max-width: 420px) {
		padding: 0 20px;
	}
}

footer {
	max-width: 1080px;
	margin: 80px auto 0 auto;
	padding: 0 40px;

	.content {
		max-width: 1000px;
		margin: 0 auto;
		border-style: solid;
		border-width: 2px 0 0 0;
		border-color: $lightGray;
		padding: 40px 0;
	}

	@media screen and (max-width: 420px) {
		padding: 0 20px;
	}
}

.intro {
	background: $highlight;
	max-width: 100%;
	padding: 0 40px 80px 40px;
	margin: 0;

	article {
		max-width: 1000px;
		margin: 0 auto;
		display: flex;
		gap: 40px;
		justify-content: flex-start;
		align-items: center;

		h1 {
			margin: 0;
		}

		img {
			max-width: 196px;
			max-height: 196px;
			aspect-ratio: 1;
			border-radius: $borderRadius;

			@media screen and (max-width: 890px) {
				max-width: 142px;
				max-height: 142px;
			}

			@media screen and (max-width: 600px) {
				margin: 0;
			}
		}

		@media screen and (max-width: 600px) {
			flex-direction: column;
			align-items: flex-start;
		}
	}

	@media screen and (max-width: 600px) {
		padding: 0 40px 40px 40px;
	}

	@media screen and (max-width: 420px) {
		padding: 0 20px 40px 20px;
	}
}

.blog-entry {
	margin-bottom: 0;

	p {
		margin: 0;
		color: $linkColor;
	}

	h2 {
		margin: 0;
	}

	a {
		color: $textColor;
		font-size: 26px;

		&:hover {
			color: $linkColor;
		}

		@media screen and (max-width: 890px) {
			font-size: 20px;
		}
	}
}
