/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  color: #c4bfc4;
  line-height: 1.6;
  overflow-x: hidden;
  margin: 0; /* remove margin-top */
  margin-top: 50px;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
      135deg,
      rgba(0, 0, 44, 0.9),
      rgba(0, 78, 251, 0.8)
    ),
    url("background.jpg") no-repeat;
  background-size: cover;
  background-position: center 30%;
  z-index: -1;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== UTILITIES ===== */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  color: #5dadfe;
  margin-bottom: 40px;
  position: relative;
}

.section-title::after {
  content: "";
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #004efb, #8c4df2);
  display: block;
  margin: 10px auto 0;
  border-radius: 2px;
}

/* ===== HEADER ===== */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
  background: rgba(0, 0, 44, 0.85);
  backdrop-filter: blur(10px);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  color: #5dadfe;
  font-weight: 700;
  font-size: 1.5rem;
}

.logo span {
  color: #8c4df2;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 25px;
}

.nav-links a {
  color: #c4bfc4;
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, #004efb, #8c4df2);
  transition: 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* ===== HERO (for home only) ===== */
.floating-shapes span {
  position: absolute;
  width: 20px;
  height: 20px;
  background: linear-gradient(90deg, #004efb, #8c4df2);
  border-radius: 50%;
  animation: float 8s infinite ease-in-out;
}

@keyframes float {
  0% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-30px) translateX(20px);
  }
  100% {
    transform: translateY(0) translateX(0);
  }
}

.hero {
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  /* background: radial-gradient(circle at 20% 30%, #004efb, #00002c 80%); */
  overflow: hidden;
  position: relative;
}

.hero h2 {
  font-size: 3rem;
  background: linear-gradient(90deg, #5dadfe, #8c4df2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.hero p {
  color: #f0f0f0;
  margin-bottom: 25px;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 600;
  transition: 0.3s ease;
}

.btn.primary {
  background: linear-gradient(90deg, #004efb, #8c4df2);
  color: #fff;
}

.btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(140, 77, 242, 0.5);
}

.btn.outline {
  border: 2px solid #5dadfe;
  color: #5dadfe;
}

.btn.outline:hover {
  background: #5dadfe;
  color: #00002c;
}

/* ===== SECTIONS ===== */
section {
  padding: 80px 0;
}

/* ===== GRID COMPONENTS ===== */
.grid {
  display: grid;
  gap: 30px;
}

.two-col {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 20px 0;
  background: #00002c;
  color: #c4bfc4;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s ease forwards;
}

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

.skill-card:hover,
.project-card:hover {
  transform: translateY(-5px);
  transition: 0.3s ease;
}

.contact-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 90vh;
  /* background: linear-gradient(135deg, #121212, #1e1e2f); */
  color: #fff;
  padding: 2rem;
}

.contact-container {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 3rem;
  margin-top: 40px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  text-align: center;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: #1a1a2e;
  border: none;
  outline: none;
  color: white;
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  transition: 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  box-shadow: 0 0 10px #7b61ff;
}

.contact-form button {
  width: 100%;
  background: linear-gradient(90deg, #7b61ff, #5c4bff);
  border: none;
  color: white;
  padding: 1rem;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.contact-form button:hover {
  transform: scale(1.03);
}

.portfolio {
  text-align: center;
  color: white;
  padding: 4rem 2rem;
  /* background: #0e0e1a; */
}

.portfolio-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(2, 1fr); /* exactly 2 per row */
  margin-top: 2rem;
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

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

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

.project-info {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  text-align: left;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
}

.logo img {
  height: 65px; /* adjust as needed */
  margin-right: 10px;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 600;
}

.logo span {
  color: #7b61ff; /* accent color */
}

.about {
  /* background: linear-gradient(135deg, #00002c, #004efb); */
  color: #fff;
  padding: 80px 20px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.about h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: #c4bfc4; /* accent heading color */
}

.about p {
  max-width: 700px;
  margin: 15px auto;
  line-height: 1.8;
  font-size: 1.1rem;
}

.about strong {
  color: #8c4df2; /* highlight key traits */
}

.about .btn {
  margin-top: 25px;
  padding: 12px 30px;
  font-size: 1rem;
  background: #5dadfe;
  color: #fff;
  border-radius: 30px;
  transition: transform 0.2s ease;
}

.about .btn:hover {
  transform: scale(1.05);
}

.services {
  /* background: linear-gradient(135deg, #00002c, #004efb); */
  color: #fff;
  padding: 80px 20px;
  text-align: center;
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.services h2.section-title {
  font-size: 2.5rem;
  margin-bottom: 15px;
  background: linear-gradient(90deg, #5dadfe, #8c4df2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.services p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 50px;
  line-height: 1.8;
  color: #ddd;
}

.service-cards {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  width: 100%;
  margin: 0 auto;
}

.card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 30px 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 10px 35px rgba(140, 77, 242, 0.5);
}

.card .icon {
  font-size: 3rem;
  margin-bottom: 15px;
  display: inline-block;
  transition: transform 0.4s ease, color 0.4s ease;
}

.card:hover .icon {
  transform: rotate(15deg) scale(1.2);
  color: #5dadfe;
}

.card h3 {
  margin-bottom: 15px;
  color: #8c4df2;
  font-size: 1.5rem;
}

.card p {
  font-size: 1rem;
  line-height: 1.6;
  color: #ddd;
}

/* Optional: fade-in on scroll effect */
.card {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.2s;
}

.card:nth-child(2) {
  animation-delay: 0.4s;
}
.card:nth-child(3) {
  animation-delay: 0.6s;
}
.card:nth-child(4) {
  animation-delay: 0.8s;
}

/* ===== TESTIMONIALS ===== */
.testimonial-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 30px 25px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #ddd;
  text-align: left;
}

.testimonial-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 10px 35px rgba(140, 77, 242, 0.5);
}

.testimonial-card p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 15px;
}

