body {
    background-image: url(images/about-bg.jpg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    transition: background-position 0.1s ease;
    color: rgb(250, 250, 250);
}

/* Navigation Bar (fallback) */
nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

/* Fallback code if global CSS fails */
.card-img {
    width: 100%;
    height: 200px;
}

.cards {
    display: flex;
    justify-content: space-around;
}

.card {
    position: relative;
    width: 300px;
}

.card-desc {
    text-align: center;
}

#write-cards {
    padding-top: 6vmin;
}

main #education {
    padding: 2.5vmax 10vmin;
}

main #education h1 {
    text-align: center;
    padding-bottom: 4vh;
}

/* Headings and h1 animations */
main h1 {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
}

main h1.show {
    opacity: 1;
    transform: translateY(0);
}

main h2 {
    padding: var(--def-padding);
    font-size: clamp(1.3rem, 2vw, 1.7rem);
    margin-top: var(--def-padding);
}

/* Animated curly underline */
.curly-underline {
    font-family: cursive;
    display: inline-block;
    /* Needed for absolute positioning of pseudo-element */
    position: relative;
    background: linear-gradient(to right, #9500ff, #d000ff, #b02797);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 1;
}

/* Create the underline using the ::after pseudo-element */
.curly-underline::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #9500ff, #d000ff, #b02797);
    background-size: 200% 100%;
    animation: cUnderline 1s ease-in-out infinite;
}

/* Animation for the underline */
@keyframes cUnderline {
    0% {
        background-position: 100% 0;
    }

    50% {
        background-position: 50% 0;
    }

    100% {
        background-position: 100% 0;
    }
}

/* Read more and read less transitions */
#digital-awareness .incident-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease;
}

#digital-awareness .incident-details.show {
    max-height: max-content;
    opacity: 1;
}

/* Hide the Read More button smoothly */
.incident-summary button.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    position: absolute; /* Takes it out of normal flow */
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.incident-summary button {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}