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

a {
  color: inherit;          /* Removes the blue/purple and uses the parent text color */
  text-decoration: none;   /* Removes the underline */
}
html {
  scroll-behavior: smooth;
}

body {
  color: #e0e0e0;
  font-family: monospace;
  line-height: 1.6;
}

/*
body {
  background: linear-gradient(
    120deg,
    #001428,
    #0b0b2a,
    #00ff50
  );
  background-size: 400% 400%;
  animation: bg 32s ease-in-out infinite;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.025'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}
*/

/* ========== NAV BAR ========== */
nav {
  position: fixed;
  top: 0;
  z-index: 2000; /* Higher than hero content */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background: #0c0c0c;
  width: 100vw;
}

.nav-content {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-content: center;
  padding: 1rem 2rem 1rem 1.6rem; /* TOP RIGHT BOTTOM LEFT*/ 
  width: 100%;
}

.logo {
  color: #50ff50;
  font-weight: bold;
  font-size: 1.1rem;
  text-align: center;
  height: 1.1rem;
}

.nav-left {
  align-content: center;
}

.nav-right {
  list-style: none;
  display: flex;
  gap: 30px;
  justify-content: flex-end;
}

.nav-right a {
  color: #e0e0e0;
  text-decoration: none;
  font-size: 1.1rem;
}

.nav-right a:hover {
  color: #50ff50;
}

/* NAV LIST ELEMENTS UNDERLINE UPON HOVER */
.nav-right li a {
  position: relative;      /* needed for pseudo-element */
  text-decoration: none;
  color: #50FF50;
  font-weight: 500;
  padding-bottom: 4px;     /* space for the line */
  transition: width 0.3s ease, text-shadow 0.3s ease;
}

/* the underline effect */
.nav-right li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;               /* start with no underline */
  height: 2px;             /* line thickness */
  background-color: #50FF50;
  transition: width 0.3s ease, text-shadow 0.3s ease;
}

/* hover/focus/active states */
.nav-right li a:hover,
.nav-right li a:focus,
.nav-right li a.active {
  text-shadow: 0 0 4px #50FF50, 0 0 8px #50FF50; /* subtle glow */
}

/* hover/focus/active states */
.nav-right li a:hover::after,
.nav-right li a:focus::after,
.nav-right li a.active::after {
  width: 100%;             /* underline expands */
}

#navbar-divider {
  height: 2px;
  width: 100%;
  background: #50FF50;
}

/* Menu Button For Small Screens */
.menu-toggle {
  display: none; /* Hide button on big screens */
  font-size: 1.5rem;
  background: none;
  border: none;
  color: #50FF50;
  cursor: pointer;
  width: 60px;
  height: 40px;
  flex-direction: column;
  justify-content: space-between;

}
.menu-toggle .bar {
  width: 60px;
  height: 4px;
  background-color: #50FF50; /* Match your text color */
  border-radius: 4px;

  /* 'all' covers transform, opacity, and background-color */
  transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
  transform-origin: center;
}

/* --- Mobile Styles --- */
@media (max-width: 1150px) {
  .menu-toggle {
    display: flex;
  }

  .nav-right {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; 
    right: 0;
    width: 100%;
    background: #0c0c0c;
    padding: 15px; /* Reset padding to 0 so it collapses perfectly */
    text-align: center;
    border-bottom: #50FF50;
    z-index: 1000;
    gap: 20px;

    /* Animation Logic */
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Crucial: stops clicks when closed */
    
    /* Clean transition for both directions */
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out, visibility 0.4s;
  }

  /* Target the list items to give them padding WITHOUT breaking the collapse */
  .nav-right li {
    padding: 0;
  }

  .nav-content .nav-right.active {
    max-height: 500px; /* High enough to fit all links */
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    /* Speed up visibility when opening */
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out, visibility 0s;

    /* This adds a solid line that glows slightly */
    border-bottom: 2px solid rgba(80, 255, 80, 0.4);
    box-shadow: 0 4px 10px rgba(80, 255, 80, 0.1);
  }

  .menu-toggle.active .bar:nth-child(1) {
    transform: translateY(18px) rotate(45deg);
  }

  .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(40px); /* Slide it out */
  }

  .menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-18px) rotate(-45deg);
  }

}

/* SECTION DIVIDER */
.section-divider {
  height: 2px;
  width: 100%;
  background: linear-gradient(
    90deg,
    #0b0b2a,
    #50FF50,
    #0b0b2a
  );
  box-shadow:
    0 0 8px rgba(80, 255, 80, 0.8),
    0 0 20px rgba(80, 255, 80, 0.4);
}


