/* =========================================
   MAURICIO NAVARRO - PORTAFOLIO PRO (V3.0)
   ========================================= */

/* --- 1. VARIABLES & RESET --- */
:root {
    --bg-main: #09090b;       /* Negro Profundo */
    --bg-secondary: #18181b;  /* Gris Oscuro (Tarjetas) */
    --bg-hover: #27272a;      /* Gris Hover */
    
    --text-main: #f4f4f5;     /* Blanco Humo */
    --text-muted: #a1a1aa;    /* Gris Texto */
    
    --accent: #3b82f6;        /* Azul Ingeniero */
    --accent-glow: rgba(59, 130, 246, 0.4);
    
    --border: 1px solid rgba(255, 255, 255, 0.1);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --nav-height: 70px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }

/* --- 2. UTILIDADES & TIPOGRAFÍA --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; border-bottom: var(--border); }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.1; margin-bottom: 20px; }
h2 { font-size: 2.5rem; margin-bottom: 20px; color: var(--text-main); }
.subtitle { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 2px; font-size: 0.85rem; margin-bottom: 15px; display: block; }
.text-lead { font-size: 1.25rem; color: var(--text-muted); max-width: 650px; margin-bottom: 30px; }

/* Botones */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 28px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: var(--transition);
    gap: 8px;
}
.btn-primary {
    background: var(--accent); color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 25px var(--accent-glow); }

.btn-outline {
    background: transparent; border: 1px solid rgba(255,255,255,0.2); color: var(--text-main);
}
.btn-outline:hover { border-color: var(--text-main); background: rgba(255,255,255,0.05); }

/* --- 3. NAVBAR --- */
.navbar {
    position: fixed; top: 0; width: 100%; height: var(--nav-height);
    background: rgba(9, 9, 11, 0.85); backdrop-filter: blur(12px);
    border-bottom: var(--border); z-index: 1000; display: flex; align-items: center;
}
.navbar .container { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--text-main); }
.logo span { color: var(--accent); }

.nav-links { display: flex; gap: 30px; }
.nav-links a { font-size: 0.95rem; color: var(--text-muted); font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: var(--text-main); color: var(--accent); }

/* --- 4. HERO SECTION --- */
.hero {
    min-height: 100vh; display: flex; align-items: center; padding-top: var(--nav-height);
    background: radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%);
}
.hero-content { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 50px; align-items: center; }
.hero-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 25px; }
.tech-tag {
    font-size: 0.85rem; padding: 6px 12px; border-radius: 20px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--text-muted);
}

/* --- 5. TARJETAS (PROJECTS & SKILLS) --- */
.grid-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; margin-top: 40px; }
.card {
    background: var(--bg-secondary); border: var(--border); border-radius: 16px; overflow: hidden;
    transition: var(--transition); position: relative; height: 100%; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-8px); border-color: var(--accent); box-shadow: 0 10px 40px rgba(0,0,0,0.5); }

.card-image { height: 220px; overflow: hidden; position: relative; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.card:hover .card-image img { transform: scale(1.05); }

.card-body { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.card h3 { font-size: 1.4rem; margin-bottom: 10px; color: var(--text-main); }
.card-tech { display: flex; gap: 8px; margin-bottom: 15px; flex-wrap: wrap; }
.card-tech span { font-size: 0.75rem; color: var(--accent); background: rgba(59,130,246,0.1); padding: 4px 8px; border-radius: 4px; }
.card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; flex-grow: 1; }

/* --- 6. FORMULARIOS & CERTIFICADOS --- */
input, textarea {
    width: 100%; background: var(--bg-secondary); border: var(--border);
    padding: 15px; border-radius: 8px; color: white; font-family: inherit; margin-bottom: 15px;
    transition: var(--transition);
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); background: var(--bg-hover); }

/* Acordeón Certificados */
details { background: var(--bg-secondary); border: var(--border); border-radius: 12px; margin-bottom: 15px; overflow: hidden; transition: background 0.2s; }
details:hover { background: var(--bg-hover); }
summary { padding: 20px; cursor: pointer; display: flex; align-items: center; gap: 15px; list-style: none; }
summary::-webkit-details-marker { display: none; }
.cert-thumb { width: 50px; height: 50px; background: #000; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: bold; flex-shrink: 0; }
.toggle-icon { margin-left: auto; font-size: 1.5rem; color: var(--accent); transition: transform 0.3s; }
details[open] .toggle-icon { transform: rotate(45deg); color: #ef4444; }
.cert-content { padding: 0 20px 20px; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 20px; animation: slideDown 0.3s; }

/* --- 7. FOOTER & ANIMACIONES --- */
footer { text-align: center; padding: 40px; color: var(--text-muted); font-size: 0.9rem; border-top: var(--border); margin-top: 50px; }

@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* --- 8. RESPONSIVE (CELULAR) --- */
.menu-toggle { display: none; cursor: pointer; flex-direction: column; gap: 6px; }
.bar { width: 25px; height: 2px; background: white; transition: 0.3s; }

@media (max-width: 768px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-tags { justify-content: center; }
    .menu-toggle { display: flex; }
    
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 75%; height: 100vh;
        background: var(--bg-secondary); flex-direction: column; justify-content: center;
        align-items: center; transition: 0.4s; box-shadow: -10px 0 30px rgba(0,0,0,0.8);
    }
    .nav-links.active { right: 0; }
    
    /* Animación X Menú */
    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}
