/* About Text Highlights & Animation Styles */

/* Base highlight style */
.highlight-phrase {
    position: relative;
    display: inline-block;
    z-index: 1;
    font-weight: 800;
    padding: 0 4px;
    color: var(--text-primary);
}

.about-row-content strong {
    position: relative;
    display: inline-block;
    z-index: 1;
    font-weight: 800;
    padding: 0 4px;
    color: var(--text-primary);
}

.highlight-phrase::after,
.about-row-content strong::after {
    content: '';
    position: absolute;
    left: -2px;
    right: -2px;
    bottom: 3px;
    height: 92%;
    background: var(--accent-color);
    opacity: 0.35;
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left;
    border-radius: 2px;
    animation: highlightDraw 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Keyframe animation for automatic highlighting */
@keyframes highlightDraw {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

/* Mobile fixes for bold text */
@media (max-width: 991px) {
    .phrase-limit {
        font-weight: 400 !important;
        -webkit-font-smoothing: antialiased;
    }
}

/* Stagger animation delays for cascade effect */
.about-row-content strong:nth-of-type(1)::after,
.highlight-phrase:nth-of-type(1)::after {
    animation-delay: 0.1s;
}

.about-row-content strong:nth-of-type(2)::after,
.highlight-phrase:nth-of-type(2)::after {
    animation-delay: 0.22s;
}

.about-row-content strong:nth-of-type(3)::after,
.highlight-phrase:nth-of-type(3)::after {
    animation-delay: 0.34s;
}

.about-row-content strong:nth-of-type(4)::after,
.highlight-phrase:nth-of-type(4)::after {
    animation-delay: 0.46s;
}

.about-row-content strong:nth-of-type(5)::after,
.highlight-phrase:nth-of-type(5)::after {
    animation-delay: 0.58s;
}

.about-row-content strong:nth-of-type(6)::after,
.highlight-phrase:nth-of-type(6)::after {
    animation-delay: 0.7s;
}

/* Word splitting for animation */
.word-wrapper {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    margin-right: 0.25em;
}

.word-inner {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
}