nav {
    position: fixed;
    top: 0; 
    width: 100%;
    height: 113px;
    background: #F2F2F2;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
}

.nav-items {
    display: flex;
    gap: 40px;
    margin-right: 50px;
}

#active {
    color: #0459BC;
    border-bottom: 2px solid #0459BC;
    display: inline-block; /* This makes the padding effective */
    padding-bottom: 0px;
}

@media screen and (min-width: 1161px) {
    .websites {
        margin-bottom: 0px;
    }   
}

/* Hover Animation */
.nav-items a:not(.name):hover {
    color: #017BFF; /* Change color on hover */
    cursor: pointer;
    transition: color 0.3s ease; /* Smooth color transition */
}

/* Click (Active) Animation */
.nav-items a:not(.name):active {
    color: #0459BC; /* Color when clicked or selected */
    transform: scale(0.97); /* Slightly shrink links when clicked */
    transition: transform 0.1s ease; /* Smooth transform transition */
}

.name {
    color: #000;
    font-family: Italiana, sans-serif;
    font-size: 48px;
    font-style: normal;
    font-weight: 400;
    margin-left: 50px;
    text-decoration: none;
}

.nav-items a {
    color: #000;
    font-family: Inter, sans-serif;
    font-size: 32px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-decoration: none;
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    display: none;
    padding: 15px;
    outline: none;
    position: relative;
    margin-right: 35px;
    transform: scale(1.15);
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    position: absolute;
    left: 0;
    transition: top 0.15s ease-in-out, transform 0.15s 0.15s ease-in-out, opacity 0.15s ease-in-out;
}

/* Adjusted default state of hamburger lines when nav is closed */
.hamburger .hamburger-line:nth-child(1) {
    top: 0; /* Position at the top */
}

.hamburger .hamburger-line:nth-child(2) {
    top: 10px; /* Position in the middle */
    opacity: 1; /* Make the middle line visible */
}

.hamburger .hamburger-line:nth-child(3) {
    top: 20px; /* Position at the bottom */
}

/* Transform hamburger into 'X' when nav is active */
.hamburger-x .hamburger-line:nth-child(1),
.hamburger-x .hamburger-line:nth-child(3) {
    top: 10px; /* Align both to the middle */
    transform: rotate(45deg);
}

.hamburger-x .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-x .hamburger-line:nth-child(3) {
    transform: rotate(-45deg);
}

.hamburger-toggle .hamburger-line {
    opacity: 1;
}

@media screen and (max-width: 960px) {
    .hamburger {
        display: block;
        order: -1;
        z-index: 1100;
    }

    .nav-items {
        position: fixed;
        top: 113px; /* This is the height of your nav bar. Adjust if your nav bar height changes */
        right: 0;
        margin-right: 0;
        width: 250px;
        background: #F2F2F2; /* Or any color you want for the background */
        display: flex;
        flex-direction: column; /* Stack the links vertically */
        align-items: center;
        transform: translateX(150%);
        transition: transform 0.3s ease-in-out;
        z-index: 900;
        box-shadow: -4px 4px 4px 0px rgba(0, 0, 0, 0.25); 
        border-top: .25px solid black;
    }    

    .nav-items a {
        z-index: 950;
    }

    nav {
        display: flex;
        flex-direction: row-reverse;
        z-index: 1000;
    }

    .nav-slide-in {
        transform: translateX(0);
    }  
    
    .home {
        padding-top: 35px;
    }.about-me{
        padding-top: 35px;
    }

    .websites {
        margin-bottom: 45px;
    }
}

/* Fade in effect for navigation links */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Fade out effect for navigation links */
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.nav-inactive {
    animation: fadeOut 0.5s ease-out forwards; /* Apply fade-out effect */
    left: 10px; /* Ensure this matches the nav-active setting */
    margin-left: 28px;
}

.nav-active {
    animation: fadeIn 0.5s ease-in forwards; /* Apply fade-in effect */
    left: 10px; /* Ensure this matches the nav-active setting */ 
    margin-left: 0px;
}