html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: #000;
  color: #fff;
  padding-top: 80px;
}


/* Navbar */
header {
  display: flex;
  justify-content: space-between;
  padding: 20px 60px;
  background: #7ED321;
    position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}


.logo {
  color: #fff;
}

nav a {
  position: relative;
  margin-left: 20px;
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  transition: 0.3s;
}

/* hover color */
nav a:hover {
  color: #000;
}

/* animated underline */
nav a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -5px;
  left: 0;
  background: #000;
  transition: 0.3s;
}

nav a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 80px;
  background: 
    linear-gradient(#111 1px, transparent 1px),
    linear-gradient(90deg, #111 1px, transparent 1px);
  background-size: 40px 40px;
}

/* LEFT SIDE */
.content {
  width: 50%;
}

/* RIGHT SIDE */
.hero-img {
  width: 50%;
  display: flex;
  justify-content: center;
}

/* IMAGE */
.hero-img img {
  width: 320px;
  height: 400px;        /* fixed height */
  object-fit: cover;    /* important: prevents stretch */
  object-position: center; /* keeps face centered */
  border-radius: 40%;
  border: 3px solid #7ED321;
}

.content h1 {
  font-size: 60px;
  margin-bottom: 10px;
}

.content h2 {
  color: #7ED321;
  margin-bottom: 30px;
}

/* Buttons */
.buttons {
  margin-bottom: 40px;
}

.btn {
  position: relative;
  padding: 12px 25px;
  margin-right: 15px;
  background: #7ED321;
  color: #000;
  font-size: medium;
  font-weight: 700;
  border: 2px solid #7ED321;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  z-index: 1;
}

/* overlay effect */
.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;   /* start from left outside */
  width: 100%;
  height: 100%;
  background: #000; /* overlay color */
  transition: 0.4s;
  z-index: -1;
}

/* hover → move left to right */
.btn:hover::before {
  left: 0;
}

/* text color change */
.btn:hover {
  color: #7ED321;
}

/* Social Icons */
.social a {
  text-decoration: none;
  color: inherit;   /* keeps icon color same */
}

.social a i {
  margin-right: 15px;
  font-size: 20px;
  padding: 10px;
  border: 2px solid #7ED321;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.3s;
}

.social a i:hover {
  background: #7ED321;
  color: #000;
}




