/* ============================================================
   Shared Navbar Styles — Ivan Tran Portfolio
   Import via: <link rel="stylesheet" href="navbar.css"> (root)
               <link rel="stylesheet" href="../navbar.css"> (projects/)
   ============================================================ */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 2px solid #000000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 56px;
  margin: -40px -20px 0 -20px;
  box-sizing: content-box;
  transition: transform 0.3s ease;
}

.navbar--hidden {
  transform: translateY(-100%);
}

.navbar-name {
  font-size: 1em;
  font-weight: 700;
  color: #000000;
  text-decoration: none;
  white-space: nowrap;
  flex: 1;
}

.navbar-links {
  display: flex;
  gap: 16px;
  list-style: none;
  flex: 2;
  justify-content: center;
}

.navbar-links a {
  color: #000000;
  text-decoration: none;
  font-size: 0.75em;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.navbar-links a:hover {
  opacity: 0.5;
}

.navbar-socials {
  display: flex;
  gap: 12px;
  flex: 1;
  justify-content: flex-end;
  align-items: center;
}

.navbar-socials a {
  color: #000000;
  text-decoration: none;
  font-size: 0.85em;
  font-weight: 600;
  border: 1.5px solid #000000;
  padding: 4px 12px;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.navbar-socials a:hover {
  background: #000000 !important;
  color: #ffffff !important;
}

/* Offset anchor targets so the sticky navbar doesn't cover them */
[id] {
  scroll-margin-top: 70px;
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    height: auto;
    padding: 12px 16px;
    gap: 6px;
    align-items: center;
    margin: -40px -20px 0 -20px;
  }

  .navbar-name { flex: none; }

  .navbar-links {
    flex: none;
    gap: 16px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
  }

  .navbar-links::-webkit-scrollbar {
    display: none;
  }

  .navbar-socials {
    flex: none;
    justify-content: center;
  }

  /* Taller stacked nav on mobile needs more offset */
  [id] {
    scroll-margin-top: 140px;
  }
}
