/*  BASIC */

/* Vars */
:root {
	--font-regular: 'Inter Regular', Arial, Helvetica, sans-serif;
	--font-light:   'Inter Light', Arial, Helvetica, sans-serif;

	--base-line-height: 1.28;
	
	--font-size-normal: 1em;
	--font-size-big: calc(1.75 * var(--font-size-normal));
	--font-size-small: calc(.75 * var(--font-size-normal));
	--font-size-smaller: calc(.5 * var(--font-size-normal));
	--font-size-caption: calc(.75 * var(--font-size-smaller));

	--section-distance-cover: calc(8em * var(--base-line-height));
	--section-distance: calc(6em * var(--base-line-height));
	
	--global-dark-bg: hsl(185, 100%, 2%);
	--global-dark-fg: hsl(120, 100%, 47%);
	--global-dark-bg: hsl(0, 0%, 98%);
	--global-dark-fg: hsl(120, 100%, 47%);
	--global-light-bg: hsl(0, 0%, 98%);
	--global-light-fg: hsl(340, 100%, 48%);
	
	--global-dark-bg: hsl(24, 100%, 98%);
	--global-dark-fg: hsl(340, 100%, 48%);
	--global-light-bg: hsl(24, 100%, 98%);
	--global-light-fg: hsl(340, 100%, 48%);

	--img-on-dark-mix-blend-mode: difference;
	--img-on-light-mix-blend-mode: multiply;

}

/* @supports LCH */
@supports (color: lch(0 0 0)) {
	* {
		/* 
		--global-dark-bg: lch(1% 15 200);
		--global-dark-fg: lch(80% 200 140);
		--global-dark-bg: lch(98% 15 160);
		--global-dark-fg: lch(40% 200 155);
		*/
		
		/* 
		*/
		--global-dark-bg: lch(97.5% 2.5 70);
		--global-dark-fg: lch(25% 165 5);
		--global-light-bg: lch(97.5% 2.5 70);
		--global-light-fg: lch(25% 165 5);

	}
}

@media screen and (orientation: landscape) {
	:root {
		--global-dark-fg: hsl(212, 100%, 50%);

	}

	/* @supports LCH */
	@supports (color: lch(0 0 0)) {
		* {
			--global-dark-fg: lch(35% 150 230);
		}
	}

}

@keyframes pulse {
	0% {
		color: 			var(--global-light-fg);
		border-color: 	var(--global-light-fg);
	}
	50% {
		color: 			var(--global-dark-fg);
		border-color: 	var(--global-dark-fg);
	}
	100% {
		color: 			var(--global-light-fg);
		border-color: 	var(--global-light-fg);
	}
}	

/* * { animation: pulse 180s infinite !important; } */

/* COLOUR SCHEME */

/* Default to light scheme */
body {
	--base-font: var(--font-regular);
	--bg-color: var(--global-light-bg);
	--fg-color: var(--global-light-fg);
}
body img.theme-light { display: block; }
body img.theme-dark { display: none; }
body.invert {
	--base-font: var(--font-regular);
	--bg-color: var(--global-dark-bg);
	--fg-color: var(--global-dark-fg);
}
body.invert img.theme-light { display: none; }
body.invert img.theme-dark { display: block; }

/* @media switch to dark scheme */
@media (prefers-color-scheme: dark) {
	body {
		--base-font: var(--font-regular);
		--bg-color: var(--global-dark-bg);
		--fg-color: var(--global-dark-fg);
		
	}
	body img.theme-light { display: none; }
	body img.theme-dark { display: block; }
	body.invert {
		--base-font: var(--font-regular);
		--bg-color: var(--global-light-bg);
		--fg-color: var(--global-light-fg);
	}
	body.invert img.theme-light { display: block; }
	body.invert img.theme-dark { display: none; }
}

/* Reset */
* {
	margin: 0;
	padding: 0;
	line-height: var(--base-line-height);
	font-family: inherit;
	color: inherit;
	text-indent: 0;
}




/* GENERAL */

/* Body */
body {
	font-family: var(--base-font); 
	font-size: var(--font-size-normal);
	color: var(--fg-color);
	background-color: var(--bg-color);
	/* hyphens: auto; */
}

/* Typography */
section:not(.cover) p:not(.underline) + p:not(.font-small) {
	text-indent: 1em;
}
em {
	font-style: italic;
	margin: 0 .075em 0 -.075em;
}
section.agenda em { font-style: normal; }
ul { list-style-type: none; }
section.agenda li + li { margin-top: .5em; }
a { 
	text-decoration: none; 
	cursor: pointer;
}
a:hover { text-decoration: underline; }
.agenda-entries li a { text-decoration: underline; }
.mt-1 { margin-top: 4em; }
.lowercase { text-transform: lowercase; }
.font-small { font-size: var(--font-size-small); }
.font-smaller { font-size: var(--font-size-smaller); }
main section.cover p.caption { 
	font-size: var(--font-size-caption);
	margin-top: 6.666em;
	width: 100%;
	text-align: center;
}
.overline {
	padding-top: .75em;
	border-top: 1px solid var(--fg-color);
	box-sizing: border-box;
}
.underline {
	padding-bottom: .75em;
	margin-bottom: .75em;
	border-bottom: 1px solid var(--fg-color);
}
.medium {
	font-family: 'Inter Medium';
}



/* CONTAINERS */

/* Global wrapper */
#GlobalWrapper {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	min-height: 100vh;
	padding: var(--font-size-normal);
	display: flex;
	flex-flow: column nowrap;
	justify-content: stretch;
	align-items: flex-start;
}

