/* =============================================================================
   SHARED NAVIGATION STYLES
   Location: root/shared/nav.css
   ============================================================================= */

/* --- Main Container --- */
.shared-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50; 
  
  /* MATCHING ROOT INDEX.HTML EXACTLY */
  /* bg-[var(--bg)]/90 -> This is a dark, solid background */
  background: rgba(8, 8, 12, 0.9);
  
  /* backdrop-blur-xl -> 24px blur */
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  
  /* border-b border-[var(--border)] */
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}

/* Class to add via JS when scrolled */
.shared-nav.scrolled {
  background: rgba(8, 8, 12, 0.95);
  border-bottom-color: rgba(0, 212, 170, 0.15);
}

.shared-nav-inner {
  width: 94%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* --- Section 1: Brand / Logo --- */
.nav-brand {
  flex-shrink: 0;
}

.nav-logo-headline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.nav-logo-headline:hover {
  color: var(--fg);
}

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

/* --- Section 2: Links Container --- */
.nav-links-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex: 1; 
}

/* Individual Link Style */
.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--accent);
  background: rgba(0, 212, 170, 0.1);
}

/* --- Section 3: Actions --- */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Search Button */
.nav-search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.3s;
}

.nav-search-btn:hover {
  border-color: var(--accent);
  color: var(--fg);
}

.search-label {
  font-size: 0.85rem;
  font-weight: 500;
}

.kbd-shortcut {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 2px 6px;
  background: var(--bg);
  border-radius: 4px;
  border: 1px solid var(--border);
  opacity: 0.7;
}

/* Outline Button (Back Button) */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 212, 170, 0.05);
}

/* --- Mobile Menu Toggle --- */
.mobile-menu-toggle {
  display: none; 
  background: none;
  border: none;
  color: var(--fg);
  cursor: pointer;
  padding: 0.5rem;
  z-index: 60;
}

.mobile-menu-toggle .icon-close { display: none; }
.mobile-menu-toggle.open .icon-open { display: none; }
.mobile-menu-toggle.open .icon-close { display: block; }

/* =============================================================================
   RESPONSIVE STYLES
   ============================================================================= */

@media (max-width: 900px) {
  
  /* 1. HIDE the Hamburger Menu Button */
  .mobile-menu-toggle {
    display: none !important;
  }

  /* 2. SHOW the Actions (Search + Back) on Mobile */
  .nav-actions {
    display: flex !important;
    gap: 0.5rem;
  }

  /* 3. Optimize Search Button for Mobile */
  .nav-search-btn .search-label,
  .nav-search-btn .kbd-shortcut {
    display: none;
  }
  
  .nav-search-btn {
    padding: 8px;
  }

  /* 4. Keep Back Button Text visible */
  .btn-outline {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  
  /* Ensure the link dropdown doesn't open */
  .nav-links-wrapper {
    display: none !important;
  }
}

/* =============================================================================
   CUSTOM NAV TRANSPARENCY (Projects Page Override)
   ============================================================================= */

/* Override shared nav styles for complete transparency */
.shared-nav,
.shared-nav.scrolled {
  /* 1. Fully Transparent Background */
  background: rgba(255, 255, 255, 0.00) !important;
  
  /* 2. Blur Effect */
  backdrop-filter: blur(15px) !important;
  -webkit-backdrop-filter: blur(15px) !important;
  
  /* 3. Remove Borders */
  border: 0px solid transparent !important;
  border-bottom: none !important; /* Ensure no bottom line on scroll */
  border-radius: 0px !important;
  
  /* 4. Shadow for depth */
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5) !important;
}

/* Ensure the inner content keeps the text color you wanted */
.shared-nav-inner {
  color: #ffffff;
}

/* Note: Width and Height were excluded to preserve the full-width header layout. */