@font-face {
    font-family: Riccione;
    src: url("fonts/RiccioneTS-Light.otf") format("opentype");
}

@font-face {
    font-family: Union;
    font-weight: Bold;
    font-style: normal;
    src: url("fonts/Union-Bold.otf") format("opentype");
}

@font-face {
    font-family: Union;
    font-weight: Bold;
    font-style: italic;
    src: url("fonts/Union-BoldItalic.otf") format("opentype");
}

@font-face {
    font-family: Union;
    font-weight: normal;
    font-style: normal;
    src: url("fonts/Union-Regular.otf") format("opentype");
}

@font-face {
    font-family: Union;
    font-weight: normal;
    font-style: italic;
    src: url("fonts/Union-Italic.otf") format("opentype");
}

/* reset */

* {
	margin:  0px;
	padding:  0px;
	box-sizing: border-box;
}

body {
	font-family: 'Riccone', Times, serif;
	transition: background 500ms ease;

	font-size: 28px;
	line-height: 34px;

	background: rgb(195,195,195);
	background: #8986A7;
	background: #bbb;
	background: #F2E9EC;
	/* background: radial-gradient(circle, rgba(207,204,237,1) 38%, rgba(157,154,187,1) 100%); */
	background-attachment: fixed;

	transition: all 400ms ease;
}

/* type adjustments */

#intro, figure, blockquote, h1, h2 {
	font-family: 'Union', -apple-system, BlinkMacSystemFont, arial, helvetica, sans-serif;	
	font-size: 18px;
	line-height: 22px;
	font-weight: bold;
}

figure {
	font-size: 14px;
	line-height: 18px;
	font-weight: normal;
}

blockquote {
	font-size: 28px;
	line-height: 34px;
	font-weight: normal;
	letter-spacing: -1px;
}

h1 {
	font-size: 60px;
	line-height: 64px;
	font-weight: normal;
	text-align: center;
	margin: 0px 30px;
	letter-spacing: -2.5px;
}

h2 {
	font-size: 28px;
	line-height: 34px;
	font-weight: normal;
	text-align: center;
	margin: 0px 10px;
	letter-spacing: -1px;
}

sup {
	font-size: 12px;
}

sup a{
	padding: 0px 4px;
}


/* links */

a {
	color: black;
	text-decoration: none;
	border: 1px solid black;
	padding: 0px 8px;
	border-radius: 12px;
	background: rgba(0,0,0,.2);
}

a:hover {
	background: white;
}

#logo a {
	border: none;
	background: none;
	transition: all 500ms ease;
}

#logo a:hover {
	background: transparent;
	filter: blur(3px);
}

#container {
	width: 100%;
	max-width: 1100px;
	max-width: 100vw;
	margin: auto;	
	position: relative;
	padding: 0px 0px 250px;
}


/* gradient */

#gradient {
	position: fixed;
	bottom: -150px;
	left: -50vw;
	width: 200vw;
	height: 300px;
	pointer-events: none;
	mix-blend-mode: color-dodge;
	z-index: 1000;

	background: linear-gradient(360deg, #7F7D4E 20%, #FF7070 40%, #C0B6FF 60%, #7F7D4E 80%);
	background-size: 200% 400%;
	animation: moveGradient 60s linear infinite;	
	filter: blur(30px);

}

@keyframes moveGradient {
    0% {
        background-position: 50% 100%;
    }
    100% {
        background-position: 50% 0%;
    }
}


/* header and nav */

#logo {
	width: 320px;
	position: fixed;
	top: 10px;
	left: 50%;
	transform: translateX(-50%);
	transform-origin: center center;

	transition: all 200ms ease;
	z-index: 10000;
	/* mix-blend-mode: screen; */
	z-index: 1000;
	text-align: center;
}

#logo img {
	width: 100%;
	height: auto;
}

#logo h1 {
	font-size: 100px;
	line-height: 110px;
}

#logo a {
	padding: 0px;
}


body.scroll #logo {
	transform: scale(.55) translateX(-100vw) translateY(-60px);
}

nav {
	position: fixed;
	top: 15px;
	right: 15px;
	text-align: right;
	z-index: 1000000;
}

