/* =========================================================
   GLOBAL NAV VARIABLES
========================================================= */
:root {
  --header-height: 64px;
}

/* =========================================================
   MAIN NAVBAR (Unified Glass Navigation)
========================================================= */

.header {
  width: 100%;
  height: var(--header-height);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  padding: 0 1rem;

  background: rgba(var(--footer-bg) 0.35);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(60, 92, 166, 0.2);
}

body.dark-theme .header {
  background: rgba(20, 25, 50, 0.55);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.nav {
  max-width: 768px;
  height: 100%;
  margin: 0 auto;
  padding-inline: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  width: 2.4rem;
  height: auto;
}

.nav__brand {
  display: flex;
  align-items: center;
}

/* Only right-side buttons: theme toggle */
.nav__btns {
  display: flex;
  align-items: center;
  gap: 16px;
}

#theme-button {
  font-size: 1.3rem;
  cursor: pointer;
}

/* =========================================================
   HOMEPAGE TAB NAV (ABOUT / WORK)
========================================================= */

.nav__menu {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.nav__list {
  display: flex;
  gap: 10px;
  padding: 6px;
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(10px);

  position: relative;
  overflow: hidden;
}

body.dark-theme .nav__list {
  background: rgba(30, 35, 62, 0.72);
}

.nav__item {
  list-style: none;
  position: relative;
  z-index: 1;
}

.nav__link {
  padding: 8px 20px;
  border-radius: 999px;
  color: var(--text-color);
  white-space: nowrap;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: var(--small-font-size);
  columns: var(--title-color);
  font-weight: var(--font-medium);
  text-align: center;
}

.nav__link.active-link {
  color: var(--button-color);
  box-shadow: 0 10px 24px rgba(60, 92, 166, 0.45);
}

/* Hide homepage tabs on detail pages */
body.detail-page .nav__list {
  display: none !important;
}

body.js-tabs-page .nav__link {
  flex-direction: row;
  font-size: 0.9rem;
  padding: 0.35rem 1rem;
  border-radius: 999px;
}

/* =========================================================
   BACK BUTTON (for detail pages)
========================================================= */

.back-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: calc(var(--header-height) + 16px);
  margin-bottom: 24px;

  color: var(--first-color);
  font-weight: 500;
  text-decoration: none;
  font-size: 1rem;
}

.back-inline i {
  font-size: 1.25rem;
}

body.dark-theme .back-inline {
  color: var(--first-color);
}

/* =========================================================
   MOVING HIGHLIGHT PILL
========================================================= */

.nav__highlight {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  width: 0;

  background: var(--first-color);
  border-radius: 999px;
  z-index: 0;

  transform: translateX(0);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
