html, body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    height: 100%;
    overflow-x: hidden;
    color: #ccd6f6;
    background-color: #0a192f;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    background-color: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(10px);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(10, 25, 47, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    z-index: 10;
}

.navbar-logo {
    height: 40px;
    width: 40px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-item {
    color: #ccd6f6;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.nav-item:hover {
    color: #64ffda;
}

/* Mobile Navbar */
.navbar-toggler {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
}

.navbar-toggler .toggler-icon {
    width: 25px;
    height: 3px;
    background-color: #ccd6f6;
    margin: 5px 0;
    transition: background-color 0.3s ease;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .navbar-toggler {
        display: flex;
    }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        background-color: rgba(10, 25, 47, 1);
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 20px 0;
    }
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align content to the left */
    justify-content: center;
    text-align: left; /* Ensure text is left-aligned */
    min-height: 100vh; /* Full viewport height */
    padding: 0 40px; /* Add padding for spacing */
    max-width: 800px; /* Restrict width for alignment */
    margin: 0 auto; /* Center the block horizontally */
    position: relative; /* Maintain layering */
    z-index: 1; /* Ensure it stays above other elements */
}

.intro {
    font-size: 1.5rem;
    color: #64ffda;
    margin-bottom: 10px;
    text-align: left;
}

.name {
    font-size: 3.5rem; /* Slightly larger for emphasis */
    font-weight: bold;
    color: #ccd6f6;
    margin-bottom: 10px;
    line-height: 1.2; /* Adjust line height for proper spacing */
    text-align: left;
}

.headline {
    font-size: 2.5rem;
    font-weight: 700;
    color: #8892b0;
    margin-bottom: 20px; /* Add spacing below the headline */
    text-align: left;
}

.description {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #8892b0;
    max-width: 700px; /* Restrict width for readability */
    margin-top: 20px;
    text-align: left;
}


/* Footer */
.footer {
    text-align: center;
    padding: 20px 40px;
    background-color: rgba(10, 25, 47, 0.85);
    color: #ccd6f6;
    font-size: 1rem;
    position: relative;
    border-top: none;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    font-size: 1.5rem;
    color: #ccd6f6;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: #64ffda;
    transform: scale(1.2);
}

/* Loader */
#loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0a192f;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#loader-container svg {
    width: 100px;
    height: 100px;
}

/* Main content hidden initially */
#main-content {
    display: none;
}

@media (max-width: 768px) {
    .hero {
        padding: 60px 20px;
    }

    .name {
        font-size: 3rem;
    }

    .headline {
        font-size: 2rem;
    }

    .description {
        font-size: 1rem;
    }
}

.cursor {
    display: inline-block;
    font-size: 3.5rem;
    color: #ccd6f6;
    animation: blink 0.7s steps(2, start) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}


/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}


/* About Section */
.about {
    padding: 120px 20px;
    margin-top: 120px; /* Adds separation from Hero section */
    background-color: #0a192f;
    color: #ccd6f6;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    scroll-margin-top: 80px;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #64ffda;
    letter-spacing: 1px;
}

.about p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #ccd6f6;
}

.about a.btn {
    padding: 10px 20px;
    font-size: 1rem;
    border: 2px solid #64ffda;
    color: #64ffda;
    background-color: transparent;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.about a.btn:hover {
    background-color: #64ffda;
    color: #0a192f;
}

.about a.link {
    color: #64ffda;
    text-decoration: none;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 1px solid transparent;
}

    .about a.link:hover {
        color: #ccd6f6;
        border-bottom: 1px solid #64ffda;
    }
.hover-word {
    position: relative;
    display: inline-block;
    cursor: pointer;
    color: #64ffda;
    transition: color 0.3s ease;
}

    .hover-word:hover::before {
        content: attr(data-hover); /* Display replacement text */
        position: absolute;
        top: -1.5em; /* Adjust as per font size */
        left: 0;
        color: #ccd6f6;
        background-color: #112240;
        padding: 0 5px;
        border-radius: 4px;
        box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
        font-size: 0.9rem;
        white-space: nowrap;
        z-index: 10;
    }

    .hover-word:hover {
        color: #8892b0; /* Subtle change to the original word */
    }

    .hover-word:hover {
        animation: bounce 0.5s ease-in-out;
    }

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}



    /* Skills Section */
.skills {
    padding: 100px 20px;
    background-color: #0a192f;
    color: #ccd6f6;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.skills h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #64ffda;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    justify-items: center;
}

.skill-category {
    background-color: #112240;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #64ffda;
}

/* Skills Section */
.skills-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center-align logos */
    gap: 20px; /* Spacing between logos */
    padding: 10px 0;
}

.skill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 80px; /* Set a consistent width for each skill */
    height: 100px; /* Set a consistent height for each skill */
}

    .skill img {
        width: 60px; /* Set a uniform width */
        height: 60px; /* Set a uniform height */
        object-fit: contain; /* Ensure the logo fits inside */
        margin-bottom: 10px; /* Add space below the image */
        transition: transform 0.3s ease;
    }

    .skill:hover img {
        transform: scale(1.2); /* Slight zoom effect on hover */
    }

    .skill p {
        font-size: 0.9rem;
        color: #ccd6f6;
        margin: 0;
        opacity: 0; /* Initially hide text */
        transition: opacity 0.3s ease;
    }

    .skill:hover p {
        opacity: 1; /* Show text on hover */
    }
