/* Import Google font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Corinthia:wght@400;700&family=Dancing+Script:wght@400..700&family=Gamja+Flower&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Reenie+Beanie&family=Unkempt:wght@400;700&family=Vujahday+Script&display=swap');
:root {
  /* Light mode */
  --background-color: #FAF9F6;
  --text-color: #1a1a1a;
  --nav-background: #ffffff;

  --button-bg: #fff;
  --button-text: #333;
  --button-border: #333;
  --button-active-bg: #333;
  --button-active-text: #fff;

  --toggle-color: #1a1a1a;

  --red: red;
  --grey: #D8D8D8;
  --black: #1a1a1a;

  color-scheme: light;
}

html {
  overflow-x: hidden;
}
html.dark {
  --background-color: #343231;
  --text-color: #FAF9F6;
  --nav-background: #1a1a1a;

  --button-bg: #343231;
  --button-text: #FAF9F6;
  --button-border: #FAF9F6;
  --button-active-bg: #fff;
  --button-active-text: #343231;

  --toggle-color: #FAF9F6;
  color-scheme: dark;
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family:  "Poppins", sans-serif;
}

::selection{
    background: var(--black);
    color: var(--red);
}

h1{
    margin: 20px 0 0 20px;
    font-size: 8em;}
footer {
  display: flex;
  flex-wrap: wrap;        /* allow items to wrap on smaller screens */
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  font-size: 0.9rem;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
}
footer > div {
  flex: 1 1 auto;         /* allow divs to grow/shrink */
  text-align: center;     /* center text by default */
}
footer .footer-left {
  text-align: left;
}
footer .footer-center {
  text-align: center;
}
footer .footer-right {
  text-align: right;
}
/* Small screens (stack items vertically) */
@media (max-width: 768px) {
  footer {
    flex-direction: column;
    position: relative;   /* stops overlapping content on mobile */
    padding: 15px 10px;
    font-size: 0.5rem;
  }

  footer > div {
    text-align: center;
  }
}


/* responsive nav bar */
nav {
  position: fixed;
  top: 20px;
  left: 0;
  width: 100%;
  padding: 0 30px;

  display: flex;
  flex-direction: row;         /* ⬅️ logo + links in same row */
  justify-content: space-between; /* ⬅️ logo left, links right */
  align-items: center;

  z-index: 9999;
}
nav ul {
  flex: 1;
  display: flex;
  justify-content: flex-end; /* ⬅️ menu stays right */
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 1rem;
  transition: opacity 0.3s ease;}
nav a:hover {
  opacity: 0.6;
  color: var(--red);}
nav .logo {
  flex: 1;
}
nav .logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
nav .toggle-wrapper {
  flex: 1;
  display: flex;
  justify-content: center; 
}
/* responsive nav bar */
.hamburger {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  position: fixed;
  top: 20px;
  right: 30px;
  z-index: 10000;}
  
.hamburger img {
  width: 32px;
  height: 32px;}

.mobile-only {
  display: none;
}

  @media (max-width: 768px) {
    nav {
        height: 100vh;          /* full screen height */
        padding-top: 80px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        flex-direction: column; /* stack items vertically */
        background: var(--nav-background);
        z-index: 9999;
        overflow-y: auto;       /* scroll if menu too long */
        align-items: center; /* align children to left */
    }

    nav.open {
      transform: translateX(0);
    }

    nav ul {
      flex-direction: column;
      gap: 25px;
      text-align: center;
      margin-right: 30px;
    }

    nav a {
      font-size: 1.2rem;
    }

    nav .logo {
      display: none;
    }

    nav .toggle-wrapper {
    order: 2;                /* place toggle after the ul */
    width: 100%;
    justify-content: center; /* align left or center as desired */
    padding: 20px 30px 0 30px;  /* spacing above toggle */
    }

    .hamburger {
      display: block;
    }

    #closeHamburger{
        display: block;
    }
    .mobile-only {
        display: block;
    }
}

