:root {
  --font: 'PST';
  --font-size: 1.3rem;
  --font-size-s: 0.8rem;
  --font-size-s-case: capitalize;
  --font-size-m: 0.95rem;
  --font-size-m-case: capitalize;
  --line-height: 1.1em; 
  --letter-spacing: 0.04rem;
  --letter-spacing-m: 0.04rem;
  --background-color-light: #ffffff;
  --text-color-light: #121212;
  --link-color-light: #F2F2F2;
  --link-color-light-hover: #8447FF;
  --em-color-light: #F2F2F2;
  --logo-color-light: #121212;
  --menu-list-color-light: #121212;
  --menu-list-hover-color-light: #121212;
  --darkModeToggle-color-light: #121212;
  --header-background-rgb-light: rgb(255,255,255);
  --header-background-light: linear-gradient(
    0deg,
    rgba(255, 255, 255, 1) 50%,
    rgba(255, 255, 255, 0.9) 88%,
    rgba(255, 255, 255, 0.2) 95%,
    rgba(255, 255, 255, 0.15) 97%,
    rgba(255, 255, 255, 0.01) 98%,
    rgba(255, 255, 255, 0) 100%
  );
  
  
  --background-color-dark: #121213;
  --text-color-dark: #dedee3;
  --link-color-dark: #f4f4f4;
  --link-color-dark-hover: #8447FF;
  --em-color-dark :#2e2e2e;
  --logo-color-dark: #f4f4f4;
  --menu-list-color-dark: #f4f4f4;
  --menu-list-hover-color-dark: #f4f4f4;
  --darkModeToggle-color-dark:#f4f4f4;
  --header-background-rgb-dark: rgb(18, 18, 19);
  --header-background-dark: linear-gradient(0deg,
  rgba(18, 18, 19, 1) 50%,     
  rgba(18, 18, 19, 0.9) 88%,  
  rgba(18, 18, 19, 0.2) 95%, 
  rgba(18, 18, 19, 0.15) 97%,   
  rgba(18, 18, 19, 0.01) 98%,  
  rgba(18, 18, 19, 0) 100%); 
}


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

@keyframes float {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-9px); }
  100% { transform: translateY(0); }
}

#welcome-overlay {
  display: flex;
  position: fixed;
  z-index: 99999;
  inset: 0;
  background: var(--background-color-light);
  color: var(--text-color-light);
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-left: 0.75rem;
  padding-top: 0.5rem;
  cursor: pointer;
  transition: opacity 1s ease, visibility 1s ease;
  opacity: 1;
  visibility: visible;

  animation: float 4s cubic-bezier(0.42, 0, 0.58, 1) infinite;
}

#welcome-overlay.fade-out {
  animation: fadeOut 1s ease forwards, float 4s cubic-bezier(0.42, 0, 0.58, 1) infinite;
  pointer-events: none;
}



html, body {
  cursor: none;
  height: 100%;
  color: var(--text-color-light);
  scroll-behavior: smooth;
}

body.dark-mode {
  background-color: var(--background-color-dark);
  color: var(--text-color-dark);
}

/* Hide scrollbars for all WebKit-based browsers */
.project-info::-webkit-scrollbar {
  display: none; 
}

/* Works on Chrome, Edge, and Safari */
.filter::-webkit-scrollbar {
  background: transparent;
}

::-webkit-scrollbar {
  display: none; 
}

.project-info {
  overflow: hidden; 
}

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

html, body {
  height: 100vh; 
  margin: 0; 
  padding: 0;
}





.cursor {
  position: fixed;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(45deg, #8447FF, #8447FF);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  filter: blur(5px);
  transition: background 0.3s ease;
}





/* Typography */

@font-face {
  font-family: 'PST';
  src: url('/assets/fonts/PSTimes-Regular.otf') format('truetype');
  font-weight: 400;
  font-style: normal;
}


body {
  font-family: var(--font);
  font-size: var(--font-size);
  letter-spacing: var(--letter-spacing);
  line-height: var(--line-height);
  font-style: normal;
  font-weight: 400;
  line-height: 1.1em;
  padding: 0.75rem;
  padding-top: .5rem;;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1; 
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 400;
  font-family: var(--font);
  font-size: var(--font-size);
  letter-spacing: var(--letter-spacing);
  line-height: var(--line-height);
  margin-bottom: 20px;
  margin-top: 0;
}


p {
  font-weight: 400;
  font-family: var(--font);
  font-size: var(--font-size);
  letter-spacing: var(--letter-spacing);
  line-height: var(--line-height);
}

a {
  font-weight: 400;
  font-family: var(--font);
  font-size: var(--font-size);
  letter-spacing: var(--letter-spacing);
  line-height: var(--line-height);
  color: var(--link-color-light);
  text-decoration: none;
  cursor: none;
  transition: color 0.25s ease;
}

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

em {
  font-family: var(--font);
  font-size: var(--font-size);
  letter-spacing: var(--letter-spacing);
  line-height: var(--line-height);
  font-style: normal;
  color: var(--em-color-light);
  transition: color 0.25s ease;
  z-index: 2;
}

em:hover{
  color: var(--link-color-light-hover);
}

em::before {
  content: ''; /* Empty content */
  position: absolute; 
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  z-index: -1; /* Place behind the text */
  transition: opacity 1s ease;
  opacity: 0; /* Initially invisible */
}

/* Change the opacity of the pseudo-element on hover */
em:hover::before {
  opacity: 1; /* Fully visible on hover */
}






.header-container {
  background: var(--header-background-rgb-light);
  background: var(--header-background-light);
  position: fixed; 
  height: 3rem;
  bottom: 0;
  left: 0;
  right: 0.75rem;
  left: 0.75rem;
  z-index: 1001; 
}


.site-content {
  margin: 0; 
  padding: 0; 
  flex-grow: 1; 
}


.footer {
height: 0;

}

header, footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  text-align: left;
}