/* About Section */
.about {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;

  background: 
    linear-gradient(#111 1px, transparent 1px),
    linear-gradient(90deg, #111 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Center Box */
.about-box {
  max-width: 700px;
  padding: 40px;
  background: #0a0a0a;
  border-radius: 20px;
  border: 1px solid #222;
  box-shadow: 0 0 10px rgba(126, 211, 33, 0.2);
  text-align: left;
    transition: transform 0.2s ease;
  transform-style: preserve-3d;
  will-change: transform;
   position: relative;
  overflow: hidden;
}

/* Heading */
.about-box h2 {
  text-align: center;
  font-size: 40px;
  font-weight: 700;
  color: #7ED321;
  margin-bottom: 25px;
}

/* Paragraph */
.about-box p {
  font-size: 15px;
  line-height: 1.8;
  color: #ccc;
  margin-bottom: 15px;
}

.about-box:hover {
  box-shadow: 0 0 25px #7ED321;
}

.about-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: 0.5s;
}

.about-box:hover::before {
  left: 100%;
}

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

.about-box {
  animation: float 4s ease-in-out infinite;
}

.skills {
  min-height: 100vh;
  padding: 80px 10%;
  text-align: center;
    background: 
    linear-gradient(#111 1px, transparent 1px),
    linear-gradient(90deg, #111 1px, transparent 1px);
  background-size: 40px 40px;
}

.section-title {
  font-size: 42px;
  font-weight: 700;
  color: #7ED321;
  margin-bottom: 50px;
}

/* GRID LAYOUT */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  margin-bottom: 70px;
}

/* CARD */
.skill-card {
  background: rgba(255, 255, 255, 0.05); /* transparent glass */
  border: 1px solid rgba(126, 211, 33, 0.3);
  border-radius: 18px;
  padding: 25px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;

  backdrop-filter: blur(10px); /* 🔥 glass effect */
    overflow: hidden;
  position: relative;
}

/* ICON */
.skill-card i {
  font-size: 38px;
  color: #7ED321;
  margin-bottom: 12px;
}

/* TEXT */
.skill-card h3 {
  font-size: 17px;
  font-weight: 600;
    color: #fff;

}

/* HOVER */
.skill-card:hover {
  box-shadow: 0 0 25px rgba(126, 211, 33, 0.4);
  border-color: #7ED321;
  transform: translateY(-5px);
}

.skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: 0.5s;
}

.skill-card:hover::before {
  left: 100%;
}


/* SECTION */
.projects {
  min-height: 100vh;
  padding: 80px 10%;
  text-align: center;

  /* SAME GRID BG */
  background: 
    linear-gradient(#111 1px, transparent 1px),
    linear-gradient(90deg, #111 1px, transparent 1px);
  background-size: 40px 40px;
}


.projects-container {
  display: flex;
  gap: 25px;
  overflow-x: auto;
    overflow-y: hidden;
  scroll-behavior: smooth;
padding: 20px 10px;
}

/* CARD */
.project-card {
    min-width: 350px;   /* 🔥 important */
  max-width: 350px;
  min-height: 350px;
  flex-shrink: 0; 
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(126, 211, 33, 0.2);
  border-radius: 20px;
  padding: 25px;
  text-align: left;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

/* TITLE */
.project-card h3 {
  color: #7ED321;
  margin-bottom: 10px;
}

/* TEXT */
.project-card p {
  color: #ccc;
  font-size: 14px;
  margin-bottom: 15px;
}

/* LINKS */
.project-links a {
  text-decoration: none;
  color: #7ED321;
  margin-right: 15px;
  font-weight: 500;
  border-bottom: 1px solid transparent;
}

.project-links a:hover {
  border-bottom: 1px solid #7ED321;
}

/* HOVER SAME AS ABOUT */
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 25px rgba(126, 211, 33, 0.4);
  border-color: #7ED321;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: 0.5s;
}

.project-card:hover::before {
  left: 100%;
}

.projects-container::-webkit-scrollbar {
  display: none;
}


.contact {
  min-height: 100vh;
  padding: 80px 10%;

  background: 
    linear-gradient(#111 1px, transparent 1px),
    linear-gradient(90deg, #111 1px, transparent 1px);
  background-size: 40px 40px;
}

/* LAYOUT */
.contact-container {
  display: flex;
  gap: 50px;
  margin-top: 50px;
  flex-wrap: wrap;
}

/* LEFT SIDE */
.contact-info {
  flex: 1;
  min-width: 280px;
}

.contact-info h2 {
  color: #7ED321;
  margin-bottom: 10px;
}

.contact-info p {
  color: #ccc;
  margin-bottom: 15px;
}

.info p {
  margin: 10px 0;
  font-size: 15px;
}

.info i {
  color: #7ED321;
  margin-right: 10px;
}

/* FORM */
.contact-form {
  flex: 1;
  min-width: 280px;

  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(126,211,33,0.2);
  border-radius: 15px;
  padding: 25px;
  backdrop-filter: blur(10px);
}

/* INPUTS */
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #333;
  background: transparent;
  color: #fff;
  border-radius: 8px;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #7ED321;
}

/* BUTTON */
.contact-form .btn {
  width: 100%;
}

.popup {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: rgba(0, 255, 255, 0.1);
  color: #00f7ff;
  padding: 12px 20px;
  border: 1px solid #00f7ff;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(20px);
  transition: 0.4s ease;
  z-index: 999;
}

.popup.show {
  opacity: 1;
  transform: translateY(0);
}


#trail-container {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 999;
}

.trail {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #7ED321;
  border-radius: 50%;
  pointer-events: none;

  opacity: 1;
  transform: translate(-50%, -50%) scale(1);

  animation: fadeOut 0.8s ease-out forwards;

  box-shadow: 0 0 10px #00ff88, 0 0 25px #00ff88;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.5);
  }
}




.content {
  opacity: 0;
  transform: translateX(-80px);
  animation: slideInLeft 1s ease forwards;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-80px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.hero-img img {
  width: 320px;
  height: 400px;
  object-fit: cover;
  object-position: center;
  border-radius: 40%;
  border: 3px solid #7ED321;

  opacity: 0;
  animation: fadeIn 1.2s ease forwards;
  animation-delay: 0.5s; /* 🔥 delay for better effect */
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}



/* ===== RESPONSIVE ===== */

/* Tablet / Medium Devices */
@media (max-width: 1024px) {
  header {
    padding: 15px 30px;
  }

  .hero {
    flex-direction: row;        /* ← keep side by side */
    justify-content: space-between;
    padding: 0 30px;
  }

  .content {
    width: 55%;
  }

  .hero-img {
    width: 45%;
  }

  .content h1 {
    font-size: 48px;
  }

  .content h2 {
    font-size: 28px;
  }

  .hero-img img {
    width: 250px;
    height: 320px;
  }

  .buttons {
    display: flex;
    flex-direction: column;
    align-items: flex-start;   /* ← left-align buttons */
  }

  .btn {
    margin-bottom: 15px;
  }
}

/* Mobile / Small Devices */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    margin-top: 10px;
  }

  nav a {
    margin-left: 10px;
    font-size: 14px;
  }

  .hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
    height: auto;
    min-height: 100vh;
    gap: 0;
  }

  /* Magic: makes .content's children direct flex items of .hero */
  .content {
    display: contents;
  }

  .content h1 {
    order: 1;
    font-size: 36px;
    width: 100%;
    text-align: center;
  }

  .content h2 {
    order: 2;
    font-size: 22px;
    width: 100%;
    text-align: center;
    margin-bottom: 15px;
  }

  /* Image slots in between h2 and buttons */
  .hero-img {
    order: 3;
    width: 100%;
    justify-content: center;
    margin: 15px 0;
  }

  .hero-img img {
    width: 200px;
    height: 260px;
  }

  .buttons {
    order: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
  }

  .social {
    order: 5;
    width: 100%;
    text-align: center;
  }

  .skills-container {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
  }

  .projects-container {
    flex-direction: column;
    gap: 20px;
  }

  .project-card {
    min-width: 100%;
    max-width: 100%;
  }

  .contact-container {
    flex-direction: column;
    gap: 25px;
  }
}

/* Extra Small / Mobile Portrait */
@media (max-width: 480px) {
  .content h1 {
    font-size: 28px;
  }

  .content h2 {
    font-size: 18px;
  }

  .btn {
    padding: 10px 18px;
    font-size: 14px;
  }

  .hero-img img {
    width: 180px;
    height: 240px;
  }
}