@import "/assets/stylesheets/common.css";
@import "/assets/stylesheets/prose.css";

:root {
	--drop-clr: color-mix(in srgb, var(--plt-accent) 30%, var(--plt-ink) 30%);
}

body > *:not(#longbug) {
	z-index: 0;
}

body {
	color: var(--plt-ink);
	height: 100vh;
	display: flex;
	justify-content: center;
}
@media screen and (max-width: 48rem) {
	body {
		height: unset;
		min-height: 100vh;
	}
}

#root a, #root a:visited {
	color: var(--plt-ink);
}

main {
	border-radius: 0.35rem;
	border: solid 1px var(--drop-clr);
	box-shadow: 0 0 0.5rem 0.05rem var(--drop-clr), inset 0 0 0.6rem 0.15rem #ffffff55;
	background: var(--plt-background);
}

#root-wrap {
	/* width: 56.5rem; */
	width: 65ch;
	display: flex;
	flex-direction: column;
	min-height: 0;
	position: relative;
	margin: 0 2rem 0 7.25rem;

	& #splash {
		position: absolute;
		top: 4rem;
		left: 1.1rem;
		mask-image: linear-gradient(to bottom, black 10%, transparent 290%);
		color: color-mix(in srgb, var(--plt-accent) 60%, black);
	}
}
@media screen and (max-width: 64rem) {
	#root-wrap {
		margin-right: 1rem;
		& #splash {
			margin-right: 1.4rem;
		}
	}
}
@media screen and (max-width: 56rem) {
	#root-wrap {
		& #splash {
			right: 0;
			/* right: 3.2rem; */
			top: 2.5rem;
			left: unset;
		}
	}
}
@media screen and (max-width: 48rem) {
	#root-wrap {
		margin-left: 1rem;
	}
}
@media screen and (max-width: 40rem) {
	#root-wrap #splash {
		font-size: var(--text-sm);
		top: 2.3rem;
		right: 0;
	}
}

#splash {
	text-shadow: 0 0 3px black;
}
@media (prefers-color-scheme: light) {
	#splash {
		text-shadow: 0 0 3px var(--clr-bone);
	}
}

#root {
	display: flex;
	flex-direction: column;
	gap: .5rem;
	margin: 0 1rem 0 1rem;
	padding-bottom: 1.5rem;
	flex-grow: 1;
	min-height: 0;
}
@media screen and (max-width: 40rem) {
	#root {
		/* margin: 1rem 0.25rem; */
		margin: 0 0.25rem 1rem 0.25rem;
		flex-direction: column;
	}
}

header {
	width: 100%;

	& a {
		margin: 1rem 1rem 1.2rem auto;
		display: flex;
		align-items: center;
		justify-content: flex-end;
	}

	& a, & a:visited {
		text-decoration: none;
		color: var(--clr-bone);
	}
}
#bugname {
	font-size: 6rem;
	font-weight: 500;
	transform: scaleY(0.5);
	margin: -0.5em 0;
	mix-blend-mode: overlay;
	opacity: 0.65;
	mask-image: linear-gradient(to bottom, black, transparent 110%);
	color: color-mix(in srgb, var(--clr-bone) 40%, var(--plt-accent));
}
@media screen and (max-width: 56rem) {
	header a {
		margin-bottom: 1.6em;
	}
	#bugname {
		font-size: var(--text-7xl);
	}
}
@media screen and (max-width: 48rem) {
	header {
		margin-botton: 1rem;
	}
}
@media screen and (max-width: 40rem) {
	header a {
		margin-bottom: 1.8rem;
	}
	#bugname {
		font-size: var(--text-6xl);
	}
}
@media (prefers-color-scheme: light) {
	#bugname {
		color: color-mix(in srgb, var(--clr-bone) 00%, var(--plt-accent));
		text-shadow: 0 0 4px var(--clr-bone);
	}
}

secthead- {
	display: block;
	line-height: 1;
	font-size: var(--text-3xl);
	font-weight: bold;
	border-top: color-mix(in srgb, var(--clr-bone) 30%, var(--plt-accent)) solid 1px;
	color: var(--clr-bone);

	--top-clr: color-mix(in srgb, var(--plt-accent) 30%, var(--clr-bone));
	--bottom-clr: color-mix(in srgb, var(--plt-accent) 70%, var(--plt-background));
	background: linear-gradient(to bottom, var(--plt-accent), var(--bottom-clr));
	position: relative;
	z-index: 0;

	&::after, &::before {
		content: '';
		position: absolute;
		width: 100%;
		z-index: -1;
	}
	&::after {
		bottom: 0;
		box-shadow: 0 0 0.15rem 0.05rem var(--bottom-clr);
	}
	/* &::before { */
		/* box-shadow: 0 0 0.9rem 0.1rem var(--top-clr); */
	/* } */

	& div {
		margin-left: 0.1em;
	}
}
@media screen and (max-width: 48rem) {
	secthead- {
		font-size: var(--text-2xl);
	}
}

