@font-face {
    font-family: 'Pantasia', serif;
    src: url("../justintam.github.io/assets/fonts/PantasiaCondensed-Regular.otf") format("opentype");
    /* font-display: fallback; */
}

@font-face {
    font-family: 'BM Spa';
    src: url("fonts/BMSPA___.TTF") format("truetype");
}

@font-face {
    font-family: 'FOT-Rodin Pro';
    src: url("fonts/FOT-Rodin Pro DB.otf") format("opentype");
}

#links {
	overflow-x: hidden;
	min-width: 30%;
	width: 30%;
}

#main {
	overflow-x: hidden;
	min-width: 30%;
	width: 30%;
}

#projects {
	overflow-x: hidden;
	min-width: 30%;
	width: 30%;
}

details {
	display: inline;
}

details summary {
	display: inline;
	list-style: none;
	cursor: crosshair;
	white-space: nowrap;
	/* padding-left: 0.3em; */
}

details > :not(summary) {
    display: inline;
}

details summary::-webkit-details-marker {
    display: none;
}

section {
    display: flex;
    flex-direction: row;
}

section div {
    width: 70%;
}

section div.body-text {
    padding: 60px 100px;
}

/* .body-text {
	font-size: 1.2rem;
	text-shadow: 0.3px 0.5px #580000;;
	
	animation: fadeIn ease 0.8s;
	-webkit-animation: fadeIn ease 0.8s;
	-moz-animation: fadeIn ease 0.8s;
	-o-animation: fadeIn ease 0.8s;
	-ms-animation: fadeIn ease 0.8s;
} */

@keyframes fadeIn{
	0% {
	  opacity: 0;
	}
	100% {
	  opacity: 1;
	}
  }
  
  @-moz-keyframes fadeIn {
	0% {
	  opacity: 0;
	}
	100% {
	  opacity: 1;
	}
  }
  
  @-webkit-keyframes fadeIn {
	0% {
	  opacity: 0;
	}
	100% {
	  opacity: 1;
	}
  }
  
  @-o-keyframes fadeIn {
	0% {
	  opacity: 0;
	}
	100% {
	  opacity: 1;
	}
  }
  
  @-ms-keyframes fadeIn {
	0% {
	  opacity: 0;
	}
	100% {
	  opacity: 1;
	}
  }

html {
	min-height: 100%;
	background: linear-gradient(rgba(188,228,229, 0) 5%, hwb(170 88% 3%) 98%);
	overscroll-behavior: none;
}

body {
	--color-text: #180e0e;
	--color-link: #180e0e;
	--color-link-hover: #c55347;
	color: var(--color-text);

	font-size: 1.8rem;
	
	font-family: 'FOT-Rodin Pro', 'DM Sans', 'Segoe UI', sans-serif;
	
	line-height: 1.4;
	margin: 0;
	padding: 40px 20px;
	position: relative;
	z-index: 20;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	min-height: 100vh;
	cursor: crosshair;

	-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility
}

.page {
	max-width: 160mm;
	width: 100%;
	background: rgba(188,228,229, 0.15);
	padding: 40mm 25mm;
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
	border-radius: 2px;
	position: relative;
}

header {
	position: sticky;
	top: 0;
	z-index: 100;
	padding: 10px 0;
	--scroll-progress: 0;
	font-family: 'Exo', sans-serif;
}

.header-morphed {
	position: fixed;
	top: 30px;
	left: 30px;
	z-index: 101;
	padding: 0;
	font-family: 'FOT-Rodin Pro', 'BM Spa', monospace;
	font-size: 1.2rem;
	opacity: 0;
	transform: scale(0.6);
	transform-origin: top left;
	color: var(--color-text);
}

/* Services text uses Segoe UI */
.page > .lang-swap {
	font-family: 'Segoe UI', sans-serif;
}

.weather {
	position: fixed;
	top: 30px;
	right: 30px;
	font-size: 1.2rem;
	opacity: 0.8;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 5px;
	z-index: 200;
	font-family: 'BM Spa', monospace;
}

.weather #temp {
	font-weight: normal;
}

.weather #season {
	font-size: 1rem;
	opacity: 0.8;
}

.weather #sunset {
	font-size: 0.9rem;
	opacity: 0.7;
}


/* Smooth transitions for dynamic blur effect */
.page > span,
.page > h3,
.page > li,
.page > p {
	transition: filter 0.1s ease-out;
}

/* Idle state - blur and darken the page more */
body.page-idle .page {
	filter: blur(4.5px);
	transition: filter 0.5s ease-in-out;
}

body.page-idle header {
	filter: blur(0px);
}

body.page-idle::before {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	pointer-events: none;
	z-index: 50;
	transition: opacity 2s ease-in-out;
	opacity: 1;
}

body:not(.page-idle)::before {
	opacity: 0;
}

/* Wake up animation - gentle shake effect */
@keyframes shake {
	0%, 100% { transform: translateX(0); }
	10%, 30%, 50%, 70%, 90% { transform: translateX(-1px); }
	22%, 45%, 75%, 95% { transform: translateX(1px); }
}

body.page-wake {
	animation: shake 0.3s ease-in-out;
	filter: blur(0px);
	transition: filter 0.5s ease-out;
}


a {
    /* color: darkslategray;
	*/
	text-decoration: none;
	color: var(--color-link);
	outline: none;
}

a:hover {
	color: var(--color-link-hover);
	outline: none;
}

