.top-nav {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  gap: 0.45rem;
  padding: 0.18rem 0.9rem;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.08rem;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(186, 195, 214, 0.78);
  transition: transform 140ms ease, color 140ms ease;
}

.nav-item:hover,
.nav-item:focus-visible {
  transform: translateY(-1px);
  color: rgba(223, 232, 255, 0.92);
}

.nav-item:focus-visible {
  outline: 2px solid rgba(167, 181, 216, 0.5);
  outline-offset: 3px;
  border-radius: 12px;
}

.nav-icon {
  width: 1.34rem;
  height: 1.34rem;
  display: inline-flex;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.nav-item-resume {
  justify-self: start;
}

.nav-screen-links {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  min-height: 1.34rem;
  max-width: min(72vw, 960px);
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-screen-links::-webkit-scrollbar {
  display: none;
}

.nav-screen-link {
  position: relative;
  min-height: 1.34rem;
  padding: 0;
  color: rgba(196, 205, 223, 0.62);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.nav-screen-link::before,
.nav-screen-link::after {
  content: none !important;
}

.nav-screen-link:hover,
.nav-screen-link:focus-visible,
.nav-screen-link.is-active,
.nav-screen-link[aria-pressed='true'] {
  color: rgba(229, 235, 246, 0.9);
}

.nav-screen-link:disabled {
  opacity: 1;
  cursor: default;
}

.nav-item-wa {
  justify-self: end;
}

.kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hot);
  text-shadow: 0 0 12px rgba(99, 230, 190, 0.2);
}

h1 {
  margin: 0.45rem 0 0;
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  line-height: 1.08;
}

.subtitle {
  margin: 0.5rem 0 0;
  max-width: 55ch;
  font-size: clamp(0.82rem, 1.5vw, 0.95rem);
  color: var(--muted);
}

.meta-row {
  display: inline-block;
  margin: 0.68rem 0 0;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--glass-stroke);
  background: var(--glass-fill);
  backdrop-filter: blur(8px);
  font-size: 0.75rem;
  color: rgba(223, 229, 245, 0.94);
}

.tuning-panel {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  z-index: 8;
  width: min(360px, calc(100vw - 1.7rem));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(13, 18, 38, 0.86), rgba(8, 12, 28, 0.72));
  backdrop-filter: blur(10px) saturate(120%);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  color: rgba(228, 235, 251, 0.95);
  overflow: hidden;
}

.tuning-panel > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.5rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(201, 255, 236, 0.94);
}

.tuning-panel > summary::-webkit-details-marker {
  display: none;
}

.tuning-body {
  max-height: 44vh;
  overflow: auto;
  padding: 0 0.65rem 0.65rem;
}

.tuning-section-title {
  margin: 0.45rem 0 0.28rem;
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(155, 176, 222, 0.95);
}

.tuning-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    'name number'
    'range number';
  gap: 0.14rem 0.52rem;
  margin-bottom: 0.35rem;
  align-items: center;
}

.tuning-label {
  grid-area: name;
  font-size: 0.67rem;
  color: rgba(222, 230, 252, 0.9);
}

.tuning-row input[type='range'] {
  grid-area: range;
  width: 100%;
}

.tuning-number {
  grid-area: number;
  width: 4.55rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(237, 242, 255, 0.95);
  padding: 0.2rem 0.32rem;
  font-size: 0.66rem;
}

.tuning-buttons {
  margin-top: 0.45rem;
  display: flex;
  justify-content: flex-end;
}

.tuning-reset {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(232, 241, 255, 0.96);
  font-size: 0.66rem;
  padding: 0.25rem 0.58rem;
  cursor: pointer;
}

.tuning-reset:hover {
  background: rgba(99, 230, 190, 0.22);
}

@media (max-width: 700px) {
  .top-nav {
    padding: 0.22rem 0.45rem 0.28rem;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.25rem 0.38rem;
    align-items: center;
  }

  .nav-icon {
    width: 1.2rem;
    height: 1.2rem;
  }

  .nav-item-resume {
    grid-column: 1;
    grid-row: 1;
  }

  .nav-item-wa {
    grid-column: 3;
    grid-row: 1;
  }

  .nav-screen-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    justify-content: flex-start;
    gap: 0.5rem;
    max-width: 100%;
    padding: 0 0.08rem;
    scroll-snap-type: x proximity;
  }

  .nav-screen-link {
    font-size: 0.56rem;
    letter-spacing: 0.07em;
    scroll-snap-align: center;
  }

  .tuning-panel {
    width: calc(100vw - 1rem);
    right: 0.5rem;
    bottom: 0.5rem;
  }
}

@media (max-width: 480px) {
  .top-nav {
    padding: 0.2rem 0.34rem 0.24rem;
  }

  .nav-screen-links {
    gap: 0.42rem;
    min-height: 1.24rem;
  }

  .nav-screen-link {
    font-size: 0.53rem;
    letter-spacing: 0.06em;
  }
}