nav .button {
	width: 28px;
	height: 28px;
	border-radius: 4px;
	background: white;
	display: inline-block;
	cursor: pointer;
}

nav .button:hover {
	background-color: #333;
}

#menu-button {
	background-image: url('menu.svg');
	background-size: contain;
	background-repeat: no-repeat;
	margin-left: 5px;
}

#visualizer-button {
	background-image: url('visualizer.svg');
	background-size: contain;
	background-repeat: no-repeat;
}

header {
	padding-top: 120px;
	height: calc(100vh - 40px);	
	position: relative;
	overflow: visible;
}

/* title */

header h1 {
	margin: 0px auto;
	max-width: 620px;
	z-index: 2;
	position: relative;
}

.all-caps {
	font-size: .8em;
	letter-spacing: 1px;
}

#header-img {
	margin: 20px auto;
	position: absolute;
	top: 170px;
	left: 20px;
	height: calc(100vh - 400px);
	width: calc(100% - 40px);
	background-position: center;
	transition: all 1000ms ease;
	background-blend-mode: screen;
}

#header-img img {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	max-width: 800px;
	height: auto;

	/* unified 27s loop; each image uses its own keyframes to keep offsets stable */
	animation: fadeMove1 12s ease-in-out infinite both;

	/* Adds a pause between repeats */
/*	animation-delay: 2s, 22s;*/

}

#header-img img:nth-of-type(2) {
	animation-name: fadeMove2;
}

#header-img img:nth-of-type(3) {
	animation-name: fadeMove3;
}

header h2 {
	position: absolute;
	bottom: 30px;
	width: 100%;
	text-align: center;
	z-index: 3;
}

/* 27s total: three 9s windows with 1s crossfade between each */
@keyframes fadeMove1 {
    0%   { opacity: 0; top: calc(50% + 10px); }
    3.7% { opacity: 1; top: calc(50% + 10px); }                       
    29.6%{ opacity: 1; top: calc(50% - 40px); }
    33.3%{ opacity: 0; top: calc(50% - 70px); }
    100% { opacity: 0; top: calc(50% - 90px); }
}

@keyframes fadeMove2 {
    0%   { opacity: 0; top: calc(50% + 10px); }
    27.6%{ opacity: 0; top: calc(50% + 10px); }                       
    33.3%{ opacity: 1; top: calc(50% + 10px); }                       
    59.3%{ opacity: 1; top: calc(50% - 40px); }
    63.0%{ opacity: 0; top: calc(50% - 70px); }
    100% { opacity: 0; top: calc(50% - 90px); }
}

@keyframes fadeMove3 {
    0%   { opacity: 0; top: calc(50% + 10px); }
    59.3%{ opacity: 0; top: calc(50% + 10px); }
    61.0%{ opacity: 1; top: calc(50% + 10px); }
    85.2%{ opacity: 1; top: calc(50% - 40px); }
    88.9%{ opacity: 0; top: calc(50% - 70px); }
    100% { opacity: 0; top: calc(50% - 90px); }
}


.scroll #header-img {
	filter: blur(25px);
	transform: scale(.92);
	transform-origin: center;
}

/* homepage */

#home #logo img {
	margin-left: 10px;
}


#home header {
	padding-top: 90px;
	height: 100vh;
	width: 100vw;
	overflow: visible;
	margin-bottom: 300px;
}

/* #home header h1 {
	font-size: 100px;
	line-height: 110px;
} */

#home header h2 {
	font-family: 'Riccone', Times, serif;
	font-size: 84px;
	line-height: 92px;
	letter-spacing: -1px;
}

#home #header-img {
	background-image: url("img/header-josh-white.png");
	background-size: contain;
	background-repeat: no-repeat;
}

#home main {
	padding: 0px 0px;
}

/* link to other articles */


ul#essays {
	padding: 0px 20px;
}

ul#essays, ul#essays li {
	list-style-type: none;
	font-family: 'Union', -apple-system, BlinkMacSystemFont, arial, helvetica, sans-serif;	
	font-size: 48px;
	line-height: 54px;
	font-weight: normal;
	letter-spacing: -2px;
}

