/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  transition:
    background,
    0.3s,
    color 0.3s;
  background: var(--bg);
  color: var(--text);
}
.section {
  padding: 20px;
  padding-bottom: 30px;
}

/* Light / Dark Variables */
:root {
  --bg: #ffffff;
  --text: #222;
  --border: #ddd;
  --input-bg: #f3f3f3;
  --hover: #007bff;
}

.dark {
  --bg: #1d1d1d;
  --text: #eaeaea;
  --border: #333;
  --input-bg: #2a2a2a;
}

/* NAVBAR */
.navbar {
  width: 100%;
  padding: 12px 25px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 999;
}

.home-btn {
  font-size: 22px;
  text-decoration: none;
  font-weight: bold;
  color: var(--text);
}

/* Center Menu */
.nav-menu {
  display: flex;
  gap: 30px;
}
.nav-link {
  position: relative;
  color: var(--text);
  text-decoration: none;
  padding: 6px 0;
  font-weight: 600;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: #2563eb;
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.nav-link.active::after {
  width: 100%;
}

/* Right section */
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Theme toggle */

/* Wrapper */
.toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 30px;
  justify-content: center;
}

/* Text */
.label {
  font-size: 15px;
  font-weight: 500;
}

/* Toggle Base */
.toggle {
  position: relative;
}

.toggle input {
  display: none;
}

.toggle-btn {
  width: 70px;
  height: 40px;
  background: #fdeaa8;
  border-radius: 50px;
  display: flex;
  align-items: center;
  padding: 5px;
  cursor: pointer;
  position: relative;
  transition: 0.4s;
}

/* Circle */
.icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 20px;
  transition: 0.4s;
}

.sun {
  background: #f4c430;
  color: #fff;
  position: absolute;
  right: 5px;
  opacity: 0;
}

.moon {
  background: #0f0f10;
  color: #fff;
}

/* Dark Mode Toggle */
#themeToggle:checked + .toggle-btn {
  background: #0c2d3f;
}

#themeToggle:checked + .toggle-btn .moon {
  transform: translateX(60px);
  opacity: 0;
}

#themeToggle:checked + .toggle-btn .sun {
  opacity: 1;
}

/* Profile Section */
.profile-container {
  position: relative;
}

.profile-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
}

/* Dropdown */
.profile-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 48px;
  background: var(--bg);
  width: 150px;
  border-radius: 8px;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  animation: fadeIn 0.2s ease;
}

.profile-dropdown a {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.profile-dropdown a:last-child {
  border: none;
  cursor: pointer;
}
.logout:hover {
  font-size: 18px;
  font-weight: 600;
}

.profile-dropdown .logout {
  color: red;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hamburger icon */
.hamburger {
  display: none;
  font-size: 26px;
  background: none;
  color: var(--text);
  border: none;
  cursor: pointer;
}

/* MOBILE RESPONSIVE */
@media (max-width: 900px) {
  .nav-menu {
    position: absolute;
    top: 70px;
    right: 0;
    width: 100%;
    text-align: center;
    background: var(--bg);
    flex-direction: column;
    display: none;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  
  .hamburger {
    display: block;
  }
}
