* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.7;
  background-color: black;
  color: var(--bg-color);
}

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

header {
  background-color: #121212;
  color: #fff;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0, 0.2);
}

header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
}

nav a {
  color: #fff;
  font-weight: 600;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #4fc3f7;
}

section {
  padding: 50px 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.section-hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* background animation */
#matrixCanvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  background: black;
  pointer-events: none;
}
.matrix-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  backdrop-filter: blur(1.5px);
  background: rgba(0, 8, 2, 0.4);
}


@media (max-width: 760px) {
  #matrixCanvas,
  .matrix-overlay {
    display: none;
  }
}






/* main heading */
#home {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns:repeat(auto-fit, minmax(50px ,1fr));
  align-items: center;
  text-align: center;
}
#home h2 {
  font-size: 36px;
  margin-bottom: 15px;
  color: #f1f1f1;
}

#home p {
  font-size: 18px;
  color: #f1f1f1;
}
.fade-in-text {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 2s ease, transform 2s ease;
}

.fade-in-text.visible {
  opacity: 1;
  transform: translateY(0);
}



/* About Section */
#about h2 {
  color: #f1f1f1;
  text-align: center;
  font-size: 30px;
  margin-bottom: 30px;
}

.about-container {
  display: flex;
  gap: 90px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(20, 233, 59, 0.3);
}

.about-container img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid rgb(8, 100, 25);
  background-color: var(--bg-color);
}

.about-text {
  max-width: 500px;
}

.about-text p {
  font-size: 17px;
  color: #f1f1f1;
  margin-bottom: 12px;
}



/* Projects Section */
#projects h2 {
  color: #f1f1f1;
}
.projects-container {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  padding: 2rem 0;
}

.project-card {
  color: #f1f1f1;
  background: linear-gradient(145deg, #171d19, #2e622f);
  /* background-color: rgba(0, 0, 0, 0.5); */
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(20, 233, 59, 0.3);
  transition: transform 0.4s ease;
}
.project-card:hover {
  transform: translateY(-5px);
}

.project-card h3 {
  margin-bottom: 0.5rem;
}

.project-card a {
  display: inline-block;
  margin-top: 1rem;
  color: #5aa8e0;
  text-decoration: none;
  font-weight: bold;
}



/* Resume */
#resume {
  color: #f1f1f1;
}
.resume-container p {
  margin-bottom: 10px;
}
.resume-button {
  color: #f1f1f1;
  background-color: #0077cc;
  padding: 6px;
  border-radius: 5px;
  font-size: 14px;
  transition: background 0.3s ease;
}
.resume-button:hover {
  background-color:#024995;
}




/* Contact Section */

#contact {
  padding: 40px 20px;
  color: #f1f1f1;
  background-color: rgba(0, 0, 0, 0.5);
}


form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

form label {
  margin: 12px 0 4px;
  font-weight: bold;
}

form input,
form textarea {
  padding: 10px;
  font-size: 16px;
  border: 2px solid #ccc;
  border-radius: 6px;
}

form button {
  margin-top: 20px;
  padding: 12px;
  font-size: 16px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

form button:hover {
  background-color: #0056b3;
}

#formMessage {
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  margin-top: 15px;
  font-weight: bold;
}

#formMessage.show {
  opacity: 1;
}

/* Scroll to top button */
#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99;
  font-size: 18px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#scrollTopBtn.show {
  opacity: 1;
  pointer-events: auto;
}

#scrollTopBtn:hover {
  background-color: #0056b3;
}



/* Home text typing animation */

#typingText.typing-cursor::after {
  content: "|";
  animation: blink 1s infinite;
  color: #007bff;
  margin-left: 4px;
}
@keyframes blink {
  0%,
  50%,
  100% {
    opacity: 1;
  }
  25%,
  75% {
    opacity: 0;
  }
}











@media (max-width: 768px) {
  header {
    flex-direction: column;
    text-align: center;
  }

  nav ul {
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
  }

  about-container {
    flex-direction: column;
    text-align: center;
  }

  .about-text {
    padding: 0 15px;
  }
}
