/* NAVBAR */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 0 clamp(16px, 5vw, 100px);
  background: var(--bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.navbar__brand {
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
  color: var(--text);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
}

.navbar__menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 3vw, 24px);
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar__menu a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: clamp(0.8rem, 2vw, 1rem);
  white-space: nowrap;
}

.navbar__menu a:hover,
.navbar__menu a.active {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: 150ms ease;
  font-size: clamp(0.8rem, 2vw, 1rem);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--bg);
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

/* THEME SWITCH */
#theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: 150ms ease;
  font-size: 1.2rem;
}

#theme-toggle:hover {
  background: var(--bg-light);
}

/* FOOTER */
.footer {
  background: var(--bg-dark);
  color: var(--text-muted);
  padding: clamp(48px, 8vw, 64px) 0;
  margin-top: auto;
}

.footer__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(32px, 6vw, 64px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 48px);
  align-items: start;
}

.footer__column {
  display: flex;
  flex-direction: column;
}

.footer__info {
  grid-column: 1;
}

.footer__info h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--primary);
  letter-spacing: 0.5px;
}

.footer__info p {
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  line-height: 1.6;
  margin: 0;
  color: var(--text-muted);
  max-width: 300px;
}

.footer__social {
  grid-column: 2;
  justify-self: end;
}

.footer__social h3 {
  font-size: clamp(1.1rem, 3vw, 1.25rem);
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--primary);
}

.footer__social ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 24px;
  min-width: 200px;
}

.footer__social li {
  display: flex;
}

.footer__social a {
  color: var(--text-muted);
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  text-decoration: none;
  transition: all 150ms ease;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  font-weight: 500;
}

.footer__social a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
  transform: translateX(4px);
}

.footer__copyright {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: clamp(32px, 6vw, 48px);
  padding-top: clamp(24px, 4vw, 32px);
  border-top: 1px solid var(--border-muted);
}

.footer__copyright p {
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  color: var(--text-muted);
  margin: 0;
  font-weight: 400;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .navbar {
    height: 56px;
    padding: 0 16px;
  }

  .navbar__menu {
    gap: 8px;
  }

  .navbar__menu a {
    font-size: 0.85rem;
  }

  .btn {
    height: 36px;
    padding: 0 12px;
    font-size: 0.85rem;
  }

  #theme-toggle {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .footer {
    padding: clamp(40px, 8vw, 48px) 0;
  }

  .footer__container {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: left;
  }

  .footer__info {
    grid-column: 1;
  }

  .footer__social {
    grid-column: 1;
    justify-self: start;
  }

  .footer__social ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 20px;
    min-width: unset;
    width: 100%;
  }

  .footer__copyright {
    margin-top: 32px;
    padding-top: 24px;
  }
}

@media (max-width: 550px) {
  .navbar {
    height: 52px;
    grid-template-columns: 1fr auto;
  }

  .navbar__menu {
    display: none;
  }

  .navbar__actions {
    gap: 8px;
  }

  .btn {
    height: 32px;
    padding: 0 8px;
    font-size: 0.8rem;
  }

  #theme-toggle {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .footer {
    padding: 32px 0;
  }

  .footer__container {
    gap: 24px;
  }

  .footer__info h3 {
    margin-bottom: 12px;
  }

  .footer__social h3 {
    margin-bottom: 16px;
  }

  .footer__social ul {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .footer__social a {
    padding: 8px 0;
  }

  .footer__copyright {
    margin-top: 24px;
    padding-top: 20px;
  }
}

/* Mobile menu toggle */
.navbar__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 1.2rem;
  transition: 150ms ease;
}

.navbar__toggle:hover {
  background: var(--bg-light);
}

@media (max-width: 550px) {
  .navbar__toggle {
    display: flex;
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
}
