
*, ::before, ::after {
	box-sizing: border-box;
	padding: 0;
	margin: 0;
}

/* SELECTION */

::selection {
	color: white;
	background: blue;
}

::-moz-selection {
	color: white;
	background: blue;
}

.no-select {
	user-select: none;
	-moz-user-select: none;
	-khtml-user-select: none;
	-webkit-user-select: none;
	-o-user-select: none;
}


/* GENERAL */

html, body {
	height:100%;
	padding:0;
	margin:0 auto;
	font-family:"Helvetica", sans-serif;
}

html {
	scroll-behavior: smooth;
}

body {
	color: #242424;
	background-color: #f9f9f9;
}

.container {
	display: grid;
	grid-gap: 28px;
	height: 100%;
	grid-template-columns: 1fr 700px 1fr;
	grid-template-rows: 60px auto 1fr;
	grid-template-areas:
		"header header header"
		"... main ..."
		"... footer ..."
}


/* GRID AREA DEFINED */

.main {
	grid-area: main;
	font-size: 24px;

	display: grid;
	grid-gap: 28px;
}

.back-to-top {
	grid-area: back-to-top;
}

.footer {
	grid-area: footer;
}


/* HEADER */

.header {
	display: grid;
	align-items: center;
	justify-content: center;

	grid-area: header;
	text-align: center;
	border-bottom: 1px solid #ddd;
	padding-top: 3px;
	letter-spacing: 2px;
	font-size: 14px;
}


/* MAIN */

.main_text a:active {
	color: blue;
}

.content_image {
	margin-bottom: 50px;
	box-shadow: 0 10px 30px -10px rgba(0,0,0,.3);
}

.content_image > :last-child {
	margin-bottom: 0;
}


/* BUTTONS */

a {
	color: black;
	text-decoration: none;
	background-color:transparent
}

.nav_buttons ul {
	display: grid;
	grid-gap: 10px;
	padding: 0;
	margin: 0;
	list-style: none;
	grid-template-columns: repeat(4, 1fr);
}

.nav_buttons a {
	display: block;
	color: #242424;
	background-color: #e0e0e0;
	padding: 1rem;
	font-size: 24px;
	text-decoration: none;
	text-align: center;
	font-weight: bold;
}

.nav_buttons a:hover {
	color:white;
	background-color: blue;
}

.nav_buttons a:active {
	color: white;
	background-color: black;
}

.tag_buttons ul {
	display: inline-block;
	padding: 0;
	margin: 0;
	list-style: none;
	grid-template-columns: repeat(1, 1fr);
}

.tag_buttons li {
	display: flex;
	float: left;
}

.tag_buttons li + li {
	margin-left: 10px;
}

.tag_buttons a {
	color: gray;
	background-color: #eaeaea;
	padding: 4px 10px 4px 10px;
	font-size: 14px;
	text-decoration: none;
	text-align: center;
}

.category_buttons ul {
	display: grid;
	grid-gap: 10px;
	padding: 0;
	margin: 0;
	margin-top: 30px;
	list-style: none;
	grid-template-columns: repeat(4, 1fr);
}

.category_buttons a {
	display: block;
	color: #242424;
	padding: 1rem;
	font-size: 16px;
	text-decoration: none;
	text-align: center;
	font-weight: bold;
}

.category_buttons a:hover {
	color:white;
	background-color: slateblue;
}

.category_buttons a:active {
	color: white;
	background-color: black;
}

.category_button_active {
	border-bottom: 4px solid slateblue;
	padding-bottom: 12px !important;
}

.category_button_active:active {
	border-bottom-color: black;
}

/* FIX: FOCUS SELECTION
        https://www.kizu.ru/keyboard-only-focus
a:-moz-focusring,
.category_buttons a:-moz-focusring,
.nav_buttons a:-moz-focusring,
.tag_buttons a:-moz-focusring {
	outline: none;
	margin: -2px;
	border: 2px dashed blue;
}
*/

.projects_link {
	display: block;
	text-decoration: none;
}

.projects_link:hover > div {
	color: #1c55ff;
	margin-left: 10px;
	transition: all 0.1s ease-in;
}

.projects_link:active > div {
	color: #1740bb;
	padding: -10px;
	transition: all 0.1s ease-in;
}


/* TEXT */

h1 {
	font-size: 38px;
}

h2 {
	color: #444444;
	font-size: 28px;
}

h3 {
	color: #cccccc;
	font-size: 18px;
}

.title_small {
	font-weight: bold;
	font-size: 24px;
}

.subtitle_small {
	color: #bbbbbb;
	font-weight: normal;
	margin-top: -16px;
}

.date {
	color: #cccccc;
}

.description {
	height: 200px;
	background-color: #eeeeee;
}

