/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: #000014;
  color: #ffffff;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

#galaxy {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  overflow: hidden;
  z-index: -10;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  width: 2px;
  height: 2px;
  animation: twinkle 3s infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}


/* Navbar */
/* Hide normal nav by default */
nav {
  position: fixed;
  top: 0;
  right: -250px; /* Hidden initially */
  height: 100%;
  width: 250px;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  padding-left: 30px;
  transition: right 0.4s ease;
  z-index: 1000;
}

nav.open {
  right: 0; /* Slides in when open */
}

nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  transition: 0.3s;
}

nav a:hover {
  color: #00ffff;
}

.menu-icon {
  position: fixed;
  top: 20px;
  right: 30px;
  font-size: 30px;
  color: white;
  cursor: pointer;
  z-index: 1100;
}



/* Glowing Box Container */
.container {
  max-width: 1000px;
  margin: 120px auto;
  padding: 30px;
  border-radius: 20px;
  border: 2px solid #00ffff;
  box-shadow: 0 0 20px #00ffff;
  transition: transform 0.3s, box-shadow 0.3s;
}

.container:hover {
  transform: scale(1.02);
  box-shadow: 0 0 40px #00ffff;
}

/* Page Headings */
h1, h2, h3 {
  color: #00ffff;
  margin-bottom: 20px;
  text-align: center;
}

/* Home Page */
.home-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 90%;
  max-width: 400px;
  margin: 0 auto;
  padding: 20px;
  margin-top: 130px;
  
}
p{
  margin-bottom: 20px;
}

.home-center img {
  width: 200px;
  max-width: 280px;
  height: 200px;
  border-radius: 50%;
  border: 3px solid #00ffff;
  object-fit: cover;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .home-center img {
    margin-top: 50px;
    max-width: 140px; /* smaller on mobile */
    height: auto;
    
  }
}


.role-text {
  font-size: 24px;
  color: #ffffff;
  margin-top: 10px;
  min-height: 30px;
  animation: fadeRole 5s infinite;
}

@keyframes fadeRole {
  0%, 50%, 100% {opacity: 1;}
  25%, 75% {opacity: 0;}
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.social-icons a {
  color: #ffffff;
  font-size: 28px;
  transition: 0.3s;
}

.social-icons a:hover {
  color: #00ffff;
  transform: scale(1.2);
}

/* Project Boxes */
.project-box {
  margin: 20px 0;
  padding: 20px;
  border-radius: 20px;
  border: 2px solid #00ffff;
  box-shadow: 0 0 20px #00ffff;
  transition: transform 0.3s, box-shadow 0.3s;
  
}

.project-box:hover {
  transform: scale(1.02);
  box-shadow: 0 0 40px #00ffff;
}

.project-box a {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  border-radius: 10px;
  background: #00ffff;
  color: #000000;
  text-decoration: none;
  font-weight: bold;
}

.project-box {
  margin: 100px auto 20px auto;           /* Keep it centered horizontally */
  padding: 40px;
  max-width: 500px;
  border-radius: 20px;
  border: 2px solid #00ffff;
  box-shadow: 0 0 20px #00ffff;
  transition: transform 0.3s, box-shadow 0.3s;
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Two boxes per row */
         

  

  display: flex;               /* Make content a flex container */
  flex-direction: column;      /* Stack elements vertically */
  justify-content: center;     /* Center vertically inside the box */
  align-items: center;         /* Center horizontally inside the box */
  text-align: center;          /* Make text centered */
}



.project-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Two boxes per row */
  gap: 40px;                              /* Space between boxes */
  max-width: 1000px;                      /* Optional: container width */
  margin: 100px auto 20px auto;           /* Center the container */
}






.skills-container {
  display: flex;
  grid-template-columns: repeat(2, 1fr); /* Two boxes per row */
  gap: 40px;                             /* Space between boxes */
  justify-content: center;
  align-items: center;
  margin-top: 25px;
  padding: 50px;
}

.skills-grid .container {
  max-width: 250px;      /* Make the box smaller */
  padding: 15px;         /* Reduce padding to shrink the box */
  border-radius: 20px;
  border: 2px solid #00ffff;
  box-shadow: 0 0 20px #00ffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.skills-grid .container:hover {
  transform: scale(1.02);
  box-shadow: 0 0 40px #00ffff;
}

.skills-grid .container p {
  margin: 5px 0;
  font-size: 16px; /* Slightly smaller text to fit box */
}

.skills-grid .container p i {
  font-size: 20px; /* Adjust icon size */
  color: #00ffff;
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 boxes per row */
  gap: 30px;                             /* space between boxes */
  justify-content: center;               /* center horizontally */
  align-items: start;
  margin-top: 120px;                     /* below navbar */
}

/* Make each skill box smaller */
.skills-grid .container {
  max-width: 250px;      /* smaller width */
  padding: 15px;         /* smaller padding */
  border-radius: 20px;
  border: 2px solid #00ffff;
  box-shadow: 0 0 20px #00ffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.skills-grid .container:hover {
  transform: scale(1.02);
  box-shadow: 0 0 40px #00ffff;
}

/* Skill items inside box */
.skills-grid .container p {
  margin: 5px 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  grid-template-columns: repeat(2, max-content); /* Make columns fit content */
  gap: 50px; /* row-gap | column-gap */
  justify-content: center; /* center the grid horizontally */
  align-items: start;
  margin-top: 120px; /* below navbar */
  padding: 0 20px;
}
.skills-grid .container {
  margin: 0;            /* remove extra vertical margin */
  max-width: 220px;
  padding: 15px;
  border-radius: 20px;
  border: 2px solid #00ffff;
  box-shadow: 0 0 20px #00ffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  row-gap: 10px;       /* smaller vertical distance between rows */
  column-gap: 30px;    /* horizontal distance */
  justify-content: center;
  align-items: start;
  margin-top: 120px;   /* distance from navbar */
}
.skills-grid .container h3 {
  margin-bottom: 10px;  /* smaller space between heading and skills */
}





