:root {
	--font-xs: 0.9rem;
	--font-sm: 1rem;
	--font-base: 1.2rem;
	--font-md: 1.5rem;
	--font-lg: 2rem;
	--font-illu-xs: 1.2rem;
	--font-illu-sm: 1.5rem;
	--font-illu-base: 2rem;
	--font-illu-md: 2.5rem;
	--font-illu-lg: 3rem;

	--color-body-text: #d0d0d0;
	--color-body-background: #232323;
	--color-mode-design: #8b93ff;
	--color-mode-design-dark: #0a051ec2;
	--color-highlight-mode-design: #360eff;
	--color-mode-design-light: #b7bdff;
	--color-mode-illu: #ffda47;
	--color-meta-label: #464088;
}

h1 {
	font-size: var(--font-lg);
};

h2 {
	font-size: var(--font-md);
}

h3 {
	font-size: var(--font-base);
}

h4 {
	font-size: var(--font-sm);
}

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

body {
	font-family: 'Caudex', serif;
	font-size: var(--font-base);
	color: var(--color-body-text);
	background: var(--color-body-background);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

main {
	display: flex;
	overflow: hidden;
	height: 100vh;
}

a {
	text-decoration: none;
	color: var(--color-mode-design);
	outline: none;
	cursor: pointer;
}

a:hover {
	color: #fff;
}

a:focus {
	outline: none;
}

.hidden {
	position: absolute;
	overflow: hidden;
	width: 0;
	height: 0;
	pointer-events: none;
}



.js .loading {
	position: fixed;
	z-index: 100;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #232323;
	transition: opacity 0.3s;
}

.js .loading--hide {
	pointer-events: none;
	opacity: 0;
}

.js .loading::after {
	content: '- - -';
	font-family: "Square Peg", cursive;
  font-weight: 400;
  font-style: normal;
	font-size: var(--font-md);
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	height: 100%;
	animation: animLoader 1s infinite alternate forwards;
}

@keyframes animLoader {
	0% {
		content: '- - -';
	}
	25% {
		content: 'd - -';
	}
	50% {
		content: '- - c';
	}
	75% {
		content: '- / -';
	}
	100% {
		content: 'd - c';
	}
}

.github {
	font-size: var(--font-md);
	margin: 0 2em 0 auto;
}

.btn {
	border: none;
	background: none;
}

.btn:focus {
	outline: none;
}

.btn--menu {
	font-size: var(--font-md);
	margin: 0 0 0 2em;
	padding: 0;
	color: var(--color-body-text);
}

.btn--menu .icon--menu-alt,
.btn--menu.mode--illu .icon--menu {
	display: none;
}

.btn--menu.mode--illu .icon--menu-alt {
	display: block;
}

/* Icons */
.icon {
	display: block;
	width: 1.5em;
	height: 1.5em;
	margin: 0 auto;
	fill: currentColor;
}

/* Content */
.content,
.content__inner {
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	align-items: center;
	width: 100%;
	height: 100%;
}

.content__inner {
	z-index: 100;
	flex-direction: column;
	align-content: flex-start;
	padding: 2.5em;
}

.content__top {
	display: flex;
	align-items: center;
	flex: none;
	width: 100%;
}

.title {
	font-size: var(--font-md);
	font-weight: 300;
	line-height: 1;
	display: flex;
	align-items: center;
	height: 6vh;
	margin: 0;
}

.title__inner.mode--design {
	font-family: "Caudex", sans-serif !important;
	font-size: var(--font-md);
	color: var(--color-body-text);
}

.title__inner.mode--illu {
	font-family: "Square Peg", cursive !important;
	font-weight: 400;
	font-style: normal;
	text-transform: lowercase;
	font-size: var(--font-illu-md);
	color: var(--color-mode-illu);
}

/* Ensure title never changes font, even when hovering on switch items (in illustrator mode) */
/* But allow hover effect to override when title--hover-design class is present */
.title .title__inner.mode--illu:not(.title--hover-design),
.title__inner.mode--illu:hover:not(.title--hover-design),
.content__top .title__inner.mode--illu:not(.title--hover-design) {
	font-family: "Square Peg", cursive !important;
	font-weight: 400 !important;
	font-style: normal !important;
	text-transform: lowercase !important;
	color: var(--color-mode-illu) !important;
}

/* In design mode: hover on illustrator transforms title to Square Peg with yellow */
.title__inner.title--hover-illu {
	font-family: "Square Peg", cursive !important;
	font-weight: 400 !important;
	font-style: normal !important;
	text-transform: lowercase !important;
	color: var(--color-mode-illu) !important;
	font-size: var(--font-illu-md) !important;
}

/* In illustrator mode: hover on ux designer transforms title to Caudex */
.title__inner.mode--illu.title--hover-design,
.title .title__inner.mode--illu.title--hover-design,
.content__top .title__inner.mode--illu.title--hover-design {
	font-family: 'Caudex', sans-serif !important;
	font-weight: 300 !important;
	font-style: normal !important;
	text-transform: none !important;
	color: var(--color-body-text) !important;
	font-size: var(--font-md) !important;
}

.controls {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	margin: 0 0 0 auto;
}



.mode--illu {
	font-family: "Square Peg", cursive;
  font-style: normal;
	text-transform: lowercase;
	/* color: var(--color-mode-illu); */
	font-weight: 600;
	font-size: var(--font-illu-base);
	color: var(--color-mode-illu);
}

.mode--illu-menu {
	color: #000;
}

.menu--illu .menu__link {
	font-family: "Square Peg", cursive;
  font-weight: 400;
  font-style: normal;
	text-transform: lowercase;
	color: var(--color-mode-illu);
	font-weight: 300;
	font-size: var(--font-illu-md);
}

.menu {
	font-size: var(--font-md);
	flex: none;
	width: 100%;
	margin: 30vh 0 0 auto;
	text-align: right;
}

.menu__inner {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--font-base);
	line-height: 2;
	letter-spacing: 1.5px;
}

