/* === Color Variables === */
:root {
    --primary: #f0f0f3;
    --accent: #8ecae6;
    --text: #111111;
    --top-shadow: #f6f1f1;
    --bottom-shadow: #D1D9E6;
    --glow: #1F51FF;
    --card-width: 80vw;
    --card-margin: 10vw;
}

body.dark-mode {
    --primary: #1f1f1f;
    --accent: #00c896;
    --text: #ffffff;
    --top-shadow: #2A2A2A;
    --bottom-shadow: #0D0D0D;
    --glow: #39FF14;
}

/* === Base Reset === */
body {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  background: var(--primary);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
  /* height: 200vh; */
}

body::selection {
    background-color: var(--accent);
    color: var(--text);
}

header {
  max-height: fit-content;
}

/* === Navbar === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 1rem 2rem;
  background: var(--primary);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 4px 4px 16px #d1d9e6, -4px -4px 16px #ffffff;
  transition: all 0.3s ease;
  overflow: hidden;
}

body.dark-mode .navbar {
  box-shadow: 4px 4px 16px #0D0D0D, -4px -4px 16px #2A2A2A;
}

.navbar.floating {
  margin: 16px;
  border-radius: 1rem;
  backdrop-filter: blur(1px);
  background: rgba(255, 255, 255, 0.8);
}

body.dark-mode .navbar.floating {
  background: rgba(31, 31, 31, 0.85);
}

/* === Layout === */
.container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
}

.nav-left,
.nav-right {
  display: flex;
  gap: 1rem;
}

.nav-center {
  text-align: center;
  flex: 1;
}

.logo img{
  width: 50px;
  height: 50px;
}

.nav-left a,
.nav-right a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: all 0.5s ease-in-out;
  position: relative;
}

.nav-left a::before,
.nav-right a::before {
  position: absolute;
  content: '';
  height: 100px;
  width: 100px;
  left: 0;
  bottom: 0;
  color: red;
}

.nav-left a:hover,
.nav-right a:hover {
  color: var(--accent);
}

/* === Theme Toggles === */
.desktop-theme-toggle,
.mobile-theme-toggle {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text);
  cursor: pointer;
  transition: color 0.3s ease;
  margin-right: 10px;
}

.desktop-theme-toggle:hover,
.mobile-theme-toggle:hover {
  color: var(--accent);
}

.desktop-theme-toggle {
  display: block;
}


/* === Hamburger === */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  width: 30px;
  height: 24px;
}

.bar {
  height: 4px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-toggle.active .top {
  transform: translateY(10px) rotate(45deg);
}

.mobile-toggle.active .middle {
  opacity: 0;
}

.mobile-toggle.active .bottom {
  transform: translateY(-10px) rotate(-45deg);
}

/* === Mobile Menu === */
.mobile-menu {
  position: static;
  top: 100%;
  left: 0;
  width: 100%;
  overflow: hidden;
  max-height: 0;
  padding: 0;
  transition: all 0.4s ease, padding 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 99;
  visibility: hidden;
  opacity: 0;
}

.mobile-menu.open {
  max-height: 300px;
  padding: 1rem;
  visibility: visible;
  opacity: 1;
}

.mobile-menu a {
  transform: translateX(-100px);
  opacity: 0;
  transition: all 0.3s ease;
  color: var(--accent);
  text-decoration: none;
  padding: 20px 0;
  border-top: 2px solid var(--text);
  width: 100%;
  text-align: center;
}

.mobile-menu.open a {
  transform: translateX(0);
  opacity: 1;
}

/* === Floating Background Blobs === */
.floating-blobs {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0.5;
  animation: float 10s infinite ease-in-out alternate;
}

.blob1 {
  width: 200px;
  height: 200px;
  background: var(--accent);
  top: -30px;
  left: -60px;
}

.blob2 {
  width: 150px;
  height: 150px;
  background: var(--accent);
  bottom: -30px;
  right: -40px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  margin-right: 10px;
}

.switch #input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #2196f3;
  -webkit-transition: 0.4s;
  transition: 0.4s;
  z-index: 0;
  overflow: hidden;
}

.sun-moon {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: yellow;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

#input:checked+.slider {
  background-color: black;
}

#input:focus+.slider {
  box-shadow: 0 0 1px #2196f3;
}

#input:checked+.slider .sun-moon {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
  background-color: white;
  -webkit-animation: rotate-center 0.6s ease-in-out both;
  animation: rotate-center 0.6s ease-in-out both;
}

.moon-dot {
  opacity: 0;
  transition: 0.4s;
  fill: gray;
}

#input:checked+.slider .sun-moon .moon-dot {
  opacity: 1;
}

.slider.round {
  border-radius: 34px;
}

.slider.round .sun-moon {
  border-radius: 50%;
}

