html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background-color: #f5efe7; /* Soft light beige for a cleaner look */
  color: #213555; /* Dark blue-grey for text */
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #3e5879; /* Muted blue */
  color: white;
  padding: 20px 40px; /* Adjust padding for spacing */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Soft shadow for header */
}

/* 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; /* Bolder heading */
}

header h2 {
  font-size: 1.5rem;
  font-weight: normal;
  margin-top: 10px;
  text-align: left;
}

/* 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; /* Accent color on hover */
}

.social-media a {
  text-decoration: none;
  font-weight: bold;
  color: #3e5879;
  transition: background-color 0.3s ease;
}

.social-media a:hover {
  color: #f5efe7;
  transition: color 0.3s ease;
}

/* Animated background color for the sections */
@keyframes backgroundAnimation {
  0% {
    background-color: #f5efe7; /* Soft light beige */
  }
  25% {
    background-color: #f5efe7; /* Light beige */
  }
  50% {
    background-color: #f5efe7; /* Light brownish */
  }
  75% {
    background-color: #f5efe7; /* Soft light beige */
  }
  100% {
    background-color: #f5efe7; /* Soft light beige */
  }
}

@keyframes backgroundAnimation {
  0% {
    background-color: #f5efe7;
  }
  25% {
    background-color: #f5efe7;
  }
  50% {
    background-color: #f5efe7;
  }
  75% {
    background-color: #f5efe7;
  }
  100% {
    background-color: #f5efe7;
  }
}

.section {
  padding: 60px 20px;
  text-align: center;
  background-color: #f5efe7; /* Soft light beige */
  animation: backgroundAnimation 10s ease infinite;
  max-height: 100%;
}

#about p {
  margin-bottom: 10px;
  line-height: 1.5;
}

.section:nth-child(even) {
  background-color: #d8c4b6; /* Light brownish for variety */
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 items per row by default */
  gap: 20px;
  padding: 20px;
}

/* Style for each project item */
.project {
  padding: 15px;
  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;
  background-size: cover;
  background-position: center;
  height: 250px;
  overflow: hidden;
}

.project:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Tablet (2x4 layout) */
@media (max-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 items per row */
  }
}

/* Mobile (1x8 layout) */
@media (max-width: 768px) {
  .project-grid {
    grid-template-columns: repeat(1, 1fr); /* 1 item per row */
  }
}

.project .text-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: black;
  color: white;
  padding: 15px;
  border-bottom-left-radius: 12px; /* Matching the container’s rounded corners */
  border-bottom-right-radius: 12px;
  text-align: center;
  transition: background-color 0.3s ease; /* smooth transition als je hoverd */
  display: flex;
  flex-direction: column; /* Stack items vertically */
  gap: 5px;
}

.project .text-container a {
  margin-bottom: 3px; /* Adds space between the links */
}

.project h3,
.project p {
  margin: 0;
}

.project-1 {
  background-image: url("/portfoliomap/img/mangapage.png");
  background-size: cover;
  background-position: top;
}

.project-2 {
  background-image: url("/portfoliomap/img/tulpenwebsite.png");
}

.project-3 {
  background-image: url("/portfoliomap/img/kalender2.png");
}

.project-4 {
  background-image: url("/portfoliomap/img/infinityscroll.png");
}

.project:hover {
  transform: translateY(-5px); /* Subtle hover lift effect */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); /* Enhanced shadow on hover */
}

.project img {
  max-width: 100%;
  border-radius: 8px;
}

#projects .fa-github .fa-html5 {
  font-size: 60px;
  margin-right: 20px;
}

#projects .text-container i {
  margin-right: 10px; /* Adjust the spacing as needed */
}

.project h3 {
  color: #d8c4b6; /* Accent pink */
}

.project a {
  color: #3e5879; /* Muted blue */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.project a:hover {
  color: #d8c4b6; /* Accent color on hover */
}

/* Carousel Styles */
.carousel-container {
  position: relative;
  width: 100%;
  max-width: 650px;
  margin: auto;
  overflow: hidden;
  border: 2px solid transparent; /* Cleaner border */
  border-radius: 15px; /* Rounded edges */
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transition */
}

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  z-index: 1;
  border-radius: 50%; /* Round navigation buttons */
  transition: background-color 0.3s ease;
}

.nav:hover {
  background-color: rgba(0, 0, 0, 0.8); /* Darker hover color */
}

/* C.V. en Contact */
#cv a,
#contact a {
  color: #d8c4b6; /* Accent pink for C.V. and contact links */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

#cv a:hover,
#contact a:hover {
  color: #3e5879; /* Change color on hover */
}

/* Container for the form */
.container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding: 20px;
  background-color: #f9f9f9; /* Light background color */
  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);
}

.left-side img {
  display: block;
  max-width: 100%; /* Ensures the image scales properly */
  margin: 0 auto 20px auto; /* Adds a gap below the image */
}

.about-me p {
  margin-top: 10px; /* Reduces gap between paragraph and image */
  line-height: 1.5; /* Adjust line height for better readability */
}

img {
  width: 300px; /* Set the width of the image */
  height: auto; /* Maintain aspect ratio */
  max-width: 90%; /* Ensure it doesn't overflow on smaller screens */
  border-radius: 10px; /* Optional: Rounded corners */
}

/* Form styling */
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #d8c4b6;
  border-radius: 5px;
}

input[type="submit"] {
  background-color: #3e5879; /* Muted blue for button */
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

input[type="submit"]:hover {
  background-color: #213555; /* Dark blue when hovered */
}

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);
}

.back-button {
  position: fixed;
  bottom: 20px; /* Position the button 20px from the bottom of the screen */
  left: 20px; /* Position the button 20px from the left side */
  background-color: #3e5879; /* Muted blue */
  color: white;
  font-weight: bold;
  padding: 12px 25px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  text-decoration: none; /* Ensure no underline */
}

.back-button:hover {
  background-color: #213555; /* Dark blue on hover */
  transform: translateY(-2px); /* Subtle hover lift effect */
}

.back-button:active {
  transform: translateY(2px); /* Slight press effect */
}

.back-button:focus {
  outline: none; /* Remove outline on focus */
}
