@import "reset.css";

/* === defaults === */


:root {
	--br-sm: 0.25rem;
	--text-color-light: rgb(195, 195, 195);
	--text-color-dark: rgb(34, 34, 34);
}

html,
body {
	font-size: 16px;
	background:	var(--text-color-light);
	color: var(--text-color-dark);
	font-family: ui-monospace, monospace;
	letter-spacing: -0.5px;
	scroll-behavior: smooth;
	text-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
}

h1,
h2,
h3 {
	line-height: 1.1;
}
.hidden {
	display: none!important;
}

p {
	margin-bottom: 1rem;
	line-height: 1.5;
}

a[href] {
	color: white;
	text-decoration-color: white;
	text-decoration-thickness: 2px;

	&:hover {
		color: var(--text-color-dark);
		text-decoration-color: var(--text-color-light);
	}
}

/* === utilities === */

.grid-full {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	row-gap: 0;
}

.flex-row {
	display: flex;
	flex-flow: row wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}

.wrapper {
	width: min(100% - 2rem, 90ch);
	margin-inline: auto;
	position: relative;
}

.up {
	display: block;
	position: fixed;
	inset: auto 0.5rem 0.5rem auto;
	a[href] {
		color: black;
		text-decoration: none;
		border: 2px solid white;
		aspect-ratio: 1;
		display: block;
		padding-inline: 0.5rem;
		padding-block: 0.1rem;
		border-radius: 0.25rem;
		box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
		font-size: 1.5rem;
		&:hover {
			background-color: black;
			color: white;
			border: 2px solid transparent;
		}
	}
}

/* === header === */

header:has(.site-title) {
	margin-inline: auto;

	nav {
		display: flex;
		flex-flow: row nowrap;
		align-items: center;
		justify-content: flex-start;
		padding-block: 1rem 0.25rem;
		border-bottom: 2px solid black;
		padding-block: 0 0.5rem;
		margin-block: 0.5rem;

		span {
			padding-inline: 0.5rem;
		}


		a[href] {
			display: inline-block;
			font-size: calc(1rem - 2px);
			text-decoration: none;

			&:hover {
				color: var(--text-color-dark);
				background-color: var(--text-color-light);
			}
		}
	}

	.site-title {
		font-weight: 900;
		margin: 0;
		padding: 0;
	}
}


/* === page === */


.page-title h2 {
	font-style: italic;
	margin-bottom: 2rem;
	line-height: 1;
	font-size: clamp(2rem, 5dvw, 3rem);
	text-align: left;
	padding: 0;
}

.about {
	min-height: 35dvh;
	display: grid;
	place-content: center;
	text-align: justify;
}

.intro {
	display: grid;
	margin-block: 0 6rem;
	font-weight: bold;
	overflow: hidden;
	padding-block: 0 2rem;
	box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
	outline: 2px solid whitesmoke;
	text-align: justify;

	h3 {
		margin-block: 0 2rem;
		background-color: whitesmoke;
		color: var(--text-color-dark);
		padding: 1rem 2rem;
		width: fit-content;
		box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
	}

	p:first-of-type {
		font-size: calc(1rem + 1dvw);
		line-height: 1;
	}

	div {
		padding-inline: 4rem;
	}
}


.page-content {
	padding: 1rem;
	width: min(100%, 90ch);
	margin-block: clamp(2rem, 6dvw, 8rem);
}

#about p {
	font-size: calc(1rem + 2px);
}

/* === contact === */

.contact-form {
	background: var(--bg-dots);
	padding: 2rem;
	color: var(--text-color-light);

	h3 {
		font-size: clamp(2rem, 4dvw, 3rem);
	}

	div:has(label) {
		span {
			display: block;
			margin-block: 2rem 1rem;
		}
	}

	input,
	textarea {
		width: 100%;
		padding: 1rem;
		border: 0;
	}

	input:not([type="submit"]),
	textarea {
		background-color: rgba(255, 255, 255, 0.33);
	}

	input[type="submit"] {
		background-color: var(--text-color-light);
		font-weight: bold;
		margin-top: 1rem;
	}
}

/* === portfolio === */

