/* Home: the project folders.
   One file per section; each screen size has its block below. */

/* Laptop and desktop */
@media screen and (min-width: 1025px) {
	.projects {
		width: 80%;
		padding: 0 5rem;
		display: flex;
		flex-direction: column;
		justify-content: start;
		align-items: start;
		gap: 1rem;

		h2 {
			width: 100%;
			font-size: 6rem;
			font-weight: 400;
			text-align: center;
			position: relative;
		}
		span {
			width: 100%;
			text-align: center;
			font-family: "Poppins", sans-serif;
			font-size: 0.8rem;
			letter-spacing: 1px;
			color: #888;
			position: relative;
			display: inline-block;

			&::before {
				content: "";
				position: absolute;
				width: 30%;
				height: 0.5px;
				background: #bbb;
				top: 50%;
				transform: translateY(-50%);
				right: 65%;
			}
			&::after {
				content: "";
				position: absolute;
				width: 30%;
				height: 0.5px;
				background: #bbb;
				top: 50%;
				transform: translateY(-50%);
				left: 65%;
			}
		}
	}

	#main-projects-grid {
		width: 100%;
		display: grid;
		grid-template-columns: repeat(4, 24%);
		grid-auto-rows: auto;
		gap: 1.3%;
		grid-auto-flow: row;
		justify-content: center;
		align-items: center;
	}

	.folder {
		display: block;
		position: relative;
		width: 100%;
		aspect-ratio: 1/1;
		transition: transform 0.35s ease;
	}

	.folder-back,
	.folder-front {
		position: absolute;
		inset: 0;
		background: linear-gradient(
			145deg,
			rgba(62, 62, 62, 0.5) 3%,
			rgba(14, 14, 14, 0.8) 35%,
			rgba(0, 0, 0, 0.5)
		);
		backdrop-filter: blur(10px);
		-webkit-backdrop-filter: blur(25px);
		border: 1px solid rgba(255, 255, 255, 0.14);
		box-shadow:
			inset 0 1px 0 rgba(255, 255, 255, 0.2),
			0 18px 35px rgba(0, 0, 0, 0.2);
		cursor: pointer;

		&::before {
			content: "";
			position: absolute;
			inset: 0;
			background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='4'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)'/%3E%3C/svg%3E");
			opacity: 0.9;
			mix-blend-mode: soft-light;
			pointer-events: none;
		}
		&::after {
			content: "";
			position: absolute;
			inset: 0;
			background: linear-gradient(
				120deg,
				rgba(255, 255, 255, 0.18),
				transparent 25%,
				transparent 70%,
				rgba(255, 255, 255, 0.04)
			);
			opacity: 0.9;
			pointer-events: none;
		}
	}

	.folder-back {
		z-index: 1;
		-webkit-mask: url(../../SVGs/glass-folder/folder-back.svg) center / 100% 100% no-repeat;
		mask: url(../../SVGs/glass-folder/folder-back.svg) center / 100% 100% no-repeat;
	}

	.folder-image {
		position: absolute;
		z-index: 2;
		width: 65%;
		height: 65%;
		left: 50%;
		transform: translateX(-50%);
		top: 19%;
		object-fit: cover;
		border-radius: 4%;
		box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
		transition: transform 0.45s ease;
	}

	.folder-front {
		z-index: 3;
		-webkit-mask: url(../../SVGs/glass-folder/folder-front.svg) center / 100% 100% no-repeat;
		mask: url(../../SVGs/glass-folder/folder-front.svg) center / 100% 100% no-repeat;
		transition:
			transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
			opacity 0.4s ease;
	}

	.main-folder-title {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 30%;
		padding: 0 0.25rem;
		opacity: 0.8;
		text-align: center;
		color: white;
		font-size: clamp(1.5rem, 2.5vw, 2.2rem);
		line-height: 1.1;
		font-weight: 700;
		text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
		pointer-events: none;
		transition: all 0.35s ease;
	}

	.sub-folder-title {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 30.5%;
		padding: 0 0.25rem;
		opacity: 0.8;
		text-align: center;
		color: white;
		font-size: clamp(0.75rem, 1.4vw, 1.25rem);
		line-height: 1.1;
		font-weight: 500;
		text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
		pointer-events: none;
		transition: all 0.35s ease;
	}

	.folder:hover {
		transform: translateY(-1rem);
		.folder-image {
			transform: translateX(-50%) translateY(-1.2rem);
		}
		.folder-front {
			transform: translateY(1.2rem) scaleY(0.8);
		}
		.main-folder-title {
			opacity: 1;
		}
		.sub-folder-title {
			opacity: 1;
		}
	}
}

