
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');
@font-face {
	font-family: 'Tiny5';
	/* set name */
	src: url('https://raw.githubusercontent.com/Gissio/font_Tiny5/refs/heads/main/fonts/ttf/Tiny5-SolidRegular.ttf') format('truetype');
}

@font-face {
	font-family: 'Tiny5 CRT Bold';
	/* set name */
	src: url('https://raw.githubusercontent.com/Gissio/font_Tiny5/refs/heads/main/fonts/ttf/Tiny5-CRTBold.ttf') format('truetype');
}

html {
	
    min-height:100%;
}
body {

	--bounce-out-easing: cubic-bezier(0.0,2.0,0.5,1);

	--debug-border-style: dotted;
	--debug-border-width: 2px;
	--debug-border-opacity: 0.0;
	--debug-border-red: var(--debug-border-style) var(--debug-border-width) rgba(255, 000, 000, var(--debug-border-opacity));
	--debug-border-green: var(--debug-border-style) var(--debug-border-width) rgba(000, 255, 000, var(--debug-border-opacity));
	--debug-border-blue: var(--debug-border-style) var(--debug-border-width) rgba(000, 128, 255, var(--debug-border-opacity));
	--debug-border-yellow: var(--debug-border-style) var(--debug-border-width) rgba(255, 255, 000, var(--debug-border-opacity));
	--debug-border-purple: solid var(--debug-border-width) rgba(255, 000, 255, var(--debug-border-opacity));
	--debug-border-white: solid var(--debug-border-width) rgba(255, 255, 255, var(--debug-border-opacity));

	
	--margin-mult: 1.0;

	--categories-padding: calc(2rem * var(--margin-mult));

	--category-gap: calc(1rem * var(--margin-mult));
	--category-hor-margin: calc(2rem * var(--margin-mult));
	--category-ver-margin: 0px;

	--title-padding-top: calc(1rem * var(--margin-mult));
	--title-padding-bottom: calc(1rem * var(--margin-mult));
	--title-margin-bottom: 0px;

	--seperator-margin-bottom: calc(0.5em * var(--margin-mult));
	
	--style: oshi;
	
	--font-normal: 'VT323', 'Tiny5', monospace;
	--font-bold: var(--font-normal);
	--font-size: 24px;
	--font-height: calc(1em);
	
	--font-header-normal: 'Tiny5', var(--font-normal);
	--font-header-bold: 'Tiny5 CRT Bold', var(--font-bold);
	--font-header-height: calc(1ch * 0.9);
	
	--color-bg: #1e1104;
	--color-text: #946501;
	--color-box-header: #623505;
	--color-box-header-text: var(--color-text);
	--color-box-bg: #371d02;
	--color-box-text: var(--color-text);
	--color-box-accent: #5e3407;
	--color-box-border: var(--color-box-header);
	--color-selection: #7A401180;
	--color-selection-text: #b35c16;
	--color-computer-shadow: #27190b;
	
	--color-preview-bg: var(--color-box-header);
	--color-preview-text: var(--color-box-header-text);
	
	/*
	--color-bg: #2A1E0E;27190b
	--color-text: #7A4011;
	--color-box-header: #452b10;
	--color-box-header-text: var(--color-text);
	--color-box-bg: #2c1d0e;
	--color-box-text: var(--color-text);
	--color-box-accent: #452b10;
	--color-box-border: #a6601580;
	--color-preview-text: var(--color-text);
	--color-selection: #7A401180;
	--color-selection-text: #b35c16;
	--color-computer-shadow: #27190b;
	*/

	--fade-in-timing: 1.5s;

	--fade-in-when-loaded-animation: fade-in-when-loaded var(--fade-in-timing) cubic-bezier(0.75,0,0.75,1) 1 forwards;

	background-color: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-normal);
	font-size: var(--font-size);
	text-align: center;
	margin: 0;
	padding: 0;
	text-transform: uppercase;
    height:100%; 
}
@keyframes fade-in-when-loaded {
	from {
		opacity: 0.0
	}
	to {
		opacity: 1.0
	}
}

#screen-type {
	display: none;
	position: fixed;
	width: 100%;
	text-align: center;
	align-self: center;
	vertical-align: middle;
	font-size: 24px;
	line-height: 24px;
	background-color: #00000080;
	color: white;
	top: 0px;
}
#screen-type:nth-of-type(2) {
	top: 24px;
}
#screen-type:nth-of-type(3) {
	top: 48px;
}

