/* === PROJECTS PAGE STYLES === */

/* Hero Section */
#projects-hero {
  padding-top: 10rem;
  padding-bottom: 3rem;
  text-align: center;
}

.hero-description {
  max-width: 800px;
  margin: 0 auto 3rem;
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--color-text);
}

.filter-container {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .filter-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.filter-btn {
  background: var(--color-glassmorphism);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--color-text);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-main);
}

.filter-btn:hover, .filter-btn.active {
  background: rgba(0, 230, 195, 0.1);
  color: var(--color-accent-teal);
  box-shadow: var(--glow-teal);
}

.filter-btn.active {
  border-color: var(--color-accent-teal);
}

.search-container {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .search-container {
    margin: 0;
  }
}

#project-search {
  width: 100%;
  padding: 0.75rem 1.25rem;
  padding-right: 3rem;
  background: var(--color-glassmorphism);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 50px;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

#project-search:focus {
  outline: none;
  border-color: var(--color-accent-teal);
  box-shadow: var(--glow-teal);
}

#search-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-icon::before {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
  position: relative;
}

.search-icon::after {
  content: '';
  display: block;
  width: 2px;
  height: 7px;
  background: currentColor;
  position: absolute;
  bottom: 3px;
  right: 5px;
  transform: rotate(-45deg);
}

/* Featured Project Section */
#featured-project {
  position: relative;
  overflow: hidden;
}

.featured-badge {
  background: var(--color-accent-magenta);
  color: var(--color-text);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  position: absolute;
  top: 2rem;
  left: 2rem;
  z-index: 10;
  box-shadow: var(--shadow-neon-magenta);
}

.featured-project-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-top: 3rem;
}

@media (min-width: 992px) {
  .featured-project-content {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.featured-image-container {
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative;
  padding-top: 75%; /* 4:3 aspect ratio */
}

.featured-image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.featured-image-container:hover img {
  transform: scale(1.05);
}

.featured-image-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.featured-image-container:hover::after {
  opacity: 1;
}

.featured-header {
  margin-bottom: 1.5rem;
}

.featured-header h2 {
  font-family: var(--font-mono);
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--color-accent-teal);
  text-shadow: var(--glow-teal);
}

.featured-description p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  color: var(--color-text);
}

.project-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-icon {
  width: 40px;
  height: 40px;
  background: rgba(0, 230, 195, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  position: relative;
}

.code-icon::before,
.sensor-icon::before,
.uptime-icon::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.code-icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300e6c3'%3E%3Cpath d='M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z'/%3E%3C/svg%3E");
}

.sensor-icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300e6c3'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z'/%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3C/svg%3E");
}

.uptime-icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300e6c3'%3E%3Cpath d='M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z'/%3E%3C/svg%3E");
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent-teal);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.featured-actions {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* Projects Grid Section */
#projects-grid {
  position: relative;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card.large {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
}

.project-card-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .project-card-content {
    grid-template-columns: 3fr 2fr;
  }
}

.project-info h3 {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--color-accent-teal);
}

.project-description {
  font-size: 1rem;
  line-height: 1.7;
  margin: 1.25rem 0;
  color: var(--color-text);
}

.project-highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .project-highlights {
    grid-template-columns: repeat(3, 1fr);
  }
}

.highlight {
  display: flex;
  flex-direction: column;
}

.highlight-label {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.25rem;
}

.highlight-value {
  font-weight: 500;
  color: var(--color-accent-magenta);
}

.project-image {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  aspect-ratio: 4/3;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
  padding: 0 1.5rem;
}

.project-card.large.active .project-details {
  max-height: 1000px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.project-section {
  margin-bottom: 2rem;
}

.project-section:last-child {
  margin-bottom: 0;
}

.project-section h4 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--color-accent-teal);
}

.feature-list {
  list-style: none;
  padding-left: 1.5rem;
}

.feature-list li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.75rem;
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent-magenta);
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tech-tags span {
  font-size: 0.85rem;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  background: rgba(0, 230, 195, 0.1);
  color: var(--color-accent-teal);
}

.project-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* Collaborate Section */
#collaborate {
  text-align: center;
}

.collaborate-content {
  max-width: 700px;
  margin: 0 auto;
}

.collaborate-content h2 {
  margin-bottom: 1.5rem;
  font-size: 2.5rem;
}

.collaborate-content p {
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

/* Animation triggers */
.project-card {
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

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

/* For projects filtering functionality */
.project-card.hidden {
  display: none;
}

/* Placeholder Image Styles */
.placeholder-image {
  width: 100%;
  height: 100%;
  min-height: 200px;
  background: linear-gradient(135deg, #4a00e0, #8e2de2);
  border-radius: var(--border-radius);
  position: relative;
  overflow: hidden;
}

/* Create animated effect */
.placeholder-image::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(45deg);
  animation: shimmer 3s infinite;
  top: -50%;
  left: -50%;
}

@keyframes shimmer {
  0% {
    transform: translateX(-50%) rotate(45deg);
  }
  100% {
    transform: translateX(150%) rotate(45deg);
  }
}

/* Generate different gradients for each placeholder card */
.project-card:nth-of-type(3n+1) .placeholder-image {
  background: linear-gradient(135deg, #4a00e0, #8e2de2);
}

.project-card:nth-of-type(3n+2) .placeholder-image {
  background: linear-gradient(135deg, #00b4db, #0083b0);
}

.project-card:nth-of-type(3n+3) .placeholder-image {
  background: linear-gradient(135deg, #11998e, #38ef7d);
}

/* Modal Styles */
.project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 20, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow-y: auto;
}

.project-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  background: linear-gradient(135deg, rgba(30, 30, 50, 0.8), rgba(15, 15, 25, 0.9));
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
              0 0 30px rgba(142, 45, 226, 0.2),
              0 0 10px rgba(0, 230, 195, 0.3);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  transform: translateY(30px);
  transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  display: flex;
  flex-direction: column;
}

.project-modal.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(142, 45, 226, 0.5);
  transform: rotate(90deg);
}

.modal-body {
  padding: 2.5rem;
  overflow-y: auto;
  max-height: 80vh;
  /* Custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: rgba(142, 45, 226, 0.5) rgba(30, 30, 40, 0.3);
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(30, 30, 40, 0.3);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(74, 0, 224, 0.5), rgba(142, 45, 226, 0.5));
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(74, 0, 224, 0.7), rgba(142, 45, 226, 0.7));
}

.modal-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
  position: relative;
}

.modal-header::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(142, 45, 226, 0.5), transparent);
}

.modal-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #4a00e0, #8e2de2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

.modal-image {
  width: 100%;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.modal-image:hover img {
  transform: scale(1.03);
}

.modal-description {
  margin-bottom: 2rem;
  line-height: 1.8;
}

.modal-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(20, 20, 30, 0.4);
  border-radius: 1rem;
}

.modal-section {
  margin-bottom: 2rem;
}

.modal-section h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--color-accent-teal);
}

@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 85vh;
  }
  
  .modal-body {
    padding: 1.5rem;
  }
  
  .modal-header h2 {
    font-size: 1.8rem;
  }
}

/* Animation for modal content */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.5s cubic-bezier(0.19, 1, 0.22, 1) both;
}

body {
  scroll-behavior: smooth;
}

body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
} 