sectmain- {
	display: block;
	flex-grow: 1;
	min-height: 0;
	--start-clr: color-mix(in srgb, var(--plt-accent) 20%, var(--plt-background));
	--end-clr: color-mix(in srgb, var(--plt-accent) 8%, var(--plt-background));
	background: linear-gradient(295deg, var(--start-clr) 0%, var(--end-clr));
	overflow: auto;
}

nav {
	margin: 0 0.2rem;
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	justify-content: end;

	& a {
		padding: 0.1rem 0.4rem;
		border-radius: 0.3rem;
		--bottom-clr: color-mix(in srgb, var(--plt-accent) 70%, var(--plt-background));
		background: linear-gradient(to bottom, var(--plt-accent), var(--bottom-clr));
		border: solid 1px color-mix(in srgb, var(--plt-accent), var(--clr-bone));
		color: var(--clr-bone) !important;
		text-decoration-color: color-mix(in srgb, var(--clr-bone), transparent);
		box-shadow: 0 0 0.25rem 0.05rem var(--drop-clr);
		transition: text-decoration 0.15s;

		&:hover {
			text-decoration-color: color-mix(in srgb, var(--clr-bone) 82%, transparent);
			/* box-shadow: inset 0 0 3px 1px color-mix(in srgb, var(--plt-accent), var(--clr-bone) 40%), */
							/* 0 0 0.25rem 0.05rem var(--drop-clr); */
			transition: text-decoration 0.15s;
		}
	}
}

main {
	display: flex;
	flex-direction: column;
	min-height: 0;
	flex-grow: 1;
	overflow: auto;

	& sectmain- {
		padding: 0.7rem;
	}
}

.smol {
	font-size: 0.6em;
}

#longbug {
	position: fixed;
	display: flex;
	align-items: center;
	flex-direction: column;
	height: 100%;
	justify-content: center;
	overflow: hidden;
	left: 1.5rem;
	--bug-clr: color-mix(in srgb, var(--clr-bone), var(--clr-dark) 10%, var(--plt-accent) 45%);
	--leg-clr: color-mix(in srgb, var(--bug-clr) 85%, var(--clr-dark));

	& .buglegs {
		display: flex;
		width: 100%;
		padding: 0 0.1rem;
		
		& div {
			width: 0.4rem;
			margin: 0 auto;
			background: var(--leg-clr);
		}

		&.fake {
			flex-grow: 1;
		}

		&.fake div {
			background: color-mix(in srgb, var(--bug-clr), var(--plt-background));
			mix-blend-mode: overlay;
		}

		&.bugpart {
			height: 4rem;
		}
	}

	& .fatlegs {
		height: 1.25rem;
		display: flex;
		width: 100%;
		padding: 0 0.1rem;

		& div {
			width: 0.8rem;
			margin: 0 auto;
			background: var(--leg-clr)
		}
	}

	& .bugbody {
		height: 4rem;
		width: 5.3rem;
		background: var(--bug-clr);
	}
}
@media screen and (max-width: 48rem) {
	#longbug {
		left: 1.1rem;
	}
}

.halfsplit {
	display: flex;

	& > section {
		display: flex;
		flex-direction: column;
		flex: 1;
	}
}
@media screen and (max-width: 56rem) {
	.halfsplit {
		flex-direction: column;
	}
}
@media screen and (min-width: 56rem) {
	.halfsplit {
		& > section:first-child > secthead- {
			border-right: solid 1px color-mix(in srgb, var(--clr-bone), var(--plt-accent) 40%);
		}
		& > section:first-child > sectmain- {
			border-right: solid 1px color-mix(in srgb, var(--plt-ink), var(--plt-background) 60%);
		}
	}
}

#bg {
	--end-clr: color-mix(in srgb, var(--plt-background), var(--plt-accent) 37%);
	--start-clr: var(--plt-background);
	--angle: 210deg;
}
@media (prefers-color-scheme: light) {
	#bg {
		--end-clr: color-mix(in srgb, var(--plt-background), var(--plt-accent) 52%);
		--start-clr: color-mix(in srgb, var(--clr-dark) 5%, var(--plt-background));
		--angle: 155deg;
	}
}
#bg {
	background: linear-gradient(var(--angle), var(--start-clr), var(--end-clr));
	position: fixed;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
}