/* Header, main, footer */
header, main, footer {
	width: 100%;
}

/* Header */
header {
	display: flex;
	flex-flow: row nowrap;
	justify-content: space-between;
	align-items: flex-end;
	margin-bottom: calc(2em * var(--base-line-height));
	z-index: 100;
}
header div#Theme {
	position: fixed;
	right: var(--font-size-normal);
	box-sizing: border-box;
	width: 1.45em;
	height: 1.45em;
	border: .1em solid var(--fg-color);
	border-radius: 100%;
	margin-right: .75vw;
}
header div#Theme #Menu {
	position: fixed;
	top: 0;
	right: 0;
	height: 100%;
	width: min(40ch, 90%);
	background: var(--fg-color);
	color: var(--bg-color);
	padding: var(--font-size-normal);
	box-sizing: border-box;
	cursor: pointer;
	flex-flow: column;
	justify-content: flex-start;
	align-items: flex-start;
	padding-top: 7.25em;
	display: none;
	overflow: hidden;
}
header div#Theme #Menu li {
	margin-left: -7.5ch;
}
header div#Theme #Menu li a {
	font-size: var(--font-size-big); 
}
header div#Theme #Menu li a span {
	color: var(--fg-color);
}
header div#Theme #Menu li:hover a span {
	color: var(--bg-color);
}
header div#Theme #Menu li a:hover {
	text-decoration: none;
}
@media screen and (orientation: portrait) {
	header div#Theme #Menu {
		padding-top: 6.4633em;
	}
	header div#Theme #Menu a {
		font-size: calc(1.333 * var(--font-size-big)) !important; 
	}
}
header div#Theme #Menu a {
	font-size: var(--font-size-big); 
}
header div#Theme #Menu :is(a, a:hover, a:active) {
	color: var(--bg-color);
}
header div#Theme:hover #Menu {
	display: flex;
}
header div#Theme:hover #Menu li:hover {
	color: black;
}


/* Main */
main {
	flex-grow: 1;
}
main > section:not(:first-child) {
	margin-top: var(--section-distance);
}
main > section.cover:not(.has-image) + section {
	margin-top: var(--section-distance-cover) !important;
}
main > section.cover.has-image + section {
	margin-top: calc(var(--section-distance) * .25);
}
main section:not(.cover) {
	opacity: 0.9;
}
main section.cover p {
	position: relative;
	font-size: var(--font-size-big); 
	margin-bottom: calc(1em * var(--base-line-height));
}
main section.cover p.font-small {
	font-size: var(--font-size-normal);
}
main section article {
	margin-bottom: calc(var(--section-distance) / 1.5);
}

/* Footer */
footer {
	margin-top: var(--section-distance);
	opacity: 0.9;
}
footer > ul {
	display: flex;
	flex-flow: row nowrap;
	justify-content: space-between;
	align-items: flex-end;
	width: calc(100vw - 2 * var(--font-size-normal));
}
footer > ul li {
	display: flex;
	flex-flow: row nowrap;
	justify-content: center;
	flex-basis: 30%;
	flex-grow: 1;
	justify-content: flex-end;
}
footer > ul li:first-child {
	justify-content: flex-start;
}
footer > ul li:nth-child(2) {
	justify-content: center;
}




/* MAIN SECTIONS */

/* Agenda */
main section.agenda ul.agenda-entries li {
	text-indent: -1.5em;
	padding-left: 1.5em;
}

/* Tracks */
section.track-details,
section.project-details {
	display: flex;
	flex-flow: row nowrap;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1em;
}
section.track-details .track-detail,
section.project-details .project-detail {
	flex-basis: calc(50% - .5em);
}

/* Projects */
section.cover img.cover {
	width: 100%;
	height: 20em;
	color: var(--bg-color);
	object-fit: contain;
}
section.cover img.cover[src="img/"] {
	background-color: var(--fg-color);
}
section.project-info p.project-description,
section.project-info p.project-detail {
	margin-bottom: 1em;
}
section.project-info section.project-text {
	margin-bottom: 5em;
}



/* WIP */
div#WIPShield {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	z-index: 1000;
	flex-flow: column nowrap;
	justify-content: center;
	align-items: center;
	box-sizing: border-box;
	padding-bottom: 5.5vh;
	/* backdrop-filter: blur(25px); */
	display: none;
}
@media screen and (pointer: coarse) {
	div#WIPShield {
		justify-content: flex-start;
		padding-top: 75vw;
	}
}
body.production header,
body.production footer,
body.production section {
	filter: blur(25px);
}
body.production div#WIPShield {
	display: flex;
}



/* @MEDIA */

/* Landscape adjust */
@media screen and (orientation: portrait) {
	.landscape-only {
		display: none;
	}
}	
@media screen and (orientation: landscape) {
	:root {
		--font-size-base: 1rem;
		--font-size-normal: calc(1.5 * var(--font-size-base));
		--font-size-big: calc(1.75 * var(--font-size-normal));
		--font-size-extra-big: calc(2.333 * var(--font-size-normal));
		--font-size-small: var(--font-size-base);
	}
	main {
		max-width: 45rem;
	}
	.portrait-only {
		display: none;
	}
	main .cover {
		width: 120%;
	}
}


/* SWITCHES */

/* Debug */
/* * { background-color: rgba(255,0,0,.1); } */
/* section.track-details { display: none; } */
.hidden { display: none !important; }