.menu--illu {
	font-size: var(--font-illu-md);
	flex: none;
	width: 100%;
	margin: 30vh 0 2em 0;
	text-align: left;
}

.menu--illu .menu__inner {
	font-size: var(--font-illu-md);
}

.menu--illu .menu__item {
	font-size: var(--font-illu-md);
	text-align: right;
}

.menu:not(.menu--illu) .menu__item {
	position: relative;
}

.menu__item {
	font-size: var(--font-md);
	line-height: 1.5;
}

.menu__item:not(:last-child) {
	margin: 0 0 0.25em 0;
}

.js .menu--illu {
	display: none;
}

.menu__link {
	display: inline-block;
	font-size: var(--font-md);
	line-height: 0.5;
}

.menu--illu .menu__link:hover {
	color: #fff;
}

.content__bottom {
	display: flex;
	align-items: center;
	width: 100%;
	margin: auto 0 0 0;
	font-size: var(--font-base);
	line-height: 2;
	letter-spacing: 1.5px;
	vertical-align: middle;
}

/* Illustrator mode: content bottom uses Square Peg and yellow */
.content__bottom.mode--illu {
	font-family: "Square Peg", cursive !important;
	font-weight: 400;
	font-style: normal;
	color: #000 !important;
}

.switch {
	position: relative;
	display: flex;
	align-items: center;
	font-size: var(--font-base);
	vertical-align: baseline;
	height: 36px;
}

.switch__content {
	display: flex;
}

.switch__item {
	line-height: 1;
	position: relative;
	display: inline-block;
	margin: 0 1.5em 0 0;
	padding: 0 4px 0.15em 4px;
	color: var(--color-body-text);
	vertical-align: middle;
	font-weight: 500;
}