.description_text {
	color: dimgrey;
	line-height: 23px;
	padding-top: 20px;
	padding-left: 20px;
}

.header a {
	text-decoration: none;
}

.header a:hover {
	text-decoration: underline;
}

/* SELECTED WORKS */

.selected_works_title {
	font-size: 24px;
	text-align:center;
}

.selected_works_subtitle {
	color: #b4b4b4;
	font-size: 14px;
	text-transform: uppercase;
	text-align: center;
}


/* WORKS */

.content_work {
	display: grid;
	max-height: 300px;
	padding: 0;
	margin: 0;
	text-align: center;
	margin-bottom: 40px;
	position: relative;
	overflow: hidden;
}

.content > :last-child {
	margin-bottom: 0;
}

.content_work_info {
	font-size: 20px;
	position: absolute;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	transition: all .1s linear;
	text-decoration: none;
	opacity: 0;
	color: black;
	background: rgba(255, 255, 255, .90);
}

.content_work_info:hover {
	opacity: 1;
}

.content_work_info:active {
	opacity: 0;
}

.content_work:active {
	transform: scale(.97);
}

.content_work_info strong {
	position: relative;
	top: 50%;
}

.content_work_image {
	max-height: 300px;
}

.content_work_image > img {
	width: 100%;
}


/* Product block */



.product {
	display: grid;
	grid-gap: 16px;

	background-color: #eee;
	padding: 30px;
}
.product_header {
	display: flex;
	gap: 15px;
	align-items: center;
}
.product_header img {
	margin: 0;
	width: 32px;
	height: 32px;
}
.product_header p {
	display: flex;
}
.product_title a {
	color: black;
	font-size: 18px;
}
.product_title a:hover {
	text-decoration:underline;
}
.product_description {
	color: #777;
	font-size: 14px;
	line-height: 22px;
}
.tags {
	display: flex;
	gap: 10px;
	flex-flow: wrap;
}
.tags p {
	background-color: #ddd;
	border-radius: 4px;
	padding: 4px 10px;
	font-size: 13px;
	color: #444;
	margin: 0;
	width: fit-content;
}


/* FOOTER */

.copyright {
	display: grid;
	color: #ccc;
	font-size: 12px;
	align-items: center;
	grid-auto-rows: 85px;
}


/* RESPONSIVE */

/* 1 */

@media only screen and (max-width:759px) {
	.container {
		grid-template-columns: 1fr 600px 1fr;
	}

	.main {
		font-size: 22px;
	}

	.category_buttons a {
		font-size: 14px;
	}

	.content_work, .content_work_info {
		width: 600px;

	}
}

/* 2 */

@media only screen and (max-width:659px) {
	.container {
		grid-template-columns: 1fr 500px 1fr;
	}

	.main {
		font-size: 20px;
	}

	.nav_buttons a {
		font-size: 20px;
	}

	.category_buttons a {
		font-size: 14px;
	}

	.selected_works_title {
		font-size: 22px;
	}

	.selected_works_subtitle {
		font-size: 12px;
	}

	.content_work, .content_work_info {
		width: 500px;
		font-size: 18px;
	}
}

/* 3 */

@media only screen and (max-width:559px) {
	.container {
		grid-template-columns: 1fr 400px 1fr;
	}

	.nav_buttons a {
		font-size: 16px;
	}

	.selected_works_title {
		font-size: 20px;
	}

	.content_work, .content_work_info {
		width: 400px;
		font-size: 16px;
	}
}

/* 4 */

@media only screen and (max-width:459px) {
	.container {
		grid-template-columns: 1fr 300px 1fr;
	}

	.header p {
		padding-top: 4px;
		font-size: 12px;
	}

	.nav_buttons ul, .category_buttons ul {
		grid-template-columns: repeat(2, 1fr);
	}

	.category_buttons li {
		background-color: #e7e7e7;
	}

	.category_button_active {
		border-bottom-color: #cccccc;
	}

	.selected_works_subtitle {
		font-size: 11px;
	}

	.content_work, .content_work_info {
		width: 300px;
		font-size: 14px;
	}

	h2 {
		font-size: 24px;
		text-align: center;
		margin-bottom: 40px;
	}

	.title_small {
		font-size: 18px;
	}

	.subtitle_small {
		font-size: 14px;
	}
}

/* 5 */

@media only screen and (max-width:359px) {
	.container {
		grid-template-columns: 1fr 230px 1fr;
	}

	.header p {
		padding-top: 7px;
		font-size: 10px;
	}

	.nav_buttons ul, .category_buttons ul {
		grid-template-columns: repeat(1, 1fr);
	}

	.content_work, .content_work_info {
		width: 230px;
	}
}