.white {
	color: white;
}

ul#essays {
	margin: auto;
	width: 600px;
}

ul#essays a {
	border: none;
	padding: 0px;
	background: none;
}

ul#essays a:hover li {
}

ul#essays li {
	margin-bottom: 80px;
}

ul#essays img {
	max-width: calc(100%);
	display: block;
	transition: all 500ms ease;
	margin: 20px auto;
	padding: 10px;
	background: white;
	border-radius: 20px;	
}

/* deck */

#intro {
	max-width: 1100px;
	margin: auto;
}

#intro p {
	margin-bottom: 14px;
}

/* article */

.article-page header{
	width: 100vw;
	overflow-x: hidden;
	overflow-y: hidden;
	pointer-events: none;
}

.article-page .section {
	max-width: 1100px;	
	margin: auto;
}

#tiger #header-img img, #josh #header-img img, #jonathan #header-img img {
	animation: none;
}

hr {
	height: 20px;
	background: red;
	margin: 30px auto;
	border: none;
	border-radius: 10px;
	background: linear-gradient(90deg, #7F7D4E 45.99%, #FF7070 55.47%, #C0B6FF 77.09%);	
	max-width: 1100px;
}

#essay {
	max-width: 100vw;
	padding: 0px 20px;
}

#essay img{
	max-width: 100%;
	width: 500px;
	margin: auto;
	display: block;
	height: auto;
}

#essay .glider-next img, #essay .glider-prev img {
	width: 32px;
}

#essay figure {
	text-align: center;
	margin-bottom: 40px;
}

#essay p {
	margin-bottom: 14px;
}

.stick {
	position: sticky;
	top: 0px;
	padding: 40px;
	background: rgba(255,255,255,0);
	margin-bottom: 20px;
	z-index: 100000;	
	transition: all 1000ms ease;
	width: calc(100% + 40px);
	transform: translateX(-20px);
}

.stick.is-stuck {
	background: rgba(255,255,255,1);
	box-shadow: 0px 0px 100px white;
}

.stick img {
	border: 1px solid rgb(150,150,150);
	border-radius: 10px;
}

.article-image {
	padding: 20px;
}


figure {
	margin: 10px auto;
}

blockquote {
	display: flex;
	position: relative;
	padding: 0px 0px 0px 40px;
	margin: 28px 0px;
}

blockquote sup {
	font-size: 14px;
}

blockquote::before {
	content: '';
	display: block;
	width: 20px;
	height: 100%;
	position: absolute;
	left: 0px;	
	border-radius: 10px;
	background: linear-gradient(180deg, #7F7D4E 45.99%, #FF7070 55.47%, #C0B6FF 77.09%);	
}

#essay img.spacing {
	display: block;
	margin: 60px auto 20px;
}

/* visualizer and menu */

#visualizer, #menu {
	width: 200vw;
	height: 200vh;
	position: fixed;
	top: 200vh;
	left: -50vw;
	background: red;
	z-index: 100000;
	pointer-events: none;
	opacity: .5;
	transform: translateY(-50vh);
	filter: blur(100px);

	transition: all 800ms ease;

}

#visualizer.active {
	top: 0vh;
	filter: blur(0px);
	transform: translateY(-50vh);
	pointer-events: all;
	opacity: .95;
}

#visualizer {
	display: flex;
	justify-content: center;
	align-items: center;
}

#visualizer .visualizer-image-layer {
	position: absolute;
	top: 50vh;
	left: 50vw;
	width: 100vw;
	height: 100vh;
	opacity: 1;
	/* mix-blend-mode: screen; */
	pointer-events: none;
	z-index: 0;
	overflow: hidden;
}

#visualizer .visualizer-image-panel {
	position: absolute;
	inset: 0;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	opacity: 0;
	transition: opacity 600ms ease;
}

#visualizer .visualizer-image-panel.is-active {
	opacity: 1;
}

#visualizer .visualizer-image-layer-1 {
	opacity: 1;
	mix-blend-mode: screen;
}

#visualizer .visualizer-image-layer-2 {
	opacity: 1;
	mix-blend-mode: lighten;
	display: none;
}

