/* Global Styles */
html, body {
  margin: 0;
  font-family: "Arial", sans-serif;
  background-color: #f4f4f4;
  color: #333;
  width: 100%;
  overflow-x: hidden;
}
.section-title {
  font-size: 2.5rem; /* Set consistent font size */
  text-align: center; /* Center align the text */
  margin-top: 20px; /* Adjust top margin to ensure consistent spacing */
  margin-bottom: 20px; /* Adjust bottom margin to ensure consistent spacing */
  color: #333; /* Set text color */
}
/* Projects Section */
.projects {
  padding: 0px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Two equal-width columns */
  gap: 20px; /* Adds space between the cards */
  margin: 30px;
}

/* Project Item */
.project-item {
  position: relative; /* For overlay and content positioning */
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  height: 450px; /* Fixed height for each card */
  cursor: pointer; /* Makes the card clickable/hoverable */
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* Hover transition */
}

/* Project Image */
.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures the image scales properly without distortion */
  border-radius: 10px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1; /* Ensures image stays behind the content */
}

/* Opaque Overlay */
.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6); /* Black with 50% opacity */
  z-index: 2; /* Overlay over the image but behind the content */
}

/* Project Content */
.project-content {
  position: relative;
  z-index: 3; /* Ensure content is on top of image and overlay */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
  text-align: center;
  color: white; /* Ensures content is readable on the dark overlay */
}

h3 {
  font-size: 1.5rem;
  color: white;
  margin: 10px 0;
}

h4 {
  font-size: 1.2rem;
  color: #ddd;
  margin: 5px 0;
}

.project-details {
  list-style: none;
  padding: 0;
  margin: 15px 0 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.project-details li {
  font-size: 0.9rem;
  color: #bbb;
  margin: 5px 0;
}

/* Hover Effect */
.project-item:hover {
  transform: translateY(-10px); /* Moves the card up slightly */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); /* Stronger shadow */
}

.project-item:hover .project-overlay {
  background-color: rgba(0, 0, 0, 0.7); /* Darkens the overlay on hover */
}

/* Video Divider Section */
.video-divider {
  position: relative;
  height: 50px; /* Increase height to accommodate the video properly */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 20px; /* Adds space below the video */
}

.video-divider .video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.video-divider .video-background iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw; /* 16:9 aspect ratio */
  transform: translate(-50%, -50%);
  pointer-events: none; /* Prevent interaction with the video */
}

.project-link {
  text-decoration: none; /* Remove underline from links */
  color: inherit; /* Inherit the text color to avoid the default blue link color */
  display: block; /* Make the whole card clickable */
}

@media (max-width: 1024px) {
  .nav-links {
    gap: 1rem;
  }

  .intro-text h1 {
    font-size: 1.8rem;
  }

  .intro-text p {
    font-size: 0.9rem;
  }

  .skills {
    padding: 40px 10px;
  }

  .skill-item {
    width: calc(50% - 40px); /* Two items per row */
  }
}

/* Mobile Devices */
@media (max-width: 768px) {
  nav {
    padding: 0.5rem 0;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
  }

  .nav-links li {
    margin: 0;
  }

  .hero {
    min-height: 60vh;
  }

  .hero-content {
    flex-direction: column;
    gap: 1rem;
  }

  .headshot {
    width: 150px;
    height: 150px;
  }

  .intro-text h1 {
    font-size: 1.5rem;
  }

  .intro-text p {
    font-size: 0.8rem;
  }

  .skill-item {
    width: 100%; /* One item per row */
  }

  .btn {
    font-size: 0.9rem;
    margin-bottom: 10px;
  }

  .cta-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

}

/* Small Mobile Devices */
@media (max-width: 480px) {
  .nav-links li a {
    font-size: 0.5rem;
  }

  .btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }