/* CSS Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables for animations */
:root {
    --underline-duration: 0.3s;    /* Duration for underline animation */
    --image-tilt-angle: 1deg;      /* Angle of tilt on hover */
    --image-scale-factor: 1.08;    /* Scale factor on hover */
    --image-hover-duration: 0.3s;  /* Duration of hover transition */
    --shake-duration: 0.25s;       /* Duration of each shake segment */
    --shake-intensity: 5px;        /* Intensity of shake movement */
    --shake-interval: 8s;          /* Total duration of the animation */
    --breathing-duration: 3s;      /* Duration of the breathing animation */
}

/* General styling for the body */
body {
    background-color: black;
    color: white;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Header styling with breathing animation */
h1 {
    text-align: center;
    margin: 1.25rem 0;
    animation: breathing var(--breathing-duration) infinite;
}

/* Breathing animation */
@keyframes breathing {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Styling for the image link */
.image-link img {
    max-width: 100%;
    height: auto;
    border: 2px solid white;
    border-radius: 10px;
    transform: translate3d(0, 0, 0);
    animation: shake var(--shake-interval) infinite linear;
    animation-duration: 8s;
    animation-delay: 3s;

    transition: transform var(--image-hover-duration) ease;
}

.image-link img:hover {
    transform: rotate(var(--image-tilt-angle)) scale(var(--image-scale-factor));
}

/* Shake animation */
@keyframes shake {
    2%, 18% {
        transform: translate3d(-5px, 0, 0);
    }
    4%, 16% {
        transform: translate3d(5px, 0, 0);
    }
    6%, 10%, 14% {
        transform: translate3d(-5px, 0, 0);
    }
    8%, 12% {
        transform: translate3d(5px, 0, 0);
    }
    18.1% {
        transform: translate3d(0px, 0, 0);
    }
}

/* Footer styling */
footer {
    margin-top: 1.25rem;
    font-size: 0.9em;
    text-align: center;
}

footer a {
    color: orange;
    text-decoration: none;
    font-weight: bold;
    position: relative;
}

footer a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: orange;
    transition: width var(--underline-duration) ease;
}

footer a:hover::after {
    width: 100%;
}

footer a:hover {
    text-decoration: none;
}