.contact-form {
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 50px;
  margin: 140px auto;
  position: relative;  /* keeps it above canvas */
  z-index: 1;
}


.contact-form textarea {
  padding: 10px;
  border-radius: 10px;
  border: none;
  outline: none;
  font-size: 16px;
}

.contact-form button {
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: #00ffff;
  color: #000000;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.contact-form button:hover {
  background: #00aaaa;
}

/* Star background canvas */
canvas#stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -10;          /* behind all content */
  pointer-events: none;   /* clicks go through */
}


.education-section {
  display: flex;               /* horizontal row */
  justify-content: center;     /* center all boxes */
  align-items: flex-start;
  gap: 30px;                   /* space between boxes */
  margin-top: 120px;           /* below navbar */
}

/* Box styling */
.edu-box {
  max-width: 250px;            /* smaller box */
  padding: 20px;
  border-radius: 20px;
  border: 2px solid #00ffff;
  box-shadow: 0 0 20px #00ffff;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.edu-box:hover {
  transform: scale(1.02);
  box-shadow: 0 0 40px #00ffff;
}
.education-section {
  display: flex;
  flex-direction: column;      /* stack vertically */
  align-items: center;         /* center horizontally */
  gap: 30px;                   /* space between boxes */
  margin-top: 120px;           /* below navbar */
}

/* Box styling */
.edu-box {
  max-width: 400px;             /* increase box width */
  width: 100%;                  /* make it flexible */
  padding: 25px 30px;           /* more padding inside */
  border-radius: 20px;
  border: 2px solid #00ffff;
  box-shadow: 0 0 20px #00ffff;
  text-align: center;
  background-color: rgba(0,0,0,0.5); /* optional slight transparency */
  transition: transform 0.3s, box-shadow 0.3s;
}


#galaxy {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  overflow: hidden;
  z-index: -1; /* behind all content */
}

.star {
  position: fixed;
  background: white;
  border-radius: 50%;
  width: 2px;
  height: 2px;
  animation: twinkle 2s infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

/* Full black background */
body {
  background-color: black;
  color: white; /* text remains visible */
  margin: 0;
  font-family: Arial, sans-serif;
}

/* Galaxy - stars */
#galaxy {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -2;
  background: black;
}

/* Individual star */
.star {
  position: fixed;
  background: white;
  border-radius: 50%;
  width: 2px;
  height: 2px;
  animation: twinkle linear infinite;
}

/* Twinkle and fast movement */
@keyframes twinkle {
  0% { transform: translateY(0); opacity: 0.5; }
  50% { opacity: 1; }
  100% { transform: translateY(500px); opacity: 0.5; } /* fast downward movement */
}

/* Black hole animation */
#blackhole {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, black 40%, transparent 100%);
  transform: translate(-50%, -50%);
  z-index: -1;
  animation: spin 5s linear infinite;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  width: 2px;
  height: 2px;
  animation: twinkle linear infinite;
}

canvas#stars {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -10;  /* behind everything */
  pointer-events: none; /* so clicks go through */
}

/* --- Global responsive fixes --- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* prevents horizontal scroll on small screens */
}

/* Make sections and containers flexible */
section, .container, .project-box, .education-box, .internship-box, .contact-form {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* Make images scale properly */
img {
  max-width: 100%;
  height: auto;
}

/* ==========================
   MOBILE RESPONSIVE FIXES
   ========================== */
@media (max-width: 768px) {
  /* General layout */
  body {
    overflow-x: hidden;
  }

  .container,
  .project-box,
  .education-section,
  .skills-grid,
  .contact-form {
    width: 95%;
    margin: 80px auto 20px auto;
    padding: 15px;
    
  }

  /* Navigation fixes */
  nav#sideNav {
    width: 180px;
    padding-top: 60px;
  }

  .menu-icon {
    top: 15px;
    right: 15px;
    font-size: 26px;
  }

  /* Home section */
  .home-center {
    height: auto;
    padding-top: 120px;
    padding-bottom: 60px;
  }

  .home-center img {
    width: 150px;
    height: 150px;
  }

  .home-center h1 {
    font-size: 22px;
  }

  .role-text {
    font-size: 16px;
  }

  /* Social icons smaller */
  .social-icons {
    gap: 15px;
  }
  .social-icons a {
    font-size: 22px;
  }

  /* Projects grid to single column */
  .project-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 100;
    padding: 0px 20px;
  }

  /* Skills grid single column */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
    margin-left: 20px;
    justify-items: center;
  }

  /* Education boxes single column */
  .education-section {
    flex-direction: column;
    align-items: center;
    margin-top: 100px;
  }

  .edu-box {
    width: 90%;
  }

  /* Contact form smaller */
  .contact-form {
    gap: 20px;
    margin: 100px auto;
  }
  .contact-form input,
  .contact-form textarea {
    font-size: 14px;
  }
  .contact-form button {
    font-size: 14px;
    padding: 8px;
  }

  /* Blackhole & stars stay behind */
  #blackhole {
    width: 60px;
    height: 60px;
  }
}





@keyframes twinkle {
  0% { transform: translateY(0); opacity: 0.5; }
  50% { opacity: 1; }
  100% { transform: translateY(500px); opacity: 0.5; }
}


@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}






