/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
body {
  font-family: "Open Sans", sans-serif;
  color: #f0f0f0;
  background-color: #0a0e17;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(0, 150, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(0, 255, 150, 0.05) 0%, transparent 50%);
}

a {
  color: #40d8ff;
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: #50ffbb;
  text-decoration: none;
  text-shadow: 0 0 8px rgba(0, 255, 170, 0.5);
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Raleway", sans-serif;
  color: #ffffff;
}

/*--------------------------------------------------------------
# Back to top button
--------------------------------------------------------------*/
.back-to-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 15px;
  bottom: 15px;
  z-index: 996;
  background: #00ccff;
  width: 40px;
  height: 40px;
  border-radius: 50px;
  transition: all 0.4s;
  box-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}

.back-to-top i {
  font-size: 28px;
  color: #0a0e17;
  line-height: 0;
}

.back-to-top:hover {
  background: #00ffaa;
  color: #0a0e17;
  box-shadow: 0 0 15px rgba(0, 255, 170, 0.7);
}

.back-to-top.active {
  visibility: visible;
  opacity: 1;
}

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
#header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  transition: all ease-in-out 0.5s;
  z-index: 9997;
  padding: 0 15px;
  background: #121820;
  border-right: 1px solid rgba(0, 204, 255, 0.1);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.8);
  overflow-y: auto;
}

#header .profile img {
  margin: 15px auto;
  display: block;
  width: 120px;
  border: 5px solid rgba(0, 204, 255, 0.2);
  box-shadow: 0 0 15px rgba(0, 204, 255, 0.3);
}

#header .profile h1 {
  font-size: 24px;
  margin: 0;
  padding: 0;
  font-weight: 600;
  -moz-text-align-last: center;
  text-align-last: center;
  font-family: "Poppins", sans-serif;
}

#header .profile h1 a, #header .profile h1 a:hover {
  color: #fff;
  text-decoration: none;
  text-shadow: 0 0 10px rgba(0, 204, 255, 0.4);
}

#header .profile .social-links a {
  font-size: 18px;
  display: inline-block;
  background: #121820;
  color: #00ccff;
  line-height: 1;
  padding: 8px 0;
  margin-right: 4px;
  border-radius: 50%;
  text-align: center;
  width: 36px;
  height: 36px;
  transition: 0.3s;
  border: 1px solid rgba(0, 204, 255, 0.3);
}

#header .profile .social-links a:hover {
  background: #00ccff;
  color: #0a0e17;
  text-decoration: none;
  box-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
  transform: translateY(-3px);
}

#main {
  margin-left: 300px;
}

@media (max-width: 1199px) {
  #header {
    left: -300px;
  }
  #main {
    margin-left: 0;
  }
}

/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
/* Desktop Navigation */
.nav-menu {
  padding: 30px 0 0 0;
}

.nav-menu * {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-menu > ul > li {
  position: relative;
  white-space: nowrap;
}

.nav-menu a {
  display: flex;
  align-items: center;
  color: #c0c0c0; /* Brightened for better readability */
  padding: 12px 15px;
  margin-bottom: 8px;
  transition: 0.3s;
  font-size: 15px;
  border-radius: 8px;
  background: rgba(18, 24, 32, 0.8);
  border-left: 3px solid transparent;
  font-weight: 500; /* Added for better readability */
}

.nav-menu a i {
  font-size: 24px;
  padding-right: 8px;
  color: #8f91a3; /* Brightened for better readability */
}

.nav-menu a:hover, .nav-menu .active, .nav-menu li:hover > a {
  text-decoration: none;
  color: #ffffff;
  background: rgba(64, 216, 255, 0.15); /* Brightened for better contrast */
  border-left: 3px solid #40d8ff;
}

.nav-menu a:hover i, .nav-menu .active i, .nav-menu li:hover > a i {
  color: #40d8ff;
}

/* Mobile Navigation */
.mobile-nav-toggle {
  position: fixed;
  right: 15px;
  top: 15px;
  z-index: 9998;
  border: 0;
  font-size: 24px;
  transition: all 0.4s;
  outline: none !important;
  background-color: #40d8ff; /* Updated for consistency */
  color: #0a0e17;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  border-radius: 50px;
  cursor: pointer;
}

.mobile-nav-active {
  overflow: hidden;
}

.mobile-nav-active #header {
  left: 0;
}

/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/
#hero {
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, rgba(5, 10, 20, 0.98), rgba(10, 14, 23, 0.95)), 
              linear-gradient(45deg, rgba(0, 50, 100, 0.1), rgba(0, 20, 40, 0.1));
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(0, 204, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(0, 255, 170, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(0, 128, 255, 0.03) 0%, transparent 80%);
  z-index: 1;
}

#hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%2340d8ff' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.4;
  z-index: 2;
  pointer-events: none;
}

/* Animated grid background effect */
#hero .grid-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 30px 30px;
  background-image: 
    linear-gradient(to right, rgba(0, 204, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 204, 255, 0.05) 1px, transparent 1px);
  z-index: 1;
  pointer-events: none;
}

/* Digital rain effect for hero */
#hero .digital-rain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, 
    rgba(10, 14, 23, 0) 0%,
    rgba(0, 204, 255, 0.03) 75%, 
    rgba(0, 204, 255, 0.05) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Content positioning and animations */
#hero .hero-container {
  position: relative;
  z-index: 10;
}

#hero .glitch-text {
  text-shadow: 
    0 0 15px rgba(0, 204, 255, 0.5),
    0 0 30px rgba(0, 204, 255, 0.2);
}

#hero .typed {
  color: #40d8ff;
  text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}

/* Grid cells animation */
.grid-cell {
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(64, 216, 255, 0);
  border: 1px solid rgba(64, 216, 255, 0.2);
  box-shadow: 0 0 10px rgba(64, 216, 255, 0.1);
  pointer-events: none;
  animation: gridCellPulse ease-in-out infinite;
  transform: scale(0);
  z-index: 3;
}

@keyframes gridCellPulse {
  0% {
    transform: scale(0);
    background: rgba(64, 216, 255, 0.1);
  }
  50% {
    transform: scale(1);
    background: rgba(64, 216, 255, 0.05);
  }
  100% {
    transform: scale(0);
    background: rgba(64, 216, 255, 0);
  }
}

/* Digital rain animation */
.rain-drop {
  position: absolute;
  top: -50px;
  height: 30px;
  background: linear-gradient(to bottom, 
    rgba(64, 216, 255, 0), 
    rgba(64, 216, 255, 0.5), 
    rgba(64, 216, 255, 0)
  );
  animation: digitalRain linear infinite;
  z-index: 2;
}

@keyframes digitalRain {
  0% {
    transform: translateY(-50px);
  }
  100% {
    transform: translateY(calc(100vh + 50px));
  }
}
