body {
    background: linear-gradient(
        to bottom,
        #1a001f 0%,     
        #000000 30%,
        #1a001f 60%,    
        #000000 80%,    
        #24002e 100%    
    );
    opacity: 0;
    animation: fadein 1.5s ease-in-out forwards;
    visibility: hidden;
    scroll-behavior: smooth;
}

/* Fade-in animation */
@keyframes fadein {
    0% {
        opacity: 0;
        visibility: visible;
    }
    100% {
        opacity: 1;
        visibility: visible;
    }
}

.navbar ul {
    display: flex;
    padding: 25px;
    margin: 10px;
    list-style-type: none;
    justify-content: center;
    overflow: hidden;
    border-radius: 5px;
}

.navbar a {
    display: flex;
    text-decoration: none;
    font-size: 21px;
    padding: 10px 20px;
    margin: 1px 20px;
    text-align: center;
    justify-content: center;
    color: white;
    background-color: transparent;
    position: relative;
    transition: background-color 0.3s ease, color 0.5s ease;
}

.navbar a::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    height: 2px;
    width: 50px;
    background-color: white;
    border-radius: 50%;
    width: 0;
    transition: width 0.3s ease;
}

.navbar a:hover {
    color: gold;
}

.navbar a:hover::after {
    width: 60%;
}

.navbar {
    background: transparent;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.1);
}
  

.img{
    display: flex;
    margin-top: 5%;
    justify-content: left;
    align-items: left ;
    height: 2.8in;
    margin-left: 10%;
    transition: transform 1.5s ease;
}


.img:hover{
    transform: scale(1.1); 
}
.bio h2{
    color: white;
    position: relative;
    gap: 20px;
    font-size: 7vh;
    display: flex;
    justify-content: center;
    top: -180px;
    text-align: center;
    font-family: 'Cinzel', sans-serif;
    margin-left: 100px;
}
 #para h1, #Hobbies h1, #skill h1, #contact h1{
    color: white;
    text-align: center;
    font-family: 'Times New Roman',sans-serif;
}
#project{
    color: white;
    text-align: center;
    font-family: 'Times New Roman' sans-serif;
}

#para p, #project p, #Hobbies p, #skill li, #contact p, #contact li {
    color: white;
    font-size: 28px;
    font-family: 'Cinzel', sans-serif;
    padding: 10px;
    text-align: center;
}

#skill ol, #contact ol {
    list-style-position: inside;
    align-items: center;
    text-decoration: none;
}

#contact a {
    text-decoration: underline;
    color: red;
}


.copyright p {
    color: white;
    text-align: center;
}

/* Media Queries for Mobile Responsiveness */
@media only screen and (max-width: 768px) {
    .navbar ul {
        flex-direction: column;
    }

    .navbar a {
        font-size: 18px;
        padding: 10px;
    }

    img {
        height: 150px; /* Adjust image size for smaller screens */
    }

    #para p, #project p, #Hobbies p, #skill li, #contact p, #contact li {
        font-size: 20px;
    }
}

@media only screen and (max-width: 480px) {
    .navbar ul {
        padding: 10px;
    }

    .navbar a {
        padding: 8px 15px;
    }

    img {
        height: 120px;
    }

    #para p, #project p, #Hobbies p, #skill li, #contact p, #contact li {
        font-size: 18px;
    }
}
/* Fade-in for scroll */
.scroll-fade {
    opacity: 0;                  /* start invisible */
    transform: translateY(20px); /* slight move up */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-fade.visible {
    opacity: 1;
    transform: translateY(0);
}
/* Initial state: hidden */
.img, .bio, #para, #project, #Hobbies, #skill, #contact {
    opacity: 0;
    transform: translateY(30px);   /* slightly bigger movement */
    transition: opacity 2s ease-out, transform 2s ease-out; /* slower fade */
}

/* Visible state: fades in */
.img.visible, .bio.visible, #para.visible, #project.visible, #Hobbies.visible, #skill.visible, #contact.visible {
    opacity: 1;
    transform: translateY(0);
}

