/* Variables de Diseño */
:root {
    --bg-color: #F8F5F2;
    --card-bg: #E8D8D3;
    --text-main: #2F2A2A;
    --text-muted: #8A6F68;
    --accent: #8A6F68;
    --accent-hover: #C98F7A;
    --font-stack: 'Inter', sans-serif;
}

/* Reset Básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-stack);
    line-height: 1.6;
    padding-top: 70px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 45px 20px;
}

/* Navegación */
header {
    background-color: #E8D8D3;
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid #C98F7A;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 5px;
}

.logo img{
    width: 100px;
    height: auto;
    display: block;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
}

/* Selector de Idioma */
.lang-switch {
    background-color: #F8F5F2;
    color: var(--accent) !important;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--accent);
    transition: all 0.3s ease;
}

.lang-switch:hover {
    background-color: var(--accent);
    color: #0f172a !important;
}

/* Sección Hero */
.hero {
    max-width: 850px;
    margin: 60px auto;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.hero .tagline {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 25px;
    font-weight: 600;
}

.hero .bio {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.btn-primary {
    display: inline-block;
    background-color: var(--accent);
    color: #0d121e;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

/* Grids de Habilidades */
.grids {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #334155;
}

.card h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-main);
    border-left: 4px solid var(--accent);
    padding-left: 10px;
}

.card p {
    color: var(--text-muted);
}

.fontalezas ul {
    list-style: none;
    margin-top: 10px;
}

.fontalezas li {
    color: var(--text-muted);
    margin-bottom: 12px;
}

.fontalezas li strong {
    color: var(--text-main);
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.skill-tag {
    background-color: #F8F5F2;
    color: #C98F7A;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #475569;
    transition: all 0.3s ease;
}
.skill-tag:hover {
    background-color: #C98F7A;
    color: white;
    border-color: #C98F7A;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(201, 143, 122, 0.25);
    cursor: default;
}

/* Sección de Proyectos */
.projects-section {
    background-color: #E8D8D3;
    padding: 60px 0;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    text-align: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #515b68;
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-img-placeholder {
    background: linear-gradient(135deg, #8A6F68 15%, #F8F5F2 75%);
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-weight: 600;
    font-size: 1.05rem;
    border-bottom: 1px solid #334155;
    position: relative;
    padding: 20px;
    text-align: center;
}

/* Etiquetas Tecnológicas */
.tech-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-wordpress { background-color: #21759b; color: #fff; }
.badge-hostinger { background-color: #673de6; color: #fff; }
.badge-html { background-color: #e34c26; color: #fff; }
.badge-js { background-color: #f7df1e; color: #000; }
.badge-figma { background-color: #a259ff; color: #fff; }

.project-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-info h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.project-info p {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: auto;
}

.project-link:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid #334155;
}

.footer-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: var(--accent);
    text-decoration: none;
}

/* --- Estilos por defecto para Escritorio --- */
.menu-checkbox,
.menu-icon {
    display: none; /* Ocultamos el menú hamburguesa en pantallas grandes */
}

/* --- Estilos Responsivos para Celular --- */
@media (max-width: 768px) {
    body { padding-top: 60px; }
    .navbar { padding: 15px 20px; position: relative; }
    .hero h1 { font-size: 2.5rem; }
    .grids { grid-template-columns: 1fr; }

    /* 1. Mostrar y estilizar el botón de hamburguesa */
    .menu-icon {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 20px;
        cursor: pointer;
        z-index: 1100;
    }

    .menu-icon span {
        display: block;
        height: 3px;
        width: 100%;
        background-color: var(--text-main);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* 2. Ocultar el menú de enlaces por defecto en móvil */
    .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #E8D8D3;
        padding: 0;
        max-height: 0; /* Oculto mediante altura cero y desbordamiento oculto */
        overflow: hidden;
        transition: max-height 0.3s ease-in-out, padding 0.3s ease;
        border-bottom: 1px solid transparent;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
        gap: 15px;
        text-align: center;
    }

    /* 3. Ocultar el checkbox nativo */
    .menu-checkbox {
        display: none;
    }

    /* 4. ACCIÓN: Cuando el checkbox está marcado, despliega el menú */
    .menu-checkbox:checked ~ .nav-links {
        max-height: 300px; /* Altura suficiente para mostrar los elementos */
        padding: 20px 0;
        border-bottom: 1px solid #C98F7A;
    }

    /* 5. Animación opcional de las rayitas de la hamburguesa a una "X" */
    .menu-checkbox:checked ~ .menu-icon span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-checkbox:checked ~ .menu-icon span:nth-child(2) {
        opacity: 0;
    }
    .menu-checkbox:checked ~ .menu-icon span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .nav-links a {
        font-size: 1rem;
    }
}