/* style.css */

/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Header / Hero Section */
header {
  background: linear-gradient(to right, #667eea, #764ba2);
  color: white;
  padding: 60px 20px;
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
  opacity: 0;
  animation: fadeInUp 1s ease-out forwards;
}

header p {
  font-size: 1.2rem;
  margin-top: 10px;
  opacity: 0;
  animation: fadeInUp 1s ease-out forwards;
  animation-delay: 0.3s;
}

/* Sections */
.section {
  padding: 40px 20px;
  max-width: 1000px;
  margin: 40px auto;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease-out forwards;
}

.about {
  text-align: center;
  animation-delay: 0.6s;
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  animation-delay: 0.9s;
}

.how-to {
  text-align: center;
  animation-delay: 1.2s;
}

footer {
  background-color: #222;
  color: white;
  text-align: center;
  padding: 20px;
  opacity: 0;
  animation: fadeInUp 1s ease-out forwards;
  animation-delay: 1.5s;
}

/* Icons/List */
.icons,
.tech-icons {
  margin-top: 20px;
  font-size: 1.5rem;
}

.tech-icons {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Project Cards */
.project-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
  position: relative;
  overflow: hidden;
}

.project-card:nth-child(1) { animation-delay: 1.0s; }
.project-card:nth-child(2) { animation-delay: 1.1s; }
.project-card:nth-child(3) { animation-delay: 1.2s; }
.project-card:nth-child(4) { animation-delay: 1.3s; }
.project-card:nth-child(5) { animation-delay: 1.4s; }
.project-card:nth-child(6) { animation-delay: 1.5s; }

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, #667eea, #764ba2);
  transition: left 0.5s ease;
}

.project-card:hover::before {
  left: 0;
}

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

.project-card h3 {
  margin-bottom: 10px;
  transition: color 0.3s;
}

.project-card:hover h3 {
  color: #764ba2;
  animation: bounce 0.6s;
}

.project-card a {
  position: relative;
  color: #667eea;
  text-decoration: none;
  margin-right: 10px;
  font-weight: 500;
}

.project-card a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #667eea;
  transition: width 0.3s ease;
}

.project-card a:hover::after {
  width: 100%;
}

/* Utility */
a:hover {
  opacity: 0.8;
}

footer a {
  color: #667eea;
  text-decoration: none;
  transition: opacity 0.3s;
}

footer a:hover {
  opacity: 0.8;
}

/* Footer Animation */
.footer-animated {
  background-color: #222;
  color: #fff;
  text-align: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.footer-animated p {
  margin: 0;
  font-size: 0.9rem;
}

/* Link styling */
.footer-link {
  color: #667eea;
  margin: 0 0.5rem;
  position: relative;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* Hover effect: sliding underline */
.footer-link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: #764ba2;
  transition: width 0.3s ease, left 0.3s ease;
}

.footer-link:hover {
  color: #764ba2;
}

.footer-link:hover::after {
  width: 100%;
  left: 0;
}

/* Pulse animation on icon (heart) */
.footer-animated p {
  animation: fadeInUp 1s ease-out forwards;
}

.heart {
  display: inline-block;
  animation: pulse 1.5s infinite;
}


/* Reuse keyframes */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.2); }
}
