:root {
  --purple: #a200ff;
  --dark: rgb(20, 20, 20);
  --darkT: rgba(10, 10, 10, 0.3);
  --light: #f9f9f9;
  --gray: #bbbbbb;
}

* {
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: #272727;
  color: var(--light);
  overflow-x: hidden;
}

section {
  scroll-margin-top: 80px;
}

.purple {
  color: var(--purple);
  text-shadow: 0 0 2px var(--purple);
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
}

.logo span:first-child {
  color: var(--purple);
}

.logo span:last-child {
  color: #fff;
}

/* Unified link underline animation */
a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  width: 100%;
  height: 2px;
  background: var(--purple);
  transition: transform 0.3s ease;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ========== SERVICES ========== */
.services, .projects, .contact {
  padding: 60px 60px;
  text-align: center;
}

.services h2,
.projects h2,
.contact h2 {
  font-size: 2.5rem;
  margin-bottom: 50px;
}

.service-cards,
.project-grid {
  display: grid;
  gap: 30px;
}

.service-cards {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.project-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--dark);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid var(--purple);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px var(--purple);
}

.card h3 {
  color: var(--purple);
  margin-bottom: 10px;
}

.card p {
  color: var(--gray);
  font-size: 0.95rem;
}

/* ========== STATS ========== */
.stats {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: var(--dark);
  padding: 80px 20px;
  text-align: center;
  flex-wrap: wrap;
  gap: 25px;
}

.stat h3 {
  color: var(--purple);
  font-size: 2.2rem;
}

.stat p {
  color: var(--gray);
  font-size: 1rem;
  margin-top: 8px;
}

/* ========== PROJECTS ========== */
.project {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
}

.project img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: 0.4s;
}

.project:hover img {
  transform: scale(1.1);
  opacity: 0.8;
}

.project span {
  position: absolute;
  bottom: 15px;
  left: 20px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 6px 12px;
  border-radius: 8px;
}

/* ========== CONTACT ========== */
#contact {
  background-color: var(--dark);
}

.contact p {
  color: var(--gray);
  margin-bottom: 40px;
  font-size: 1rem;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: #1a1a1a;
  color: var(--light);
  font-size: 1rem;
  transition: border 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border: 1px solid var(--purple);
  box-shadow: 0 0 10px rgba(162, 0, 255, 0.5);
}

.contact-form button {
  background-color: var(--purple);
  color: #fff;
  border: none;
  padding: 14px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 0 25px rgba(162, 0, 255, 0.4);
}

.contact-form button:hover {
  box-shadow: 0 0 8px var(--purple), 0 0 30px var(--purple);
}

/* ========== PROJECTS PAGE ========== */
.projects-page {
  padding: 120px 60px 80px;
  text-align: center;
}

.projects-page h1 {
  font-size: 2.8rem;
  margin-bottom: 15px;
}

.projects-page .intro-text {
  color: var(--gray);
  margin-bottom: 50px;
  font-size: 1.1rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.project-card {
  background: var(--dark);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid transparent;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
  transition: 0.3s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--purple);
  box-shadow: 0 0 20px rgba(162, 0, 255, 0.3);
}

.project-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: 0.3s ease;
}

.project-card:hover img {
  opacity: 0.85;
  transform: scale(1.03);
}

.project-info {
  padding: 20px;
}

.project-info h3 {
  color: var(--purple);
  margin-bottom: 10px;
}

.project-info p {
  color: var(--gray);
  font-size: 0.95rem;
}

.show-more-container {
  text-align: center;
  margin-top: 40px;
}

.show-more-btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--purple);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(125, 60, 255, 0.4);
}

.show-more-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 5px var(--purple), 0 0 25px var(--purple);
}

/* ========== ABOUT PAGE ========== */
.about-page {
  padding: 100px 60px;
  text-align: center;
  background: linear-gradient(to bottom, rgba(25,25,25,0.95), rgba(15,15,15,1));
}

.about-page h1 {
  font-size: 2.8rem;
  margin-bottom: 15px;
}

.about-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 60px;
  gap: 40px;
  flex-wrap: wrap;
}

.about-text {
  flex: 1;
  color: var(--gray);
  text-align: left;
}

.about-text h2 {
  color: var(--light);
  margin: 20px 0 8px;
}

.about-image {
  flex: 1;
  text-align: center;
}

.about-image img {
  width: 100%;
  max-width: 480px;
  border-radius: 20px;
  box-shadow: 0 0 25px rgba(125, 60, 255, 0.3);
}

/* ========== TEAM SECTION ========== */
.team-section {
  padding: 100px 60px;
  text-align: center;
  background: #111;
}

.team-section h2 {
  font-size: 2.5rem;
  margin-bottom: 50px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  justify-items: center;
}

/* Make all cards consistent height */
.team-card {
  background: #1a1a1a;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 0 15px rgba(125, 60, 255, 0.2);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  max-width: 320px;
}

.team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 25px rgba(125, 60, 255, 0.4);
}

.team-card img {
  width: 100%;
  aspect-ratio: 1 / 1; /* ✅ keeps perfect square images */
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 15px;
}


.team-card h3 {
  color: var(--light);
  margin-bottom: 5px;
}

.team-card p {
  color: var(--gray);
  font-size: 0.95rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .services, .projects, .contact {
    padding: 60px 30px;
  }
}

@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .projects-page {
    padding: 100px 30px;
  }
}

@media (max-width: 768px) {
  .stats {
    flex-direction: column;
    padding: 60px 20px;
  }

  .contact {
    padding: 60px 30px;
  }

  .contact h2 {
    font-size: 2rem;
  }

  .contact-form {
    gap: 15px;
  }

  .about-page {
    padding: 80px 30px;
  }

  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .about-text {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .service-cards,
  .project-grid {
    grid-template-columns: 1fr;
  }
}