#visualizer .life-grid {
	font-family: 'Courier New', monospace;
	font-size: 100px;
	line-height: 100px;
	color: red;
	padding: 10px;
	white-space: pre;
	width: 100%;
	height: 100%;
	margin: 0;
	overflow: hidden;
	display: flex;
  	align-items: center;
	justify-content: center;
	/* text-shadow: 0px 0px 100px red; */
    color: white;
	filter: blur(22px);
	mix-blend-mode: color;
	position: relative;
	z-index: 1;
}

#visualizer .svg-step {
  opacity: 0;
  transition: opacity 0.3s ease;
}

#three-canvas {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 25%;
    left: 25%;
    filter: blur(0px);
    mix-blend-mode: plus-lighter;
}

/* menu */

#menu.active {
	top: 0vh;
	filter: blur(0px);
	transform: translateY(0vh);
	pointer-events: all;
	opacity: 1;	
	filter: blur(0px);
	pointer-events: all;
}

#menu {
	width: 100vw;
	height: 100vh;
	position: fixed;
	top: 0vh;
	left: 0vw;
	opacity: 0;
	pointer-events: none;
	transform: translateY(0vh);
	filter: blur(0px);
	background: black;
	transition: all 1200ms ease;	
	color: white;
	display: grid;
	grid-template-columns: 1fr 1fr;
	overflow-y: scroll;
}

#menu div#about-info, #menu div#menu-links {
	padding: 34px;
}

#menu #about-info p {
	margin-bottom: 34px;
}

#menu div#about-info {
	padding-bottom: 100px;	
}

#menu #menu-links h3 {
	font-weight: normal;
	font-size: 28px;
    line-height: 34px;
	margin-bottom: 34px;
	padding-left: 6px;
}

#menu #menu-links ul{
	max-width: 100%;
	list-style-type: none;
	font-family: 'Union', -apple-system, BlinkMacSystemFont, arial, helvetica, sans-serif;	
}

#menu #menu-links ul * {
	display: block;
}

#menu #menu-links ul li {
	margin-bottom: 36px;
	font-size: 20px;
	line-height: 24px;
	font-weight: normal;
}

#menu #menu-links ul img {
	max-width: 150px;
	margin-bottom: 12px;
	height: auto;
	width: auto;
}

#menu a {
	color: white;
}

#menu a:hover {
	background: none;
	opacity: .75;
}


/* parallax */

.parallax {
	margin: 80px 0px;
	position: relative;
	height: 150vh;
	width: 100vw;
	overflow: hidden;
	margin-left: calc(-1 * ( (100vw - 100%) / 2 ));
	box-shadow: 0px 0px 100px white;
}

.parallax .background,
.parallax .foreground,
.parallax .foreground-2 {
	background-position: center;
	background-size: cover;
}

.parallax .background {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	transform: translateY(0);
	filter: blur(4px);
}

.parallax .foreground,
.parallax .foreground-2 {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.parallax .foreground {
	z-index: 1;
	/* mix-blend-mode: hard-light; */
	filter: none;
}

.parallax .foreground-2 {
	z-index: 2;
	/* mix-blend-mode: hard-light; */
}

/* josh */

#josh .parallax {
	height: 250vh;
}

.parallax#jb-1 .background {
	background: url('../josh-berson/img/Pudding 006-JB-1_0.png') center / cover;
}

.parallax#jb-1 .foreground {
	background: url('../josh-berson/img/Pudding 006-JB-1_1.png') center / cover;
	filter: blur(0px);
}

.parallax#jb-1 .foreground-2 {
	background: url('../josh-berson/img/Pudding 006-JB-1_2.png') center / cover;
	filter: blur(0px);
}

.parallax#jb-2 .background {
	background: url('../josh-berson/img/Pudding 006-JB-2_0.png') center / cover;
}

.parallax#jb-2 .foreground {
	background: url('../josh-berson/img/Pudding 006-JB-2_1.png') center / cover;
	filter: blur(0px);
}

.parallax#jb-2 .foreground-2 {
	background: url('../josh-berson/img/Pudding 006-JB-2_2.png') center / cover;
	filter: blur(0px);
}