/* Projects Section */
.projects {
    padding: 100px 20px;
    background-color: #0a192f;
    color: #ccd6f6;
    text-align: center;
}

    .projects h2 {
        font-size: 2.5rem;
        margin-bottom: 40px;
        color: #64ffda;
    }

/* Filter Buttons */
.filter-buttons {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

    .filter-buttons button {
        background-color: #112240;
        color: #64ffda;
        border: none;
        padding: 10px 15px;
        cursor: pointer;
        border-radius: 4px;
        font-size: 1rem;
        transition: background-color 0.3s ease, color 0.3s ease;
    }

        .filter-buttons button:hover {
            background-color: #64ffda;
            color: #0a192f;
        }

/* Center Projects Grid */
.projects-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column; /* Ensures button stays below the grid */
    min-height: 100vh; /* Vertically centers content on larger screens */
}

/* Projects Grid */
.projects-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Adaptive layout */
    margin: 0 auto;
    width: 100%; /* Ensures proper alignment */
    max-width: 1200px; /* Restrict grid width for better visuals */
}

/* Adjustments for Specific Breakpoints */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr; /* Single column for mobile */
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr); /* Two columns for tablets */
    }
}

@media (min-width: 1025px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr); /* Three columns for larger desktops */
    }
}

    /* Hidden Section */
    .projects-grid.hidden {
        display: none; /* Ensure hidden section is invisible */
    }

#extra-projects {
    margin-top: 20px; /* Add margin above hidden section */
}

/* Project Card */
.project-card {
    background-color: #112240;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    width: 100%;
    max-width: 350px;
    padding-bottom: 20px;
    position: relative;
}

    .project-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
    }

    .project-card img {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }

    .project-card h3 {
        font-size: 1.8rem;
        margin: 15px;
        color: #64ffda;
    }

    .project-card p {
        font-size: 1.1rem;
        line-height: 1.6;
        margin: 0 15px 15px 15px;
        color: #ccd6f6;
    }

/* Project Tags */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 15px 15px 15px;
}

    .project-tags span {
        background-color: #1c3d63;
        color: #64ffda;
        font-size: 0.9rem;
        padding: 5px 10px;
        border-radius: 20px;
        cursor: pointer;
        transition: background-color 0.3s ease, color 0.3s ease;
    }

        .project-tags span:hover {
            background-color: #64ffda;
            color: #0a192f;
        }

/* Badges */
.badge {
    background-color: #ff5733;
    color: white;
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 12px;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
    font-weight: bold;
}

.featured-badge {
    background-color: #64ffda;
    color: #0a192f;
}

/* View More Button */
#view-more-btn {
    background-color: #112240;
    color: #64ffda;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin: 20px auto;
    display: block;
}

    #view-more-btn:hover {
        background-color: #64ffda;
        color: #0a192f;
    }

/* Active Filter Button */
.filter-buttons button.active {
    background-color: #64ffda;
    color: #0a192f;
    font-weight: bold;
    cursor: default; /* Show that it's already active */
}
/* Contact Section */
.contact {
    padding: 120px 20px;
    text-align: center;
    background-color: #0a192f;
    color: #ccd6f6;
    scroll-margin-top: 80px;
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #64ffda;
}

.contact p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 40px;
    color: #8892b0;
}

#toggle-form-btn {
    padding: 10px 20px;
    font-size: 1rem;
    color: #64ffda;
    background-color: transparent;
    border: 2px solid #64ffda;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

    #toggle-form-btn:hover {
        background-color: #64ffda;
        color: #0a192f;
    }

form {
    display: none;
    opacity: 0;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
    animation: fadeIn 0.5s ease forwards; /* Default fade-in animation */
}

    form.hide {
        animation: fadeOut 0.5s ease forwards; /* Fade-out animation when hiding */
    }

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

label {
    font-size: 1rem;
    color: #8892b0;
    margin-bottom: 5px;
}

input, textarea {
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #8892b0;
    border-radius: 5px;
    background-color: #112240;
    color: #ccd6f6;
    transition: border-color 0.3s ease;
}

    input:focus, textarea:focus {
        outline: none;
        border-color: #64ffda;
    }

.btn {
    padding: 10px 20px;
    font-size: 1rem;
    color: #64ffda;
    background-color: transparent;
    border: 2px solid #64ffda;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .btn:hover {
        background-color: #64ffda;
        color: #0a192f;
    }

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

    .social-links a {
        font-size: 1.5rem;
        color: #ccd6f6;
        transition: color 0.3s ease, transform 0.3s ease;
    }

        .social-links a:hover {
            color: #64ffda;
            transform: scale(1.2);
        }

/* Thank You Message */
.thank-you-message {
    display: none; /* Initially hidden */
    opacity: 0;
    font-size: 1.2rem;
    color: #64ffda;
    animation: fadeIn 0.5s ease forwards;
    margin-top: 20px;
}


/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}