/* ========== light dark mode ========== */
@keyframes reveal-in {
	from {
		clip-path: circle(0% at var(--x) var(--y));
	}
	to {
		clip-path: circle(150% at var(--x) var(--y));
	}
}
@keyframes reveal-out {
	from {
		clip-path: circle(150% at var(--x) var(--y));
	}
	to {
		clip-path: circle(0% at var(--x) var(--y));
	}
}
::view-transition-new(root) {
	animation: reveal-in 0.5s ease-in-out forwards;
	z-index: 1;
	mix-blend-mode: normal;
}
::view-transition-old(root) {
	animation: reveal-out 0.5s ease-in-out forwards; 					animation-delay: .5s;
	z-index: 0;
	mix-blend-mode: normal;
}
::view-transition-image-pair(root) {
	isolation: isolate;
}
.toggle {
	transform: translateX(-50%) scale(.5);
	cursor: pointer;
	z-index: 10;
}
.toggle input {
	display: none;
}
.toggle input + div {
	border-radius: 50%;
	width: 36px;
	height: 36px;
	position: relative;
	box-shadow: inset 16px -16px 0 0 var(--toggle-color);
	transform: scale(1) rotate(-2deg);
	transition: box-shadow .5s ease 0s, transform .4s ease .1s;
}
.toggle input + div:before {
	content: '';
	width: inherit;
	height: inherit;
	border-radius: inherit;
	position: absolute;
	left: 0;
	top: 0;
	background: light-dark(transparent, var(--toggle-color));
	transition: background .3s ease;
}
.toggle input + div:after {
	content: '';
	width: 8px;
	height: 8px;
	border-radius: 50%;
	margin: -4px 0 0 -4px;
	position: absolute;
	top: 50%;
	left: 50%;
	box-shadow: 0 -23px 0 var(--toggle-color),
		0 23px 0 var(--toggle-color),
		23px 0 0 var(--toggle-color),
		-23px 0 0 var(--toggle-color),
		15px 15px 0 var(--toggle-color),
		-15px 15px 0 var(--toggle-color),
		15px -15px 0 var(--toggle-color),
		-15px -15px 0 var(--toggle-color);
	transform: scale(0);
	transition: all .3s ease;
}
.toggle input:checked + div {
	box-shadow: inset 32px -32px 0 0 var(--background-color);
	transform: scale(.5) rotate(0deg);
	transition: transform .3s ease .1s, box-shadow .2s ease 0s;
}
.toggle input:checked + div:before {
	background: var(--toggle-color);
	transition: background .3s ease .1s;
}
.toggle input:checked + div:after {
	transform: scale(1.5);
	transition: transform .5s ease .15s;
}

/* ========== HOME PAGE ========== */
#lettersContainer {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

#lettersContainer-des {
  text-align: center;
  margin-top: 200px;
  color: red;
  display:block;
}

/* https://uiverse.io/SteveBloX/dangerous-warthog-85 */
.cards {
  margin: 80px 0 80px   30px;
}
.cards-all{
  display: flex;
  justify-content: center;
  gap: 50PX;
  margin-top: 50px;
}
.card {
  box-sizing: border-box;
  width: 250px;
  height: 250px;
  background: rgba(217, 217, 217, 0.58);
  border: 1px solid white;
  box-shadow: 12px 17px 51px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(6px);
  border-radius: 17px;
  text-align: center;
  cursor: pointer;
  transition: all 0.5s;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  font-weight: bolder;
  color: black;
}

.card img{
  overflow: hidden;
}

.card:hover {
  border: 1px solid black;
  transform: scale(1.05);
}

.card:active {
  transform: scale(0.95) rotateZ(1.7deg);
}

/* draggable letters first section */
.draggableLetter {
    position: absolute;
    display: inline-block;  /* ensures the box hugs the glyph */
    line-height: 1;         /* removes extra vertical spacing */
    cursor: grab;
    font-size: clamp(2rem, 15vw, 30em);
    user-select: none;
    color: var(--text-color);
    padding: 0;             /* no extra spacing */
    margin: 0;              /* no extra spacing */
    transform-origin: top left; /* helps when moving precisely */
}

.hero-section {
  position: relative;
  width: 100vw;
  height: 75vh;
  overflow: hidden; /* this keeps trail inside section */
  background-color: var(--text-color);}
#trail-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

#trail-tekst {
    color: var(--background-color);
    text-align: center;
    font-size: 3rem;
    z-index: 10; /* make sure it stays above images if needed */
}
.trail-image {
    position: absolute;
    width: 80px;          /* adjust size of trail images */
    height: 80px;
    object-fit: contain;
    transform: translate(-50%, -50%);
    opacity: 1;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;}