.parallax#jb-3 .background {
	background: url('../josh-berson/img/Pudding 006-JB-3_0.png') center / cover;
}

.parallax#jb-3 .foreground {
	background: url('../josh-berson/img/Pudding 006-JB-3_2.png') center / cover;
}

.parallax#jb-3 .foreground-2 {
	background: url('../josh-berson/img/Pudding 006-JB-3_1.png') center / cover;
}

/* jonathan */

.parallax#jc-1 .background {
	background: url('../jonathan-castro/img/Pudding 006-JC-1_0.png') center / cover;
}

.parallax#jc-1 .foreground {
	background: url('../jonathan-castro/img/Pudding 006-JC-1_1.png') center / cover;
}

.parallax#jc-1 .foreground-2 {
	background: url('../jonathan-castro/img/Pudding 006-JC-1_2.png') center / cover;
}

.parallax#jc-2 .background {
	background: url('../jonathan-castro/img/Pudding 006-JC-2_0.png') center / cover;
}

.parallax#jc-2 .foreground {
	background: url('../jonathan-castro/img/Pudding 006-JC-2_1.png') center / cover;
}

.parallax#jc-2 .foreground-2 {
	background: url('../jonathan-castro/img/Pudding 006-JC-2_2.png') center / cover;
}

.parallax#jc-3 .background {
	background: url('../jonathan-castro/img/Pudding 006-JC-3_0.png') center / cover;
}

.parallax#jc-3 .foreground {
	background: url('../jonathan-castro/img/Pudding 006-JC-3_1.png') center / cover;
}

.parallax#jc-3 .foreground-2 {
	background: url('../jonathan-castro/img/Pudding 006-JC-3_2.png') center / cover;
}

/* tiger */

/* #tiger header {
	height: auto;
	padding-bottom: 0px;
}

#tiger header h1 {
	padding-bottom: 30px;
}

#tiger header h2 {
	position: relative;
	bottom: auto;
} */

.parallax#td-1 .background {
	background: url('../tiger-dingsun/img/Pudding 006-TD-4_0.png') center / cover;
}

.parallax#td-1 .foreground {
	background: url('../tiger-dingsun/img/Pudding 006-TD-4_1.png') center / cover;
	filter: blur(0px);
}

.parallax#td-1 .foreground-2 {
	background: url('../tiger-dingsun/img/Pudding 006-TD-4_2.png') center / cover;
}

/* adjustments for josh's article */

#josh #intro, #josh blockquote, body#josh {
	font-size: 28px;
	line-height: 34px;
	font-weight: normal;
	letter-spacing: 0px;
}

body#josh blockquote {
	letter-spacing: -1px;
}

#josh blockquote::before {
	content: '';
	display: block;
	width: 20px;
	height: 100%;
	position: absolute;
	left: 0px;	
	border-radius: 10px;
	background: transparent;	
}

.number {
	font-weight: bold;
	font-family: 'Union', -apple-system, BlinkMacSystemFont, arial, helvetica, sans-serif;
}

body#josh #notes, body#josh #references, body#josh #notes h2, body#josh #references h2 {
	font-size: 20px;
	line-height: 24px;
}

body#tiger #notes {
	font-size: 20px;
	line-height: 24px;
}

body#jonathan #notes {
	font-size: 20px;
	line-height: 24px;
}

body#josh #notes, body#josh #references {
	margin-bottom: 120px;
}

#grid {
	padding: 30px 0px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 30px;
}

/* adjustments for jonathan's article */

/* adjustments for jonathan's article */

#tiger #essay img{
	width: 900px;
}


.page {
	min-height: 140vh;
	display: flex;
	align-items: center;

	font-size: 44px;
	line-height: 50px;
}

#audio-toggle {
	position: fixed;
	bottom: 20px;
	left: 20px;
	z-index: 10000;
	font-family: 'Union', -apple-system, BlinkMacSystemFont, arial, helvetica, sans-serif;	
	font-size: 12px;
	display: flex;
	justify-content: center;
	align-items: center;

	max-width: calc(100vw - 40px);
}