#background {
	position: fixed;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: var(--color-bg);
	z-index: -1;
}
#loading {
	position: fixed;
	display: flex;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	justify-content: center;
	align-items: center;
	pointer-events: none;
	user-select: none;
	z-index: 100;
}
#loading.loaded {
	opacity: 0.0;
	transform: scale(0.6);
	transition: opacity 0.7s ease-out, transform 0.7s cubic-bezier(0.6,-0.28,0.74,0.05);
}
#loading #centered {
	text-align: left;
	vertical-align: middle;
	font-size: 4em;
	width: 5em;
}
#loading #label {
	text-align: center;
	vertical-align: middle;
	font-size: 1em;
}
#loading #bar {
	background: #1e1104;
	width: 100%;
	height: 0.3em;
	overflow:hidden;
	border-radius: 4px;
	border: solid 2px #623505;
}
#loading #bar #progress {
	background: #623505;
	border: solid 2px #1e1104;
	width: 0%;
	height: 100%;
	border-radius: 4px;
	transition: width 0.5s var(--bounce-out-easing);
}

#loading #label::after {
	content: "loading...";
	white-space-collapse: preserve-spaces;
	animation: loading-cycle 2s linear forwards infinite;
}
@keyframes loading-cycle {
	0% {
		content: "loading   ";
	}
	25% {
		content: "loading.  ";
	}
	50% {
		content: "loading.. ";
	}
	75% {
		content: "loading...";
	}
	100% {
		content: "loading   ";
	}
}

#loading #label::after {
	content: "loading...";
	animation: loading-cycle 2s linear forwards infinite;
}

strong, b, s {
	font-family: var(--font-bold);
}

* {
	box-sizing: border-box;
}

a {
	color:var(--color-text);
	text-decoration: underline;
	cursor: pointer;
}

h1, h2, p, div {
	text-align: center;
}
	
ul {
	display: inline-block;
	text-align: left;
}

li::marker {
	content: "⊹ ";
}

.columns {
	display: flex;
	flex-direction: row;
	height: 100%;
}
.rows {
	display: flex;
	flex-direction: column;
	width: 100%;
}
/* 

.section{
	flex: 1;
}

.columns:nth-child(2n) {
	border: var(--debug-border-red);
}
.columns:nth-child(2n+1) {
	border: var(--debug-border-green);
}
.rows:nth-child(2n) {
	border: var(--debug-border-blue);
}
.rows:nth-child(2n+1) {
	border: var(--debug-border-yellow);
}
*/

::selection, ::-moz-selection {
	background-color: var(--color-selection);
	color: var(--color-selection-text) !important;
}

.emoji {
	background-position: center;
	background-size: contain;
	background-repeat: no-repeat;
	color: transparent !important;
}
.emoji::selection, .emoji::-moz-selection {
	color: transparent !important;
}


#container {
	height: calc(100% - var(--categories-padding) * 2);
	width: calc(100vw - var(--categories-padding) * 2);
	margin: var(--categories-padding);
	z-index: 10;
}

#container > div {
	flex: 1;
	width: calc(100vw - var(--categories-padding) * 2);
	justify-content: end;
	/* gap: var(--category-gap); */
}

.category {
	min-width: min-content;
	height: fit-content;
	overflow: hidden;
	margin: var(--category-ver-margin) 0;
	padding-bottom: 3rem;
	background: var(--color-box-bg);
	border: solid 1px var(--color-box-border);
}

.category > #title {
	padding: var(--title-padding-top) 0 var(--title-padding-bottom) 0;
	margin: 0 0 var(--title-margin-bottom) 0;
	font-size: 2em;
	font-family: var(--font-header-bold);
	height: calc(var(--font-header-height) + var(--title-padding-top) + var(--title-padding-bottom));
	background: var(--color-box-header);
	color: var(--color-box-header-text);
	div {
		line-height: 1em;
		vertical-align: text-top;
		transform: translateY(calc(var(--font-header-height) * -0.5));		
	}
}
.category > :not(.seperator) {
	padding: 0 var(--category-hor-margin);
}

.seperator {
	letter-spacing: 2px;
	text-overflow: ellipsis;
	text-wrap: nowrap;
	margin-bottom: var(--seperator-margin-bottom);
}
/* .seperator::after {
	content: "+ - + - + - + - + - + - +";
} */

/* # --- */

/* # LINK CATEGORY */

#links.category {
	--category-hor-margin: calc(20% * var(--margin-mult));
	width: 30%;
	margin-left: 5%;
	margin-right: 5%;
	display: none;
}

