/* ===== NAVBAR — Clean, white, sidebar (desktop) + drawer (mobile) ===== */

.mobile-name-banner {
  display: none;
}
#check {
  display: none;
}

/* ── Hamburger / Close buttons ── */
.ham,
.cross {
  visibility: hidden;
  position: absolute;
  cursor: pointer;
  z-index: 20;
}
.ham {
  top: 0.85rem;
  left: 0.85rem;
}
.cross {
  top: 0.85rem;
  left: 0.85rem;
}

.ham i,
.cross i {
  font-size: 1.25rem;
  color: var(--text-color);
  background: var(--secondry-bg-color);
  border: 1.5px solid var(--border-color);
  border-radius: 0.6rem;
  padding: 0.4rem 0.5rem;
  transition: all 0.2s ease;
  box-shadow: var(--card-shadow);
  display: block;
}

.ham i:hover,
.cross i:hover {
  background: var(--main-color);
  color: #fff;
  border-color: var(--main-color);
}

/* ── Sidebar nav (desktop) ── */
.nav {
  background-color: var(--nav-color);
  border-right: 1px solid var(--border-color);
  width: 11rem;
  height: 100vh;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Logo / avatar ── */
.logo {
  margin: 0.875rem;
  border-radius: 0.875rem;
  overflow: hidden;
  height: 200px;
  background: var(--main-color-light);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.logo img:hover {
  transform: scale(1.6);
  cursor: pointer;
}

/* ── Divider ── */
.line {
  height: 1px;
  background: var(--border-color);
  margin: 0 0.875rem 0.5rem;
}

/* ── Nav links ── */
#nav-links-all {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 0 0.375rem;
}
#nav-links-all::-webkit-scrollbar {
  display: none;
}

.nav ul {
  list-style: none;
}

.nav ul li {
  margin: 0.1rem 0;
  border-radius: 0.6rem;
}

.nav ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 0.6rem;
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 0.6rem;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.nav ul li a.active {
  color: var(--main-color);
  background: var(--main-color-light);
  font-weight: 600;
}

.nav ul li:hover a:not(.active) {
  color: var(--text-color);
  background: var(--nav-hover-color);
}

.nav-icons {
  color: var(--main-color);
  margin-right: 0.55rem;
  width: 1rem;
  font-size: 0.82rem;
  flex-shrink: 0;
}

/* ── Hire Me button ── */
.nav-hire-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--main-color);
  color: #fff !important;
  border-radius: 0.75rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.84rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.nav-hire-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--main-color-alpha50);
}

/* ── Mobile top bar ── */
.mobile-top-bar {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: 3.25rem;
  background: var(--secondry-bg-color);
  border-bottom: 1px solid var(--border-color);
  align-items: center;
  justify-content: center;
  padding: 0 3.25rem;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.mobile-top-bar .site-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-color);
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.mobile-top-bar .site-subtitle {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 400;
  text-align: center;
}

/* ── Premium Sliding Theme Toggle ── */
.theme-switch-wrapper {
  position: fixed;
  right: 1.5rem;
  top: 1.5rem;
  z-index: 99;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.theme-switch {
  position: relative;
  width: 64px;
  height: 32px;
  background: var(--secondry-bg-color);
  border-radius: 30px;
  border: 1.5px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.04),
    0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.theme-switch i {
  font-size: 14px;
  z-index: 2;
  transition: color 0.3s ease;
}

.icon-sun {
  color: #f59e0b;
} /* Yellow sun active by default in light mode */
.icon-moon {
  color: var(--text-secondary);
  opacity: 0.5;
}

/* The sliding circle */
.switch-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 23px;
  height: 23px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.4s cubic-bezier(0.25, 1.5, 0.5, 1);
  z-index: 1;
}

/* ── Dark Mode State ── */
.dark-mode .theme-switch {
  background: #1e293b;
  border-color: #334155;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.2);
}

.dark-mode .switch-slider {
  transform: translateX(32px);
  background: #0891b2; /* brand color for the slider in dark mode */
}

.dark-mode .icon-sun {
  color: var(--text-secondary);
  opacity: 0.5;
}
.dark-mode .icon-moon {
  color: #fff;
  opacity: 1;
}

.theme-switch-wrapper:hover .theme-switch {
  border-color: var(--main-color);
}

/* ── Mobile overlay backdrop ── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
  z-index: 9;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* ── MOBILE LAYOUT ── */
@media only screen and (max-width: 900px) {
  /* Show mobile top bar */
  .mobile-top-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* Shift sections down below top bar */
  .sections {
    padding-top: 3.25rem;
  }

  /* Hamburger / close visible */
  .ham {
    visibility: visible;
    top: 0.65rem;
    left: 0.65rem;
  }
  .cross {
    visibility: visible;
    top: 0.65rem;
    left: 0.65rem;
  }

  /* Slide-in drawer */
  .nav {
    position: fixed;
    top: 0;
    left: -320px;
    width: 260px;
    height: 100vh;
    z-index: 15;
    border-right: 1px solid var(--border-color);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* When drawer open — show logo inside */
  .nav .logo {
    display: block;
  }

  /* Nav links inside drawer — larger touch targets */
  .nav ul li a {
    font-size: 0.95rem;
    padding: 0.7rem 1rem;
  }

  .nav ul li {
    margin: 0.2rem 0.5rem;
  }

  .nav-hire-btn {
    margin: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  /* Open state */
  #check:checked ~ .nav {
    left: 0;
  }

  #check:checked ~ .nav-overlay {
    display: block;
    opacity: 1;
  }

  /* Adjust theme toggle for mobile top bar */
  .theme-switch-wrapper {
    top: 0.6rem;
    right: 0.85rem;
  }

  .theme-switch {
    width: 56px;
    height: 28px;
    padding: 0 6px;
    border-color: transparent;
    box-shadow: none;
    background: var(--primary-bg-color);
  }

  .switch-slider {
    width: 22px;
    height: 22px;
    top: 2px;
    left: 2px;
  }

  .dark-mode .switch-slider {
    transform: translateX(28px);
  }

  .theme-switch i {
    font-size: 12px;
  }

  /* Hide ham when drawer open */
  #check:checked ~ .ham {
    visibility: hidden;
  }
  #check:checked ~ .mobile-top-bar .ham {
    visibility: hidden;
  }

  /* Close X sits inside the nav at top-right */
  .cross {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    left: auto;
    visibility: visible;
  }

  /* Hide close X when drawer is closed */
  .cross {
    display: none;
  }
  #check:checked ~ .nav .cross {
    display: flex;
  }

  /* Hide mobile-name-banner (replaced by mobile-top-bar) */
  .mobile-name-banner {
    display: none !important;
  }
}
