/* Variables y reset */
:root {
    --primary: #2d3436;
    --secondary: #636e72;
    --accent: #0984e3;
    --light: #dfe6e9;
    --dark: #1e272e;
    --card-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem 1rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, var(--accent), #00cec9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

/* Navbar Styles */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--accent);
    transition: var(--transition);
}

.nav-logo a:hover {
    color: var(--dark);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    background: var(--light);
    color: var(--accent);
}

.nav-link.active {
    background: var(--accent);
    color: white;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--primary);
    margin: 3px 0;
    transition: var(--transition);
}

/* Secciones */
.section {
    display: none;
    padding: 2rem 0;
    animation: fadeIn 0.5s ease-in;
}

.section.active {
    display: block;
}

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

/* Estilos para las secciones de Certificados y Experiencia */
.certificates-grid,
.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.certificate-card,
.experience-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.certificate-card:hover,
.experience-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Placeholders para certificados y experiencia */
.certificate-placeholder,
.experience-placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--secondary);
}

/* Filtros */
.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.filter-btn {
    background: var(--card-bg);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    font-weight: 500;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--accent);
    color: white;
}

/* Grid de proyectos */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Tarjetas de proyecto */
.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    height: 350px;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-bg {
    height: 40%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, var(--card-bg), transparent);
}

.card-content {
    padding: 1.5rem;
    position: relative;
    z-index: 1;
    height: 60%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-header {
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.project-description {
    font-size: 0.9rem;
    color: var(--secondary);
    line-height: 1.4;
}

.technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tech-icon {
    display: inline-block;
    width: 16px;        /* tamaño fijo igual que tus iconos */
    height: 16px;
    vertical-align: middle;
    color: var(--accent); /* el svg usará este color si el path tiene fill="currentColor" */
    transform: translateY(-6.5px);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem 0;
    color: var(--secondary);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-link {
    color: var(--accent);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-link:hover {
    color: var(--dark);
    transform: translateY(-3px);
}

/* Responsive Navbar */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--card-bg);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 0.5rem 0;
    }

    .nav-link {
        padding: 1rem;
        justify-content: center;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .navbar {
        margin-bottom: 1rem;
    }
    
    .nav-container {
        padding: 0 0.5rem;
    }
    
    .nav-link {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    header {
        margin-bottom: 2rem;
    }
    
    h1 {
        font-size: 2rem;
        margin-top: 1rem;
    }
}

/* Asegurar que el body tenga padding-top para el navbar sticky */
body {
    padding-top: 0;
}

/* Ajuste para los filtros en el header */
header .filters {
    margin-top: 1.5rem;
}