@import 'fonts.css';

/* These are CSS variables. You can quickly change the style of the most 
important elements here without changing the CSS code below. */

:root {
	/* Background images */
	--background-image-1: url('../images/bg1.jpg');
	--background-image-2: url('../images/bg2.jpg');
	--background-image-3: url('../images/bg3.jpg');
	--background-image-4: url('../images/bg4.jpg');

	/* 1 for randomized background images, 0 to show default image */
	--random-background: 1;

	/* Set desired background image here 
	(--background-image-1, --background-image-2, --background-image-3 or --background-image-4) */
	--default-background: var(--background-image-1);

	/* Text colors */
	--header-text-color: #fff;
	--box-text-color: #fff;
	--box-blur: blur(20px);
	--border-radius: 5px;

	--links-border-radius: 100%;
	--links-text-color: #fff;
	--links-size: 80px;
	--links-font-size: 1.8em;

	/* STYLES */
	--box-background: rgba(0,0,0, 10%);
	--links-background: rgba(255,255,255, 10%);

	--progress-bar-background: rgba(255,255,255, 10%);
	--progress-bar-gradient-top: rgba(255, 255, 255, 0.3);
	--progress-bar-gradient-bottom: rgba(0,0,0, 10%);

	--progress-bar-border-radius: 20px;
	--progress-bar-padding: 10px;

	--soft-box-shadow-large: 0px 0px 30px rgba(0,0,0, 10%);
	--soft-text-shadow-large: 0px 0px 30px rgba(0,0,0, 40%);
	--soft-text-shadow-small: 0px 2px 5px rgba(0,0,0, 20%);

	--main-padding: 20px;

	/* Width of the middle area */
	--container-width: 600px;
}

* {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	word-wrap: break-word;
	-webkit-appearance: none;
	padding: 0px; 
	margin: 0px;
} 

body, html {
	height: 100%;
}

body {
	/* The image used */
	background-image: var(--default-background);

	/* Center and scale the image correctly */
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;

	/* Background image uses full height */
	width: 100%;
	height: 100%;

	/* Fonts */
	font-family: Arial, Helvetica, sans-serif;
	font-size: 10pt;
	font-weight: 400;

	/* Layout */
	display: grid;

	/* 1fr = 100% of the (remaining) available space left and right */
	grid-template-columns: 1fr var(--container-width) 1fr;

	/* A period signifies an empty cell. 
	Repeating the name of an element causes the content to span those cells. */
	grid-template-areas: ". header ."
						 "text text text"
						 ". links .";

	justify-content: center;
	align-content: center;
}

/* STANDARDS
Headlines, normal links, text fields and formatting
*/

a {
	color: var(--box-text-color);
	opacity: 80%;
	text-decoration: none;
}

a:hover {
	opacity: 100%;
}

input, textarea, button, select {
	border-radius: var(--border-radius);
	color: var(--box-text-color);
}

input::placeholder,
textarea::placeholder {
	color: rgba(255,255,255, 50%);
}

p:last-child { margin-bottom: auto; }
		   p { margin-bottom: 15px; line-height: 23px; }

/* Layout CSS starts here */
.inner-container {
	width: var(--container-width);
	padding: var(--main-padding);
	margin: 0 auto;
}

header {
	grid-area: header;
	font-family: Elsie;
	font-weight: 400;
	font-size: 3em;
	text-shadow: var(--soft-text-shadow-large);
	color: var(--header-text-color);
}

header i {
	margin-right: 10px;
}

#text {
	grid-area: text;
	-webkit-backdrop-filter: var(--box-blur);
	backdrop-filter: var(--box-blur);
	background: var(--box-background);
	color: var(--box-text-color);
	text-shadow: var(--soft-text-shadow-small);
	border-radius: var(--border-radius);
}

.footer {
	margin-top: var(--main-padding);
}

#links {
	grid-area: links;
}

#links .inner-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, var(--links-size));
	grid-auto-rows: var(--links-size);
	grid-gap: 10px;
	justify-content: center;
}

#links a {
	display: flex;
	vertical-align: center;
	justify-content: center;
	box-shadow: var(--soft-box-shadow-large);
	background: var(--links-background);
	-webkit-backdrop-filter: var(--box-blur);
	backdrop-filter: var(--box-blur);
	border-radius: var(--links-border-radius);
	align-items: center;
	color: var(--links-text-color);
	text-shadow: var(--soft-text-shadow-small);
	font-size: var(--links-font-size);
}

#links a > i {
	transition: transform .2s;
}

#links a:hover > i {
	transform: scale(1.5);
}

/* Bar style */
#progress .bar {
	background: var(--progress-bar-background);
	border-radius: var(--progress-bar-border-radius);
	display: block;
	margin-bottom: 3px;
	text-shadow: var(--soft-text-shadow-small);
}

#progress .bar span {
	background: var(--progress-bar-gradient-bottom);
	background: linear-gradient(0deg, 
		var(--progress-bar-gradient-bottom) 0%, 
		var(--progress-bar-gradient-top) 100%
	);
	border-radius: var(--progress-bar-border-radius);
	padding: var(--progress-bar-padding);
	display: inline-block;
	overflow-wrap: normal;
}

/* Value style */
#progress [data]::before {
	content: attr(data);
	margin-right: 10px;
	font-weight: bold;
}


/* Mobile adjustments */

@media only screen and (max-width: 768px) {
	body {
		grid-template-columns: 100%;
		grid-template-areas: "header"
							 "text"
							 "links";
	}

	header {
		font-size: 2.3em;
		text-align: center;
	}

	#links .inner-container {
		display: grid;
		grid-template-columns: repeat(auto-fit, 40px);
		grid-auto-rows: 40px;
		grid-gap: 10px;
		justify-content: center;
	}

	#links a {
		font-size: 1.3em;
	}
	
}