/**
 * Custom CSS Enhancements for Personal Portfolio
 * Enhanced styling and modern features
 */

/* ===== Section Spacing Fixes ===== */
.resume {
  margin-bottom: 60px;
  padding-bottom: 40px;
}

.portfolio.section-bg {
  margin-top: 40px;
  padding-top: 60px;
}

.section-separator {
  height: 2px;
  background: linear-gradient(90deg, transparent, #1e3a8a, transparent);
  margin: 40px 0;
  opacity: 0.6;
}



/* ===== Enhanced Project Cards ===== */
.portfolio-item {
  margin-bottom: 30px;
}

.portfolio-wrap {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  background: white;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.portfolio-image {
  position: relative;
  overflow: hidden;
}

.portfolio-wrap img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.portfolio-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.portfolio-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #272829;
}

.portfolio-description {
  font-size: 14px;
  color: #6c757d;
  margin-bottom: 15px;
  line-height: 1.5;
  flex-grow: 1;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 15px;
}

.portfolio-tag {
  background: rgba(30, 58, 138, 0.8);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.portfolio-technologies {
  margin-bottom: 15px;
}

.portfolio-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

.portfolio-actions .btn {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.portfolio-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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


/* ===== No Results Message ===== */


/* ===== Loading Animation ===== */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #1e3a8a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ===== Enhanced Hero Section ===== */
#hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  position: relative;
}

#hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../img/cover_pic.jpg') center center;
  background-size: cover;
  opacity: 0.3;
  z-index: 1;
}

.hero-container {
  position: relative;
  z-index: 2;
}

/* ===== Enhanced About Section ===== */
.about img {
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.about img:hover {
  transform: scale(1.02);
}

/* ===== Enhanced Skills Section ===== */
.skills .skill-category {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: 100%;
}

.skills .skill-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.skill-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #ecf0f1;
}

.skill-header i {
  font-size: 24px;
  color: #1e3a8a;
  margin-right: 15px;
}

.skill-header h4 {
  margin: 0;
  color: #2c3e50;
  font-weight: 600;
}

.skill-items {
  space-y: 15px;
}

.skill-item {
  margin-bottom: 15px;
}

.skill-name {
  display: block;
  font-weight: 500;
  color: #5a6c7d;
  margin-bottom: 8px;
  font-size: 14px;
}

.skill-level {
  width: 100%;
  height: 8px;
  background: #ecf0f1;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.skill-bar {
  height: 100%;
  background: linear-gradient(90deg, #1e3a8a, #3b82f6);
  border-radius: 4px;
  transition: width 1s ease-in-out;
  position: relative;
}

.skill-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ===== Specialties Section ===== */
.specialties-section {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.specialties-section h3 {
  color: #2c3e50;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  font-weight: 600;
}

.specialties-section h3 i {
  color: #149ddd;
  margin-right: 10px;
  font-size: 24px;
}

.specialties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.specialty-item {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid #dee2e6;
}

.specialty-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  color: white;
}

.specialty-item:hover i,
.specialty-item:hover h5,
.specialty-item:hover p {
  color: white;
}

.specialty-item i {
  font-size: 32px;
  color: #1e3a8a;
  margin-bottom: 15px;
  transition: color 0.3s ease;
}

.specialty-item h5 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #2c3e50;
  transition: color 0.3s ease;
}

.specialty-item p {
  font-size: 13px;
  color: #6c757d;
  margin: 0;
  transition: color 0.3s ease;
}

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


/* ===== Animation Classes ===== */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-up {
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Enhanced Testimonials ===== */
.testimonials .testimonial-item {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ===== Enhanced Contact Section ===== */
.contact .info {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact .info i {
  color: #1e3a8a;
  font-size: 24px;
}

/* ===== Utility Classes ===== */
.text-gradient {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-effect {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ===== Responsive Design for Skills ===== */
@media (max-width: 768px) {
  .skills .skill-category {
    margin-bottom: 20px;
    padding: 20px;
  }
  
  .specialties-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
  }
  
  .specialty-item {
    padding: 15px;
  }
  
  .specialty-item i {
    font-size: 28px;
  }
  
  .specialty-item h5 {
    font-size: 14px;
  }
  
  .specialty-item p {
    font-size: 12px;
  }

  .portfolio-content {
    padding: 15px;
  }

  .portfolio-title {
    font-size: 16px;
  }

  .portfolio-description {
    font-size: 13px;
  }

  .portfolio-actions {
    gap: 6px;
  }

  .portfolio-actions .btn {
    font-size: 11px;
    padding: 5px 10px;
  }
}

/* ===== Animation for Skill Bars ===== */
.skill-bar {
  animation: skillBarFill 1.5s ease-out;
}

@keyframes skillBarFill {
  from { width: 0; }
  to { width: var(--skill-level); }
}

/* Portfolio Loading and Display Fixes */

/* Ensure portfolio items are visible */
.portfolio-item {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.portfolio-item.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* Loading spinner styles */
.loading-spinner {
  padding: 40px 20px;
}

.loading-spinner .spinner-border {
  width: 3rem;
  height: 3rem;
}

/* Portfolio item styles - updated to show info below image */

/* Ensure proper spacing */
.portfolio-container {
  margin-top: 30px;
}

/* Animation delays for staggered loading */
.portfolio-item:nth-child(1) { animation-delay: 0.1s; }
.portfolio-item:nth-child(2) { animation-delay: 0.2s; }
.portfolio-item:nth-child(3) { animation-delay: 0.3s; }
.portfolio-item:nth-child(4) { animation-delay: 0.4s; }
.portfolio-item:nth-child(5) { animation-delay: 0.5s; }
.portfolio-item:nth-child(6) { animation-delay: 0.6s; }
