 :root {
	--card: 0 1px 4px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.3);
	--main-clr: hsl(289, 85%, 34%);
	--border: 1.6px solid #ccc;
	--body-bgc: hsl(0, 0%, 98%);
	--header-bgc: white;
	--article-bgc: white;
	--quote-bgc: whitesmoke;
	--kbd-bgc: whitesmoke;
	--tbl-border: hsl(0, 1%, 90%);
}

@media (prefers-color-scheme: dark) {
	:root {
		--card: 0 1px 4px rgba(200, 200, 200, 0.2), 0 1px 2px rgba(200, 200, 200, 0.3);
		--txt-clr: rgb(248, 248, 248);
		--border: 1.6px solid rgb(162, 162, 162);
		--body-bgc: rgb(20, 20, 20);
		--header-bgc: rgb(28, 28, 28);
		--article-bgc: rgb(32, 32, 32);
		--quote-bgc: rgb(54, 54, 54);
		--kbd-bgc: rgb(54, 54, 54);
		--bulb-icon: url("/light.svg");
		--dialog-bgc: rgb(60, 60, 60);
		--tbl-border: hsl(0, 0%, 28%);
	}
}

* {
	box-sizing: border-box;
}

*::-webkit-scrollbar {
	background-color: rgba(0, 0, 0, 0.01);
	width: 2px;
	height: 3px;
}

html {
	height: 100%;
	scroll-behavior: smooth;
}

body {
	font-family: BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-size-adjust: 100%;
	margin: 0;
	height: 100%;
	background-color: var(--body-bgc);
	color: var(--txt-clr);
	text-rendering: optimizeSpeed;
}

a {
	text-decoration: none;
	color: hsl(211, 100%, 50%);
}

button {
	box-shadow: var(--card);
	padding: 0.8em;
	background-color: var(--main-clr);
	color: white;
	border-radius: 8px;
	border: none;
	font-weight: bold;

	& a {
		color: white;
	}
}

.center {
	text-align: center;
}
 main {
	display: flex;
	justify-content: end;

	& article {
		width: 62%;
		background-color: var(--article-bgc);
		min-height: 100vh;
		font-size: 1.1rem;
	}

	& aside {
		width: 20%;
	}
}

.author-info {
	display: flex;
	align-items: center;
	column-gap: 0.5em;
	padding-inline: 1em;

	& img {
		border-radius: 50%;
		width: 3.5em;
		height: 3.5em;
	}

	& .author-name {
		font-size: 1.2rem;
		font-weight: bold;
	}

	& .published-at {
		font-size: small;
		color: grey;
	}
}

article {
	& header {
		margin-inline: 1em;

		& h1 {
			text-align: center;
			text-wrap: balance;
			font-size: 2.2rem;
		}
	}

	& .article-hero {
		margin-block: 0.8em;
		width: 100%;
	}

	& section {
		margin-inline: 1.5em;
		line-height: 1.3;
	}
}
 main {
	& h1 {
		font-size: 1.6rem;
	}

	& h3 {
		font-size: 1.4rem;
	}

	& p,
	& ol,
	& ul {
		font-size: 1.2rem;
		line-height: 1.5;
	}

	& img {
		max-width: 100%;
	}

	& kbd,
	& code {
		font-weight: bold;
		font-size: 0.9rem;
		background-color: var(--kbd-bgc);
		box-shadow: 1px 1px 1px 1px rgb(0 0 0 /0.2);
		padding: 2px 4px;
	}
}

blockquote {
	background-color: var(--quote-bgc);
	border-left: 10px solid #ccc;
	padding: 0.4em 1rem;
}

table {
	border-collapse: collapse;
	width: 100%;
	margin-top: 1em;

	& td,
	& th {
		border: 1px solid var(--tbl-border);
		text-align: left;
		padding: 8px;
	}

	& tr:nth-child(even) {
		background-color: var(--tbl-border);
	}
}

video {
	height: 370px;
	box-shadow: var(--card);
	border-radius: 3px;
}
