:root {
	--background : #3e3f4b;
	--text : #e8e8f0; 
}

body, html { scroll-behavior: smooth; }

body {
	position: relative;
	max-width: 80rem;
	margin: 0 auto;

	font-family: Helvetica, Arial, sans-serif;
	color: var(--text);
	background-color: var(--background);

	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 16px;
	font-family: Arial, sans-serif;
	padding: 10vh 0;
}

h1 {
	font-weight: bold;
	font-size: 80px;
	line-height: 1;
	text-transform: uppercase;
	margin-bottom: 10px;
}

h2, a { 
	font-size: 1.3rem; 
	line-height: 1.25;
	letter-spacing: 1px;
	display: block;
	color: #ccc;
}

p { font-size: 1rem; }

/* LEFT // NAME & NAV COLUMN */
.left {
  	grid-column: 2 / span 3;
	position: sticky;
	top: 10vh;
	min-height: 600px;

	display: flex;
	flex-direction: column;

	height: calc(100vh - 20vh);
}

.nav { margin-top: auto; }

.nav a { 
	margin-top: 20px; 
	font-weight: bold; 	
	text-decoration: none;
	transition: color 300ms;
}

.nav a:hover {
	cursor: pointer;
	color: #fff;
	transition: color 300ms;
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 60px;
  height: 60px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .5);
  color: white;

  display: flex;
  align-items: center;
  justify-content: center;

  line-height: 1.3;
  text-align: center;

  pointer-events: none; /* IMPORTANT */
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 300ms ease;
  z-index: 10;
}

.custom-cursor p { margin-top: 10px; }

/* RIGHT // CONTENT COLUMN */
.main {	
	grid-column: span 7; 
	background-color: #3e3f4b; 
	z-index: 2;
}

.viewer {
	border-radius: 10px;
	background-color: rgba(0, 0, 0, 0.1);
	aspect-ratio: 16 / 9;
	margin-bottom: 20px;
	scroll-margin-top: 10vh;
	position: relative;
}

.viewer img {
	width: 98%;
	height: 98%;
	margin: 1%;
	object-fit: contain;
}

.viewer img:hover {
	cursor: none;
}

p:first-of-type { color: #fff; display: block; margin-bottom: 10px; }
p:last-of-type{ color: #ccc; }

.info { display: flex; margin-bottom: calc(10vh + 10px); } /*  default 40 */
.info > div:last-of-type { margin-left: auto; }

.usedInProject {
	border-radius: 5px;
	background-color: rgba(0, 0, 0, 0.1);
	display: inline-block;
	aspect-ratio: 1;
	width: 40px;
	margin-left: 10px;
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
	position: relative;
	filter: saturate(.25) opacity(.5);
}

.html-icon { background-image: url(../images/html-icon.png); }
.css-icon { background-image: url(../images/css-icon.webp); }
.js-icon { background-image: url(../images/js-icon.png); background-size: 200%; }

.usedInProject::after {
	content: attr(data-label);
	position: absolute;
	top: 110%;
	left: 50%;
	transform: translateX(-50%);

	background: black;
	color: white;
	font-size: 12px;
	padding: 3px 6px;
	white-space: nowrap;

	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.usedInProject:hover { filter: saturate(1); }
.usedInProject:hover::after { opacity: 1; }

/* FOOTER */

.info:last-of-type { margin-bottom: 100px; }

footer {
	margin-top: 50px;
	max-width: 500px;
}

footer p { line-height: 1.4; }

@media only screen and (min-width: 768px) and (max-width: 991px) { h1 { font-size: 60px; } }
@media only screen and (max-width: 767px) { 
	.left, .main { grid-column: 2 / span 10; }

	h1 {
		font-size: 120px;
	}

	.viewer {
		aspect-ratio: 2 / 3;
	}

	img[src*="./images/desktoprisk.png"] {
		content: url("../images/mobilerisk.png");
	}

	img[src*="./images/desktopburst.png"] {
		content: url("../images/mobileburst.png");
	}

	img[src*="./images/desktopkeys.png"] {
		content: url("../images/mobilekeys.png");
	}

}
