body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    position: relative;
    overflow-x: hidden; /* Prevent horizontal scroll from animations */
}

header {
    background: #333;
    color: #fff;
    padding: 1rem 0;
}

nav ul {
    list-style: none;
    text-align: center;
}

nav ul li {
    display: inline;
    margin: 0 1rem;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
}

section {
    padding: 2rem 0;
    border-bottom: 1px solid #ddd;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    float: left;
    margin-right: 1rem;
}

h1, h2, h3 {
    color: #333;
}

ul {
    list-style-type: disc;
    margin-left: 1rem;
}

.job, .edu {
    margin-bottom: 1rem;
}

form {
    display: flex;
    flex-direction: column;
    max-width: 400px;
}

input, textarea {
    margin-bottom: 1rem;
    padding: 0.5rem;
}

button {
    padding: 0.5rem;
    background: #333;
    color: #fff;
    border: none;
    cursor: pointer;
}

footer {
    text-align: center;
    padding: 1rem 0;
    background: #333;
    color: #fff;
    position: relative;
}

/* GIF Animations */
.running-rams {  /* Fixed: Removed .gif extension */
    position: absolute;
    top: 50%;
    left: -200px; /* Start off-screen */
    width: 200px;
    z-index: 10;
    animation: runAcross 8s linear infinite; /* CSS animation */
}

.giphy {
    position: absolute;
    top: 50%;
    left: -200px; /* Start off-screen */
    width: 200px;
    z-index: 10;
    animation: runAcross 8s linear infinite; /* CSS animation */
}

.rams-gif {
    width: 50%;
    height: auto;
}

@keyframes runAcross {
    0% {
        left: -200px;
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px); /* Slight bounce */
    }
    100% {
        left: calc(100vw + 200px);
        transform: translateY(0);
    }
}

.working-man-gif {  /* Assuming this is for the working man GIF in About section */
    position: absolute;
    top: 20%;
    right: 10%;
    width: 150px;
    opacity: 0.5;
    animation: fadeIn 3s ease-in-out infinite alternate;
}

@keyframes fadeIn {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

.spiderman-gif {
    width: 100px;
    position: absolute;
    bottom: 10px;
    left: -100px; /* Start off-screen left */
    animation: spidermanRun 10s linear infinite; /* New animation for left to right */
}

@keyframes spidermanRun {
    0% {
        left: -100px;
    }
    100% {
        left: calc(100vw + 100px); /* Move off-screen right */
    }
}

/* Blood Rain Effect */
.blood-drop {
    position: absolute;
    width: 10px;
    height: 20px;
    background: #ff0000; /* Red color for blood */
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; /* Drop shape */
    z-index: 1000;
    animation: fall linear infinite;
}

@keyframes fall {
    0% {
        top: -20px;
        opacity: 1;
    }
    100% {
        top: 100vh;
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .profile-pic {
        float: none;
        display: block;
        margin: 0 auto;
    }
    .running-rams {
        width: 50px; /* Smaller on mobile/tablet, but still visible */
        animation: runAcross 12s linear infinite; /* Slower animation for better visibility */
    }
    .giphy {
        display: none; /* Hide on mobile to avoid clutter */
    }
    .working-man-gif, .spiderman-gif {
        width: 80px; /* Smaller on mobile */
    }
}

@media (max-width: 480px) {
    .running-rams {
        width: 60px; /* Even smaller on very small phones */
        animation: runAcross 15s linear infinite; /* Even slower for very small screens */
    }
    .working-man-gif, .spiderman-gif {
        width: 50px; /* Even smaller on very small phones */
    }
}