@media (max-width: 768px) {
  .draggableLetter {
      font-size: 50px;
      cursor: default; /* no dragging */
  }

  #trail-tekst {
  font-size: 1.5rem;
  }

  #lettersContainer-des {
    display:none;
  }

}

@media (max-width: 480px) {
  #trail-tekst {
      font-size: 1rem;
  }
}

/* ========== ABOUOT ME PAGE ========== */

.head-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.head {
  margin: 5% 5%;
  display: block;
  z-index: 1;
}

.pupil {
  position: absolute;
  width: 75px;     /* responsive size relative to head */
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  pointer-events: none;
  transition: transform 0.05s linear;
}

.pupil-left {
  top: 48%;   /* change for your image */
  left: 28%;
}

.pupil-right {
  top: 50%;
  left: 62%;
}

@media (max-width: 768px) {
  .head {
    max-width: 500px;
  }

  .pupil {
    width: 40px;
  }

  .pupil-left {
    top: 47%;
    left: 32%;
  }

  .pupil-right {
    top: 47%;
    left: 60%;
  }
}

@media (max-width: 480px) {
  .head {
    max-width: 350px;
  }

  .pupil {
    width: 35px;
  }

  .pupil-left {
    top: 45%;
    left: 28%;
  }

  .pupil-right {
    top: 45%;
    left: 62%;
  }
}

/* ========== CONTACT PAGE ========== */
.links-section {
  display: flex;
  justify-content: left;
  align-items: center;
  overflow-y: visible;
  margin: 0 20px;}
.links-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: left;}

.animated-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-dark);
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.3s ease;}
.animated-link::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);}
.animated-link:hover::before {
  transform: scaleX(1);
  transform-origin: left;}
.animated-link svg {
  margin-left: 0.3em;
  width: 10px;
  height: 10px;
  opacity: 0;
  transform: translateY(1px);
  transition: all 0.3s ease;}
.animated-link:hover svg {
  opacity: 1;
  transform: translateY(0);}

@media (max-width: 1200px) {
    h1 {
        font-size: 10em;
    }

    .animated-link {
        font-size: 2.5rem;
    }
}
@media (max-width: 768px) {
    h1 {
        font-size: 4.5em;
        margin: 40px 20px 20px 20px;
    }

    .links-section {
        margin: 0 15px;
    }

    .links-container {
        gap: 15px;
    }

    .animated-link {
        font-size: 2rem;
    }
}
@media (max-width: 480px) {
    h1 {
        font-size: 2.5em;
        margin: 40px 15px 15px 15px;
    }

    .animated-link {
        font-size: 1rem;
    }
}

/* ========== ABOUT PAGE ========== */
.aboutTexts { 
  display: flex;
  flex-wrap: wrap;
  width: 80%;            
  margin: 20px auto;    
  gap: 20px;            
}
.aboutLinks,
.aboutRechts {
  flex: 1 1 45%;         /* grow/shrink, approx half width each */
}
.aboutLinks p,
.aboutRechts p {
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 400;
}
@media (max-width: 1024px) {
  .aboutLinks h2,
  .aboutRechts h2 {
    font-size: 1.3rem;
  }
}
@media (max-width: 768px) {
  .aboutTexts {
    flex-direction: column;  /* stack columns vertically */
    width: 90%;              /* full width with some padding */
    margin: 20px auto;
    gap: 15px;
  }

  .aboutLinks,
  .aboutRechts {
    flex: 1 1 100%;
    text-align: center;
  }

  .aboutLinks p,
  .aboutRechts p {
    font-size: 1.1rem;
  }
}
@media (max-width: 480px) {
  .aboutLinks,
  .aboutRechts {
    text-align: center;
  }
  .aboutLinks p,
  .aboutRechts p {
    font-size: 0.7rem;
    text-align: center;
  }
}


