/* --- 1. CONFIGURACIÓN DE LA PÁGINA --- */
.personal-page-body {
    background-color: #FDFBF7;
    padding-top: 100px;
    min-height: 100vh;
    position: relative; /* Necesario para el fondo absoluto */
}

.personal-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2; /* Para que el contenido esté sobre el fondo animado */
}

/* Cabecera */
.personal-header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeInDown 1s ease;
}

.personal-header h1 {
    font-size: 3.5rem;
    color: #3E2723;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1.1rem;
    color: #5D4037;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.8;
}

/* --- 2. SOLUCIÓN AL FONDO ANIMADO --- */
/* Agregamos esto aquí para asegurar que se vea en esta página */
.pardos-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Detrás de todo */
    overflow: hidden;
    pointer-events: none;
}

.floating-tile {
    position: absolute;
    background-color: rgba(141, 110, 99, 0.08);
    border-radius: 12px;
    color: rgba(62, 39, 35, 0.1);
    font-weight: 800;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: monospace;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% { transform: translateY(110vh) rotate(0deg); opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

/* --- 3. GRID UNIFORME (TODAS IGUALES) --- */
.bento-grid {
    display: grid;
    /* Esto crea columnas automáticas de mínimo 320px */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    padding-bottom: 50px;
}

/* Estilo de Tarjeta Unificado */
.bento-card {
    background: #FFFFFF;
    border: 1px solid #EFEBE9;
    border-radius: 20px;
    padding: 30px;
    
    /* TAMAÑO FIJO PARA TODAS */
    height: 380px; 
    
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    overflow: hidden; 
}

.bento-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(62, 39, 35, 0.1);
    border-color: #8D6E63;
}

/* --- YA NO USAMOS SPANS (Para que sean iguales) --- */
/* Neutralizamos las clases de tamaño por si el JS las pone */
.bento-card.large, 
.bento-card.wide, 
.bento-card.tall, 
.bento-card.medium, 
.bento-card.small {
    grid-column: auto;
    grid-row: auto;
}

/* --- CONTENIDO INTERNO --- */
.bento-icon {
    font-size: 2rem;
    color: #8D6E63;
    background: #FDFBF7;
    width: 60px; height: 60px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 16px;
    margin-bottom: 20px;
}

.bento-content {
    z-index: 2; /* Asegura que el texto esté sobre decoraciones */
}

.bento-content h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #3E2723;
    font-weight: 700;
}

.bento-content p {
    font-size: 1rem;
    color: #5D4037;
    line-height: 1.6;
    /* Limitamos el texto para que no rompa el diseño fijo */
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Máximo 4 líneas de texto */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bento-stat {
    display: inline-block;
    margin-top: auto; /* Empuja el stat al fondo */
    font-size: 0.85rem;
    font-weight: 700;
    color: #8D6E63;
    background: rgba(141, 110, 99, 0.1);
    padding: 8px 16px;
    border-radius: 30px;
    align-self: flex-start;
}

/* --- EL HUSKY 3D (LEE) - VERSIÓN TARJETA ESTÁNDAR --- */
#lee {
    background: linear-gradient(135deg, #FFF 0%, #F5F5F5 100%);
    overflow: visible; /* Permitir efecto 3D */
    z-index: 10;
    border: 2px solid white;
}

.bento-3d-img {
    position: absolute;
    bottom: -10px;     
    right: -20px;      
    width: 220px;      /* Tamaño ajustado para tarjeta estándar */
    z-index: 3;        
    filter: drop-shadow(8px 8px 15px rgba(0,0,0,0.15));
    transition: transform 0.4s ease;
}

#lee:hover .bento-3d-img {
    transform: scale(1.1) rotate(-3deg) translateY(-5px);
}

#lee .bento-content {
    position: relative;
    z-index: 5;
    max-width: 65%; /* Texto más estrecho para no tapar al perro */
}

/* --- ANIMACIONES --- */
.reveal-card {
    opacity: 0;
    animation: fadeInUp 0.8s forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr; /* Una columna en móvil */
    }
    
    .bento-card {
        height: auto;       /* Altura flexible en móvil */
        min-height: 300px;
    }

    .bento-3d-img {
        width: 160px;
        opacity: 0.5; /* Transparente para leer mejor en móvil */
        right: -10px;
    }
    
    #lee .bento-content { max-width: 100%; }
}
/* --- BOTÓN VOLVER (EN PERSONAL HEADER) --- */
.btn-return {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: transparent;
    color: #3E2723; /* Café oscuro */
    border: 2px solid #3E2723;
    padding: 10px 25px;
    border-radius: 50px; /* Bordes redondos */
    font-weight: 700;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-return i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.btn-return:hover {
    background-color: #3E2723;
    color: #fff; /* Texto blanco al hover */
    box-shadow: 0 5px 15px rgba(62, 39, 35, 0.2);
    transform: translateY(-2px);
}

/* Animación de la flecha hacia la izquierda */
.btn-return:hover i {
    transform: translateX(-5px);
}