/* ===== Modern Projects Section Styles ===== */

.projects-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 40px;
  position: relative;
  background-color: rgba(20, 20, 30, 0.3);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.projects-header {
  text-align: center;
  margin-bottom: 50px;
}

.projects-h.pli-text { 
  padding: 8px 12px 0px;
}

.pli-title { 
  font-weight: 600; 
  color: #ffffff; 
  text-decoration: none; 
  font-size: 1rem;
  transition: all 0.2s ease;
  display: block;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.pli-title:hover {
  color: #667eea;
}

.projects-header .sub {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 15px;
  position: relative;
}

.projects-header .sub::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

.projects-subtitle {
  font-size: 1.1rem;
  color: #b8c5d6;
  max-width: 600px;
  margin: 15px auto 0;
  line-height: 1.6;
  font-weight: 300;
}

/* ===== Project Controls Styles ===== */

.project-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  gap: 20px;
  flex-wrap: wrap;
}

.search-container {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-input {
  width: 100%;
  padding: 16px 50px 16px 20px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 221, 255, 0.3);
  border-radius: 0;
  color: #ffffff;
  font-size: 1rem;
  font-family: 'Consolas', monospace;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 98% 100%, 0% 100%);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4);
}

.search-input:focus {
  outline: none;
  border-color: #00ddff;
  box-shadow: 0 0 20px rgba(0, 221, 255, 0.3), inset 0 0 10px rgba(0, 0, 0, 0.4);
  background: rgba(0, 0, 0, 0.5);
}

.search-input::placeholder {
  color: rgba(0, 221, 255, 0.5);
  opacity: 0.7;
}

.search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #b8c5d6;
  pointer-events: none;
}

.filter-container {
  display: flex;
  gap: 15px;
}

.filter-select {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 221, 255, 0.3);
  border-radius: 0;
  color: #00ddff;
  font-size: 0.9rem;
  font-family: 'Consolas', monospace;
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  clip-path: polygon(0 0, 100% 0, 95% 100%, 0% 100%);
  position: relative;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4);
  appearance: none;
  -webkit-appearance: none;
}

.filter-select::before {
  content: '▼';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #00ddff;
  pointer-events: none;
}

.filter-select:focus {
  outline: none;
  border-color: #00ddff;
  box-shadow: 0 0 20px rgba(0, 221, 255, 0.3), inset 0 0 10px rgba(0, 0, 0, 0.4);
}

.filter-select option {
  background: #0a0f16;
  color: #ffffff;
  padding: 8px;
  font-family: 'Consolas', monospace;
}

.filter-select option {
  background: #1a1a1a;
  color: #ffffff;
}

/* ===== Projects Grid Styles ===== */

.projects-container {
  position: relative;
}

/* ===== Project Statistics ===== */

.project-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 30px 0;
  padding: 20px;
  background: rgba(16, 23, 36, 0.6);
  border-radius: 12px;
  border: 1px solid rgba(102, 126, 234, 0.2);
  backdrop-filter: blur(10px);
}

.stat-item {
  text-align: center;
  padding: 10px 15px;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 5px;
  font-family: 'Consolas', monospace;
}

.stat-label {
  font-size: 0.9rem;
  color: #b8c5d6;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== Language Filter Styles ===== */

.project-filters {
  margin-bottom: 30px;
  text-align: center;
}

.filter-label {
  color: #b8c5d6;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 15px;
  font-family: 'Consolas', monospace;
}

.language-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.filter-btn {
  background: rgba(16, 23, 36, 0.8);
  border: 1px solid rgba(102, 126, 234, 0.3);
  color: #b8c6ff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'Consolas', monospace;
}

.filter-btn:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.5);
  color: #ffffff;
  transform: translateY(-2px);
}

.filter-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.filter-btn.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.project-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  position: relative;
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.5s ease-out forwards;
  opacity: 0;
  transform: translateY(16px);
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scanline {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

@keyframes glitch {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-3px, 3px);
  }
  40% {
    transform: translate(-3px, -3px);
  }
  60% {
    transform: translate(3px, 3px);
  }
  80% {
    transform: translate(3px, -3px);
  }
  100% {
    transform: translate(0);
  }
}

