/* Global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}
.tagline {
  font-size: 1.2rem;
  color: #ddd;
  margin-top: 10px;
}

html {
  scroll-behavior: smooth;
}

body {
  /* The canvas now provides the background */
  cursor: none;
  color: #f5f5f5;
  line-height: 1.6;
}

h1, h2 {
  color: #f1c40f; /* deep yellow */
  text-align: center;
  margin-bottom: 20px;
}

a {
  text-decoration: none;
  color: #f1c40f;
  transition: 0.3s;
}

a:hover {
  color: #ffd633;
}

a, button, .btn, .skill, .project-card {
  cursor: none;
}

/* Canvas Background */
#stars-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Behind all content */
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: #f1c40f;
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 2px solid #f1c40f;
  transition: transform 0.2s ease-out, width 0.3s ease-out, height 0.3s ease-out, background-color 0.3s ease-out;
}

.cursor-outline.cursor-hover {
  transform: translate(-50%, -50%) scale(1.5);
  background-color: rgba(241, 196, 15, 0.2);
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  background-color: transparent;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background-color 0.4s ease, transform 0.4s ease-out;
}

.navbar.navbar-hidden {
  transform: translateY(-100%);
}



.logo {
  font-size: 1.7rem;
  font-weight: bold;
  color: #f1c40f;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links li {
  list-style: none;
}

.nav-links a {
  font-weight: 500;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  background-color: #f5f5f5;
}
/* Hero */
.hero {
  height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
  animation: fadeIn 2s ease-in-out;
}

.hero h1 {
  font-size: 3rem;
}

.hero span {
  color: #ffd633;
}

.hero .typing::after {
  content: '|';
  animation: blink 0.7s step-end infinite;
}

.hero .btn {
  position: relative; /* For pseudo-element */
  overflow: hidden;   /* To contain the shine */
  margin-top: 20px;
  background: #f1c40f;
  color: #000;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  transition: transform 0.3s;
}

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

/* Shine effect for the button */
.hero .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.485), transparent);
  transition: left 0.7s ease;
}

.hero .btn:hover::before {
  left: 100%;
}

/* About */
.about, .skills, .projects, .contact {
  padding: 60px 20px;
  max-width: 1200px;
  margin: auto;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.skill {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #222;
  padding: 20px;
  border-radius: 10px;
  transition: transform 0.3s, background 0.3s;
}

.skill img {
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
}

.skill span {
  font-size: 0.9rem;
  color: #f5f5f5;
}

.skill:hover {
  background: #f1c40f;
  color: #000;
  transform: translateY(-8px);
}

.skill:hover span {
  color: #000;
}


/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  margin-top: 20px;
}

.project-card {
  background: #222;
  padding: 20px;
  border-radius: 10px;
  transition: transform 0.3s, background 0.3s;
  display: flex;
  flex-direction: column;
}

.project-card img {
  border-radius: 10px;
  margin-bottom: 20px;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.project-card h3 {
  margin-bottom: 10px;
  color: #f1c40f;
  text-align: left;
}

.project-card p {
  flex-grow: 1; /* Allows description to take up available space */
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.tech-stack span {
  background: #333;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  color: #f1c40f;
}

.project-link {
  display: inline-block;
  margin-top: 20px;
  text-align: center;
  background: #f1c40f;
  color: #000;
  padding: 10px 15px;
  border-radius: 5px;
  font-weight: bold;
  align-self: flex-start;
}

.project-link:hover {
  background: #ffd633;
  color: #000;
}

.project-card:hover {
  transform: translateY(-10px);
  background: #333;
}

/* Contact */
.contact a {
  color: #f1c40f;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  background: #111;
  color: #aaa;
  margin-top: 40px;
}

/* Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: #f1c40f;
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(100px);
  transition: all 0.4s ease;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes blink {
  from, to { opacity: 1; }
  50% { opacity: 0; }
}

/* Animation for elements fading in on scroll */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    padding: 15px 20px;
  }

  .hamburger {
    display: block;
    z-index: 1001;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    left: -100%;
    top: 0;
    flex-direction: column;
    justify-content: center;
    background-color: #111;
    width: 100%;
    height: 100vh;
    text-align: center;
    transition: left 0.3s ease-in-out;
    gap: 20px;
  }

  .nav-links.nav-active {
    left: 0;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }
}

#about>p{
  text-align: center;
}
