/*
  1. Use a more-intuitive box-sizing model.
*/
*,
*::before,
*::after {
	box-sizing: border-box;
}
/*
  2. Remove default margin
*/
* {
	margin: 0;
}
/*
  3. Allow percentage-based heights in the application
*/
:where(html, body) {
	height: 100%;
}
/*
  Typographic tweaks!
  4. Add accessible line-height
  5. Improve text rendering
*/
:where(body) {
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
/*
  6. Improve media defaults
*/
:where(img, picture, video, canvas, svg) {
	display: block;
	max-width: 100%;
}
/*
  7. Remove built-in form typography styles
*/
:where(input, button, textarea, select) {
	font: inherit;
}
/*
  8. Avoid text overflows
*/
:where(p, h1, h2, h3, h4, h5, h6) {
	overflow-wrap: break-word;
}

:root {
	--text-color: light-dark(#2c2f31, #fff);
	--link-color: light-dark(#2c2f31, #fff);
	--background-color: light-dark(#fff, #2c2f31);
	--background-image: none;
	color-scheme: light dark;
}

* {
	box-sizing: border-box;
	line-height: calc(1em + 0.5rem);
}

:root {
	background-color: var(--background-color);
	color: var(--text-color);
	font-size: 0.875rem;
	line-height: 1.5;
	font-family: sans-serif;
}

:is(a, button) {
	color: var(--link-color);
	text-decoration: none;
	display: inline-block;
	line-height: 1.3;
	position: relative;

	&:after {
		background: var(--text-color);
		content: "";
		display: block;
		height: 2px;
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
	}

	&:hover {
		padding: 0 5px;
		margin: 0 -5px;
	}
}

main {
	overflow: hidden;
	background-position: center;
	background-size: cover;
	min-height: 100vh;
	background-image: var(--background-image);

	@media (width >= 768px) {
		display: flex;
		align-items: center;
		justify-content: center;
		flex-flow: column;
	}
}

.Text {
	position: relative;
	background-position: center;
	background-size: cover;
	padding: 2rem;

	width: min(100%, 30em);

	@media (width >= 1100px) {
		transform: rotate(2deg);
	}

	:is(a, button) {
		color: var(--text-color);

		&::after {
			background-color: var(--text-color);
		}
	}

	p:not(:last-child) {
		margin-bottom: 1.5rem;
	}
}

.Text-title {
	position: relative;
	margin: 0 0 1em;
	font-weight: normal;
	font-size: 1em;
}

.Links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 2em;
}

:is(a, button) {
	&::after {
		background-color: currentColor;
	}

	&:not(:hover) {
		&::after {
			display: none;
		}
	}
}

email-button {
	button {
		background: none;
		font: inherit;
		border: none;
		padding: 0;
		color: inherit;
		cursor: pointer;
	}

	button.copied {
		font-style: italic;
	}
}