/* Tablet */
@media screen and (min-width: 768px) and (max-width: 1024px) {
	.projects {
		width: 80%;
		display: flex;
		flex-direction: column;
		justify-content: start;
		align-items: start;
		gap: 1rem;

		h2 {
			width: 100%;
			font-size: 6rem;
			font-weight: 400;
			text-align: center;
			position: relative;
		}
		span {
			width: 100%;
			text-align: center;
			font-family: "Poppins", sans-serif;
			font-size: 0.8rem;
			letter-spacing: 1px;
			color: #888;
			position: relative;
			display: inline-block;

			&::before {
				content: "";
				position: absolute;
				width: 30%;
				height: 0.5px;
				background: #bbb;
				top: 50%;
				transform: translateY(-50%);
				right: 65%;
			}
			&::after {
				content: "";
				position: absolute;
				width: 30%;
				height: 0.5px;
				background: #bbb;
				top: 50%;
				transform: translateY(-50%);
				left: 65%;
			}
		}
	}

	#main-projects-grid {
		display: grid;
		width: 100%;
		grid-template-columns: repeat(4, 24%);
		grid-auto-rows: auto;
		gap: 1.3%;
		grid-auto-flow: row;
	}

	.folder {
		display: block;
		position: relative;
		width: 100%;
		aspect-ratio: 1/1;
		transition: transform 0.35s ease;
	}

	.folder-back,
	.folder-front {
		position: absolute;
		inset: 0;
		background: linear-gradient(
			145deg,
			rgba(62, 62, 62, 0.5) 3%,
			rgba(14, 14, 14, 0.8) 35%,
			rgba(0, 0, 0, 0.5)
		);
		backdrop-filter: blur(10px);
		-webkit-backdrop-filter: blur(25px);
		border: 1px solid rgba(255, 255, 255, 0.14);
		box-shadow:
			inset 0 1px 0 rgba(255, 255, 255, 0.2),
			0 18px 35px rgba(0, 0, 0, 0.2);
		cursor: pointer;

		&::before {
			content: "";
			position: absolute;
			inset: 0;
			background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='4'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)'/%3E%3C/svg%3E");
			opacity: 0.9;
			mix-blend-mode: soft-light;
			pointer-events: none;
		}
		&::after {
			content: "";
			position: absolute;
			inset: 0;
			background: linear-gradient(
				120deg,
				rgba(255, 255, 255, 0.18),
				transparent 25%,
				transparent 70%,
				rgba(255, 255, 255, 0.04)
			);
			opacity: 0.9;
			pointer-events: none;
		}
	}

	.folder-back {
		z-index: 1;
		-webkit-mask: url(../../SVGs/glass-folder/folder-back.svg) center / 100% 100% no-repeat;
		mask: url(../../SVGs/glass-folder/folder-back.svg) center / 100% 100% no-repeat;
	}

	.folder-image {
		position: absolute;
		z-index: 2;
		width: 65%;
		height: 65%;
		left: 50%;
		transform: translateX(-50%);
		top: 19%;
		object-fit: cover;
		border-radius: 4%;
		box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
		transition: transform 0.45s ease;
	}

	.folder-front {
		z-index: 3;
		-webkit-mask: url(../../SVGs/glass-folder/folder-front.svg) center / 100% 100% no-repeat;
		mask: url(../../SVGs/glass-folder/folder-front.svg) center / 100% 100% no-repeat;
		transition:
			transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
			opacity 0.4s ease;
	}

	.main-folder-title {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 30%;
		padding: 0 0.25rem;
		opacity: 0.8;
		text-align: center;
		color: white;
		font-size: clamp(1.5rem, 2.5vw, 2.2rem);
		line-height: 1.1;
		font-weight: 300;
		text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
		pointer-events: none;
		transition: all 0.35s ease;
	}

	.sub-folder-title {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 30.5%;
		padding: 0 0.25rem;
		opacity: 0.8;
		text-align: center;
		color: white;
		font-size: clamp(0.75rem, 1.4vw, 1.25rem);
		line-height: 1.1;
		font-weight: 300;
		text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
		pointer-events: none;
		transition: all 0.35s ease;
	}

	.folder:hover {
		transform: translateY(-1rem);
		.folder-image {
			transform: translateX(-50%) translateY(-1.2rem);
		}
		.folder-front {
			transform: translateY(1.2rem) scaleY(0.8);
		}
		.main-folder-title {
			opacity: 1;
		}
		.sub-folder-title {
			opacity: 1;
		}
	}
}