#links.category #content {
	display: grid;
	grid-template-columns: 1fr 1fr;
	justify-content: center;
	min-width: fit-content;
	text-align: center;
	text-wrap: nowrap;
	column-gap: 1rem;
	row-gap: 1rem;
}

/* # --- */

/* # COMPUTER */

#computer {
	--x-offset: -63vh + 20vw;
	--size: 1;
	--image-width: calc(90vw);
	--image-height: calc(120vh * var(--size));
	--pos-x: 0px;
	--pos-y: 0em;
	font-size: var(--font-size);
	position: absolute;
	left: var(--pos-x);
	top: var(--pos-y);
	width: fit-content;
	height: fit-content;
	padding: 0;
	pointer-events: none;
	z-index: 20;
	opacity: 0.0;
}
#computer.loaded {
	animation: var(--fade-in-when-loaded-animation);
}

#computer img {
	position: absolute;
	left: calc(var(--x-offset) * var(--size));
	top: 0vh;
	width: auto;
	height: var(--image-height);
}
#computer #screen {
	position: relative;
	z-index: 20;
}
#computer #screen #cursor {
	animation: blinking-cursor 1.0s linear 0s infinite alternate forwards;
}
@keyframes blinking-cursor {
	0%, 40% {
		opacity: 1.0;
	}
	60%, 100% {
		opacity: 0.0;
	}
}
#computer #twitch-video {
	position: absolute;
	pointer-events: initial;
	height: calc(var(--image-height) * 0.32);
	left: 21%;
	margin-top: 15.5%;
	aspect-ratio: 1.77777;
	transform: translate(-50%, -50%) scale(1.02) perspective(100vh) rotateX(5deg);
	overflow: hidden;
	z-index: 21;
}
#computer iframe {
	position: absolute;
	width: 100%;
	height: 100%;
	left: 0;
	top: 0 !important;
}
#computer #overlay, #computer #overlay-shadow {
	display: block;
	z-index: 22;
}
#computer #overlay-shadow {
	display: none;
	filter: drop-shadow(0px 0px 10px var(--color-computer-shadow));
	mask: url("/resources/assets/computer_screen.png") no-repeat center;
	mask-size: contain;
}

/* # --- */

/* # INFO CATEGORY */

#info.category {
	--width: 60%;
	--picture-width: 40%;
	width: var(--width);
	min-width: var(--width);
	text-transform:	none;
	opacity: 0.0;
}
#info.category.loaded {
	animation: var(--fade-in-when-loaded-animation);
}

#info.category #content {
	flex: calc(100% - var(--picture-width));
}
#info.category #content #about {
	margin: 0 0;
	border: solid 2px var(--color-box-accent);
	border-radius: 2px;
	padding: 0.5em;

	h1, h2, h3, h4 {
		margin: 0 0;
	}
	p {
		margin: 0.5em 0;
	}
}
#info.category #content ul {
	margin: 0.0em;
	line-height: 1.2em;
}
#info.category #content .key {
	font-family: var(--font-bold);
	font-weight: 600;
	border: solid 1px var(--color-box-accent);
	border-radius: 2px;
	padding: 0 6px 0 5px;
}

#info.category #picture {
	flex: var(--picture-width);
	background: url('/resources/assets/moyasi-charm.avif') no-repeat;
	background-size: contain;
	background-position: center;
}
#info.category #links {
	flex: 1;
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	justify-content: center;
	min-width: fit-content;
	text-align: center;
	text-wrap: nowrap;
	column-gap: 1rem;
	row-gap: 1rem;
	margin-left: 25%;
}

/* # --- */

/* # PORTFOLIO */

#portfolio {
	margin-top: 16rem;
}
#portfolio > .columns {
	margin: 0 5%;
	gap: 1em;
}

#portfolio > .columns > .rows {
	width: 33%;
	gap: 1em;
}

#portfolio .item {
	cursor: pointer;
	opacity: 0.0;
}
#portfolio .item.loaded {
	animation: var(--fade-in-when-loaded-animation);
}

#portfolio .item #image {
	user-select: none;
	pointer-events: none;
	border-radius: 0.15em;
	background-size: contain;
	background-repeat: no-repeat;
	transform: rotate(var(--img-rotation)) scale(1.0);
	transition: transform 0.1s cubic-bezier(0.0, 0.75, 0.65, 2.0);
}
#portfolio .item:hover #image {
	transform: rotate(calc(var(--img-rotation) * -1)) scale(1.02);
}
#portfolio .item:active #image {
	transform: rotate(calc(var(--img-rotation) * 2)) scale(0.9);
}

