/* Main CSS - Non-critical styles loaded after critical CSS */

/* Utility classes */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

/* Layout components */
.right-panel {
  max-width: 400px;
}

.stats-container {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.stats-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 20px;
  text-align: center;
}

.stats {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: white;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  display: block;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.9;
}

/* Section styling */
.section {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 20px;
  position: relative;
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 2px;
}

.section h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 15px;
}

/* Timeline components */
.timeline-item {
  margin-bottom: 25px;
  padding: 20px;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 12px;
  border-left: 4px solid #667eea;
  transition: all 0.3s ease;
}

.timeline-item:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.timeline-period {
  font-weight: 700;
  color: #667eea;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.timeline-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 8px;
}

.timeline-subtitle {
  font-size: 1rem;
  color: #4a5568;
  margin-bottom: 10px;
  font-weight: 500;
}

.timeline-description {
  color: #718096;
  line-height: 1.6;
}

/* Progress bars */
.progress-item {
  margin-bottom: 20px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 500;
  color: #2d3748;
}

.progress-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 4px;
  transition: width 0.8s ease;
}

/* Skills and tags */
.skill-item {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-block;
  margin: 5px;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}

.skill-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Contact info */
.contact-info {
  margin-top: 25px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  padding: 12px;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.contact-item:hover {
  background: rgba(102, 126, 234, 0.1);
  transform: translateX(5px);
}

.contact-icon {
  font-size: 1.5rem;
  width: 30px;
  text-align: center;
}

/* Page transitions */
.page {
  display: none;
  animation: pageEnter 0.5s ease-out;
}

.page.active {
  display: block;
}

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

/* Projects section */
.projects-hero {
  text-align: center;
  margin-bottom: 40px;
}

.projects-hero h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #1a202c;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.project-subtitle {
  font-size: 1.1rem;
  color: #718096;
  font-weight: 400;
  position: relative;
  display: inline-block;
}

.subtitle-accent {
  color: #667eea;
  font-weight: 600;
  position: relative;
}

.subtitle-accent::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 2px;
}

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 800px;
  margin: 0 auto;
}

.project-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 20px;
  padding: 35px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  text-align: center;
  max-width: 100%;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
  border-radius: 20px 20px 0 0;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.project-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.project-title {
  font-size: 1.4rem !important;
  font-weight: 800 !important;
  color: #1a202c !important;
  margin-bottom: 15px !important;
  letter-spacing: -0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.project-desc {
  font-size: 1rem !important;
  color: #4a5568 !important;
  line-height: 1.6 !important;
  margin-bottom: 20px !important;
  font-weight: 400 !important;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}

.tech-tag {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6px 14px;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.tech-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.project-links {
  margin-top: 25px;
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #24292e 0%, #1a1a1a 100%);
  color: white !important;
  padding: 12px 24px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.github-link::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.5s;
}

.github-link:hover::before {
  left: 100%;
}

.github-link:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  background: linear-gradient(135deg, #1a1a1a 0%, #24292e 100%);
}

.link-icon {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.github-link:hover .link-icon {
  transform: scale(1.2);
}

/* Travel album */
.travel-album {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.travel-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  position: relative;
}

.travel-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.travel-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.travel-card:hover img {
  transform: scale(1.05);
}

.travel-desc {
  padding: 15px;
  background: white;
  font-size: 0.9rem;
  color: #4a5568;
  line-height: 1.5;
}

/* Responsive design */
@media (max-width: 768px) {
  .main-container {
    padding: 80px 15px 30px;
  }

  .section {
    padding: 20px;
    margin-bottom: 20px;
  }

  .stats {
    flex-direction: column;
    gap: 15px;
  }

  .stat-item {
    padding: 20px;
  }

  .projects-hero h2 {
    font-size: 2rem;
  }

  .project-card {
    padding: 25px;
  }

  .travel-album {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .nav-links {
    display: none; /* Implement mobile menu */
  }

  .project-card {
    padding: 20px;
  }

  .project-icon {
    font-size: 2.5rem;
  }
}


@media (max-width: 480px) {
  .nav-brand {
    font-size: 1.2rem;
  }
}

/* Print styles */
@media print {
  .navbar,
  .right-panel,
  .stats-container,
  .travel-album {
    display: none !important;
  }

  .main-container {
    display: block !important;
  }

  .section {
    break-inside: avoid;
    margin-bottom: 20px;
  }
}