/* reset (src https://www.joshwcomeau.com/css/custom-css-reset/) */
/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
	box-sizing: border-box;
}

/* 2. Remove default margin */
* {
	margin: 0;
}

/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
	html {
		interpolate-size: allow-keywords;
	}
}

body {
	/* 4. Add accessible line-height */
	line-height: 1.5;
	/* 5. Improve text rendering */
	-webkit-font-smoothing: antialiased;
}

/* 6. Improve media defaults */
img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
}

/* 7. Inherit fonts for form controls */
input,
button,
textarea,
select {
	font: inherit;
}

/* 8. Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
	overflow-wrap: break-word;
}

/* 9. Improve line wrapping */
p {
	text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	text-wrap: balance;
}

/*
  10. Create a root stacking context
*/
#root,
#__next {
	isolation: isolate;
}

/* page setup */
:root {
	--bg: #FFF;
	--fg: #000;
	--primary: #F7A8B8;
	--primary-bg: #FFFA;

	--margin: 2rem;
	--m2: calc(var(--margin) / 2);
	--m4: calc(var(--margin) / 4);

	--mono: 'Andale Mono', 'PT Mono', 'Menlo', 'Courier', monospace;

	font-size: 16px;
	font-family: var(--mono);
}

@media screen and (prefers-color-scheme: dark) {
	:root {
		--bg: #000;
		--fg: #FFF;
		--primary: #ff2bf8;
		--primary-bg: #80167c;
	}
}

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

pre>code,
code {
	font-family: 'Courier New', Courier, monospace;
}

/* common components */
a {
	color: var(--primary);
	text-decoration: none;
}

a:hover {
	background-color: var(--primary-bg);
}

a::before {
	content: '⎣';
}

a::after {
	content: '⎤';
}

ul,
ol {
	padding-left: 2ch;
}

code {
	font-weight: bold;
}

:not(pre)>code {
	background-color: var(--primary-bg);
}

pre {
	padding: var(--m4);
	margin: var(--m2) 0;
	overflow-x: auto;
}

pre,
pre * {
	background-color: var(--primary-bg);
}

hr {
	margin: var(--m2) 0;
}

img {
	margin: var(--m2) 0;
}

blockquote {
	padding-left: var(--m4);
	border-left: 3px solid var(--primary);
}

/* layout */
.container {
	margin: var(--margin);
}

header {
	border-bottom: 2px dashed;
	display: flex;
	flex-direction: column-reverse;
	justify-content: space-between;
	align-items: center;
	margin-bottom: calc(var(--margin) / 2);
}

nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: calc(var(--margin) / 4) var(--margin);
	padding: 0;
	font-size: 1em;
}

nav li {
	list-style: none;
}

nav a::before {
	content: '~/';
}

nav a::after {
	content: '';
}

@media screen and (min-width: 700px) {
	header {
		flex-direction: row;
	}

	nav ul {
		font-size: 1.2em;
	}

	section.page-list {
		display: flex;
		justify-content: stretch;
		gap: var(--margin);
	}

	section.page-list>* {
		flex: 1;
	}
}

article>*+* {
	margin-block-start: 1rem;
}

/* components and shit */
section.projects {
	columns: 600px auto;
}

section.projects>section+section {
	margin-top: var(--margin);
}

article.project>.head {
	display: flex;
	justify-content: space-between;
}

article.project>p {
	margin: 0;
}

ul.inline.nav {
	list-style: none;
	display: flex;
	padding-left: 0;
	margin: 0;
}

ul.inline.nav>li+li::before {
	content: '/';
}