/* # | LABELS */

/* disable labels */
#portfolio .item #label {
	display: none;
}

/* enable labels
#portfolio .item > div {
	font-family: var(--font-bold);
	font-size: calc(var(--font-size) * 0.75);
	font-weight: 800;
	position: absolute;
	margin: auto;
	padding: 0 0.4em;
	bottom: 0.25em;
	left: 0.25em;
	border-radius: 0.15em;
	background: #e4cc76;
}*/

/* # --- */

/* # PORTFOLIO: ITEM OPEN */

#portfolio-preview:not(.active) {
	display: none;
	pointer-events: none;
	opacity: 0.0;
}

#portfolio-preview {
	--margins: 5;
	--width-if-wider: calc(100vw - var(--margins) * 2vw);
	--height-if-taller: calc(100vh - var(--margins) * 2vh);
	position: fixed;
	display: flex;
	justify-content: center;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	z-index: 100;
}
#portfolio-preview.closing {
	pointer-events: none;
}


#portfolio-preview #bg {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background: #2a1e0ea0;
	z-index: 101;
	opacity: 0.0;
}
#portfolio-preview.opening #bg {
    animation: portfolio-preview-bg-open 1s forwards;
    animation-timing-function: cubic-bezier(0.0, 1.8, 0.74, 1.0);
}
@keyframes portfolio-preview-bg-open {
	from {
	}
	to {
		opacity: 1.0;
	}
}
#portfolio-preview.closing #bg {
    animation: portfolio-preview-bg-close 1s forwards;
    animation-timing-function: cubic-bezier(0.0, 1.8, 0.74, 1.0);
}
@keyframes portfolio-preview-bg-close {
	from {
		opacity: 1.0;
	}
	to {
	}
}

#portfolio-preview #image {
	--scale: 0.8;
	--rot: calc(var(--img-rotation) * -1);
	--offsety: 0%;
	position: absolute;
	margin-top: 4vh;
	top: 0;
	height: 80vh;
	background-repeat: no-repeat;
	background-size: contain;
	background-position: center;
	border-radius: 6px;
	transform: rotate(var(--rot)) scale(var(--scale));
	z-index: 102;
	opacity: 0.0;
}
#portfolio-preview #label {
	--scale: 0.8;
	--rot: calc(var(--img-rotation) * -1);
	--offsety: 37vh;
	position: absolute;
	top: 50vh;
	width: fit-content;
	padding: 1em;
	background-repeat: no-repeat;
	background-size: contain;
	background-position: center;
	border-radius: 3px;
	background: var(--color-preview-bg);
	color: var(--color-preview-text);
	transform: rotate(var(--rot)) scale(var(--scale)) translateY(var(--offsety));
	z-index: 103;
	opacity: 0.0;
}
#portfolio-preview #label.double {
	--offsety: 35.5vh;
}

#portfolio-preview.active > div {
	opacity: 1.0;
}
#portfolio-preview.active.opening > div {
    animation: open-image 200ms forwards;
    animation-timing-function: cubic-bezier(0.0, 1.8, 0.74, 1.0);
}
@keyframes open-image {
	from {
		opacity: 0.0;
	}
	to {
		--scale: 1.0;
		--rot: calc(var(--img-rotation));
		transform: rotate(var(--rot)) scale(var(--scale)) translateY(var(--offsety));
		opacity: 1.0;
	}
}
#portfolio-preview.closing > div {
    animation: close-image 200ms forwards;
    animation-timing-function: cubic-bezier(0.0, 1.8, 0.74, 1.0);
}
@keyframes close-image {
	from {
		opacity: 1.0;
	}
	to {
		--scale: 0.8;
		--rot: calc(calc(var(--img-rotation) * -1));
		opacity: 0.0;
	}
}




/* # --- */

/* # MEDIA */

@media (min-aspect-ratio: 1.3) {
	#screen-type:first-of-type::after {
		content: "pc";
	}
	.mobile {
		display: none;
	}
}
@media (max-aspect-ratio: 1.3) {
	#screen-type:first-of-type::after {
		content: "mobile";
	}
	.pc {
		display: none;
	}
}


#computer:not(.loaded), #portfolio .item:not(.loaded), #info.category:not(.loaded) {
	opacity: 0;
}