/* Reseteo y Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #0d0f14;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 30px 30px;
    color: #f1f5f9;
    font-family: 'Outfit', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding-bottom: 60px;
}

.portfolio-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 40px 20px;
    text-align: center;
}

.brand-title {
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff 20%, #a5b4fc 45%, #a5b4fc 55%, #ffffff 80%);
    background-size: 250% auto;
    background-position: 0% center;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: background-position 0.5s ease;
}

.social-link {
    display: inline-block;
    padding: 8px 22px;
    background-color: #1e293b;
    color: #e2e8f0;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #334155;
    transition: background-color 1s ease, border-color 0.5s ease;
}

.social-link:hover {
    background-color: #2e3e50;
    border-color: #475569;
}

.social-link:hover .brand-title {
    background-position: 100% center;
}

.portfolio-container {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 0 16px;
}

/* Tarjeta Base Compacta y Vertical */
.project-card {
    border-radius: 20px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center; 
    text-align: center;  
    min-height: 310px; 
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-card:hover {
    transform: translateY(-6px);
}

/* Contenido Principal de la Tarjeta */
.card-main {
    display: flex;
    flex-direction: column; 
    align-items: center;
    gap: 16px;
    width: 100%;
}

/* Logo Wrapper - Sin fondo, sin padding, solo el logo */
.logo-wrapper {
    width: 115px;         
    height: 115px;
    background-color: transparent; 
    border-radius: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0px; 
    backdrop-filter: none; 
    border: none; 
    transition: transform 0.3s ease;
}

.project-card:hover .logo-wrapper {
    transform: scale(1.12); 
}

.project-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Info del Proyecto */
.project-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.project-info h2 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.project-date {
    font-size: 0.75rem;
    opacity: 0.65;
    font-weight: 300;
}

.project-tech {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 6px;
    opacity: 0.85;
}

/* Botones de Acción Estilizados y Flexibles */
.card-actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap; 
    gap: 10px;
    width: 100%; 
}

.btn-demo, .btn-code {
    flex: 1 1 110px; 
    text-align: center;
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Estilos de Botón para Tarjetas Oscuras */
.project-card .btn-demo, .project-card .btn-code {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.project-card .btn-demo:hover, .project-card .btn-code:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
}

/* Estilos de Botón para Tarjetas Claras */
.project-card.dark-text .btn-demo, .project-card.dark-text .btn-code {
    background-color: rgba(0, 0, 0, 0.05);
    color: inherit;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.project-card.dark-text .btn-demo:hover, .project-card.dark-text .btn-code:hover {
    background-color: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.25);
}

/* Colores de Fondo y Luces Neón */
.gtf { background-color: #2c215c; color: #ffffff; }
.gtf:hover { box-shadow: 0 10px 25px rgba(44, 33, 92, 0.5); }

.mtt { background-color: #68d162; }
.mtt:hover { box-shadow: 0 10px 25px rgba(104, 209, 98, 0.5); }

.tropikol { background-color: #1f44a3; color: #ffffff; }
.tropikol:hover { box-shadow: 0 10px 25px rgba(31, 68, 163, 0.5); }

.waste-it { background-color: #ff751f; color: #ffffff; }
.waste-it:hover { box-shadow: 0 10px 25px rgba(255, 117, 31, 0.5); }

.dactimex { background-color: #ff00b8; color: #000000; } /* Fondo fucsia, texto negro */
.dactimex:hover { box-shadow: 0 10px 25px rgba(255, 0, 184, 0.5); }
.dactimex .project-date, .dactimex .project-tech { color: #000000; opacity: 1; } /* Asegurar que la fecha y tech sean negros */

.ixora { background-color: #f6ecd9;  color: #b63c47; }
.ixora:hover { box-shadow: 0 10px 25px rgba(182, 60, 71, 0.5); }

.futbot { background-color: #014740; color: #ffffff; }
.futbot:hover { box-shadow: 0 10px 25px rgba(1, 71, 64, 0.5); }

.spatula { background-color: #2a1212; color: #C62828; }
.spatula:hover { box-shadow: 0 10px 25px rgba(198, 40, 40, 0.5); }

/* Helper class */
.dark-text { color: #1a202c; }
.dark-text .project-tech { color: #000000; }


/* ==========================================
    MEDIA QUERIES (Ajustes para pantallas chicas)
   ========================================== */

@media (max-width: 480px) {
    .portfolio-header {
        padding: 40px 16px 20px 16px;
    }
    
    .portfolio-container {
        padding: 0 12px;
        gap: 16px;
    }

    .project-card {
        padding: 20px 16px;
        min-height: auto; 
    }

    .logo-wrapper {
        width: 100px; 
        height: 100px;
    }

    .card-actions {
        flex-direction: column;
        gap: 8px;
    }

    .btn-demo, .btn-code {
        width: 100%;
        padding: 11px; 
    }
}