/* Mobile */
@media screen and (min-width: 320px) and (max-width: 767px) {
	.projects {
		width: 85%;
		display: flex;
		flex-direction: column;
		justify-content: start;
		align-items: start;
		gap: 1rem;

		h2 {
			width: 100%;
			font-size: 5rem;
			font-weight: 300;
			text-align: center;
			position: relative;
		}
		span {
			width: 100%;
			text-align: center;
			font-family: "Poppins", sans-serif;
			font-size: 0.5rem;
			letter-spacing: 1px;
			color: #888;
			position: relative;
			display: inline-block;

			&::before {
				content: "";
				position: absolute;
				width: 30%;
				height: 0.5px;
				background: #bbb;
				top: 50%;
				transform: translateY(-50%);
				right: 65%;
			}
			&::after {
				content: "";
				position: absolute;
				width: 30%;
				height: 0.5px;
				background: #bbb;
				top: 50%;
				transform: translateY(-50%);
				left: 65%;
			}
		}
	}

	#main-projects-grid {
		display: grid;
		width: 100%;
		grid-template-columns: repeat(2, 49%);
		grid-auto-rows: auto;
		gap: 2%;
		grid-auto-flow: row;
	}

	.folder {
		display: block;
		position: relative;
		width: 100%;
		aspect-ratio: 1/1;
		transition: transform 0.35s ease;
	}

	.folder-back,
	.folder-front {
		position: absolute;
		inset: 0;
		background: linear-gradient(
			145deg,
			rgba(62, 62, 62, 0.5) 3%,
			rgba(14, 14, 14, 0.8) 35%,
			rgba(0, 0, 0, 0.5)
		);
		backdrop-filter: blur(10px);
		-webkit-backdrop-filter: blur(25px);
		border: 1px solid rgba(255, 255, 255, 0.14);
		box-shadow:
			inset 0 1px 0 rgba(255, 255, 255, 0.2),
			0 18px 35px rgba(0, 0, 0, 0.2);
		cursor: pointer;

		&::before {
			content: "";
			position: absolute;
			inset: 0;
			background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='4'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)'/%3E%3C/svg%3E");
			opacity: 0.9;
			mix-blend-mode: soft-light;
			pointer-events: none;
		}
		&::after {
			content: "";
			position: absolute;
			inset: 0;
			background: linear-gradient(
				120deg,
				rgba(255, 255, 255, 0.18),
				transparent 25%,
				transparent 70%,
				rgba(255, 255, 255, 0.04)
			);
			opacity: 0.9;
			pointer-events: none;
		}
	}

	.folder-back {
		z-index: 1;
		-webkit-mask: url(../../SVGs/glass-folder/folder-back.svg) center / 100% 100% no-repeat;
		mask: url(../../SVGs/glass-folder/folder-back.svg) center / 100% 100% no-repeat;
	}

	.folder-image {
		position: absolute;
		z-index: 2;
		width: 65%;
		height: 65%;
		left: 50%;
		transform: translateX(-50%);
		top: 19%;
		object-fit: cover;
		border-radius: 4%;
		box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
		transition: transform 0.45s ease;
	}

	.folder-front {
		z-index: 3;
		-webkit-mask: url(../../SVGs/glass-folder/folder-front.svg) center / 100% 100% no-repeat;
		mask: url(../../SVGs/glass-folder/folder-front.svg) center / 100% 100% no-repeat;
		transition:
			transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
			opacity 0.4s ease;
	}

	.main-folder-title {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 30%;
		padding: 0 0.25rem;
		opacity: 0.8;
		text-align: center;
		color: white;
		font-size: clamp(1.5rem, 2.5vw, 2.2rem);
		line-height: 1.1;
		font-weight: 300;
		text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
		pointer-events: none;
		transition: all 0.35s ease;
	}

	.sub-folder-title {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 30.5%;
		padding: 0 0.25rem;
		opacity: 0.8;
		text-align: center;
		color: white;
		font-size: clamp(0.75rem, 1.4vw, 1.25rem);
		line-height: 1.1;
		font-weight: 300;
		text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
		pointer-events: none;
		transition: all 0.35s ease;
	}

	.folder:hover {
		transform: translateY(-1rem);
		.folder-image {
			transform: translateX(-50%) translateY(-1.2rem);
		}
		.folder-front {
			transform: translateY(1.2rem) scaleY(0.8);
		}
		.main-folder-title {
			opacity: 1;
		}
		.sub-folder-title {
			opacity: 1;
		}
	}
}
