/* Base styles */
:root {
  --bg-color: #111827;
  --text-color: #e2e8f0;
  --accent-color: #d946ef;
  --secondary-bg: #1e293b;
  --glow-color: rgba(217, 70, 239, 0.5);
  --navbar-bg: rgba(30, 41, 59, 0.7);
  --footer-bg: #1a2234;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  padding-top: 80px; /* Space for fixed navbar */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  flex: 1;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  display: flex;
  justify-content: center;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 90%;
  max-width: 1200px;
  padding: 0.5rem 1.5rem;
  background-color: var(--navbar-bg);
  backdrop-filter: blur(8px);
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.navbar-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
  cursor: pointer;
}

.navbar-menu {
  display: flex;
  list-style: none;
  align-items: center;
}

.navbar-item {
  margin-left: 1.5rem;
}

.navbar-link {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.navbar-link:hover, .navbar-link.active {
  color: var(--accent-color);
}

.navbar-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.navbar-link:hover::after, .navbar-link.active::after {
  width: 100%;
}

.navbar-toggle {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  transition: all 0.3s ease;
  background-color: var(--text-color);
  border-radius: 3px;
}

/* Header and profile */
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 3rem;
  text-align: center;
}

.profile-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 3px solid var(--accent-color);
}

h1 {
  font-size: 3.5rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.5rem;
  color: var(--text-color);
  opacity: 0.9;
}

.cursor {
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Sections */
section {
  margin-bottom: 3rem;
}

h2 {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* Technologies */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.tech-item {
  background-color: var(--secondary-bg);
  padding: 1rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.tech-item i {
  font-size: 1.5rem;
}

/* Projects */
.project {
  background-color: var(--secondary-bg);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.project a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.1rem;
}

/* Projects Page */
.projects-header {
  margin-bottom: 2rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background-color: var(--secondary-bg);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.project-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.8);
  border-radius: 0.5rem 0.5rem 0 0;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-content {
  padding: 1.5rem;
}

.project-content h3 {
  font-size: 1.5rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.project-links {
  display: flex;
  margin-top: 1rem;
  gap: 1rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 50px;
  transition: all 0.3s ease;
}

.project-link:hover {
  background-color: var(--accent-color);
  color: white;
}

/* Contact */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-links a {
  background-color: var(--secondary-bg);
  padding: 1rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.1rem;
}

.arrow {
  margin-left: auto;
  transition: transform 0.3s ease;
}

/* Footer */
.footer {
  background-color: var(--footer-bg);
  padding: 3rem 0 1rem;
  margin-top: 3rem;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-color) 0%, #9333ea 100%);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.footer-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-color);
}

.footer-section h3 {
  color: var(--accent-color);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-color);
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--secondary-bg);
  border-radius: 50%;
  color: var(--text-color);
  font-size: 1.2rem;
  transition: all 0.3s ease;
  text-decoration: none; /* Remove underline */
}

.social-icon:hover {
  background-color: var(--accent-color);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-credit {
  margin-top: 0.5rem;
}

.footer-credit i {
  color: #ff6b6b;
  margin: 0 0.2rem;
}

/* Glow effect */
.glow-effect {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.glow-effect:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 15px var(--glow-color);
}

.glow-effect:hover .arrow {
  transform: translateX(5px);
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 3rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .tech-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  /* Mobile navbar */
  .navbar-toggle {
    display: block;
  }
  
  .navbar-menu {
    position: absolute;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--navbar-bg);
    backdrop-filter: blur(8px);
    width: 100%;
    border-radius: 0 0 20px 20px;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
    padding: 1rem 0;
  }
  
  .navbar-menu.active {
    left: 0;
  }
  
  .navbar-item {
    margin: 1rem 0;
  }
  
  .navbar-container {
    border-radius: 20px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .social-icons {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .profile-img {
    width: 120px;
    height: 120px;
  }
  
  .navbar-container {
    width: 95%;
    padding: 0.5rem 1rem;
  }
  
  .navbar-logo {
    font-size: 1.2rem;
  }

/* Updated particles canvas styling */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -10; /* Much lower z-index to ensure it's behind everything */
  pointer-events: none;
  display: block; /* Ensure it's displayed as a block element */
}

/* Ensure body takes up full height */
html, body {
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  padding-top: 80px; /* Space for fixed navbar */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative; /* Ensure proper stacking context */
}

/* Make sure content containers have a higher z-index */
.container, .navbar, .footer {
  position: relative;
  z-index: 1;
}

/* Add a semi-transparent background to main content areas to ensure text readability */
.container {
  background-color: rgba(17, 24, 39, 0.7); /* Slightly transparent bg-color */
  border-radius: 1rem;
  backdrop-filter: blur(5px);
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}

/* Ensure footer has proper z-index and background */
.footer {
  background-color: var(--footer-bg);
  position: relative;
  z-index: 1;
  margin-top: auto; /* Push footer to bottom */
}
