.nav {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 24px;
  margin: 12px 24px;
  border-radius: 999px;
  background: rgba(248,250,252,0.95);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  gap: 32px;
  position: sticky;
  top: 12px;
  z-index: 100;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-link {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 0;
  position: relative;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link.active {
  color: var(--accent);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.footer {
  text-align: center;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

@media (max-width: 640px) {
.layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.layout main {
  flex: 1;
}

.nav {
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
    width: auto;
    margin: 12px 16px 0;
    border-radius: 16px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
}
