@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #f3f4f6;
  color: #1f2937;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Layout Containers */
.page-wrapper {
  max-width: 900px;
  width: 100%;
  margin: 2rem auto 3rem;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}


.header {
  text-align: center;
  margin-bottom: 2rem;
}

/* Logo */
.logo a {
  font-size: 2.4rem;
  font-weight: 700;
  text-decoration: none;
  color: #1f2937;
  border-bottom: 3px solid #6366f1;
  padding-bottom: 0.25rem;
  display: inline-block;
}

/* About Section */
.about-section {
  background: #fff;
  border-radius: 12px;
  padding: 1.75rem 2rem;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 3rem;
  text-align: center;
}

.about-text {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  color: #374151;
}

.about-links {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  align-items: center;
}

/* Buttons */
.btn {
  padding: 0.6rem 1.5rem;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  border-radius: 9999px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn:hover,
.btn:focus {
  background-color: #4f46e5;
  transform: translateY(-2px);
}

.btn:active {
  transform: scale(0.97);
}

/* Social Icons */
.social-link {
  display: inline-flex;
  align-items: center;
}

.social-icon {
  width: 38px;
  height: 38px;
  transition: transform 0.3s ease;
}

.social-link:hover .social-icon,
.social-link:focus .social-icon {
  transform: scale(1.2);
}

/* Projects Section */
.projects-section {
  background: #fff;
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
}



.projects-header {
  font-size: 2rem;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  color: #1f2937;
}

.projects-header:focus {
  outline: 3px solid #6366f1;
  outline-offset: 4px;
  border-radius: 6px;
}

.toggle-arrow {
  font-size: 1.3rem;
  transition: transform 0.3s ease;
}

.projects-header[aria-expanded="false"] .toggle-arrow {
  transform: rotate(-90deg);
}

.projects-grid {
  display: grid;
   grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}


.projects-grid.collapsed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

/* Project Card */
.project-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%; 
  border: 1.5px solid #d1d5db; /* light gray border */
  border-radius: 12px;          /* rounded corners */
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  background-color: white;      /* optional for better border contrast */
  height: auto;
}


.project-card:hover,
.project-card:focus-visible {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  transform: translateY(-6px) scale(1.01);
}

.project-card.expanded {
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
  transform: translateY(-8px) scale(1.02);
}


.project-media-frame {
  width: 100%;
  max-width: 100%;
  height: 300px;        
  overflow: hidden;
  border-radius: 12px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}



.project-media-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

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

.project-info {
  padding: 1rem; /* Add this */
  display: flex;
  align-items: center;
  text-align: center;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

.project-info h3 {
  font-size: 1.25rem;
  color: #111827;
  margin-bottom: 0.5rem;
}

.project-info p {
  flex-grow: 1;
  font-size: 1rem;
  color: #374151;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.project-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.github-link img.github-icon {
  width: 28px;
  height: 28px;
  transition: transform 0.3s ease;
}

.github-link:hover img.github-icon,
.github-link:focus-visible img.github-icon {
  transform: scale(1.2);
}


.live-demo-link {
  font-weight: 600;
  color: #6366f1;
  text-decoration: none;
  padding: 0.3rem 1rem;
  border-radius: 9999px;
  border: 2px solid #6366f1;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.live-demo-link:hover,
.live-demo-link:focus-visible {
  background-color: #6366f1;
  color: white;
  transform: translateY(-2px);
}


.live-demo-link:active {
  transform: scale(0.97);
}

.tech-stack {
  margin-top: 2rem;
  padding-bottom: 0.5rem; /* add breathing room */
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Footer */
.footer {
  text-align: center;
  color: #6b7280;
  font-size: 0.9rem;
  margin-top: 3rem;
}

/* Entry Animation */
@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
