/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #fcfcfc;
  color: #111111;
  line-height: 1.6;
}

/* Main container — full width like about.css */
main#main-content {
  width: 100%;
  padding: 2.5rem 0;            /* remove desktop inline gutters to use full width */
  color: #111111;
  box-sizing: border-box;
  scroll-margin-top: 80px;
}

/* Add small inline padding back on smaller viewports */
@media (max-width: 900px) {
  main#main-content { padding-inline: 3vw; }
}
@media (max-width: 600px) {
  main#main-content { padding-inline: 5vw; }
}

/* Section header */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  color: #000000;
  font-weight: 900;
  font-size: 3.2rem;
  margin-bottom: 0.8rem;
  letter-spacing: -0.02em;
  position: relative;
  user-select: none;
  cursor: default;
  transition: color 0.3s ease;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, #000000 0%, #333333 100%);
  border-radius: 2px;
}

.section-header h2:hover,
.section-header h2:focus-within { color: #444444; }

.section-subtitle {
  font-size: 1.3rem;
  color: #666666;
  font-weight: 400;
  font-style: italic;
  margin-top: 1.5rem;
}

/* Projects showcase container */
.projects-showcase {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 3vw, 4rem);
  max-width: 1200px;
  margin: 0 auto;
}

/* Featured project */
.featured-project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 2.5vw, 3rem);
  background: #ffffff;
  border-radius: 20px;
  padding: clamp(1.5rem, 3vw, 3rem);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid #e8e8e8;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.featured-project::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #000000 0%, #333333 100%);
}

.featured-project:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Featured project image */
.project-image-container {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.project-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overlay-content {
  text-align: center;
  color: white;
}

.overlay-content i {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  display: block;
}

.overlay-content span {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.featured-project:hover .image-overlay { opacity: 1; }
.featured-project:hover .project-image-container img { transform: scale(1.05); }

/* Featured project content */
.project-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.project-header h3 {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 800;
  color: #000000;
  margin: 0;
}

.project-badge {
  background: #000000;
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-description {
  font-size: 1.1rem;
  color: #444444;
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* Tech stack */
.tech-stack {
  display: flex;
  flex-wrap: wrap;                /* allow wrapping */
  gap: 0.8rem;
  margin-bottom: 2.5rem;
}

.tech-tag {
  background: #f0f0f0;
  color: #333333;
  padding: 0.6rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.3s ease;
}

.tech-tag:hover {
  background: #000000;
  color: white;
  transform: translateY(-2px);
}

/* Project actions */
.project-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.btn-primary {
  background: #000000;
  color: white;
}

.btn-primary:hover {
  background: #333333;
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: #000000;
  border-color: #000000;
}

.btn-secondary:hover {
  background: #000000;
  color: white;
}

/* Regular projects grid — intrinsically responsive */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Project cards */
.project-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e8e8e8;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

/* Card header */
.card-header { position: relative; }

.project-image-wrapper {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.project-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.image-gradient {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 50%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
}

.project-category {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Card content */
.card-content {
  padding: 2rem;
  padding-bottom: 1rem;
}

.card-content h4 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #000000;
  margin-bottom: 0.8rem;
}

.card-content p {
  color: #555555;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* Mini tech stack */
.mini-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mini-tech {
  background: #f8f8f8;
  color: #666666;
  padding: 0.3rem 0.7rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.mini-tech:hover {
  background: #000000;
  color: white;
}

/* Card footer */
.card-footer {
  padding: 0 2rem 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.card-footer a {
  flex: 1;
  text-align: center;
  padding: 0.7rem;
  background: #f8f8f8;
  color: #333333;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.card-footer a:hover {
  background: #000000;
  color: white;
  transform: translateY(-1px);
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, #f0f0f0 0%, #e5e5e5 100%);
  border-radius: 20px;
  padding: clamp(2rem, 4vw, 4rem);
  text-align: center;
  border: 1px solid #e8e8e8;
}

.cta-content h3 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 800;
  color: #000000;        /* stays dark */
  margin-bottom: 1rem;
}

.cta-content p {
  font-size: 1.1rem;
  color: #3a3a3a;        /* darker than before → now visible */
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}


.github-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: #000000;
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.github-btn:hover {
  background: #333333;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Responsive design — unify breakpoints with about.css */
@media (max-width: 900px) {
  .section-header h2 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
  .featured-project {
    grid-template-columns: 1fr; 
    gap: 2rem;
    text-align: center;
  }
  .project-header { justify-content: center; }
  .project-actions { justify-content: center; }
}

/* Mobile alignment fixes for Featured Project */
@media (max-width: 600px) {
  .section-header h2 { font-size: 2.5rem; }

  /* Force true single-column and centered content inside the featured project */
  .featured-project {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .project-image-container,
  .project-content {
    grid-column: 1;
  }

  /* Title + badge: center and allow wrapping so nothing drifts right */
  .project-header {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  .project-header h3 {
    width: 100%;
    text-align: center;
  }
  .project-badge {
    align-self: center;
  }

  /* If you use the top-right category chip, center it on mobile */
  .project-category {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    top: 0.75rem;
  }

  /* Keep text from compressing to the right */
  .project-content { align-items: center; }
  .project-description { text-align: center; }

  /* Live Demo / Source Code: stack and fill width */
  .project-actions {
    width: 100%;
    justify-content: center;
    align-items: stretch;
    flex-direction: column;
    gap: 0.75rem;
  }
  .project-actions a,
  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
  }

  /* Make tech tags 2-per-row so MongoDB and Cloudinary sit side by side */
  .tech-stack { display: flex; flex-wrap: wrap; gap: 0.8rem; }
  .tech-tag { flex: 1 1 calc(50% - 0.4rem); justify-content: center; } /* 2 per row */
  /* If order matters, you can enforce it with order (optional):
     .tech-tag[data-tech="mongodb"] { order: 10; }
     .tech-tag[data-tech="cloudinary"] { order: 11; }
  */

  /* Cards and grids refine for phones */
  .projects-grid { grid-template-columns: 1fr; }
  .featured-project { padding: 1.5rem; }
  .card-content { padding: 1.25rem 1.25rem 0.75rem; }
  .card-footer { padding: 0 1.25rem 1.25rem; }
  .project-category { font-size: 0.75rem; }
  .tech-tag { font-size: 0.85rem; padding: 0.5rem 0.9rem; }
  .mini-tech { font-size: 0.7rem; }
}

/* Focus accessibility */
.project-card:focus-visible,
.featured-project:focus-visible {
  outline: 3px solid #000000;
  outline-offset: 4px;
}

/* Smooth scroll behavior */
html { scroll-behavior: smooth; }