header h1, footer p {
  margin-top: 0;
  padding: 0 0;
}

.site-title {
  position: fixed;
  bottom: 0;    
  left: 0.75rem;           
  font-size: var(--font-size);       
  z-index: 1001;        
  padding-bottom: 0.75rem;
}
.logo:hover {
  color: var(--link-color-light-hover);
}

.logo {
  font-weight: 400;
  font-size: var(--font-size);
  color: var(--logo-color-light);
}

.menu {
  position: fixed;
  bottom: 0;
  right: 0;
  font-size: var(--font-size);
  list-style-type: none;  
  padding-right: 0;
  padding-bottom: 0.75rem;
  margin: 0;         
  display: flex;          
  justify-content: right; 
  text-align: right;
  z-index:1000;
}

.menu li { 
  display: inline;
}

.menu li:last-child {
  margin-right: 0; 
  
}

.menu li a {
  text-decoration: none; 
  color: var(--menu-list-color-light);          
  padding-top: 5px;
  padding-right: .75rem;     
}

.menu li a:hover {
  color: var(--link-color-light-hover);          
}

.darkModeToggle{
  color: var(--darkModeToggle-color-light);
}

.dark-mode {
  min-height: 100vh;
  background-color: var(--background-color-dark);
}








/* FILTER SYSTEM */
/* container: single horizontal row, scroll if needed */
.filter {
  display: flex;
  flex-wrap: nowrap;            /* never wrap */
  overflow-x: auto;             /* horizontal scrolling */
  overflow-y: visible;          /* allow underline to be visible */
  -webkit-overflow-scrolling: touch;
  align-items: center;
  gap: 0.2rem;
  margin: 0 0 0.6rem 0;
  white-space: nowrap;          /* extra safety */
}

/* links: keep them on one line and don't stretch */
.filter a {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;               /* don't grow or shrink */
  white-space: nowrap;          /* text doesn't wrap */
  text-decoration: none;
  color: var(--text-color-light);                /* default color */
  transition: color .25s ease;
  padding: 0 .35rem .35rem;     /* bottom padding to room the underline */
}

/* underline: 110% width, inside the link box, animated with scaleX */
.filter a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: .1rem;                
  width: 110%;                  
  height: 1px;
  background: #8447FF;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform .25s ease;
  pointer-events: none;        
}

/* hover + active state: color + underline */
.filter a:hover,
.filter a.active {
  color: var(--text-color-light);               /* purple when hovered/selected */
}

.filter a:hover::after,
.filter a.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* debug helper (optional): show the link boxes to verify no wrap */
/* .filter a { outline: 1px dashed rgba(0,0,0,.05); } */







/* Projects Grid */
.projects {
  display: grid;
  grid-template-columns: repeat(8 , 1fr);
  list-style: none;
  grid-gap: calc(2vw);
  transition: all 0.5s ease;
  padding: 0;
  padding-bottom: 3rem;
}

.projects li {
  position: relative;
  overflow: visible;
  height: auto;
}

.projects img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.projects figure {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: .5rem;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0); /* invisible zero shadow initially */
  transition: 
    transform 0.35s ease,
    box-shadow 0.35s ease;
  perspective: 1000px; /* Add perspective for 3D effect */
  border: 1px solid#ffffff;
}

.projects figure:hover {
  z-index: 2;
  position: relative;
  transform: translateY(-2%);
  box-shadow: -0.4rem 0.4rem 0.4rem rgba(0, 0, 0, 0.1); /* grows as it moves */
}


