/* --- VARIABLES --- */
:root {
    --bg: #03050a;
    --accent: #00e5ff;
    --accent-glow: rgba(0, 229, 255, 0.4);
    --text-main: #f0f2f5;
    --text-dim: #94a3b8;
}

/* --- BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    background: var(--bg); 
    color: var(--text-main); 
    font-family: 'Inter', sans-serif; 
    overflow-x: hidden; 
}

/* --- NAVEGACIÓN RESPONSIVA --- */
.glass-nav {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 10px 5%; 
    background: rgba(3, 5, 10, 0.95);
    backdrop-filter: blur(15px); 
    position: fixed; 
    width: 100%; 
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-logo { 
    height: 50px; /* Tamaño optimizado para móvil */
    mix-blend-mode: screen; 
    filter: brightness(1.1); 
}

.back-btn { 
    color: var(--accent); 
    text-decoration: none; 
    font-family: 'Fira Code', monospace; 
    font-size: 0.8rem; 
}

/* --- HERO SECTION --- */
.hero-mini { 
    padding: 120px 5% 40px; 
    text-align: center; 
}

h1 { 
    font-family: 'Fira Code', monospace; 
    font-size: clamp(1.8rem, 6vw, 3rem); 
    margin-bottom: 15px; 
}

.highlight { 
    color: var(--accent); 
    text-shadow: 0 0 20px var(--accent-glow); 
}

/* --- PORTFOLIO GRID (Flexible para Celular) --- */
.portfolio-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px; 
    padding: 20px 5% 60px;
}

.project-card {
    background: rgba(255, 255, 255, 0.03); 
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.08); 
    overflow: hidden; 
    transition: 0.4s;
}

.project-card:hover { 
    border-color: var(--accent); 
    transform: translateY(-8px); 
}

.project-image { 
    width: 100%; 
    height: 200px; 
    overflow: hidden; 
}

.project-image img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    cursor: zoom-in; 
}

.project-info { padding: 20px; }

.tech-tags { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
    margin-bottom: 12px; 
}

.tech-tags span { 
    font-family: 'Fira Code', monospace; 
    font-size: 0.65rem; 
    color: var(--accent); 
    border: 1px solid var(--accent); 
    padding: 2px 8px; 
    border-radius: 4px; 
}

.project-info h3 { margin-bottom: 8px; font-size: 1.25rem; }
.project-info p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.5; }

/* --- MODAL POP-UP (Centrado y Responsivo) --- */
.modal-oss {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(3, 5, 10, 0.98); 
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1100px;
    animation: zoomAnim 0.3s ease-out;
}

.modal-content-oss {
    max-width: 100%;
    max-height: 65vh; /* Un poco más pequeño para dar espacio al texto en móvil */
    border: 2px solid var(--accent);
    border-radius: 12px;
    box-shadow: 0 0 30px var(--accent-glow);
    object-fit: contain;
}

#caption {
    margin-top: 20px;
    color: var(--accent);
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    width: 100%;
    max-width: 900px;
    padding: 10px;
    background: rgba(0, 229, 255, 0.05);
    border-radius: 8px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
}

@keyframes zoomAnim { from {transform: scale(0.8); opacity: 0;} to {transform: scale(1); opacity: 1;} }

/* --- FOOTER (Pie de página corregido) --- */
.main-footer {
    padding: 60px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 40px;
}

.main-footer p {
    color: var(--text-dim);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* --- AJUSTES EXTRA PARA CELULAR --- */
@media (max-width: 600px) {
    .portfolio-grid { grid-template-columns: 1fr; }
    .hero-mini { padding-top: 100px; }
    .project-image { height: 180px; }
    #caption { font-size: 0.85rem; }
}