@import "_reset.css";

/* 
***************
Fonts
***************
*/
@font-face {
  font-family: "ABCDiatypeEdu-Bold";
  src: url("fonts/ABCDiatypeEdu-Bold.woff") format("woff"),
    url("fonts/ABCDiatypeEdu-Bold.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "ABCDiatypeVariableEdu";
  src: url("fonts/ABCDiatypeVariableEdu.woff") format("woff");
  src: url("fonts/ABCDiatypeVariableEdu.woff2") format("woff2");
}

/* 
***************
General
***************
*/

body,
html {
  overflow: hidden; 
  display: flex;
  flex-direction: column;
  font-family: "ABCDiatypeVariableEdu";
  font-size: 13px;
  line-height: 1em;
  font-feature-settings: "calt" 1, "liga" 1, "rlig" 1, "rvrn" 1, "kern" 1, "rclt" 1;
  font-variation-settings: "wght" 700, "ital" 0, "MONO" 0;
}

img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--border-radius);
}

.highlight {
  background-color:white;
  color: black;
}

/* Welcome Animation */
#white-overlay {
  background-color: white;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; 
  z-index: 9999;
  mix-blend-mode: difference;
  pointer-events: none; 
  animation: FadeOverlay 1s ease-out forwards 1.6s; 
}

@keyframes FadeOverlay {
  0% {
    opacity: 1;   
  }
  50% {
    opacity: 0.5;   
  }
  55% {
    opacity: 0.5;  
  }
  100% {
    opacity: 0;  
  }
}

/* Typewriter container */
#typewriter-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: black;
  color: white;
  z-index: 9999; 
  pointer-events: none;
  white-space: nowrap;
  border-right: 2px solid white; /* cursor */
  padding-right: 1px;
  overflow: hidden;
}

/* Cursor blinking animation */
@keyframes blinkCursor {
  0% { border-right-color: white; }
  50% { border-right-color: transparent; }
  100% { border-right-color: white; }
}

#typewriter-text {
  animation: blinkCursor 0.8s infinite;
}

#typewriter-container.fade-out {
  animation: fadeOut 2s forwards;
}

@keyframes fadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* Navigation | HEADER */
#headnav {
  position: fixed;
  width: 100%;
  height: 100px;
  top: 0;
  left: 0;
  z-index: 120;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 2fr 1fr 1fr 3fr 1fr 1fr 3fr;
  grid-gap: 3px;
  padding: 5px;
  text-decoration: none;
  z-index: 999;
  /* mix-blend-mode: difference; */
  opacity: 0; /* Initially hidden */
  animation: fadeInHeadnav 1s ease-in forwards 3s;
}
@keyframes fadeInHeadnav {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

#home-container {
  grid-column-start: 3;
}

#home-container a {
  background-color:black; 
  color: white;
}

#home-container a:hover {
  background-color:rgb(0, 0, 0);
  color: rgb(255, 255, 255);
}

#contact-container {
  grid-column-start: 5;
}

#contact-container p {
  display: inline; 
}

#contact-container a {
  background-color:white;
  color: black;
}

#contact-container a:hover {
  background-color:rgb(0, 0, 0);
  color: rgb(255, 255, 255);
}

#ig-container {
  text-decoration: none;
  grid-column-start: 7;
}

#ig-container a {
  background-color:white;
  color: black;
}

#ig-container a:hover {
  background-color:rgb(0, 0, 0);
  color: rgb(255, 255, 255);
}

#description-container {
  grid-column-start: 8;
}

#description-container a {
  background-color:white;
  color: black;
}

#description-container a:hover {
  background-color:rgb(0, 0, 0);
  color: rgb(255, 255, 255);
}

#navigation {
  grid-column-start: 11;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

#index-link-container, #lab-link-container {
  grid-column-start: auto;
}

#navigation a {
  background-color:white;
  color: black;
}

#navigation li {
  list-style: none;
}

#navigation a:hover {
  background-color:black;
  color: white;
}

#show-more-button {
  display: none; 
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 20px;
  background-color: black;
  color: white;
  border: none;
  cursor: pointer;
  z-index: 1000; 
  transition: background-color 0.3s ease;
}

