/**
 * ==============================================
 * FOOTER SECTION (BEM)
 * ==============================================
 * Block: .footer
 * Elements: __hero, __title, __line, __word, __char, __cursor, __contact, __icon, __blogs, __links, __bottom
 * Modifiers: --linkedin, --email, --accent
 */
.footer {
    padding: var(--space-4xl) var(--space-3xl) var(--space-2xl);
    background: var(--color-bg-primary);
    position: relative;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer__hero {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* ===== Footer Title - Stagger Cascade ===== */
.footer__title {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: var(--space-xl);
}

.footer__title-line {
    display: block;
    overflow: hidden;
}

.footer__title-word {
    display: inline-block;
}

/* Stagger Cascade - initial state */
.footer__title-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%) rotate(5deg);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Revealed state */
.footer__title-char.revealed {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

/* Colors */
.footer__title-line:nth-child(1) .footer__title-char {
    color: #888;
}

.footer__title-line--accent .footer__title-char {
    color: #fff;
}

.footer__title-line--accent {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.1em;
}

/* ===== Blinking Cursor ===== */
.footer__cursor {
    display: inline-block;
    width: 4px;
    height: 0.8em;
    background: var(--color-primary);
    margin-left: 0.1em;
    opacity: 0;
    vertical-align: baseline;
}

.footer__cursor.revealed {
    animation: footerCursorBlink 1s step-end infinite;
}

@keyframes footerCursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ===== Contact Icons ===== */
.footer__contact {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
    opacity: 0;
    transform: translateY(20px);
}

.footer__contact.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer__icon {
    width: 60px;
    height: 60px;
    background: var(--color-bg-glass);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-primary);
    text-decoration: none;
    transition: all var(--transition-base);
}

.footer__icon:focus-visible {
    box-shadow: var(--focus-ring);
}

.footer__icon--linkedin:hover {
    background: #0077B5;
    border-color: #0077B5;
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 119, 181, 0.3);
}

.footer__icon--email:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-bg-darker);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(250, 204, 21, 0.3);
}

/* ===== Footer Blogs ===== */
.footer__blogs {
    margin-top: var(--space-3xl);
    text-align: center;
    padding-top: var(--space-2xl);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer__blogs-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
}

.footer__blogs-title::before,
.footer__blogs-title::after {
    content: '';
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-text-muted), transparent);
}

.footer__links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    flex-wrap: wrap;
}

.footer__link {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all var(--transition-base);
    position: relative;
    padding: var(--space-sm) 0;
}

.footer__link::before {
    content: '✦';
    position: absolute;
    left: -1.2rem;
    opacity: 0;
    color: var(--color-primary);
    font-size: 0.6rem;
    transition: all var(--transition-base);
    transform: translateX(-5px);
}

.footer__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-primary);
    transition: width var(--transition-base);
}

.footer__link:hover {
    color: var(--color-primary);
    padding-left: var(--space-sm);
}

.footer__link:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.footer__link:hover::after {
    width: 100%;
}

.footer__link:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

/* ===== Footer Bottom ===== */
.footer__bottom {
    text-align: center;
    padding-top: var(--space-xl);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .footer {
        padding: 5rem var(--space-lg);
    }

    .footer__links {
        gap: var(--space-lg);
    }
}
