:root {
    --primary: #1a2a6c;
    --secondary: #2980b9;
    --accent: #f39c12;
    --bg-light: #f8f9fa;
    --text-dark: #2c3e50;
    --text-light: #ecf0f1;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--text-light);
    padding: 4rem 1rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
}

nav {
    background: var(--white);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: center;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    transition: color 0.3s;
}

nav a:hover, nav a.active {
    color: var(--secondary);
}

.container {
    max-width: 1000px;
    margin: 3rem auto;
    padding: 0 20px;
}

section {
    margin-bottom: 4rem;
}

h2 {
    border-bottom: 2px solid var(--secondary);
    display: inline-block;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    color: var(--primary);
}

/* Estilos de Proyectos */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr; /* Una sola columna por fila */
    gap: 2rem;
}

.project-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex; /* Flex para disposición horizontal */
    flex-direction: row; 
    min-height: 200px;
}

.project-card:hover {
    transform: translateX(10px); /* Desplazamiento lateral sutil */
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

/* Espacio para un icono o imagen representativa a la izquierda */
.project-visual {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    flex-shrink: 0;
}

.project-info {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-info h3 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.project-category {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 0.8rem;
    letter-spacing: 1px;
}

.project-info p {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 1.5rem;
    max-width: 800px; /* Limitar ancho para lectura cómoda */
}

.btn-project {
    align-self: flex-start; /* Botón a la izquierda */
    background: var(--secondary);
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s;
}

/* Responsividad para móviles */
@media (max-width: 768px) {
    .project-card {
        flex-direction: column;
    }
    .project-visual {
        width: 100%;
        height: 100px;
        font-size: 2rem;
    }
    .project-info {
        padding: 1.5rem;
    }
}

.btn-project:hover {
    background: var(--primary);
}

/* Estilos de Sobre Mí / CV */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: center;
}

.cv-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.cv-item h3 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1rem;
}

.skill-tag {
    background: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.social-links {
    margin-top: 1rem;
    font-size: 1.5rem;
}

.social-links a {
    color: var(--white);
    margin: 0 1rem;
    transition: transform 0.3s, color 0.3s;
    display: inline-block;
}

.social-links a:hover {
    color: var(--accent);
    transform: scale(1.1);
}

/* Estilos de Detalle de Proyecto (Markdown) */
.project-detail {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.project-content h2 {
    margin: 2rem 0 1rem;
    border-bottom: 2px solid var(--bg-light);
    display: block;
}

.project-content h3 {
    margin: 1.5rem 0 0.8rem;
    color: var(--secondary);
}

.project-content ul, .project-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.project-content li {
    margin-bottom: 0.5rem;
}

.btn-back {
    display: inline-block;
    margin-bottom: 2rem;
    text-decoration: none;
    color: var(--secondary);
    font-weight: 600;
}

footer {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 4rem 1rem;
    margin-top: 4rem;
}

.footer-content p {
    margin-bottom: 1rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    nav {
        flex-wrap: wrap;
        gap: 1rem;
    }
}
