html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background-color: #f5efe7; /* Soft light beige */
  color: #213555; /* Dark Blue */
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #3e5879; /* Medium blue */
  color: white;
  padding: 20px 40px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Name (H1) and Subtitle (H2) on the left */
header .left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

header h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: bold;
}

header h2 {
  font-size: 1.5rem;
  font-weight: normal;
  margin-top: 10px;
  text-align: left;
}

.nav {
  position: absolute;
  top: 50%;
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  z-index: 1;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.nav:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* Navigation on the right */
nav ul {
  list-style: none;
  padding: 0;
  display: flex;
}

nav ul li {
  margin: 0 15px;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: #d8c4b6; /* Light beige on hover */
}

.social-media a {
  text-decoration: none;
  font-weight: bold;
  color: #3e5879; /* Medium blue */
  transition: background-color 0.3s ease;
}

.social-media a:hover {
  color: #d8c4b6;
}

@keyframes backgroundAnimation {
  0% {
    background-color: #f5efe7; /* Soft light beige */
  }
  25% {
    background-color: #f5efe7; /* Light beige */
  }
  50% {
    background-color: #f5efe7; /* Medium blue */
  }
  75% {
    background-color: #f5efe7; /* Dark blue */
  }
  100% {
    background-color: #f5efe7; /* Soft light beige */
  }
}

.section {
  padding: 60px 20px;
  text-align: center;
  background-color: #f5efe7; /* Soft light beige */
  animation: backgroundAnimation 10s ease infinite;
}

#about p {
  margin-bottom: 20px;
  line-height: 1.5;
}

.section:nth-child(even) {
  background-color: #d8c4b6;
}

@media (max-width: 500px) {
  .project-grid {
    grid-template-columns: 1fr; /* 1 column on very small screens */
    gap: 15px; /* Adjusted gap for small screens */
  }
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px; /* Verhoogd van 5px naar 15px */
  padding: 10px;
  justify-items: center;
}

/* Style for each tool block */
.tool-block {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background: #d8c4b6;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative; /* Needed for absolute positioning */
  overflow: hidden;
}

/* Hover effect */
.tool-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

/* Font Awesome Icons */
.tool-block i {
  font-size: 30px;
  color: white;
  transition: opacity 0.3s ease;
}

/* Hide icon on hover */
.tool-block:hover i {
  opacity: 0;
}

/* Percentage text */
.tool-block .percentage {
  position: absolute;
  font-size: 16px;
  color: white;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Show percentage on hover */
.tool-block:hover .percentage {
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 800px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

@media (max-width: 500px) {
  .tools-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Styling for each project */
.project {
  position: relative;
  padding: 0; /* Remove padding for a more compact layout */
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 300px; /* Increase height for larger projects */
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

/* Text container at the bottom of each project */
.project .text-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8); /* Slight transparency for the background */
  color: white;
  padding: 10px;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  text-align: center;
  transition: background-color 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.project .text-container a {
  margin-bottom: 3px;
}

.project h3,
.project p {
  margin: 0;
}

/* Ensure the background images fill the entire project container */
.project-1 {
  background-image: url("/img/mangapage.png");
}
.project-2 {
  background-image: url("/img/tulpenwebsite.png");
}
.project-3 {
  background-image: url("/img/kalender2.png");
}
.project-4 {
  background-image: url("/img/infinityscroll.png");
}
.project-5 {
  background-image: url("/img/banksy.png");
}
.project-6 {
  background-image: url("/img/todolistwithreact.png");
}
.project-7 {
  background-image: url("/img/weeraplicatie.png");
}
.project-8 {
  background-image: url("/img/colorpicker.png");
}

/* Ensure images fill the project container fully */
.project img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Makes image cover the container */
}

/* Hover effect for projects */
.project:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.project h3 {
  color: #d8c4b6;
}

.project a {
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.project a:hover {
  color: #d8c4b6;
}

/* Carousel Styles */
.carousel-container {
  position: relative;
  width: 100%;
  max-width: 650px;
  margin: auto;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.carousel-container:hover {
  background-color: rgba(0, 0, 0, 0.6);
}

/* C.V. en Contact */
#cv a,
#contact a {
  color: #d8c4b6; /* Light beige */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

#cv a:hover,
#contact a:hover {
  color: #3e5879; /* Medium blue */
}

/* Container for the form */
.container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.container .left-side img {
  padding: 2rem;
  height: 10rem;
  width: 12rem;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Hide the image for screens smaller than 200px */
@media (max-width: 260px) {
  .container .left-side img {
    display: none;
  }

  .left-side {
    display: none;
  }
}

.left-side {
  width: 40%;
}

.right-side {
  width: 60%;
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Form styling */
form {
  display: flex;
  flex-direction: column;
}

form label {
  font-size: 1rem;
  color: #213555; /* Dark Blue */
  margin-bottom: 8px;
}

form input,
form textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

form input:focus,
form textarea:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

button {
  padding: 10px 20px;
  background-color: #d8c4b6;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #213555;
}

.download-btn {
  background-color: #d8c4b6; /* Light beige */
  border: none;
  color: white;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 25px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.download-btn:hover {
  background-color: #213555;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
  background-color: #3e5879; /* Medium blue */
  color: white;
  text-align: center;
  padding: 10px 0;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
  background: #f5efe7;

  -webkit-animation: AnimateBG 20s ease infinite;
  animation: AnimateBG 20s ease infinite;
  background-clip: text;
  color: transparent;
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
    align-items: center;
  }

  .left-side,
  .right-side {
    width: 100%; /* Full width on small screens */
  }

  .left-side img {
    width: 100%; /* Make the image responsive */
    height: auto; /* Maintain aspect ratio */
  }

  form input,
  form textarea {
    width: 100%; /* Full width on small screens */
    margin-bottom: 15px; /* Reduce margin for better spacing */
    padding: 10px; /* Adjust padding for smaller screens */
  }
}

/* Header - Responsive Styles */
@media (max-width: 768px) {
  header {
    flex-direction: column; /* Stack header elements */
    align-items: center;
    text-align: center;
    padding: 20px; /* Adjust padding for smaller screens */
  }

  header .left {
    align-items: center; /* Center-align text */
  }

  header h1 {
    font-size: 2rem; /* Smaller font size for the header */
  }

  header h2 {
    font-size: 1.2rem; /* Smaller font size for the subtitle */
  }

  nav ul {
    flex-direction: column; /* Stack navigation links vertically */
    gap: 10px; /* Add spacing between links */
    margin: 20px 0; /* Add spacing below the navigation */
  }

  nav ul li {
    margin: 0; /* Remove horizontal margins */
  }

  nav ul li a {
    font-size: 1rem; /* Adjust font size for smaller screens */
  }
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  justify-content: center;
}

/* Fix for small screens */
@media (max-width: 768px) {
  .project-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .project {
    width: 90%; /* Ensures projects take up most of the screen width */
    height: auto; /* Allows height to adjust based on content */
    display: block; /* Prevents flex issues */
    opacity: 1; /* Ensures visibility */
  }

  /* Fix text-container visibility */
  .project .text-container {
    position: static; /* Allows normal flow */
    background: rgba(0, 0, 0, 0.7); /* Darker background for contrast */
  }
}
