/* Inline Projects Section Styles */

.projects-section {
  position: fixed;
  bottom: -100vh; /* Start hidden below the viewport */
  left: 0;
  width: calc(100% - 450px); /* Adjust width to leave space for chat window */
  height: 90vh;
  background-color: rgba(15, 43, 63, 0.95);
  border-top: 1px solid rgba(59, 193, 199, 0.5);
  z-index: 900;
  overflow-y: auto;
  transition: bottom 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
  padding-bottom: 50px;
  /* Add padding to avoid content being too close to the edge */
  padding-left: 20px;
  padding-right: 20px;
}

.projects-section.active {
  bottom: 0;
}

.projects-section-header {
  text-align: left; /* Align to the left to match project cards */
  padding: 30px 40px; /* Add more horizontal padding */
  position: sticky;
  top: 0;
  background-color: rgba(15, 43, 63, 0.95);
  z-index: 10;
  border-bottom: 1px solid rgba(59, 193, 199, 0.3);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); /* Add subtle shadow for depth */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.projects-section-header h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: 2.5rem;
  margin: 0;
  color: #ffffff;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
}

/* Add underline effect to the header */
.projects-section-header h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 60px;
  height: 2px;
  background-color: #3bc1c7;
  transition: width 0.3s ease;
}

.projects-section.active .projects-section-header h2::after {
  width: 120px;
}

.projects-section-close {
  position: absolute;
  top: 30px;
  right: 40px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(59, 193, 199, 0.3);
  border-radius: 50%;
  color: #ffffff;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.projects-section-close:hover {
  opacity: 1;
  color: #3bc1c7;
  border-color: #3bc1c7;
  transform: rotate(90deg);
  background: rgba(59, 193, 199, 0.1);
}

/* Import the existing projects styles */
.projects-container {
  max-width: 900px;
  margin: 40px auto 40px 40px; /* Adjust margin to align more to the left */
  padding: 0 20px;
}

.project-card {
  display: flex;
  margin-bottom: 50px;
  background-color: rgba(15, 43, 63, 0.85); /* Slightly darker for better contrast */
  border: 1px solid rgba(59, 193, 199, 0.4); /* Slightly more visible border */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); /* Stronger shadow for depth */
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  max-width: 850px; /* Limit width for better readability */
  margin-left: 0; /* Align to the left */
  margin-right: auto;
}

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

.project-image {
  width: 300px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.project-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(15, 43, 63, 0), rgba(15, 43, 63, 0.7));
}

.project-content {
  flex: 1;
  padding: 30px 35px; /* More padding for better readability */
}

.project-content h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: 1.8rem;
  margin: 0 0 15px 0;
  color: #3bc1c7;
  letter-spacing: 0.1em;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.tag {
  background-color: rgba(59, 193, 199, 0.25); /* Slightly more visible */
  border: 1px solid rgba(59, 193, 199, 0.6); /* More visible border */
  border-radius: 20px;
  padding: 6px 14px; /* Slightly larger padding */
  margin-right: 10px;
  margin-bottom: 10px;
  font-size: 0.85rem; /* Slightly larger font */
  letter-spacing: 0.05em;
  font-weight: 500; /* Slightly bolder */
}

.project-content p {
  line-height: 1.7; /* Increased line height for better readability */
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.95); /* Slightly brighter text */
  font-size: 1.05rem; /* Slightly larger text */
  max-width: 95%; /* Limit width for better readability */
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  margin-top: 20px;
}

.tech-item {
  background-color: rgba(0, 0, 0, 0.3);
  padding: 5px 10px;
  margin-right: 8px;
  margin-bottom: 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.8);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .projects-section {
    width: calc(100% - 400px); /* Slightly adjust width for medium screens */
  }
  
  .projects-container {
    max-width: 800px;
    margin: 40px auto 40px 20px;
  }
}

@media (max-width: 992px) {
  .projects-section {
    width: calc(100% - 350px); /* Further adjust width for smaller screens */
  }
  
  .project-image {
    width: 250px; /* Make images smaller on medium screens */
  }
}

@media (max-width: 768px) {
  .projects-section {
    width: 100%; /* Full width on mobile */
    padding-bottom: 100px; /* Extra padding to avoid overlap with chat input */
  }
  
  .projects-container {
    margin: 40px auto;
    padding: 0 15px;
  }
  
  .project-card {
    flex-direction: column;
  }
  
  .project-image {
    width: 100%;
    height: 200px;
  }
  
  .project-image::before {
    background: linear-gradient(to bottom, rgba(15, 43, 63, 0), rgba(15, 43, 63, 0.7));
  }
  
  /* When both chat and projects are open on mobile, hide chat */
  .chat-window.active ~ .projects-section.active {
    z-index: 1100; /* Ensure projects section is above chat on mobile */
  }
}
