/* Root styles */
:root {
	--primary-fg: #F2F4F3;
	--primary-bg: #30343F;
	--accent-fg: #E85D75;
	--accent-bg: #464C5D;
	
	--section-padding: 2em;
	--border: 1px solid var(--primary-fg);
	--line-height: 22px;

	font-family: "Noto Sans Mono", monospace;
	font-optical-sizing: auto;
	font-size: clamp(14px, 2vw, 16px);
	box-sizing: border-box;
	line-height: var(--line-height);

	background-color: var(--primary-bg);
	color: var(--primary-fg);
}

/* Element styles */
h1 {
	text-align: center;
	font-size: 1.4rem;
	font-weight: bold;
}

h2 {
	text-align: left;
	font-size: 1.2rem;
	font-weight: bold;
	margin-bottom: 1rem;
}

h3 {
	text-align: left;
	font-weight: bold;
	margin-bottom: 1rem;
	text-decoration: underline;
}

p {
	margin-top: 1em;
	margin-bottom: 1em;

	&:last-child {
		margin-bottom: 0;
	}
}

a {
	color: var(--accent-fg);
	font-weight: bold;
	padding: 0 .6ch;
	margin: 0 -.6ch;
	border-radius: .2em;
	white-space: nowrap;

	&:hover {
		background-color: var(--accent-bg);
	}
}

strong {
	font-weight: bold;
}

/* Layout styles */
body {
	max-width: 75ch;
	border-left: var(--border);
	border-right: var(--border);
	margin: auto;

	& > header {
		padding: var(--section-padding);

		.tagline {
			text-align: center;
			margin-bottom: 1em;
		}
	}

	nav {
		ul {
			display: flex;
			flex-direction: row;
			gap: 2em;
			justify-content: center;

			li {
				white-space: nowrap;
			}
		}
	}

	section {
		padding: var(--section-padding);
		border-top: var(--border);

		.tabs {
			display: flex;
			flex-direction: row;
			justify-content: space-around;

			.tab {
				input {
					display: none;

					&:checked + label {
						width: 22ch;
						color: var(--accent-fg);
						font-weight: bold;
						text-decoration: underline;
					}
				}

				label {
					cursor: pointer;
					color: var(--accent-fg);
					font-weight: bold;
				}
			}
		}

		.tab-content {
			border: var(--border);
			border-style: dashed;
			padding: 1em;
			margin-top: 1em;
			transition: all 1s;

			& > div {
				display: none;

				&.active {
					display: block;
				}
			}

			ul {
				margin: 1em 0 1em 2ch;

				li {
					list-style-type: "- ";
					list-style-position: outside;
				}
			}
		}
	}

	footer {
		padding: var(--section-padding);
		border-top: var(--border);

		#copyright {
			text-align: center;
		}
	}
}

@media only screen and (max-width: 600px) {
	body {
		border: none;
	}
}