#moon-dot-1 {
  left: 10px;
  top: 3px;
  position: absolute;
  width: 6px;
  height: 6px;
  z-index: 4;
}

#moon-dot-2 {
  left: 2px;
  top: 10px;
  position: absolute;
  width: 10px;
  height: 10px;
  z-index: 4;
}

#moon-dot-3 {
  left: 16px;
  top: 18px;
  position: absolute;
  width: 3px;
  height: 3px;
  z-index: 4;
}

#light-ray-1 {
  left: -8px;
  top: -8px;
  position: absolute;
  width: 43px;
  height: 43px;
  z-index: -1;
  fill: white;
  opacity: 10%;
}

#light-ray-2 {
  left: -50%;
  top: -50%;
  position: absolute;
  width: 55px;
  height: 55px;
  z-index: -1;
  fill: white;
  opacity: 10%;
}

#light-ray-3 {
  left: -18px;
  top: -18px;
  position: absolute;
  width: 60px;
  height: 60px;
  z-index: -1;
  fill: white;
  opacity: 10%;
}

.cloud-light {
  position: absolute;
  fill: #eee;
  animation-name: cloud-move;
  animation-duration: 6s;
  animation-iteration-count: infinite;
}

.cloud-dark {
  position: absolute;
  fill: #ccc;
  animation-name: cloud-move;
  animation-duration: 6s;
  animation-iteration-count: infinite;
  animation-delay: 1s;
}

#cloud-1 {
  left: 30px;
  top: 15px;
  width: 40px;
}

#cloud-2 {
  left: 44px;
  top: 10px;
  width: 20px;
}

#cloud-3 {
  left: 18px;
  top: 24px;
  width: 30px;
}

#cloud-4 {
  left: 36px;
  top: 18px;
  width: 40px;
}

#cloud-5 {
  left: 48px;
  top: 14px;
  width: 20px;
}

#cloud-6 {
  left: 22px;
  top: 26px;
  width: 30px;
}


.stars {
  transform: translateY(-32px);
  opacity: 0;
  transition: 0.4s;
}

.star {
  fill: white;
  position: absolute;
  -webkit-transition: 0.4s;
  transition: 0.4s;
  animation-name: star-twinkle;
  animation-duration: 2s;
  animation-iteration-count: infinite;
}

#input:checked+.slider .stars {
  -webkit-transform: translateY(0);
  -ms-transform: translateY(0);
  transform: translateY(0);
  opacity: 1;
}

#star-1 {
  width: 20px;
  top: 2px;
  left: 3px;
  animation-delay: 0.3s;
}

#star-2 {
  width: 6px;
  top: 16px;
  left: 3px;
}

#star-3 {
  width: 12px;
  top: 20px;
  left: 10px;
  animation-delay: 0.6s;
}

#star-4 {
  width: 18px;
  top: 0px;
  left: 18px;
  animation-delay: 1.3s;
}

.cursor-circle {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  background-color: var(--accent);
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: transform 0.08s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cursor-hovered {
  transform: translate(-50%, -50%) scale(2.5);
  background-color: var(--accent);
  transition: transform 0.2s ease;
  mix-blend-mode: difference;
}

.cursor-label {
  position: absolute;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: var(--primary);
  padding: 2px 8px;
  border-radius: 6px;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.2s ease-in-out;
  pointer-events: none;
  white-space: nowrap;
  z-index: 99999999;
}

.cursor-circle.cursor-hovered .cursor-label {
  opacity: 1;
  top: -30px; 
  transform: translateY(0);
}

.cursor-circle.nav-hover .cursor-label {
  top: 30px;
}





/* === Responsive === */

@media screen and (max-width: 768px) {

  .nav-left,
  .nav-right {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-center {
    text-align: left;
    width: 100%;
  }

  .desktop-theme-toggle {
    display: none;
  }

  .mobile-theme-toggle {
    display: block;
    margin-right: 1rem;
  }
  .navbar.floating {
    backdrop-filter: blur(2px);
  }

}

@media screen and (min-width: 769px) {
  .mobile-theme-toggle {
    display: none;
  }

  .nav-left a,
  .nav-right a {
    position: relative;
    display: inline-block;
    text-decoration: none;
    color: var(--text);
    transition: color 0.3s ease;
  }

  .nav-left a::before,
  .nav-right a::before {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
  }

  .nav-left a:hover::before,
  .nav-right a:hover::before {
    width: 100%;
  }
}

@keyframes float {
  0% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateX(50px) scale(1.5);
  }

  100% {
    transform: translateY(20px) scale(1.1);
  }
}

@keyframes star-twinkle {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.2);
  }

  80% {
    transform: scale(0.8);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes cloud-move {
  0% {
    transform: translateX(0px);
  }

  40% {
    transform: translateX(4px);
  }

  80% {
    transform: translateX(-4px);
  }

  100% {
    transform: translateX(0px);
  }
}