#audio-toggle-switch {
	background: white;
	border-radius: 30px;
	transition: all 1000ms ease;
	box-shadow: 0px 0px 20px black;	
	cursor: pointer;
	padding: 2px 15px;
	display: flex;
	justify-content: center;
	align-items: center;
}

#audio-toggle-switch:hover {
	color: red;
}


#audio-info {
	display: flex;
	flex-direction: row;
	height: auto;
	align-items: center;		
}


#audio-toggle * {
	margin: 5px;
}

#audio-toggle img {
	width: 12px;
	height: auto;
}

#audio-toggle audio {
	background: white;
	border-radius: 30px;
	transition: all 1000ms ease;
	box-shadow: 0px 0px 20px black;
	display: none; /* only the active track is shown */
}

#message {
	padding-right: 5px;
	-webkit-text-stroke: 5px #fff;
	paint-order: stroke fill;
	text-shadow: 0px 0px 3px rgba(255, 255, 255, 1);
}

audio::-webkit-media-controls-play-button,
audio::-webkit-media-controls-panel {
	background-color: #fff;
	color: #fff;
}

#audio-toggle audio.show {
	display: block;
}

bg-audio {
	/*display: block;*/
}

bg-audio-loop {
	/*display: block;*/
}

@media only screen and (max-width: 812px) { 

	html, body {
		overflow-x: hidden;
	}

	/* type */

	body {
		font-size: 20px;
		line-height: 26px;
	}

	#intro, figure, blockquote, h1, h2 {
		font-size: 16px;
		line-height: 20px;
	}	

	h1 {
		font-size: 44px;
		line-height: 50px;
		letter-spacing: -1.5px;
	}	

	h2 {
		letter-spacing: -.25px;
	}

	ul#essays, ul#essays li {
		font-size: 28px;
		line-height: 34px;
		letter-spacing: -1.5px;
	}

	.parallax {
		height: 150vh;
	}


	/* menu */

	#logo {
		width: auto;
		position: fixed;
		top: 15px;
		left: 0%;
		transform: translateX(0%);
		width: 100vw;
	}

	body.scroll #logo {
		transform: scale(.55) translateX(-70vw) translateY(-60px);
	}

	#logo h1 {
		font-size: 80px;
		line-height: 90px;
	}

	nav .button {
		width: 24px;
		height: 24px;
	}

	#menu {
		width: 100%;
		height: 100%;
		position: fixed;
		top: 0;
		left: 0;	
		padding-top: 30px;	
		display: block;
	}
	
	#container {
		padding: 0px 0px 250px;
		max-width: 100vw;
	}

	main {
		box-sizing: border-box;
		max-width: 100vw;
	}

	/* home */

	body#home {
		position: relative;
	}

	#header {
		overflow-x: hidden;
	}

	#header-img {
		width: calc(100% - 80px);
		left: 40px;
	}

	#header-img img {
		/* max-width: 300vw; */
		width: auto;
	}

	#home header h1 { 
		font-size: 70px;
	}

	#home header h2 {
		font-size: 55px;
	}

	main#page, ul#essays {
		width: 100%;
	}

	ul#essays img {
		max-width: calc(100%);
		width: auto;
		margin: 20px auto;
		padding: 10px;
		background: white;
		border-radius: 20px;	
	}

	/* josh */

	#josh #intro, #josh blockquote, body#josh {
		font-size: 20px;
		line-height: 24px;
	}

	body#josh blockquote {
    	letter-spacing: -.5px;
	}
	
	#grid {
		font-size: 16px;
		display: block;
	}

	/* jonathan */

	.page {
    	font-size: 24px;
    	line-height: 30px;
    }

	/* audio */

	#audio-info {
		display: flex;
		flex-direction: row;
		height: auto;
		width: 100%;
		justify-content: center;
		align-items: center;		
	}

	#audio-toggle {
		width: auto;
		width: 100%;
		font-size: 11px;
		flex-direction: column;
	}

	#bg-audio, #bg-audio-full, #audio-toggle-switch {
		width: 100%;
	}
	
	#audio-toggle-switch {
		padding: 10px;
		width: auto;
	}

}
