*{
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cambria', Cochin, Georgia, Times, 'Times New Roman', serif;
    background-color: #c2cdcd;
}

nav {
    position: sticky;
    top: 0;
    transition: background-color 0.3s; 
    z-index: 1000;
}
  
  nav ul {
    display: flex;
    padding-left: 25%;
    justify-content: center;
    list-style: none;
    background-color: #444;
    margin: 0;
    padding: 0;
  }
  
  nav ul li {
    list-style-type: none;
    margin: 0 15px;
  }
  
  nav ul li a {
    font-size: 20px;
    text-decoration: none;
    padding: 10px 20px;
    display: block;
    border: 2px solid whitesmoke 0.8;
    border-radius: 3px;
    color: #fff;;
  }

  nav ul li a:hover,
  .active {
    background-color: #1991e1;
    color:rgb(218, 206, 206);
    transition: 0.3s ease-in-out;
  }

/* Hero section styling */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, rgba(172, 148, 103, 0.888) 0%, #62829a 100%);
    text-align: center;
}

/* Styling for the name */
.hero h1 {
    font-size: 4rem;
    font-weight: bold;
    margin: 0;
    color: rgb(218, 206, 206);
}

.hero img{
    border-radius: 50%;
}

/* Styling for the description */
.hero p.id1 {
    font-size: 1.5rem;
    font-style: italic;
    margin: 10px 0;
}

.hero p.id2 {
    font-size: 1.5rem;
    font-style: italic;
    margin: 10px 0;
}

.hero span {
    font-style: normal;
    font-size: 24px;
}

/* Smooth scrolling animation */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(15px);
    }
}

section {
    padding: 50px 20px;
    width: 100%;
    height: auto;
}

.project {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers content inside cards */
    padding: 20px;
    margin: 0 2%;
    background-color: rgb(239, 239, 239); 
    height: 460px;  
    width: 400px; 
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease-in-out; /* Smooth transformation on hover */
}

.project img {
    width: 90%; /* Ensures the image fits the card */
    height: auto; /* Keeps the aspect ratio of the image */
    margin-bottom: 15px; /* Space between image and text */
    border-radius: 5px;
    border: 2px solid rgb(210, 169, 108);
    margin: 6px 8px;
    background-color: rgb(216, 212, 212);
}

.project img:hover {
     opacity: 0.85;
}

.project-description {
    position: absolute;
    margin-top: 270px;
    display: inline-block;
    justify-content: center; /* Center button horizontally */
    align-items: center; /* Center button vertically */
    height: 100%; /* Adjust height as needed */
}

.project-description a{
    display: block;
    text-align: center;
    padding: 6px;
    color: #333;
    text-decoration: none;
    border: 1px solid rgb(6, 86, 6);
}

.project-description a:hover{
    background-color: rgb(131, 131, 15);
    color: white;
    transition: 0.3s ease-in-out;
}

.project:hover {
    transform: translateY(-5px); /* Lifts the card slightly on hover */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); /* Enhances shadow on hover */
}

#container {
    display: flex;
    width: 60%;
    margin: 3% auto;
    justify-content: center;
    align-items: center;
}

section h2{
    text-align: center;
    font-size: 22px;
    font-family: monospace;
}

#skills h2{
    padding: 3% 0;
    text-align: center;
}

.skills-section {
    width: 100%;
    box-sizing: border-box;
    padding: 20px;
    background-color: rgba(196, 183, 159, 0.888);
    color: #333;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.skill-category {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.skill-category h3 {
    color: #007BFF; /* Blue headers for categories */
}

.skill-category ul {
    list-style: none;
    padding: 0;
    margin-top: -4px;
    display: inline-block;
    justify-content: center;
}

.skill-category li {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    position: relative;
    cursor: pointer;
}

.skill-category li a{
    text-decoration: none;
    color: #333;
}

.skill-category li:last-child {
    border-bottom: none;
}

.skill-category:last-child {
    justify-self: center; /* Center only the last item */
    grid-column: 1 / -1; /* Make the last item take the full row */
    width: 300px;
}

.skill-category li::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%; /* Start from the middle */
    width: 0; /* Initial width is 0 */
    height: 1.6px; /* Border height */
    background-color: rgb(37, 148, 239); /* Border color */
    transition: 0.3s ease-in-out;
    transform: translateX(-50%); /* Center the border */
}

.skill-category li:hover::after {
    width: 100%; /* Full width on hover */
    left: 0; /* Align to the left edge */
    transform: translateX(0%); /* Reset transform */
}

img.icon{
    margin: 4px 6px -4px 6px;
    cursor: pointer;
}

footer {
    text-align: center;
    padding: 20px 0;
    background-color: #333;
    color: #fff;
}

/* Media Query for screens smaller than 600px */
@media (max-width: 600px) {
    .hero h1{
        font-size: 36px;
        padding: 10px;
    }

    .hero p.id1, .hero p.id2{
        font-size: 16px;
    }

    nav {
        width: 100%; 
        margin: 0;
        padding: 0;
        background-color: #444; /* same color as your existing navbar */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        position: static; /* if you want it non-sticky under 600px */
    }

    nav ul {
        width: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
        display: flex;
        flex-direction: column;
        align-items: stretch; 
    }

    nav ul li {
        width: 100%;
        margin: 0; /* reduce extra spacing */
        border-bottom: 1px solid #ccc; /* optional separator line */
        text-align: center; 
    }

    nav ul li a {
        display: block; /* makes the entire row clickable */
        padding: 15px 20px;
        text-decoration: none;
        background-color: transparent;
    }

    .project {
        width: 100%; /* Full width to use the available space */
        margin: 10px 0; /* Adjust margin for vertical spacing */
        height: auto; /* Adjust height as needed */
    }

    .project-description {
        margin-top: 10px; /* Reset margin */
        position: static; /* Remove absolute positioning */
    }

    /* Adjust skills container to display items in a single column */
    .skills-container {
        display: grid;
        grid-template-columns: 1fr; /* Single column layout */
        gap: 20px; /* Space between skills */
    }

    /* Adjusting the overall container for projects and skills */
    #container {
        flex-direction: column; /* Stack vertically */
        width: 80%; /* Full width for container */
        margin: 20px auto; /* Centering and adding vertical space */
    }

    #contact {
        display: flex;
        flex-direction: column;
        align-items: center; /* Align items to the center */
        text-align: center; /* Center-align the text */
        width: 100%; /* Full width */
        padding: 20px; /* Add some padding around */
    }

    /* If the contact section uses list items, align these as well */
    #contact ul {
        padding: 0; /* Remove padding */
        list-style: none; /* Remove list style */
    }

    #contact ul li {
        width: 100%; /* Full width to fit the container */
    }

    #contact ul li a {
        display: block; /* Block display to fill the width */
        padding: 10px; /* Add padding for better tap targets */
    }
    nav {
        position: static; /* Changes navbar to non-sticky on smaller screens */
        background-color: inherit; /* Optionally ensure the background color matches the non-sticky state */
    }
}

.hero {
    background: radial-gradient(circle at center, rgba(172, 148, 103, 0.888) 0%, #62829a 100%);
    position: relative;
}

.hero img {
    mix-blend-mode: multiply; /* This will blend the image with the gradient background */
    opacity: 0.85; /* Optional: Makes the image slightly transparent */
}

#contact p{
    margin-left: 40px;
}

#contact a{
    text-decoration: none;
    color: #333;
}