#show-more-button:hover {
  background-color: #333; 
}



/* 
***************
SLIDERS
***************
*/

.slider-grid-container {
  position: fixed; 
  bottom: 20px; 
  left: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 2fr 1fr 1fr 3fr 1fr 1fr 3fr;
  grid-gap: 3px;
  align-items: center;
  z-index: 999; 
  opacity: 0; 
  animation: fadeInSlider 1s ease-in forwards 3s;
}

@keyframes fadeInSlider {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.slider-labels {
  grid-column: 3 / span 3 ; 
  display: flex;
  justify-content: space-between;

}

.slider {
  grid-column: 3 / span 3; 
  -webkit-appearance: none; 
  appearance: none;
  width: 100%; 
  height: 2px; 
  background: #000; 
  outline: none; 
}

.label-exp,
.label-sys {
  background-color: black;
  color: white;
  font-size: 14px;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none; 
  appearance: none;
  width: 20px; 
  height: 20px; 
  background: black;
  cursor: pointer; 
}

.slider::-moz-range-thumb {
  width: 20px; 
  height: 20px; 
  background: black; 
  cursor: pointer; 
}



/* 
***************
PROJECTS
***************
*/

#project-wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 99;
}

.project-image {
  transform-origin: center;
  position: fixed;
  left: 50%; 
  top: 50%; 
  width: 200px; 
  height: auto;
  cursor: pointer;
  transform: translate(-50%, -50%) translate3d(0, 0, 0); /* Center the image */
  transition: transform 0.5s ease, z-index 0.5s ease;
}

.project-image img {
  display: block;
  width: 100%;
  height: auto;
}

.project-video {
  width: 250px;
  pointer-events: auto; 
  cursor: pointer; 
  outline: none;
  user-select: none; 
}

.project-video::-webkit-media-controls, 
.project-video::-webkit-media-controls-enclosure {
  display: none !important; /* Disable controls on hover */
}

.project-video:hover,
.project-video:focus {
  outline: none; /* Prevent outlines */
}

input[type="range"] {
  margin: 20px 0;
}

/* 
***************
LAB
***************
*/

#ui {
  position: absolute;
  top: 50%; /* Center vertically */
  left: 0;  /* Align to the left of the screen */
  transform: translateY(-50%); /* Adjust for proper vertical centering */
  background-color: yellow; /* Background for #lab-ui */
  padding: 10px;
  width: 200px; /* You can adjust this as needed */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Optional shadow */
  z-index: 9999; /* Ensure it's above other content */
}

#artboard {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute; /* Use absolute positioning */
  top: 50%; /* Vertically center */
  left: 50%; /* Horizontally center */
  transform: translate(-50%, -50%); /* Ensure proper centering */
  background-color: transparent; /* Background for #lab-artboard */
  width: 500px; /* Adjust width as necessary */
  height: 500px; /* Adjust height as necessary */
  z-index: 999; /* Lower z-index than #lab-ui if needed */
}

/* 
***************
Typography
***************
*/

.body-text {
  font-size: 13px;
  padding-right: 0.4%;
  line-height: 1;
}

a {
  text-decoration: none;  /* Remove the underline from links */
}


/* 
***************
INDEX List
***************
*/

.index-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background-color: rgba(255, 101, 211, 0.467);  */
  z-index: 9999; 
  justify-content: center;
  align-items: center;
  text-transform: uppercase;
  color: white;
  z-index: 9999;
  background-color: #ffffff;
  mix-blend-mode: difference;
  opacity: 0; 
  animation: fadeInBottomnav 500ms ease-in forwards; /* Fade in after 2s */
  /* backdrop-filter: blur(2px);  */
}

