:root {
  --md-sys-color-primary: #b4c5ff;
  --md-sys-color-on-primary: #002a77;
  --md-sys-color-secondary-container: #384366;
  --md-sys-color-on-secondary-container: #dce2f9;
  --md-sys-color-on-surface: #e4e7f2;
  --md-sys-color-on-surface-variant: #c2c6d4;
  --spring-spatial: cubic-bezier(0.34, 1.56, 0.64, 1);
}

body{
   background: url("../images/background.jpg") center center / cover no-repeat fixed;
    }

nav {
    position: sticky;
    top: 20px;
    z-index: 100;
    width: fit-content;
    max-width: (100% - 32px);
    margin: 20px auto;
    padding: 8px 12px;
    border-radius: 9999px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.45),
    inset 0 -1px 1px rgba(255, 255, 255, 0.10),
    0 10px 30px rgba(0, 0, 0, 0.30);
    backdrop-filter: blur(18px) saturate(180%) brightness(1.08);
    -webkit-backdrop-filter: blur(18px) saturate(180%) brightness(1.08);
     transition: 
        transform 0.4s var (--spring-spatial),
    box-shadow 0.3 ease,
    border-color 0.3s ease;    
}

nav:hover {
    border-color: rgba(180, 197, 255, 0.30);
    box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 16px 40px rgba(0, 0, 0, 0.55);
}

.nav-toggle {
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.35s var(--spring-spatial);
}

.nav-toggle:active {
  transform: scale(0.92);
}

nav a {
  position: relative;
  height: 42px;
  padding: 0 16px;
  border: none;
  border-radius: 9999px;
  color: var(--md-sys-color-on-surface-variant);
  background: transparent;
  display: flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.35s var(--spring-spatial);
}

nav a:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--md-sys-color-on-surface);
  transform: translateY(-1px);
}

nav a:active {
  transform: scale(0.94);
}

nav a.active {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  font-weight: 600;
}

.nav-icon {
  width: 24px;
  min-width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon img,
.nav-toggle img {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
}

.nav-label {
  margin-left: 8px;
  font-family: "JetBrains Mono", system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
}

@media (max-width: 640px) {
  nav {
    padding: 6px 10px;
    gap: 4px;
    overflow-x: auto;
  }

  nav a {
    padding: 0 12px;
  }

  .nav-label {
    font-size: 12px;
  }
}