.testimonial-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #ebdeff;
  text-align: right;
}

.grid.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Fade-in effect on scroll */
.testimonial-card {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease forwards;
}

.testimonial-card:nth-child(1) {
  animation-delay: 0.2s;
}
.testimonial-card:nth-child(2) {
  animation-delay: 0.4s;
}
.testimonial-card:nth-child(3) {
  animation-delay: 0.6s;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .grid.two-col {
    grid-template-columns: 1fr;
  }

  .testimonial-card {
    padding: 25px 20px;
  }

  .testimonial-card p {
    font-size: 0.95rem;
  }

  .testimonial-card h4 {
    font-size: 0.9rem;
  }
}

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

/* ===== MOBILE MEDIA VERSION ===== */
@media (max-width: 768px) {
  /* === HEADER === */
  header .container {
    justify-content: space-between;
    padding: 10px 20px;
  }

  .logo img {
    height: 55px;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100vh;
    background: rgba(0, 0, 44, 0.95);
    backdrop-filter: blur(15px);
    gap: 30px;
    transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    padding: 50px 20px;
    z-index: 1000;
    clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
  }

  /* Animate menu in with a cool slide + shape reveal */
  .nav-links.active {
    right: 0;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }

  .nav-links li {
    opacity: 0;
    transform: translateX(50px);
    animation: navFadeIn 0.5s forwards;
  }

  .nav-links li:nth-child(1) {
    animation-delay: 0.1s;
  }
  .nav-links li:nth-child(2) {
    animation-delay: 0.2s;
  }
  .nav-links li:nth-child(3) {
    animation-delay: 0.3s;
  }
  .nav-links li:nth-child(4) {
    animation-delay: 0.4s;
  }
  .nav-links li:nth-child(5) {
    animation-delay: 0.5s;
  }

  .project-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.3s ease;
  }

  @keyframes navFadeIn {
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  /* Mobile menu links */
  .nav-links li a {
    font-size: 1.6rem;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 20px;
    border-radius: 15px;
    background: linear-gradient(90deg, #004efb, #8c4df2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    transition: all 0.3s ease;
  }

  .nav-links li a::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    transition: width 0.3s ease;
    z-index: -1;
  }

  .nav-links li a:hover::before {
    width: 100%;
  }

  /* Hamburger button */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.3s ease;
  }

  .hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, #004efb, #8c4df2);
    border-radius: 3px;
    transition: all 0.4s ease;
  }

  .portfolio-grid {
    gap: 1.5rem;
  }

  .project-card {
    height: 240px; /* increased height */
    border-radius: 18px;
  }

  .project-card img {
    height: 100%;
    object-fit: cover;
  }

  .project-info {
    padding: 1rem 1.2rem;
  }

  .project-info h3 {
    font-size: 1rem; /* smaller text */
  }

  .project-info p {
    font-size: 0.85rem; /* smaller text */
  }

  /* Hamburger turns into X */
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* === HERO === */
  .hero {
    height: 85vh;
    padding: 0 1rem;
    text-align: center;
  }

  .hero h2 {
    font-size: 2.1rem;
  }

  .hero p {
    font-size: 1rem;
  }

  /* === ABOUT / SERVICES / CONTACT === */
  section {
    padding: 50px 0;
  }

  .about p,
  .services p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .service-cards {
    grid-template-columns: 1fr;
  }

  .contact-container {
    padding: 2rem;
  }

  /* === FOOTER === */
  footer {
    font-size: 0.85rem;
  }

  #nav-links {
    pointer-events: none;
  }

  #nav-links.active {
    pointer-events: auto;
  }
}