/* a:hover {
    color: #d31c22;
    cursor: help;
    font-style: oblique;
	
} */

a::selection {
    background: #000;
    color: #fdbf68;
}

::selection {
    background: #000;
    color: #fff;
}

a[target="_blank"]:hover::after {
  content: "彡";
  margin: 0 3px 0 5px;
  font-size: 0.8em;
}

h1 {
    /* float: left; */
    font-size: 1.8rem;
    /* position: fixed; */
} 

h3 {
	font-size: 2.2rem;
	font-family: 'FOT-Rodin Pro', 'Exo', sans-serif;
	font-weight: 400;
	display: inline-block;
}

h2 {
	font-family: 'FOT-Rodin Pro', 'Exo', sans-serif;
}

h3:hover {
	transform: rotate(-4.6deg);
}


a.toplinks {
    background-size: 500% auto;
    background-position: -0% 0;
    color: #d31c22;
    font-size: 1rem;
    transition: background-position 1s ease-out;
    text-decoration: none;
}

a.toplinks:hover {
    background-position: -99.99% 0;
    cursor: help;
    font-size: 0;
    font-style: oblique;
    line-height: 0;
}

a.toplinks:hover:before {
    content: attr(data-hover);
    font-size: 1rem;
	
}

sup {
  font-size: 1.5rem;
  font-family: monospace;
  font-style: oblique;
	vertical-align: middle;
	line-break: auto;
}

li {
    list-style-type: none;    
	padding: 8px 0 4px 0;
	margin-left: 24px;
}

li::marker {
	content: "○ ";
	font-size: 1em;
}

/* to make youtube responsive */
/* .embed-wrapper {
	overflow: hidden;
	padding-top: 56.25%;
	position: relative;
}
.embed-wrapper iframe {
	 border: 0;
	 height: 100%;
	 left: 0;
	 position: absolute;
	 top: 0;
	 width: 100%;
} */

p {
	display: inline; /* Crucial - prevents <details> from being ejected */
	margin: 0; /* Remove default paragraph margins */
}

.wheel {
	font-size: 1rem;
	/* padding-top: 10rem; */
}

/** MOBILE VIEW **/
@media only screen and (max-width: 768px) {
	body {
		padding: 20px 10px;
	}
	
	.page {
		max-width: 100%;
		padding: 30px 20px;
		box-shadow: none;
		border-radius: 0;
	}
	
	img {
		width: 100%;
	}
	
	iframe {
		width: 100%;
	}
}


/* Scribble link animation */
.link--worksans {
    font-family: 'Work Sans', sans-serif;
    font-size: 1.25rem;
}

.link--worksans::before {
    display: none;
}


.link {
    cursor: crosshair;
    font-size: 18px;
    position: relative;
    white-space: nowrap;
    color: var(--color-link);
}

.link::before,
.link::after {
    position: absolute;
    width: 100%;
    height: 1px;
    background: currentColor;
    top: 100%;
    left: 0;
    pointer-events: none;
}

.link::before {
	content: '';
    /* show by default */
}

.link__graphic {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    fill: none;
    stroke: var(--color-link-hover);
    stroke-width: 1px;
}

.link__graphic--stroke path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
}

.link:hover .link__graphic--stroke path {
    stroke-dashoffset: 0;
}

.link__graphic--scribble {
    top: 100%;
}

.link__graphic--scribble path {
    transition: stroke-dashoffset 1.4s cubic-bezier(0.2, 0, 0.3, 0.6);
}

.link:hover .link__graphic--scribble path {
    transition-timing-function: cubic-bezier(2, 1.3, 2.7, 1);
    transition-duration: 0.7s;
}

.lang-swap {
	position: relative;
	display: inline-block;   /* Required for pseudo-elements */
  }
  
  .lang-swap:hover {
	color: transparent;     /* Hide original text */
  }
  
  .lang-swap:hover::after {
	content: attr(data-language);
	position: absolute;
	left: 0;
	top: 0;
	color: initial;
  }

/* Keep link visible during hover */
.lang-swap:hover a {
	position: relative;
	z-index: 1;
  }
  
/* 
// Original code
.link__graphic--scribble path {
	transition: stroke-dashoffset 0.6s cubic-bezier(0.7, 0, 0.3, 1);
}

.link:hover .link__graphic--scribble path {
	transition-timing-function: cubic-bezier(0.8, 1, 0.7, 1);
	transition-duration: 0.3s;
} */
/* Portrait fade */
/* 
.img-opacity img {
    position: absolute;
    top: 20%;
    right: 0;
    bottom: 0;
    left: 80%;
}

.img-opacity .img-1 {
    opacity: 0.1;
}

.img-opacity .img-2 {
    opacity: 0;
}

.img-opacity:hover .img-1 {
    opacity: 0;
}

.img-opacity:hover .img-2 {
    opacity: 1;
}

.img-opacity img {
    transition:all .2s ease-in-out;
    -webkit-transition:all .2s ease-in-out;
    -moz-transition:all .2s ease-in-out;
    -ms-transition:all .2s ease-in-out;
    -o-transition:all .2s ease-in-out;
}

.img-opacity:hover img {
    transition:all .1s ease-in-out;
    -webkit-transition:all .1s ease-in-out;
    -moz-transition:all .1s ease-in-out;
    -ms-transition:all .1s ease-in-out;
    -o-transition:all .1s ease-in-out;
} */