/* Modern Portfolio Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
}

[data-theme="light"] .navbar {
  background: rgba(248, 250, 252, 0.95);
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.navbar.scrolled {
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(24px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(248, 250, 252, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

/* Subtle Logo Section (Left) */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.03);
  border: 1px solid rgba(59, 130, 246, 0.08);
  transition: all 0.3s ease;
}

.logo:hover {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.15);
  transform: translateY(-1px);
}

[data-theme="light"] .logo {
  background: rgba(59, 130, 246, 0.04);
  border-color: rgba(59, 130, 246, 0.12);
}

[data-theme="light"] .logo:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
  transition: all 0.3s ease;
}

.logo:hover .logo-icon {
  transform: scale(1.02);
  box-shadow: 0 3px 12px rgba(59, 130, 246, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  line-height: 1;
}

.brand-subtitle {
  font-size: 0.65rem;
  font-weight: 600;
  color: #3b82f6;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  line-height: 1;
}

/* Enhanced Dynamic Quote Section (Center) - 15px wider */
.dynamic-text-section {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 1rem;
  max-width: 715px;
  margin: 0 auto;
}

.text-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 30px;
  backdrop-filter: blur(15px);
  transition: all 0.4s ease;
  width: 100%;
  max-width: 700px;
  overflow: hidden;
}

.text-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg,
      rgba(59, 130, 246, 0.1),
      rgba(139, 92, 246, 0.1),
      rgba(236, 72, 153, 0.1),
      rgba(59, 130, 246, 0.1));
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.text-container:hover::before {
  opacity: 1;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

[data-theme="light"] .text-container {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%);
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.05);
}

.text-container:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(139, 92, 246, 0.12) 100%);
  border-color: rgba(59, 130, 246, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.25);
}

[data-theme="light"] .text-container:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.12) 100%);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.quote {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  opacity: 0;
  transition: all 0.6s ease-in-out;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 2;
  background: linear-gradient(45deg, #3b82f6, #8b5cf6, #ec4899);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: textGradient 3s ease infinite;
}

@keyframes textGradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.quote.show {
  opacity: 1;
  transform: translateY(0);
}

/* Improved Theme Toggle (Right) */
.theme-toggle {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
}

[data-theme="light"] .theme-toggle {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(251, 191, 36, 0.06));
  border-color: rgba(245, 158, 11, 0.15);
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.1);
}

.theme-toggle:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

[data-theme="light"] .theme-toggle:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(251, 191, 36, 0.1));
  border-color: rgba(245, 158, 11, 0.25);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.theme-toggle i {
  font-size: 1.1rem;
  color: #3b82f6;
  transition: all 0.3s ease;
}

[data-theme="light"] .theme-toggle i {
  color: #f59e0b;
}

.theme-toggle:hover i {
  transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .navbar {
    padding: 1rem 4%;
  }
}

@media (max-width: 1024px) {
  .navbar {
    padding: 1rem 3%;
    gap: 0.8rem;
  }

  .brand-text {
    display: none;
  }

  .logo-icon {
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
  }

  .text-container {
    padding: 0.8rem 1.5rem;
    max-width: 415px;
  }

  .quote {
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.8rem 2%;
    gap: 0.6rem;
  }

  .dynamic-text-section {
    padding: 0 0.5rem;
  }

  .text-container {
    padding: 0.6rem 1rem;
    max-width: 335px;
  }

  .quote {
    font-size: 0.8rem;
  }

  .theme-toggle {
    width: 45px;
    height: 45px;
  }

  .theme-toggle i {
    font-size: 1rem;
  }
}

@media (max-width: 640px) {
  .text-container {
    padding: 0.5rem 0.8rem;
    max-width: 275px;
  }

  .quote {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 0.7rem 1.5%;
    gap: 0.4rem;
  }

  .logo-icon {
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
  }

  .dynamic-text-section {
    padding: 0 0.3rem;
  }

  .text-container {
    max-width: 215px;
    padding: 0.4rem 0.6rem;
  }

  .quote {
    font-size: 0.7rem;
  }

  .theme-toggle {
    width: 42px;
    height: 42px;
  }

  .theme-toggle i {
    font-size: 0.95rem;
  }
}

/* Focus states for accessibility */
.theme-toggle:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.logo:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 12px;
}