/* Keyframes for fade-in animation */
@keyframes fadeInBottomnav {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.index-overlay-content {
  display: flex;
  color: black;
  padding: 20px;
  border-radius: 8px;
  width: 50%;
  max-height: 80%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  /* overflow-y: auto; */
}

.index-overlay h2 {
  display: flex;
  background-color: white;
  color: black;
  margin-bottom: 20px;
}

.index-overlay ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.index-overlay li {
  /* padding: 10px 0; */
  background-color: white;
  color: black;
  text-align: center;
}

.index-overlay .close-button {
  border: none;
  /* display: block; */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 20px auto 0;
  background-color: white;
  color: black;
  font-family: "ABCDiatypeVariableEdu";
  font-size: 13px;
  line-height: 1em;
  font-feature-settings: "calt" 1, "liga" 1, "rlig" 1, "rvrn" 1, "kern" 1, "rclt" 1;
  font-variation-settings: "wght" 700, "ital" 0, "MONO" 0;
  text-transform: uppercase;
  outline: none;        
  appearance: none;   
  -webkit-appearance: none;
  transition: background-color 0.3s, color 0.3s;
}

.index-overlay .close-button:hover {
  background-color: rgb(0, 0, 0);
  color: white;
}

#mobile-page-title {
  display: none; 
}

#mobile-menu {
  display: none;
  position: fixed;
  margin-left: 20px;
  top: 50px;
  background: rgba(255, 255, 255, 0);
  color: #ffffff;
  z-index: 9999;
  padding: 0px;
 
}

#mobile-menu ul {
  list-style: none;
  padding: 0;
}

#mobile-menu ul li {
  margin: 20px 0;
  
}

#mobile-menu ul li a {
  text-decoration: none;
  background-color: #000;
  color: white;
  font-size: 32px;
}

#mobile-menu-trigger { /* button */
  display: none; /* hidden on desktop */
  position: center;
  outline: none;
  font: inherit;
  left: auto;
  background-color: none;
  background: none;
  color: #000000;
  font-size: 32px;
  z-index: 99999;
  padding: 0px;
  margin-top: 20px;
  margin-left: 20px;
  -webkit-appearance: none; 
  -moz-appearance: none; 
  appearance: none; 
  outline: none;
  border: none;
  opacity: 0; /* Initially hidden */
  animation: fadeInInfo 1s ease-in forwards 3s;
}
@keyframes fadeInInfo {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
#mobile-menu-trigger:focus {
  outline: none; /* Ensure there's no outline on focus */
}


/* 
***************
MEDIA QUERIES
***************
*/

@media (max-width: 1001px) {
  body,
  html {
  font-size: 32px;
  line-height: 1.1em;
  } 
  #headnav {
    display: none;
  }
  #mobile-page-title {
    display: flex; 
    justify-content: center; 
    align-items: center; 
    position: fixed; 
    top: 20px;
    left: 50%;
    transform: translateX(-50%); 
    background-color: black; 
    color: white; 
    font-size: 32px; 
    z-index: 10000; 
    text-align: center;
    opacity: 0; /* Initially hidden */
    animation: fadeInMPageTitle 1s ease-in forwards 3s;
  }
  @keyframes fadeInMPageTitle {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    } 
  }
  #mobile-menu-trigger {
    display: flex;
  }
  #mobile-menu {
    display: none; 
  }
  #navigation {
    width: 90%;
  }
  .project {
    width: 200px;
  }
  .project img {
    width: 200px;
  }
  /* Center the sliders with margins on smaller screens */
  .slider-grid-container,
  .slider-container-raw-polished {
    position: fixed; 
    bottom: 100px; 
    left: 20px; 
    right: 20px; 
    width: auto; 
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 999; 
    padding: 0px;
  }

  .slider {
    width: 80%; 
    height: 5px; 
  }

  .slider::-webkit-slider-thumb {
    -webkit-appearance: none; 
    appearance: none;
    width: 50px; 
    height: 50px; 
    background: #000000;
  }
  
  .slider::-moz-range-thumb {
    width: 50px; 
    height: 50px; 
    background: #000000;
  }

  /* Labels styling for the slider on mobile */
  .slider-labels {
    display: flex;
    justify-content: space-between;
    width: 80%; 
    padding: 0 0px; 
    margin-bottom: 5px; 
  }

  .label-exp,
  .label-sys {
    font-size: 24px; 
    color: white;
    background-color: black;
  }
}

@media (max-width: 480px) {
  #navigation {
    width: 90%;
  }
  .project {
    width: 100px;
    height: 150px;
  }
  .project img {
    width: 60px;
  }
}
