/* Typing Animation Styles */
.title-role {
    display: block;
    color: var(--text-primary);
    position: relative;
    min-height: 1.2em;
    white-space: nowrap;
    overflow: hidden;
}

.title-role .typed-text {
    display: inline-block;
    transition: font-size 0.1s ease-out;
}

.title-role .cursor {
    display: inline-block;
    color: var(--accent-color);
    font-weight: 400;
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Hidden element for measuring text width */
.text-measure {
    position: absolute;
    visibility: hidden;
    height: auto;
    width: auto;
    white-space: nowrap;
    pointer-events: none;
}

/* Ensure the underline still works */
.title-role::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-full);
}