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

html, body {
    height: 100%;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    background-color: #000;
    display: flex;
    flex-direction: column;
    font-family: 'Fira Code', monospace;
    cursor: url('../images/cursor1.png'), auto;

}

/* Preloader Styles */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #9b59b6;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Header Styling */
header {
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 0.5rem 0; /* Reduced padding for smaller navbar */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    
}

.navbar {
    display: flex;
    justify-content: center;  /* Centers the navbar */
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px; /* Reduced padding for a more compact design */
    position: relative;
}


.nav-links {
    list-style: none;
    display: flex;
    justify-content: space-evenly;  /* Spreads out the nav items evenly */
    width: 100%;  /* Ensures the space is distributed across the whole navbar */
    padding: 0;
    margin: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-links li {
    margin-left: 15px; /* Reduced spacing between nav items */
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    font-size: 1rem; /* Reduced font size */
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #9b59b6;
}

/* Dropdown Menu */
.portfolio {
    position: relative;  /* To position the dropdown relative to the portfolio item */
}

.portfolio .dropdown {
    display: none;  /* Hide by default */
    position: absolute;  /* Position it below the Portfolio item */
    top: 100%;  /* Position directly below */
    background-color: rgba(0, 0, 0, 0.9);  /* Matches the navbar background */
    padding: 0;
    margin: 0;
    list-style: none;
    width: 250px;  /* Adjust the width as needed */
    border-radius: 5px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);  /* Adds a subtle shadow */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    margin-left: -60px;
}

.portfolio:hover .dropdown {
    display: block;
    opacity: 1;
    visibility: visible;  /* Show the dropdown when hovering over Portfolio */
}

.dropdown li {
    padding: 10px;

}

.dropdown li:last-child {
    border-bottom: none;  /* Remove the last border */
}

.dropdown a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    display: block;
    padding: 0px 0px;
    margin-left: 10px;
    transition: background-color 0.3s ease, padding 0.3s ease;
}

.dropdown a:hover {
    color: #fff;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    background: #fff;
    height: 3px;
    width: 25px;
    margin: 4px 0;
    transition: 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    position: relative;
    top: 8px;
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    position: relative;
    top: -8px;
}

/* Hero Section */
.hero {
    height: 100vh; 
    background: linear-gradient(to bottom, rgba(130, 100, 162, 0.573), rgba(0, 0, 0, 0.9));
    background-size: cover;
    color: #fff;
    text-align: center;
    padding: 120px 20px;
    margin-top: 40px;
    flex: 1;
    transition: background-position 0.1s ease-out;
    background-position: center center;
    animation: moveBackground 20s infinite linear;
}

.hero-content {
    text-align: center;
}


@keyframes moveBackground {
    0% {
        background-position: center center;
    }
    100% {
        background-position: center top;
    }
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    animation: fadeInUp 1s ease-out;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 25px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Styling */
.btn {
    width: 180px;
    height: 40px;
    font-family: 'Fira Code', monospace;
    background-color: rgba(255, 255, 255, 0);
    color: white;
    border: 3px solid rgba(255, 255, 255, 0);
    border-radius: 50px;
    font-size: 15px;
    pointer-events: auto; /* Allow interaction with the button */
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.9);
}

.btn:hover {
    background: rgba(130, 100, 162, 0.142);
    color: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.9);
    transform: translateY(-5px);
}

/* Button 1 Styling */
.btn1 {
    background: #9c59b600; /* Transparent background */
    color: #fff;
    text-decoration: none;
    padding: 10px 15px;
    font-size: 0.9rem;
    border-radius: 5px; /* Same radius as the button */
    border: 2px solid transparent; /* Creates a transparent border to apply the gradient */
    background-clip: padding-box; /* Ensures the background doesn't cover the border */
    border-image: linear-gradient(to right, rgba(208, 183, 236, 0.817), rgba(130, 100, 162, 0.7)) 1; /* Two-colored gradient border */
    transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
    font-family: 'Fira Code', monospace;
}

.btn1:hover {
    transform: translateY(-5px);
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


/* Section Transitions */
.fade-in-section {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Portfolio Section */
#work {
    padding: 60px 20px;
    text-align: center;
    margin-top: 100px;
}

#work h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

#work p {
    margin-bottom: 20px;
}

/* About Section */
#about {
    display: flex;               /* Use flexbox layout */
    flex-direction: column;      /* Stack items vertically */
    justify-content: center;     /* Center items vertically */
    align-items: center;         /* Center items horizontally */
    height: 100vh;               /* Make the section take up the full viewport height */
    text-align: center;          /* Center the text */
    padding: 20px;               /* Add some padding around the section */
  }

  /* Optional: Add some spacing between the elements */
  #about h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;        /* Space between the heading and paragraph */
  }

  #about p {
    margin-bottom: 20px;         /* Space between the paragraph and the image */
  }

  #about img {
    width: 80%;                  /* Make the image responsive, adjust width as needed */
    max-width: 400px;            /* Limit the maximum width of the image */
    height: auto;                /* Maintain aspect ratio */
    margin-bottom: 20px;         /* Space between the image and the button */
  }

  #about button {
   margin-top: 20px;
  }


/* Contact Section */
#contact {
    padding: 60px 20px;
    text-align: center;
}

#contact h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.button6{
    margin-top: 20px;
}

/* Footer Styling */
footer {
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    color: #e0e0e0;
    padding: 10px 0;
    flex-shrink: 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 40px;
        right: 0;
        background: rgba(0, 0, 0, 0.9);
        flex-direction: column;
        align-items: center;
        width: 100%;
        transform: translateY(-150%);
        opacity: 0;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-links li {
        margin: 15px 0;
    }

    .menu-toggle {
        display: flex;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .hero-content img {
       width: 50%;
    }
}


/* GitHub and LinkedIn Icons */
.github-icon, .linkedIn-icon {
    font-size: 25px;
    color: #fff;
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s;
}

.github-icon:hover, .linkedIn-icon:hover {
    transform: scale(1.1);
    color: #9b59b6;
}

img{
    width: 600px;
    height: 120px;
}


/* Mobile Responsiveness */
@media (max-width: 768px) {
    .portfolio-cards {
        flex-direction: column;
        gap: 15px;
    }
}


/* Portfolio Section */
#work {
    padding: 60px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
}

#dots-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Make sure it doesn't block other elements */
  }
  
  canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 85%;
    margin-top: 40px;
    background: rgba(0, 0, 0, 0.1);
  }

  #particleCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
  }

  #mySVG {
    width: 100%;   /* Scale to 100% of the screen width */
    height: auto;  /* Maintain the aspect ratio */
    max-width: 800px; /* Optional: limit the maximum width */
    margin-top: 20px;
}

.button-container {
    position: absolute;
    pointer-events: auto; /* Allow mouse events */
}

.button1, .button2, .button3, .button4, .button5, .button6{
    width: 120px;
    height: 40px;
    font-family: 'Fira Code', monospace;
    background-color: rgba(255, 255, 255, 0);
    color: white;
    border: 3px solid rgba(255, 255, 255, 0);
    border-radius: 50px;
    font-size: 12px;
    pointer-events: auto; /* Allow interaction with the button */
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.9); /* Glowing effect */
}

.button1:hover, .button2:hover, .button3:hover, .button4:hover, .button5:hover, .button6:hover{
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.968); /* Glowing effect */
    fill: rgba(255, 255, 255, 0.7); /* Change color */
    transform: translateY(-5px);
}


