/* ====================
   Navigation Styles
   ==================== */

/* Sticky nav with backdrop */
.main-nav {
  position: sticky;
  top: 0;
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  z-index: 10;
}

/* Logo styling */
.logo a {
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--white);
}

.logo a.glitch {
  font-family: 'Rubik Glitch', cursive;
}

.logo a:hover {
  color: var(--accent-green);
}

.logo a.active {
  color: var(--accent-green);
}

/* Nav link container */
.nav-links {
  list-style: none;
  display: flex;
  gap: 2.6rem;
  text-transform: uppercase;
}

/* Nav link base */
.nav-links a {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s ease, transform 0.2s ease;
  padding: 0.75rem 1rem;
  display: inline-block;
  border-radius: 6px;
}

/* Hover scale */
.nav-links a:hover {
  transform: scale(1.08);
}

/* Active state */
.nav-links a.active {
  transform: scale(1.08);
}

/* Active color (main pages and project pages) */
.nav-links a[href*="work"].active,
.nav-links a[href="../work.html"].active {
  color: var(--accent-blue);
}

.nav-links a[href*="stack"].active,
.nav-links a[href="../stack.html"].active {
  color: var(--accent-pink);
}

.nav-links a[href*="about"].active,
.nav-links a[href="../about.html"].active {
  color: var(--accent-red);
}

.nav-links a[href*="contact"].active,
.nav-links a[href="../contact.html"].active {
  color: var(--accent-orange);
}

/* Nav stagger effect */
.nav-links li:nth-child(1) { transform: translateY(4px); }
.nav-links li:nth-child(2) { transform: translateY(12px); }
.nav-links li:nth-child(3) { transform: translateY(2px); }
.nav-links li:nth-child(4) { transform: translateY(10px); }

/* ====================
   Mobile Styles
   ==================== */

.nav-toggle {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
}

@media (max-width: 768px) {
.main-nav {
    flex-wrap: nowrap;          /* Keep items on one line */
    align-items: center;        /* Vertically center logo and toggle */
    position: relative;
  }


  .nav-toggle {
    display: block;
    position: relative;         /* changed from absolute */
    margin-left: auto;          /* pushes toggle to far right */
    top: auto;
    right: auto;
    z-index: 1100;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    line-height: 1;             /* fix vertical alignment */
    padding: 0;                 /* remove default button padding */
    align-self: center;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(17, 17, 17, 0.95);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    gap: 2.5rem;
    text-align: center;         /* Center the text inside nav */
  }

  .nav-links a {
    font-size: 1.5rem;
    color: var(--white);
    text-decoration: none;
    padding: .5rem;
    width: 100%;
    max-width: 300px;
    transition: color 0.3s ease, transform 0.2s ease;
    text-align: center;         /* Center the link text */
  }


  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
  }



  /* Remove hover color changes on mobile */
  .nav-links a:hover,
  .nav-links a:focus {
    color: var(--white);
    transform: none;
  }

  /* Active link style */
  .nav-links a.active {
    color: var(--accent-green);
    font-weight: bold;
  }
}