.featured {
	min-height: 25dvh;
	margin-block: 2rem clamp(4rem, 9dvw, 8rem);

	.grid-full {
		gap: 1rem;

		.item {
			overflow: hidden;

		}

		article:has([class]) {
			background-size: cover;
			background-position: center;
			position: relative;
			display: flex;
			flex-flow: column;
			place-items: center;
			place-content: center;
			aspect-ratio: 4/3;

			&:hover {
				cursor: pointer;
			}

			span.txt-overlay {
				display: grid;
				position: absolute;
				inset: auto;
				background-color: var(--text-color-light);
				backdrop-filter: blur(0px) grayscale(100%);
				mix-blend-mode: color;
				height: 100%;
				width: 100%;
				transition:
					backdrop-filter 1s ease-out,
					mix-blend-mode 1s ease-out;

				span {
					align-self: center;
					justify-self: center;
					opacity: 0;
					padding: 0.25rem 0.5rem;
				}
			}

			&:hover span.txt-overlay {
				color: white;
				background-color: transparent;
				backdrop-filter: grayscale(0%) blur(4px);
				mix-blend-mode: normal;
				transition:
					backdrop-filter 1s ease-in,
					mix-blend-mode 1s ease-in;

				span {
					opacity: 1;
					background-color: white;
					color: var(--text-color-dark);
					font-weight: bold;
					box-shadow: 0 2px 0 black;

				}
			}

			.embed {
				--aspect-ratio: 16/9;
				background-color: black;
				position: relative;
				width: 100%;
				display: none;

				&:has(iframe)::before,
				&:has(video)::before {
					content: "";
					display: block;
					padding-bottom: calc(100% / (var(--aspect-ratio)));
				}

				&:has(figure) {
					padding: 1rem;
				}

				.flex-row:has(figure, picture) {
					flex-wrap: nowrap;
				}

				figure {
					width: min(100%, 10ch);
					flex-grow: 1;
					margin-inline: auto;
					display: block;
					aspect-ratio: 9/16;
					position: relative;
					background-size: 100%;
					overflow: hidden;

					audio {
						position: absolute;
						inset: auto 0 0 0;
						width: 100%;
						background-color: var(--black);
						padding: 1rem;
					}
				}

				iframe,
				video {
					position: absolute;
					inset: 0;
					width: 100%;
					height: 100%;
					margin-inline: auto;
					margin-block: -0.5rem;
				}
			}

			.embed.special {
				color: white;
				background-color: transparent !important;

				&:has(iframe)::before,
				&:has(video)::before {
					content: "";
					display: block;
					padding-bottom: calc(120% / (var(--aspect-ratio)));
				}

				iframe {
					position: relative;
					inset: 0;
					width: 90%;
					height: 90%;
					margin-block: 0 !important;
				}
			}

			&.active {
				background-color: black;
				flex: 0 0 100%;
			}

			&.active img {
				display: none;
			}

			&.active .embed {
				display: block;
			}

			img {
				aspect-ratio: 4 / 3;
				object-fit: cover;
				visibility: hidden;

				&:hover {
					filter: grayscale(0%);
					transition: 250ms filter ease-in;
				}
			}
		}


	}
}

.short_ws {
	background-image: url(img/wafflestomper.jpg);
}

.short_cargo {
	background-image: url(img/cargo.webp);
}

.music-video {
	background-image: url(img/music-videos.jpg);
}

.ad_product {
	background-image: url(img/product.jpg);
}

.short_untitled {
	background-image: url(img/untitled-short.webp);
}

.audio_podcast {
	background-image: url(img/ciswt.jpg);
}

.audio_repair {
	background-image: url(img/audio-repair.jpg);
}

.graphic-design {
	background-image: url(img/design-graphic.webp);
}

figure {
	background-size: cover !important;
	background-position: center;
}

/* === footer === */

footer.site-footer {
	min-height: 10dvh;
	dosplay: grid;
	place-content: center;
	margin-block: 6rem 0;
	text-align: center;
	padding-inline: 2rem;

	p {
		margin-block: 2rem;
	}

	a[href] {
		color: whitesmoke;
	}
}