/* ========== PROJECT PAGE ========== https://medium.com/@francesco.saviano87/build-a-dynamic-filterable-portfolio-with-html-cjs-e2a488e637f0*/ 
#portfolio {
  max-width: 100%;
  padding: 0 20px;
}
#filter-buttons {
  margin: -40px 0 0 30px;
}
.filter-btn {
  background-color: var(--button-bg);
  color: var(--button-border);
  border: 2px solid var(--button-border);
  padding: 10px 20px;
  margin: 0 5px;
  cursor: pointer;
  border-radius: 30px;
  transition: all 0.3s ease;
  font-size: 0.7em;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--button-active-bg);
  color: var(--button-active-text);
  border-color: var(--button-active-text);
}

.filter-text {
  display: flex;
  justify-content: space-between;
  width: 50%;
  padding: 10px 0 0 0;
}
.filter-text p {
  color: grey;
  font-size: 0.8em;
  padding-right: 20px;
}
#filter-links{margin: 0 0 0 30px;}

#portfolio-items {
  margin: 10px 0 0 30px;
  overflow: hidden;
  padding-right: 20px;
}
.portfolio-link{
  text-decoration: none;
  color: inherit;
  display: block;
}
.portfolio-item {
  position: relative;
  white-space: nowrap;
  margin: 20px 0 0 0;
  overflow: hidden;
  border-radius: 10px;
  transition: transform 0.3s ease;
}
.portfolio-item:hover {
color: var(--red);
transform: scale(0.95);
}
.portfolio-text {
  display: flex;
  justify-content: space-between;
  width: 50%;
  padding: 10px 0;
}
.portfolio-text p{
  margin: 0;
}

@media (max-width: 1024px) {
  #filter-buttons {
    margin: 10px auto;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  #filter-buttons {
    width: 100%;
    margin: 10px auto 20px auto;
    justify-content: center;
    gap: 12px;
  }

  .filter-btn {
    flex: 1 1 calc(50% - 20px); /* two per row */
    font-size: 0.7rem;
    padding: 10px;
    text-align: center;
  }

  .filter-text {
  width: 100%;
}

  .portfolio-text {
    width: 100%;
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .filter-btn {
    flex: 1 1 100%; /* one per row */
    font-size: 0.6rem;
    padding: 8px;
  }
}
/* PROJECT PAGE */
.project-des{
  display: flex;
  justify-content: space-between; /* space between left and right sections */
    margin: 5% 5%;
  flex-wrap: wrap; /* make it responsive */
}

.project-desLeft {
  text-align: left;
  flex: 1; /* take available space */
  min-width: 250px; /* prevent too small on small screens */
}

.project-title {
  margin-bottom: 20px;
}

.project-details {
  display: flex;
  gap: 40px; /* spacing between detail blocks */
}

.project-details div {
  text-align: left;
  font-size: 0.8em;
}

.project-details div h3 {
  color: gray;
}

.project-desRight {
  flex: 1;
  min-width: 250px;
  margin-top: 20px;
  font-size: 0.8em;
}

#logo-picture img {
  width: 50%;
}

/* Specific project images */
.project-pictures img {
    width: 100%;         
    max-width: 800px;    
    height: auto;        
    object-fit: contain; /* keep content visible */
    margin: 0 auto;      
}

.project-pictures2 img{
    width: 30%;         
    height: auto;        
    object-fit: contain; /* keep content visible */
    margin: 0 auto;      
}
/* Project pictures container */
.project-pictures,
.project-pictures2 {
    display: flex;
    flex-wrap: wrap;      
    justify-content: center;
    gap: 20px;           
    margin: 30px 0;     
}

/* Optional: smaller screens adjustments */
@media (max-width: 768px) {
    .project-pictures2 img {
        max-width: 50%;  
    }
}

.project-pictures2 img:nth-child(1) { animation-delay: 0.1s; }
.project-pictures2 img:nth-child(2) { animation-delay: 0.3s; }
.project-pictures2 img:nth-child(3) { animation-delay: 0.5s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* project pages */
.docu-btn {
  background-color: var(--button-bg);
  border: 2px solid var(--button-border);
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 30px;
  transition: all 0.3s ease;
  font-size: 0.7em;
}
.docu-btn-container {
  display: flex;
  justify-content: center;  /* horizontal centering */
  margin: 40px 0;           /* optional vertical spacing */
}

.docu-btn:hover {
  background-color: var(--button-active-bg);
  color: var(--button-active-text);
  border-color: var(--button-active-text);
}