/* Header Styles */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

header {
  position: relative;
  z-index: 20;
  width: 100%;
  background-color: rgb(16, 16, 26);
  animation: slideDown 0.5s ease-out;
}

/* Header Container */
.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-md) var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

/* Top row: title + burger */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Header Title */
.header-title {
  color: var(--color-light);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Burger — hidden on desktop */
.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 30;
}

.burger-line {
  display: block;
  width: 26px;
  height: 2px;
  background: #dcdce0;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger-btn.is-open .burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger-btn.is-open .burger-line:nth-child(2) {
  opacity: 0;
}

.burger-btn.is-open .burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Navigation Styles */
nav {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
  justify-content: flex-end;
  align-self: flex-end;
  width: auto;
}

nav a {
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--color-gray);
  font-weight: 500;
  font-size: 15px;
  border-radius: 6px;
  transition: all 0.2s ease;
  position: relative;
}

nav a:hover,
nav a:focus {
  color: #00d2ff;
  background-color: rgba(0, 210, 255, 0.08);
  text-shadow: 0 0 8px rgba(0, 210, 255, 0.3);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, #00d2ff, #57a9ff);
  transition: transform 0.3s ease;
}

nav a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

/* Active page styling */
nav a.active {
  color: #00d2ff;
  font-weight: 600;
}

nav a.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* Mobile */
@media (max-width: 768px) {
  .header-title {
    font-size: 18px;
  }

  .burger-btn {
    display: flex;
  }

  nav {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    align-self: stretch;
    background: rgb(16, 16, 26);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: var(--spacing-sm);
  }

  nav.nav-open {
    display: flex;
  }

  nav a {
    width: 100%;
    text-align: center;
    padding: var(--spacing-sm) var(--spacing-md);
  }
}
