:root {
	color-scheme: light dark;

	--color-static-white: white;
	--color-static-dark: #333;
	--color-static-accent: #ffdc34;
	--color-accent-secondary: #f79137;
	--color-bg-primary: white;
	--color-bg-secondary: #333;
	--color-bg-tertiary: #f0f0f0;
	--color-bg-code: #F9F9F9;
	--color-text-primary: #333;

	/* custom theme for Shiki syntax highlighting,
	   losely based on tomorrow night eighties,
	   but with more white instead of blues,
	   and with custom colors for light/dark theme */
	--astro-code-color-text: var(--color-text-secondary);
	--astro-code-color-background: var(--color-bg-code);
	--astro-code-token-constant: #825b4e;
	--astro-code-token-string: #67cdcc;
	--astro-code-token-comment: #999;
	--astro-code-token-keyword: #823a70;
	--astro-code-token-parameter: #e52f0b;
	--astro-code-token-function: #307422;
	--astro-code-token-string-expression: var(--color-accent-secondary);
	--astro-code-token-punctuation: var(--color-text-secondary);
	--astro-code-token-link: #6196cc;
}

:root.theme-dark {
	--color-static-accent: #ffdc34;
	--color-accent-secondary: #f08d49;
	--color-bg-primary: #2d2d2d;
	--color-bg-secondary: #333;
	--color-bg-tertiary: #555;
	--color-bg-code: #333;
	--color-text-primary: white;
	--color-static-white: white;

	--astro-code-token-constant: #f8c555;
	--astro-code-token-string: #67cdcc;
	--astro-code-token-keyword: #cc99cd;
	--astro-code-token-parameter: #e2777a;
	--astro-code-token-function: #7ec699;
}

body {
	margin: 0;
	font-family: Roboto, -apple-system, BlinkMacSystemFont, Segoe UI, Oxygen,
		Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: var(--color-text-primary);
	min-height: 100%;
	background: var(--color-bg-primary);
	display: flex;
	justify-content: center;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

h1 {
	font-weight: 800;
	font-size: 2rem;
	margin: 0;
	margin-block-end: 0.5rem;
	word-break: break-word;
	line-height: 1.2;
	padding: 0.4ch 1rem;
}

h2,
h3 {
	word-break: break-word;
	line-height: 1.2;
	margin-inline-start: 0;
	margin-inline-end: 0;
	margin-block-end: 1.5rem;
}

h2 {
	margin-block-start: 2.5rem;
	font-size: 1.75rem;
}

h3 {
	margin-block-start: 2rem;
	font-size: 1.5rem;
	font-weight: 400;
}

a {
	color: inherit;
	border: none;
	outline: none;
	cursor: pointer;
	text-decoration: underline;
}

a:hover,
a:focus {
	text-decoration: none;
	color: var(--color-static-dark);
	background: var(--color-static-accent);
	border-radius: 0.4rem 0 0.4rem 0;
}

main {
	background-color: var(--color-bg-primary);
	margin: 1rem 1.5rem;
	display: flex;
	flex-direction: column;
}

img {
	max-width: 100%;
}

@media (min-width: 370px) {
	body {
		font-size: 19px;
	}
}

@media (min-width: 420px) {
	h1 {
		font-size: 4rem;
		margin-block-end: 1.5rem;
	}

	h2 {
		margin-block-start: 3rem;
	}

	h3 {
		margin-block-start: 2.5rem;
	}

	main {
		margin: 2rem;
	}
}

@view-transition {
	navigation: auto;
}
