:root {
	--customWhite: #FFF6EC;
	--customBlack: #3C3A3A;
	--inverseBlack: #C3BCB2; /* calculated using https://ashieliw.github.io/Mix-Blend-Mode-Calculator/ */

	--titleFont: 'Space Mono';
	--bodyFont: 'Space Grotesk';

	--textSize7: 48px;
	--textSize6: 32px;
	--textSize5: 24px;
	--textSize4: 20px;
	--textSize3: 18px;
	--textSize2: 16px;
	--textSize1: 14px;

	--gridGap: 20px;
	--gridCellHeight: 14vh;

	--textGapBig: 60px;
	--textGapMedium: 40px;
	--textGapSmall: 12px;

	--linkPadding: 2px;
	--imageHoveredBrightness: 0.75;
	--gradientPointSize: 50%;

	--desktopWidth: 1440px;
	--tabletWidth: 1000px;
	--phoneWidth: 750px;
}

@view-transition {
	navigation: auto;
}

html {
	position: relative;
	box-sizing: border-box;
	padding: 0;
	margin: 0;
	scrollbar-width: thin;
	scrollbar-color: var(--customBlack) var(--customWhite); /*fallback*/
	scrollbar-color: var(--customBlack) transparent;
	background-color: var(--customWhite);
}

*,:before,:after {
	box-sizing: inherit;
	font-weight: inherit;
}

body {
	color: var(--customBlack);
	font-family: var(--bodyFont);
}

::selection {
	color: var(--customWhite);
	background: var(--customBlack);
}

h1,
h2,
h3,
a,
code {
	font-family: var(--titleFont);
}

a {
	text-decoration: none;
	color: var(--customBlack);
	font-weight: 700;
}

hr {
	background-color: transparent;
	height: 0;
	margin: 0;
	border: none;
	border-bottom: solid 1px var(--inverseBlack);
	position: relative;
	mix-blend-mode: difference;
	z-index: 1;
}

blockquote {
	margin: 0;
	margin-bottom: var(--textGapMedium);
	padding-left: var(--textGapMedium);
	border-left: solid 1px var(--customBlack);
	font-style: italic;
}

pre {
	display: block;
	margin: 0;
	margin-bottom: var(--textGapMedium);
	padding: var(--textGapMedium);
	line-height: normal;
	font-size: var(--textSize3);
	background-color: var(--customBlack) !important;
}

pre code {
	background-color: transparent !important;
}

pre code span::selection {
	background-color: var(--customWhite) !important;
	color: var(--customBlack) !important;
}

code {
	color: var(--customWhite);
	background-color: var(--customBlack);
}

img {
	background-color: transparent;
}

/* --- global classes --- */

.inverse {
	color: var(--inverseBlack);
	mix-blend-mode: difference;
}

.inverse::selection {
	color: #000;
	background: var(--inverseBlack);
}

.inverse.highlightHover {
	background-image: linear-gradient(var(--inverseBlack), var(--inverseBlack)) !important;
}

.inverse.highlightHover:hover {
	color: #000 !important; /* produces original background in blend mode difference */
}

.highlightHover {
	display: inline-block;
	font-weight: 400;
	/* add padding on sides and cut area off top and bottom for equal highlight when hovered - values are highly font-dependent */
	padding: 0 var(--linkPadding);
	height: 15px;
	line-height: 14px;
	user-select: none;
	background-size: 0 100%;
	background-repeat: no-repeat;
	transition: background-size 0.2s ease-out, color 0.2s ease-out;
	background-image: linear-gradient(var(--customBlack), var(--customBlack)); /* background-size only works with background-image */
}

.highlightHover:hover {
	font-style: italic;
	color: var(--customWhite);
	background-size: 100% 100%;
}

/* links in project body should look like .highlightHover */
#footer a,
p a {
	display: inline-block;
	padding: 0 var(--linkPadding);
	height: 15px;
	line-height: 14px;
	user-select: none;
	background-size: 0 100%;
	background-repeat: no-repeat;
	transition: background-size 0.2s ease-out, color 0.2s ease-out;
	background-image: linear-gradient(var(--customBlack), var(--customBlack));
}

#footer a:hover,
p a:hover {
	font-style: italic;
	color: var(--customWhite);
	background-size: 100% 100%;
}

.noSelect {
	user-select: none;
}

.regular:hover .floatImage {
	filter: brightness(var(--imageHoveredBrightness));
}

.block {
	position: relative;
	width: 100%;
	max-width: var(--desktopWidth);
	margin: 0 auto;
	padding: var(--gridGap);
	clip-path: rect(0 auto 101% 0); /* 101% makes image clip just a bit further, which removes occasional 1px gaps */
}

/* gradient drawn as fixed background */
.block::before,
html::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-attachment: fixed;
	background-position: 0 0;
	z-index: -1;
	background-image: 	radial-gradient(circle at var(--gradient1X) var(--gradient1Y), var(--customWhite) 0, transparent var(--gradientPointSize)),
						radial-gradient(circle at var(--gradient2X) var(--gradient2Y), var(--gradientHighlight) 0, transparent var(--gradientPointSize)),
						radial-gradient(circle at var(--gradient3X) var(--gradient3Y), var(--customWhite) 0, var(--customWhite) var(--gradientPointSize));
}

/* --- project --- */

.sectionLeft p {
	line-height: var(--textSize4);
	font-size: var(--textSize2);
	margin: 0;
	margin-bottom: var(--gridGap);
}

.sectionLeft h2,
.sectionRight h3 {
	margin-top: 0;
	font-size: var(--textSize3);
	text-transform: uppercase;
	font-weight: 700;
}

.sectionRight h3 {
	line-height: normal;
	margin: 0;
	margin-bottom: var(--textGapMedium);
}

.sectionRight p {
	margin-top: 0;
	margin-bottom: var(--textGapMedium);
}

.sectionRight p,
.sectionRight ul {
	line-height: 32px;
	font-size: 20px;
}

.sectionRight ul {
	margin: 0;
	margin-bottom: var(--textGapMedium);
	padding-left: var(--textGapMedium);
}

.caption {
	display: block;
	font-size: var(--textSize1);
	line-height: normal;
}

.sectionRight *:first-child {
	margin-top: 0 !important;
}

.sectionLeft *:last-child,
.sectionRight *:last-child {
	margin-bottom: 0 !important;
}

.columns ul {
	line-height: 44px;
	font-size: var(--textSize5);
	margin: 0;
	padding: 0;
	list-style-type: none;
}