:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-section-alt: #141e30;
    --accent: #38bdf8;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --max-width: 1100px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
}

/* Contenedor Reutilizable Global */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Navbar con Efecto Glassmorphism */
.navbar {
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Clase inyectada por JS al hacer Scroll */
.navbar-scrolled {
    background-color: #0b111e !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 22px;
    font-weight: bold;
    color: var(--text-main);
    text-decoration: none;
    font-family: monospace;
}

.accent { color: var(--accent); }

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover { 
    color: var(--accent); 
}

/* Botón Menú Móvil */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 0 60px 0;
}

.hero-content {
    max-width: 800px;
}

.hero h1 { 
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    margin-bottom: 15px; 
    font-weight: 800; 
}

.highlight { color: var(--accent); }

.subtitle { 
    font-size: clamp(1rem, 2.5vw, 1.25rem); 
    color: var(--text-muted); 
    margin-bottom: 30px; 
    font-weight: 400; 
}

.hero p { 
    max-width: 600px; 
    margin: 0 auto 35px auto; 
    color: var(--text-muted); 
}

/* Botones con Microinteracciones */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin: 5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn.primary { 
    background-color: var(--accent); 
    color: var(--bg-dark); 
}

.btn.secondary { 
    border: 1px solid var(--border); 
    color: var(--text-main); 
}

.btn:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.25); 
}

/* Secciones Generales */
.section { 
    padding: 100px 0; 
}

.section-title {
    font-size: 32px;
    margin-bottom: 40px;
    color: var(--text-main);
    border-left: 5px solid var(--accent);
    padding-left: 15px;
}

.bg-light { 
    background-color: var(--bg-section-alt); 
}

/* Grid de Certificaciones */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    padding: 25px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.card:hover { 
    transform: translateY(-5px); 
    border-color: var(--accent); 
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.card-icon { font-size: 30px; color: var(--accent); margin-bottom: 15px; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.issuer { color: var(--text-muted); font-size: 14px; margin-bottom: 15px; }
.badge { background-color: var(--bg-dark); padding: 4px 10px; border-radius: 4px; font-size: 12px; color: var(--accent); font-family: monospace; }

/* Habilidades Flex-Wrap */
.skills-container { 
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.skill-tag {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.skill-tag i { color: var(--accent); margin-right: 8px; }
.skill-tag:hover { border-color: var(--accent); background-color: var(--bg-dark); transform: scale(1.05); }

/* Proyectos */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.project-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    padding: 30px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.folder-icon { font-size: 40px; color: var(--accent); }
.project-links a { font-size: 20px; color: var(--text-muted); transition: color 0.3s; }
.project-links a:hover { color: var(--accent); }
.project-card h3 { margin-bottom: 10px; font-size: 22px; }
.project-card p { color: var(--text-muted); margin-bottom: 20px; font-size: 15px; }

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags span {
    background-color: var(--bg-dark);
    padding: 4px 12px;
    font-size: 13px;
    border-radius: 4px;
    color: var(--accent);
}

/* Footer */
.footer { text-align: center; padding: 40px 0; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 14px; margin-top: 50px; }

/* Media Query Responsivo */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links { 
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--bg-dark);
        border-bottom: 1px solid var(--border);
        padding: 20px;
        gap: 15px;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .section {
        padding: 60px 0;
    }
}