.switch__item span {
	position: relative;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

/* Ensure ux-designer is never affected by glitch or hover effects on illustrator */
.switch__item[data-switch-item="ux-designer"] span {
	font-family: 'Caudex', sans-serif !important;
	font-weight: 500 !important;
	text-transform: none !important;
	color: inherit !important;
}

/* In illustrator mode, ux-designer should use Square Peg font */
.mode--illu .switch__item[data-switch-item="ux-designer"] span {
	font-family: "Square Peg", cursive !important;
	font-weight: 500 !important;
	letter-spacing: 0.1em;
	text-transform: lowercase !important;
	color: var(--color-mode-illu) !important;
	font-size: var(--font-illu-mase) !important;
	vertical-align: baseline;
	width: 130px;
}

.mode--illu .switch__item[data-switch-item="illustrator"] span {
	font-family: "Square Peg", cursive !important;
	font-weight: 600 !important;
	text-transform: lowercase !important;
	color: #000;
	font-size: var(--font-illu-base) !important;
	vertical-align: baseline;
}

/* Specific styling for ux-designer in illustration mode */
.mode--illu .switch__item[data-switch-item="ux-designer"] {
	height: 36px;
	width: 120px;
	padding-bottom: 0;
	vertical-align: middle;
	font-size: var(--font-illu-base);
}

/* Design mode (default): purple highlight */
.switch__item--current {
	pointer-events: none;
	color: #fff;
	background-color: var(--color-highlight-mode-design);
}

/* Illustrator mode: yellow highlight */
.mode--illu .switch__item--current {
	color: var(--color-body-background);
	background-color: var(--color-mode-illu);
}


/* In design mode: hover on illustrator transforms it to Square Ped */
.switch.mode--design .switch__item[data-switch-item="illustrator"]:hover > span {
	font-family: 'Square Peg', cursive !important;
	font-weight: 500 !important;
	text-transform: none !important;
	color: #fff !important;
	font-size: var(--font-illu-base) !important;
	line-height: 1 !important;
}



.switch.mode--illu .switch__item {
	font-size: var(--font-illu-base);
	font-weight: 400;
	font-family: "Square Peg", cursive;
	
	text-transform: lowercase;
}

/* In illustrator mode: hover on ux designer transforms it to Caudex */
.switch.mode--illu .switch__item[data-switch-item="ux-designer"]:hover > span {
	font-family: 'Caudex', sans-serif !important;
	font-weight: 500 !important;
	text-transform: none !important;
	color: #fff !important;
	font-size: var(--font-base) !important;
	line-height: 1 !important;
}

.switch__item:first-child::after {
	content: '';
	position: absolute;
	top: -5%;
	left: calc(100% + 0.75em);
	width: 1px;
	height: 110%;
	background: #464646;
	transform: rotate(22.5deg);
}

/* Hover effects on switch items */
/* In design mode: hover on illustrator transforms it to Square Peg with yellow color */
.mode--design .switch__item[data-switch-item="illustrator"]:hover span {
	font-family: "Square Peg", cursive !important;
	font-weight: 400;
	font-style: normal;
	text-transform: lowercase;
	color: var(--color-mode-illu) !important;
	font-size: var(--font-illu-base) !important;
	line-height: 0.5 !important;
}

/* Glitch effect on illustrator - show yellow illu style */
.mode--design .switch__item[data-switch-item="illustrator"] span.mode--illu {
	font-family: "Square Peg", cursive !important;
	font-weight: 400;
	font-style: normal;
	text-transform: lowercase;
	color: var(--color-mode-illu) !important;
	font-size: var(--font-illu-base) !important;
	line-height: 0.5 !important;
}

.link-wrap {
	display: flex;
	align-items: center;
	height: 4em;
	margin: 0 0 0 auto;
}

.contact-link {
	display: inline-block;
	padding: 1em 0;
	font-size: var(--font-md);
}

.overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	background: rgba(107, 87, 86, 0.22);
	opacity: 0;
}

@media screen and (max-height: 38.5em) {
	.menu {
		text-align: right;
	}
}




@media screen and (max-width: 1200px) {
	html, body {
		overflow: hidden;
		height: 100%;
		position: fixed;
		width: 100%;
	}
	main {
		height: 100vh;
		height: 100dvh;
		overflow: hidden;
	}

	.content__inner {
		padding: 1.5em;
		height: 100vh;
		height: 100dvh;
		overflow: hidden;
	}


	.content__top {
		font-size: var(--font-md);
		order: 1;
	}
	.menu:not(.menu--illu) {
		order: 2;
		font-size: var(--font-md);
	}
	.menu:not(.menu--illu) .menu__inner {
		font-size: var(--font-md);
	}
	.menu:not(.menu--illu) .menu__item {
		font-size: var(--font-md);
	}
	.link-wrap {
		order: 4;
		margin: 0.5em 0 0 auto;
		height: auto;
	}
	
	.menu--illu {
		order: 3;
	}
	.menu--inner {
		order: 2;
	}



	.content__bottom {
		display: flex;
        order: 5;
        flex-direction: row;
        align-content: center;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
		width: 100%;
		
	}
	
	.switch {
		order: 5;
		margin-top: auto;
		font-size: var(--font-base);
		margin: 0 0 1px 0;
	}

	.switch .mode--design {
		height: 36px;

		}
	.switch .mode--illu {
	width: 100%;
	height: fit-content;
	}

	.switch__item {
		font-size: var(--font-base);
		line-height: 1;
    position: relative;
    display: inline-block;
    padding: 0 4px 0.15em 4px;
	}

	.mode--illu .switch__item[data-switch-item="ux-designer"] {
		height: 36px;
		width: 112px;
		padding-bottom: 0;
		vertical-align: middle;
	}


	/**
	 * If someone has problems with motion and has said so in their browser, 
	 animations happen immediately
	 */

	 @media (prefers-reduced-motion: reduce) {
		*, *::before, *::after {
		animation-duration: 0ms !important;
		transition-duration: 0ms !important;
		}
	   };
	
}
