* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	display: flex;
	justify-content: center;
	background-color: oklch(14.1% 0.005 285.823);
	align-items: center;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
		Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

main {
	max-width: 1400px;
	padding: 2rem;
}

main > div {
	border: 2px solid oklch(21% 0.006 285.885);
	padding: 1rem;
	margin-bottom: 1lh;
	border-radius: 10px;
	display: grid;
	grid-template-columns: 1fr auto;
}

h1 {
	line-height: 95%;
	font-size: 2.7rem;
	text-transform: uppercase;
	color: #f3f3f3;
}

h1 > a {
	text-decoration: none;
	color: #f39e00;
}

main > div > div {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	border-radius: calc(1rem - 10px);
	color: #f3f3f3;
	padding: 1rem;
	border: 2px solid oklch(21% 0.006 285.885);
}

main > div > div > p {
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.1rem;
}

.total {
	line-height: 1;
	font-weight: 700;
	font-size: 6rem;
}

main ul {
	display: grid;
	grid-template-columns: repeat(3, auto);
	grid-template-rows: auto;
	gap: 1.5rem;
	/* align-items: start; */
}

ul > li {
	list-style: none;
	width: 300px;
	height: auto;
	padding-bottom: 1rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	border: 2px solid oklch(21% 0.006 285.885);
	border-radius: 0.5rem;
	overflow: hidden;
}

ul > li > img {
	width: 100%;
	filter: grayscale(100%);
}

.tech,
ul > li > h2 {
	padding-inline: 1rem;
}

.tech {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	color: #bdbdbd;
	font-weight: bold;
	font-size: 1.2rem;
	text-transform: uppercase;
}

.tech span.html {
	color: rgb(106, 190, 205);
}

.tech span.css {
	color: rgb(75, 101, 194);
}

.tech span.js {
	color: rgb(207, 99, 144);
}

.tech span.tailwindcss {
	color: #0ea5e9;
}

.tech span.api {
	color: #f39e00;
}

.tech span.preact {
	color: #673ab8;
}

ul > li > h2 {
	padding-right: 1.6rem;
	font-size: 1.5rem;
	color: #bdbdbd;
}

.description {
	padding-inline: 1rem;
	color: #8b92a8;
	font-size: 0.9rem;
	line-height: 1.4;
	margin-bottom: 0.5rem;
}

.links {
	margin-top: auto;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding-inline: 1rem;
}

.link:first-child {
	margin-right: auto;
}

.link span {
	display: inline-block;
	background-color: oklch(67.332% 0.15493 240.263);
	padding: 3px 10px;
	font-size: 14px;
	text-transform: uppercase;
	font-weight: 700;
	border-radius: calc(1rem + 1rem);
	color: oklch(100% 0.00011 271.152);
}
ul li a {
	text-decoration: none;
}

/* Tab Screen */
@media (min-width: 768px) and (max-width: 1023px) {
	main {
		padding: 1.5rem;
	}

	main ul {
		grid-template-columns: repeat(2, auto);
		gap: 1rem;
	}

	ul > li {
		width: 100%;
		max-width: 350px;
	}

	h1 {
		font-size: 2.4rem;
	}

	.total {
		font-size: 5rem;
	}

	ul > li > h2 {
		font-size: 1.3rem;
	}

	.tech {
		font-size: 1rem;
	}
}

/* Mobile screen */
@media (max-width: 500px) {
	main {
		padding: 1rem;
	}

	main ul {
		grid-template-columns: repeat(1, auto);
		justify-items: center;
	}

	main > div {
		gap: 2rem;
		width: 100%;
	}

	ul > li {
		width: 100%;
	}

	h1 {
		line-height: 95%;
		font-size: 1.6rem;
		color: #f3f3f3;
	}

	main > div > div {
		padding: 0.4rem;
	}

	main > div > div > p {
		font-size: 0.5rem;
	}

	.total {
		font-size: 4.5rem;
	}

	ul > li > h2 {
		font-size: 2rem;
	}

	main ul li a {
		font-size: 1.4rem;
	}

	.tech {
		font-size: 1.4rem;
	}
}

.image-container {
	position: relative;
	overflow: hidden;
	border-radius: 8px 8px 0 0;
	background: #2d3548;
	min-height: 200px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.image-placeholder {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, #2d3548 25%, #3a4458 50%, #2d3548 75%);
	background-size: 200% 100%;
	animation: loading 1.5s infinite;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.5s ease;
	z-index: 2;
	backdrop-filter: blur(20px);
}

.placeholder-content {
	color: #8b92a8;
	font-size: 14px;
	font-weight: 500;
}

@keyframes loading {
	0% {
		background-position: 200% 0;
	}

	100% {
		background-position: -200% 0;
	}
}

.image-container img {
	width: 100%;
	height: auto;
	display: block;
	transition: filter 0.5s ease, opacity 0.5s ease;
	opacity: 0;
	filter: blur(20px);
	z-index: 1;
}

.image-container img.loaded {
	opacity: 1;
	filter: grayscale(100%);
}

.image-container a:hover img.loaded {
	opacity: 1;
	filter: grayscale(0%);
	transition: grayscale ease-in-out 200;
}

.image-container img.error {
	opacity: 0.5;
	filter: blur(0);
	background: #2d3548;
}
