/* 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;
}

/* 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 {
    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;
}

@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;
    animation: fadeInUp 1.5s ease-out;
    animation-delay: 0.5s; /* Delay for paragraph */
}

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


/* Main Content */
main {
    padding: 50px 20px;
    margin-top: 50px;
}

/* Project Container */
.project-container {
    display: flex;
    flex-direction: column;  /* Stack items vertically */
    justify-content: center;  /* Center items horizontally */
    align-items: center;      /* Center items vertically */
    gap: 20px;                /* Space between project displays */
    flex-wrap: wrap;
    padding: 30px;
    width: 100%;
    opacity: 0;
    animation: fadeInScale 1s ease-out forwards;
}

/* Project Display */
.project-display {
    align-items: center;
    gap: 20px;
    max-width: 600px;
    width: 100%;
    padding: 20px;
    background-color: #1c1c1e00;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.9); 
}

/* Preview (Image) Styling */
.preview {
    min-width: 300px;
    max-width: 600px;
    overflow: hidden; /* Prevents overflow if the image is larger than the container */
}

/* Make sure the image fits the container */
.project-preview {
    width: 100%; /* Take up full width of the container */
    height: 100%; /* Take up full height of the container */
    object-fit: cover; /* Ensure the image covers the container without stretching */
    border-radius: 8px; /* Optional: for rounded corners */
}
/* Description Styling */
.description {
    flex: 1;
    min-width: 300px;
    color: #fff;
    text-align: center;
}

.description h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.description p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #ddd;
}

.description .btn {
    width: 100px;
    height: 30px;
    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);
    text-decoration: none;
}

.description .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);
}

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

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .project-display {
        flex-direction: column;
    }

    .preview, .description {
        min-width: 100%;
    }

    .project-preview {
        height: 300px;
    }
}


/* Coding container */
.coding-container {
    position: relative;
    display: inline-block;
}

/* The code area where text will be typed */
#codeArea {
    white-space: pre-wrap;
    font-size: 24px; /* Font size for the code */
    line-height: 1.5;
    width: 100%;
    height: 80%;
    padding: 20px;
    border: none;
    outline: none;
}

/* Cursor blink effect */
.cursor {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 10px;
    height: 24px;
    background-color: #a57fa9;
    animation: blink 0.7s step-start infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

#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: 20px;
    background: rgba(0, 0, 0, 0.1);
}



/* Add this to the .project-container selector */
.project-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 100px;
    flex-wrap: wrap;
    padding: 30px;
    opacity: 0;
    animation: fadeInScale 1s ease-out forwards;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Add individual delays for each item to stagger them */
.project-display:nth-child(1) {
    animation: fadeInScale 1s ease-out forwards;
    animation-delay: 0.1s;
}

.project-display:nth-child(2) {
    animation: fadeInScale 1s ease-out forwards;
    animation-delay: 0.2s;
}

.project-display:nth-child(3) {
    animation: fadeInScale 1s ease-out forwards;
    animation-delay: 0.3s;
}