/* ========== MAIN CONTENT ========== */
main {
  padding: 40px 0 0 0;
  min-height: 100vh;

  
  background: linear-gradient(
    120deg,
    #3e3eff,
    #0b0b2a,
    #00ff50  
  );
  background-size: 400% 400%;
  animation: bg 32s ease-in-out infinite;
}

/*
  background: linear-gradient(
    120deg,
    #001428,
    #0b0b2a,
    #00ff50  
  );


main::after {
  content: "";
  position: absolute;
  inset: 0;

  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.025'/%3E%3C/svg%3E");

  pointer-events: none;
  z-index: 0;
}
*/
@keyframes bg {
  0% { background-position: 56% 45%; }
  50% { background-position: 61% 50%; }
  100% { background-position: 56% 45%; }
}

main > * {
  position: relative;
  z-index: 1;
}


section {
  padding: 0 0 45px 0;
  scroll-margin-top: 90px;
  max-width: 900px;
  margin: 0 auto;
}

section h2 {
  color: #50ff50;
  font-size: 1.2rem;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(80, 255, 80, 0.25);
  padding-bottom: 8px;
  text-transform: lowercase;
}


/* ========== ABOUT ========== */
#about {
  padding-bottom: 20px;
}

#about #about-text {
  max-width: 700px;
}

.about-text {
  padding-bottom: 1.5rem;
  font-size: 1rem;
}


/* ========== BLOG ========== */
.blog {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 20px;
}

.blog h1 {
  font-size: 2.2rem;
  margin-bottom: 40px;
}

.blog-cards {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.blog-card {
  border: 1px solid rgba(255,255,255,0.15);
  padding: 24px;
  border-radius: 4px;
  background: rgba(255,255,255,0.03);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.blog-card:hover {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06);
}

.blog-card h2 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.blog-meta {
  opacity: 0.6;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.blog-desc {
  opacity: 0.85;
  margin-bottom: 18px;
}

.blog-link {
  text-decoration: none;
  font-weight: 500;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.blog-link:hover {
  opacity: 1;
}



/* ========== CONTACT ========== */
#contact p {
  color: #ccc;
}

#contact form {
  max-width: 100%;
  margin-top: 20px;
}

#contact label {
  display: block;
  margin-bottom: 15px;
}

#contact span {
  display: block;
  margin-bottom: 5px;
  color: #50ff50;
}

#contact input,
#contact textarea {
  width: 100%;
  background: #000;
  border: 1px solid #50ff50;
  color: #50ff50;
  padding: 8px;
  font-family: monospace;
}

#contact button {
  background: none;
  border: 1px solid #50ff50;
  color: #50ff50;
  padding: 8px 16px;
  cursor: pointer;
}

#contact button:hover {
  background: #50ff50;
  color: #000;
}

/* ========== CONTACT ADD ME ON SOCIALS ========== */

.contact-socials {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 40px;
}

.contact-socials a {
  width: 36px;
  height: 36px;
  color: #50ff50;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.contact-socials svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.contact-socials a:hover {
  transform: translateY(-4px) scale(1.1);
  filter: drop-shadow(0 0 6px rgba(80, 255, 80, 0.6));
}


/* ========== FOOTER ========== */
footer {
  border-top: 1px solid rgba(80, 255, 80, 0.1);
  padding: 20px;
  text-align: center;
  font-size: 0.8rem;
}

footer p {
    color: #666;
}

@media (max-width: 768px) {
  main {
    padding-top: 20px;
  }

  .contact-socials {
    gap: 20px;
    flex-wrap: wrap; /* Allow icons to wrap if needed */
  }
}

html, body {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* This is the ultimate fix for side-scrolling bugs */
}

/* ========== SMALL SCREENS ========== */

@media (max-width: 640px) {
  /* ALL SECTIONS */
  section {
    padding: 3% 2% 1% 2%;
  }
  /* NAV SECTION */
  .nav-content {
    min-height: 65px;
    padding: 0.8rem 1.6rem 0.8rem 1.3rem;
  }
  .menu-toggle {
    width: 54px;
    height: 36px;
  }
  .menu-toggle .bar {
    width: 54px;
    height: 3px;
  }
  .menu-toggle.active .bar:nth-child(1) {
    transform: translateY(16.5px) rotate(45deg);
  }
  .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(30px); /* Slide it out */
  }
  .menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-16.5px) rotate(-45deg);
  }

/* ABOUT SECTION */
  #about {
    padding-bottom: 0;
  }
  .about-text {
    padding-bottom: 1.1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 530px) {
  main {
    padding: 2%;
    padding-top: 4%;
  }
}

@media (max-width: 440px) {
/* ABOUT SECTION */
  .about-text {
    font-size: 0.8rem;
    padding-bottom: 1rem;
  }
}

@media (max-width: 380px) {

}

@media (max-width: 330px) {
  /* SECTION */
}