@font-face {
  font-family: 'Inter';
  src: url('./public/fonts/Inter-Italic-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('./public/fonts/Inter-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
	--background: white;
	--text: #131313;
	--text-subdued: gray;
	--text-hovered: black;
	--border: #F5F5F5;
	--sidebar-background: white;
	--current: #EFEFEF;
}

:root .dark {
	--background: #131313;
	--text: #efefef;
	--text-subdued: #747474;
	--text-hovered: white;
	--border: #1E1E1E;
	--sidebar-background: #1E1E1E;
	--current: #222222;
}

html {
	font-size: 14px;
	scroll-behavior: smooth;
}

body {
	font-family: 'Inter';
	margin: auto;
	background: var(--background);
	color: var(--text);
	transition: background 105ms ease, color 105ms ease;
}

ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

button {
	border: none;
	background: unset;
}

a:not(.xp a) {
	text-decoration: none;
}

a {
	color: var(--text);
}

p {
	margin: 0 0 10px;
}

.h1 {
	text-align: center;
	font-size: 3.75rem;
	font-weight: 500;
}

.h2 {
	margin-bottom: 6px;
	margin-top: 20px;
}

.h2, .h3 {
	font-weight: 500;
	font-size: 1.125rem;
}

.border-top {
	margin-top: 50px;
	padding-top: 40px;
	border-top: 1px solid var(--border);
}

h1, h2, h3 {
	text-align: center;
}

.title {
	text-align: left;
	margin-top: 50px;
}

#menu-btn,
#theme {
	z-index: 1;
	position: relative;
	cursor: pointer;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
}

nav {
	position: absolute;
	top: 0;
	left: -100%;
	bottom: 0;
	transition: left 105ms ease-in;
	z-index: 0;
	padding-top: 40px;
	background: var(--sidebar-background);
	height: 100vh;
	overflow: hidden;
}

nav ul {
	margin-top: 60px;
	margin: 60px 20px 20px;
}

nav a {
	padding: 10px 16px;
	font-size: 0.875rem;
	border-radius: 4px;
	white-space: nowrap;
	display: block;
	transition: font-weight 105ms ease;
}

nav a:hover {
	font-weight: 800;
}

header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	padding: 8px 20px;
	background: var(--background);
	z-index: 1;
	display: flex;
	align-items: start;
	gap: 4px;
	transition: background 105ms ease;
}

.content {
	position: relative;
	transition: left 105ms ease-in, padding-left 105ms ease-in;
	padding: 60px 20px;
	margin: auto;
	max-width: 768px;
	left: 0;
}

.open {
	overflow: hidden;
	user-select: none;
}

:not(.open) .i-open {
	display: block;
}
.open .i-open, body:not(.open) .i-close {
	display: none;
}

.open nav {
	left: 0;
	border-right: 1px solid var(--border);
}

.open header {
	bottom: 0;
	background: unset;
	backdrop-filter: blur(10px);
}

.open .content {
	left: 50%;
}

.bold {
	font-weight: 600;
}

.link {
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 4px;
}

.link > svg {
	transform: translate3d(0px, 0px, 0px);
	transition: transform 105ms ease;
}

.link:hover > svg {
	transform: translate3d(2px, -4px, 0px);
}

body:not(.dark) #theme > :first-child,
body.dark #theme > :last-child {
	display: none;	
}

body.dark:not(.open) .shadow {
	border-bottom: 1px solid var(--border);
}
body:not(.dark) .shadow {
	box-shadow: 0 4px 6px var(--border);
}

.subdued {
	color: var(--text-subdued);
	transition: color 105ms ease;
}

.subdued:hover {
	color: var(--text-hovered);
}

.current {
	background: var(--current);
	font-weight: 800;
}

.xp {
	margin-top: 30px;
	display: flex;
	flex-wrap: wrap;
	flex-direction: column;
}

.xp > .link,
.xp > p {
	margin-bottom: 10px;
}

.xp > p {
	font-size: 0.875rem;
	width: 150px;
	font-weight: 300;
}

.xp li {
	margin-bottom: 10px;
}

footer {
	margin-top: 60px;
	font-weight: 300;
	font-size: 0.875rem;
}

footer > div {
	margin-top: 20px;
	display: flex;
	justify-content: center;
	gap: 10px;
}

footer p {
	text-align: center;
}

#about, #xp {
	scroll-margin-top: 80px;
}

@media screen and (min-width: 550px) {
	html {
		font-size: 16px;
	}

	.xp {
		display: grid;
		grid-template-columns: 150px 1fr;
	}

	.xp :not(:first-child) {
		grid-column: 2;
	}

	.open {
		overflow: auto;
	}

	.open header {
		backdrop-filter: none;
		right: inherit;
	}
	
	.open nav {
		width: 200px;
	}

	.open .content {
		left: 0;
		padding-left: 220px;
	}
	
	nav {
		background: unset;
	}
}

@media screen and (max-width: 765px) {
	.open .xp > ul {
		padding-left: 0;
	}
	.open .xp .link {
		width: 100%;
	}
}

.chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
}

.chips > p {
	background: var(--current);
	border-radius: 12px;
	display: block;
	font-weight: 300;
	text-align: center;
	padding: 4px 20px;
	font-size: 0.875rem;
	margin: 0;
}