/* Add a cool scanline effect to the projects section */
.projects-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(0, 221, 255, 0.5), transparent);
  opacity: 0.3;
  z-index: 1;
  animation: scanline 8s linear infinite;
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: rgba(102, 126, 234, 0.4);
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(102, 126, 234, 0.2);
}

.project-image-container {
  position: relative;
  height: 240px; /* Increased height for better image display */
  overflow: hidden;
  background: linear-gradient(135deg, #232526 0%, #414345 100%);
  cursor: pointer;
  border-radius: 12px 12px 0 0;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

.project-card:hover .project-image {
  transform: scale(1.1);
}

.project-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: #7f8c8d;
}

.placeholder-icon {
  font-size: 3rem;
  margin-bottom: 10px;
  opacity: 0.6;
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  cursor: pointer;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.overlay-content {
  text-align: center;
  transform: translateY(20px);
  transition: transform 0.4s ease;
  pointer-events: none;
}

.overlay-content h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #ffffff;
}

.overlay-content p {
  font-size: 1.25rem;
  color: #e3f2fd;
  margin: 0;
}

.project-card:hover .overlay-content {
  transform: translateY(0);
}

.project-content {
  padding: 16px; /* reduce padding for denser layout */
}

.project-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.project-card:hover .project-title {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.project-description {
  color: #b8c5d6;
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.description-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.3s ease;
}

.description-text.expanded {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

.see-more-btn {
  background: none;
  border: none;
  color: #4e7bc9;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
  margin-left: 5px;
  display: inline;
  transition: color 0.3s ease;
}

.see-more-btn:hover {
  text-decoration: underline;
}

.project-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

/* Compact project list styling */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ===== Clean Project Cards - Built from Scratch ===== */

.project-list-item {
  background: rgba(16, 23, 36, 0.9);
  border: 1px solid rgba(30, 45, 65, 0.3);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.project-list-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  border-color: rgba(80, 100, 160, 0.2);
}

/* Image Section */
.pli-thumb-wrap { 
  height: 180px;
  overflow: hidden;
  background: rgba(10, 15, 25, 0.8);
}

.pli-thumb { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  object-position: center;
  display: block;
  transition: transform 0.6s ease, filter 0.3s ease;
  cursor: pointer;
}

.pli-thumb:hover {
  filter: brightness(1.1);
}

.project-list-item:hover .pli-thumb {
  transform: scale(1.08);
}

/* Content Section - Compact Layout */
.pli-content {
  padding: 12px;
}

/* Title */
.pli-title { 
  font-weight: 600; 
  color: #ffffff; 
  text-decoration: none; 
  font-size: 1rem;
  display: block;
  margin-bottom: 6px;
}

.pli-title:hover {
  color: #667eea;
}

/* Description */
.pli-desc { 
  color: rgba(170, 180, 195, 0.85); 
  font-size: 0.85rem; 
  margin-bottom: 8px; 
  line-height: 1.4;
}

.pli-desc.expanded {
  max-height: none;
}

/* Languages */
.pli-langs { 
  display: flex; 
  gap: 6px; 
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pli-lang { 
  background: rgba(102, 126, 234, 0.2);
  color: #b8c6ff;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(102, 126, 234, 0.3);
}

/* Meta Info (Stars/Forks) */
.pli-meta { 
  color: rgba(180, 185, 200, 0.7); 
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.pli-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pli-meta-item i {
  color: #667eea;
  font-size: 0.9rem;
}

/* Buttons */
.pli-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pli-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.pli-button-github {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.pli-button-github:hover {
  background: rgba(255, 255, 255, 0.12);
}

.pli-button-demo {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border: none;
}

.pli-button-demo:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* See More Button */
.see-more-btn { 
  background: none;
  border: none;
  color: #667eea; 
  cursor: pointer; 
  font-size: 0.8rem;
  padding: 0; 
  margin-left: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline;
}

.see-more-btn:hover { 
  color: #764ba2;
  text-decoration: underline;
}

.stat-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(102, 126, 234, 0.15);
  color: #b8c5d6;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(102, 126, 234, 0.25);
  transition: all 0.3s ease;
}

.stat-tag:hover {
  background: rgba(102, 126, 234, 0.25);
  transform: scale(1.05);
  color: #ffffff;
}

.stat-tag .stat-icon {
  width: 14px;
  height: 14px;
  color: #667eea;
  flex-shrink: 0;
}

.project-languages {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.language-tag {
  background: rgba(102, 126, 234, 0.2);
  color: #667eea;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}

.language-tag:hover {
  background: rgba(102, 126, 234, 0.3);
  transform: scale(1.05);
}

.project-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.project-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(102, 126, 234, 0.2);
}

.project-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(102, 126, 234, 0.25);
}

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

.action-btn {
  flex: 1;
  max-width: none;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.action-btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border: 2px solid transparent;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #b8c5d6;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-2px);
}

/* ===== Loading and Empty States ===== */

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #b8c5d6;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(102, 126, 234, 0.2);
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-container p {
  font-size: 1.35rem;
  margin: 0;
}

.no-projects {
  text-align: center;
  padding: 60px 20px;
  color: #7f8c8d;
}

.no-projects svg {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  opacity: 0.6;
}

.no-projects h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #b8c5d6;
}

.no-projects p {
  font-size: 1.25rem;
  margin: 0;
}

/* ===== Responsive Design ===== */

@media (max-width: 1200px) {
  .projects-section {
    padding: 40px 20px;
  }
  
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
  }

  .project-stats {
    gap: 20px;
    margin: 25px 0;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .language-filters {
    gap: 6px;
  }

  .filter-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  .projects-section {
    padding: 30px 15px;
  }
  
  .project-stats {
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
  }

  .stat-item {
    padding: 5px 10px;
  }

  .stat-number {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .projects-section {
    padding: 30px 15px;
  }
  
  .projects-header .sub {
    font-size: 2.5rem;
  }
  
  .projects-subtitle {
    font-size: 1.1rem;
  }
  
  .dashboard-card {
    padding: 25px;
  }
  
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .stat-card {
    padding: 20px;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .project-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-container {
    max-width: none;
  }
  
  .filter-container {
    justify-content: center;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .project-image-container {
    height: 220px;
  }
  
  .project-stats {
    gap: 6px;
  }
  
  .stat-tag {
    gap: 4px;
    font-size: 0.75rem;
    padding: 4px 8px;
  }
  
  .stat-tag .stat-icon {
    width: 12px;
    height: 12px;
  }
  
  .project-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .project-filters {
  scale:.85;
    margin-left:-80px;
}
  .projects-header .sub {
    font-size: 2rem;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .project-content {
    padding: 20px;
  }
  
  .project-title {
    font-size: 1.2rem;
  }
  
  .project-description {
    font-size: 0.9rem;
  }
  
  .project-image-container {
    height: 180px;
  }
  
  .overlay-content h3 {
    font-size: 1.1rem;
  }
  
  .overlay-content p {
    font-size: 1.1rem;
  }
  
  .project-stats {
    gap: 6px;
  }
  
  .stat-tag {
    font-size: 0.85rem;
    padding: 3px 6px;
  }
  
  .stat-tag .stat-icon {
    width: 10px;
    height: 10px;
  }
}

/* ===== Animation Delays for Staggered Loading ===== */

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

/* ===== Accessibility ===== */

.action-btn:focus,
.search-input:focus,
.filter-select:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

.project-card:focus-within {
  outline: 2px solid #667eea;
  outline-offset: 4px;
}

/* ===== Dark Theme Enhancements ===== */

@media (prefers-color-scheme: dark) {
  .project-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
  }
  
  .search-input,
  .filter-select {
    background: rgba(255, 255, 255, 0.08);
  }
}
