@import url(https://fonts.olejka.ru/Ubuntu.css); /* Default font */
@import url(https://fonts.olejka.ru/VK-Sans-Display.css); /* Russian h1-h5 on some pages */

:root {
	/*Constant variables*/
	--trsnsition: .3s;
	--dark: #0a0a0a;
	--light: #fefefe;

	
	--overlay-final: 200px;
}

html, body{
	width: 100%;
	height: 100%;
	margin: 0px;
	padding: 0px;
	overflow: hidden;
	user-select: none;
	background-color: var(--first-color);
	color: var(--second-color);
	/*font-family: 'Ubuntu', sans-serif;*/
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	font-size: 14pt;
	font-synthesis: style;
	box-sizing: border-box;
	scroll-behavior: smooth;
	transition: .25s;
}
body.onLoading { overflow: hidden }

body.light {
	--first-color: var(--light);
	--second-color: var(--dark);
}
body.dark {
	--first-color: var(--dark);
	--second-color: var(--light);
}

p { transition: .25s }
table {
	border-collapse: collapse;
	width: 75%;
}
tr { padding: 2px }
svg { transition: .25s }
h1, h2, h3 footer{ font-family: 'VK Sans Display' }
h1, h2, h3 {
	margin: 0;
	font-size: 50pt;
}


.overlay {
	overflow: hidden;
	position: absolute;
	width: 100%;
	height: 100%;
	background: var(--first-color);
	z-index: 1000;
}
@keyframes blink {
	0% {
		stroke-dashoffset: -650;
	}
	99% { /* Please don't kill me */
		stroke-linecap:unset;
	}
	100% {
		stroke-linecap:round;
		stroke-dashoffset: 0;
	}
}
@keyframes scale {
	from {
		left: 0%;
		width: 300%;
	}
	to {
		left: 50%;
		width: var(--overlay-final);/*170px*/
	}
}
.overlay .box {
	position: absolute;
	width: 300%;
	left: 0%;
	top: 50%;
	transform: translateX(-50%) translateY(-50%);
}
.overlay svg path {
	stroke-dasharray: 1600;
	stroke-dashoffset: -650;
	fill:none;
	stroke: var(--second-color);
	stroke-width:75;
	stroke-linecap:unset;
	stroke-linejoin:round;
	stroke-miterlimit:10;
}

.overlay.animate .box {
	animation: scale forwards .4s .6s ease-in;
}
.overlay.animate svg path {
	animation: blink forwards .5s ease-in;
}

@keyframes unscale {
	from {width: var(--overlay-final);}
	to {width: 30%;}
}
@keyframes hide {
	from {opacity: 1;}
	to {opacity: 0;}
}
.overlay.final { animation: hide forwards .35s ease-in }
.overlay.final .box {
	width: var(--overlay-final);
	left: 50%;
	animation: unscale forwards .35s ease-out;
}
@media screen and (max-width: 1200px){
	:root {
		--overlay-final: 18%;
	}
}

canvas {
	position: fixed;
	width: 100%;
	height: 100%;
	z-index: -1;
}

main {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}
body.onLoading main { opacity: 0 }

main h1 { margin: 10px 0 }
main .links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;

	max-width: 500px;
	gap: 12px;
}
main .links a {
	/*padding: 10px;*/
	border-radius: 50%;
	font-size: 16pt;
	width: 60px;
	height: 60px;
	text-decoration: none;
	display: flex;
	justify-content: center;
	align-items: center;
	color: var(--second-color);
	transition: .25s;
}
main .links a:active {
	background-color: var(--second-color);
	color: var(--first-color);
}

footer {
	color: var(--second-color);
	font-size: 14px;
	position: fixed;
	bottom: 0;
	z-index: 1000;
}

.btn {
	display: inline-block;
	padding: 0.3em 1em;
	padding: 0.3em 1em;
	text-decoration: none;
	color: var(--second-color);
	border-radius: 5px;
	transition: .25s;
}


@media (hover: hover) { /* For non-mobile devices */
	main .links a:hover {
		background-color: var(--second-color);
		color: var(--first-color);
	}

	.btn:hover {
		background-color: var(--second-color);
		color: var(--first-color);
	}
}

@media (hover: none) {    
	.btn:active {
		background-color: var(--second-color);
		color: var(--first-color);
	}
}

/* Stupid mobile adaptation */
@media screen and (max-width: 900px) {
    body { font-size: 12pt }
    h1, h2, h3 { font-size: 40pt }
	footer { font-size: 13px }
	main h1 { margin: 9px 0 }
	main .links {
		max-width: 400px;
		gap: 10px;
	}
	main .links a {
		font-size: 14pt;
		width: 50px;
		height: 50px;
	}
}
@media screen and (max-width: 500px) {
    body { font-size: 10pt }
    h1, h2, h3 { font-size: 30pt }
	footer { font-size: 12px }
	main h1 { margin: 8px 0 }
	main .links {
		max-width: 300px;
		gap: 8px;
	}
	main .links a {
		font-size: 12pt;
		width: 40px;
		height: 40px;
	}
}