figcaption {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #36213E;
  opacity: 0; /* Initially hidden */
  transition: opacity 0.3s; /* Transition for smooth opacity change */
}

figure:hover figcaption {
  opacity: 0; /* Keeps the caption hidden on hover */
}

/* Project Animations */
.project {
  opacity: 0;
  transform: translateY(.3rem);
  transform: translateX(.1rem);
  transition: opacity 0.3s ease, transform 0.3s ease;
}


.project.fadeIn {
  opacity: 1;
  transform: translateY(0);
  transform: translateX(0);
}

.project.fadeOut {
  opacity: 0;
  transform: translateY(.3rem);
  transform: translateX(.35rem);
}

.project.visible {
  opacity: 1;
  transform: translateY(0);
  transform: translateX(0);
}


/* Project Gallery */
.project-gallery ul {
  list-style: none; /* Entfernt Listenstil */
  padding: 0; /* Entfernt Innenabstand */
  margin: 0; /* Entfernt Außenabstand */
  display: grid;
}

/* Make sure the figure matches the image dimensions */
figure {
  display: inline-block;
  position: relative;
  perspective: 1000px; /* Enable 3D space for the card flip */
}

.last-page-element{
  margin-bottom: 5rem;
}


.pagination {
  display: flex;
  justify-content: space-between;
  padding-top: 3rem;
}

.pagination span {
  color: #999;
}







/* Column-Layout */
.row {
  display: flex;
  flex-wrap: wrap;
}

.col {
  flex: 1;
  padding: 10px;
}

.col-1-2 {
  flex: 0 0 50%;
}





.newsletter-wrapper{
  display: flex;
  position: fixed;
  inset: 0;
  color: var(--text-color-light);
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-bottom: 1.5rem;
}

.newsletter-input{
  width: 250px;
  font-family: var(--font);
  font-size: var(--font-size);
  color: var(--text-color-light);
  border-color: var(--text-color-light);
  border-width: 0;
  border-bottom-width: .04rem;
  letter-spacing:var(--letter-spacing);
  cursor: none;
  outline: none;
}

.newsletter-icon{
  font-family: var(--font);
  font-size: var(--font-size);
  border-color: var(--text-color-light);
  border-width: .04rem;
  padding-left: 10px;
  padding-top: 0px;
  padding-right: 10px;
  border-radius: 5px;
  letter-spacing:var(--letter-spacing);
  background: var(--background-color-light);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.newsletter-icon:hover{
  color: var(--background-color-light);
  background:var(--link-color-light-hover);
  border-color: transparent;
  cursor: none;
}




/* Media Query for Em */
@media (max-width: 768px) {
  em {
    position: static; /* Remove absolute positioning */
    color: var(--link-color-light-hover);
  }

  em::before {
    display: none; /* Hide the pseudo-element on smaller screens */
  }
  
  em:hover {
    color: var(--text-color-light); /* Remove hover color change on smaller screens */
  }

  .cursor {
    opacity: 0;
}
}



/*Media Queries*/
@media (max-width: 900px) {
  .col-1-2 {
      flex: 0 0 100%;
  }

  .projects {
    grid-template-columns: repeat(6, 1fr);
    grid-gap: calc(2vw);
  }

}

/*Media Queries*/
@media (max-width: 768px) {
  .col-1-2 {
      flex: 0 0 100%;
  }

  .projects {
    grid-template-columns: repeat(4, 1fr);
    grid-gap: calc(2vw);
  }
}




@media (max-width: 600px) {
  
  .projects {
    grid-template-columns: repeat(3, 1fr);
    grid-gap: calc(2vw);
  }

}







/*Miscellaneous*/
.details {
  display: flex;
  flex-wrap: wrap; /* Elemente umbrechen in zwei Zeilen */
  justify-content: space-between;
}

.details div {
  flex: 1; /* Lässt die Div-Elemente gleichmäßig Platz einnehmen */
  margin: 10px;
}

.images {
  display: flex;
  justify-content: space-between; /* Bilder nebeneinander anordnen */
}

.images img {
  width: 45%; /* Passt die Breite der Bilder an */
}









/* Dark mode styles */
.dark-mode {
  --background-color-light: var(--background-color-dark);
  --text-color-light: var(--text-color-dark);
  --link-color-light: var(--link-color-dark);
  --link-color-light-hover: var(--link-color-dark-hover);
  --em-color-light: var(--em-color-dark);
  --logo-color-light: var(--logo-color-dark);
  --menu-list-color-light: var(--menu-list-color-dark);
  --menu-list-hover-color-light: var(--menu-list-hover-color-dark);
  --darkModeToggle-color-light: var(--darkModeToggle-color-dark);
  --header-background-rgb-light: var(--header-background-rgb-dark);
  --header-background-light: var(--header-background-dark);
}
