/* assets/css/styles.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ============================================
   HEADER
============================================ */

.header-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    text-align: center;
}

.header-section h1 {
    color: #0077b5;
    font-size: 36px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.header-section nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.header-section nav a {
    color: #0077b5;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 5px;
    transition: all 0.3s;
}

.header-section nav a:hover {
    background: #0077b5;
    color: white;
}

.header-section nav a.cv-link {
    background: #0077b5;
    color: white;
}

/* ============================================
   SECCIÓN INTRO (FOTO + SOBRE MÍ + INTERESES)
============================================ */

.intro-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

/* Foto y Datos Personales */
.foto-box {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.foto-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0px;
}

.foto-circle {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    background: linear-gradient(135deg, #0077b5, #00a0dc);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 600;
    border: 4px solid #e1e8ed;
}

.datos-personales {
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: left;
    border: 1px solid #0077b5;
    color: #0077b5;
    font-weight: 600;
    margin: 0px;
}

/* Info Box (Sobre mí + Intereses) */
.info-box {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sobre-mi-box {
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 5px solid #0077b5;
}

.sobre-mi-box h2 {
    color: #0077b5;
    font-size: 24px;
    margin-bottom: 15px;
    text-transform: lowercase;
}

.sobre-mi-box p {
    color: #333;
    line-height: 1.8;
}

.intereses-box {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.intereses-box h3 {
    color: #0077b5;
    font-size: 28px;
    margin-bottom: 15px;
    text-transform: lowercase;
    text-align: center;
}

.intereses-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.interes-item {
    background: linear-gradient(135deg, #0077b5, #00a0dc);
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.3s;
    color: #f8f9fa;
}

.interes-item:hover {
    transform: scale(1.1);
}

/* ============================================
   SECCIÓN SKILLS (HARD + SOFT)
============================================ */

.skills-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.hard-skill-box,
.soft-skill-box {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.hard-skill-box h2,
.soft-skill-box h2 {
    color: #0077b5;
    font-size: 24px;
    margin-bottom: 20px;
    text-transform: lowercase;
    border-bottom: 3px solid #0077b5;
    padding-bottom: 10px;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e1e8ed;
}

.skill-list li:last-child {
    border-bottom: none;
}

.skill-list span {
    color: #333;
    font-weight: 500;
}

.stars {
    color: #f59e0b;
    font-size: 18px;
}

/* ============================================
   SECCIÓN PROYECTOS
============================================ */

.proyectos-section {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.proyectos-section h2 {
    color: #0077b5;
    font-size: 32px;
    margin-bottom: 30px;
    text-transform: lowercase;
    text-align: center;
}

.proyectos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.proyecto-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #e1e8ed;
    transition: all 0.3s;
}

.proyecto-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,119,181,0.3);
    border-color: #0077b5;
}

.proyecto-imagen {
    font-size: 48px;
    margin-bottom: 15px;
}

.proyecto-card h3 {
    color: #0077b5;
    margin-bottom: 10px;
    font-size: 20px;
}

.proyecto-card p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.proyecto-link {
    display: inline-block;
    color: #0077b5;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 15px;
    border: 2px solid #0077b5;
    border-radius: 5px;
    transition: all 0.3s;
}

.proyecto-link:hover {
    background: #0077b5;
    color: white;
}

/* ============================================
   SECCIÓN CONTACTO
============================================ */

.contacto-section {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.contacto-section h2 {
    color: #0077b5;
    font-size: 32px;
    margin-bottom: 30px;
    text-transform: lowercase;
    text-align: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #0077b5;
}

.contact-form textarea {
    resize: vertical;
}

.submit-btn {
    background: #0077b5;
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    align-self: center;
}

.submit-btn:hover {
    background: #005885;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,119,181,0.3);
}

/* ============================================
   FOOTER
============================================ */

footer {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    text-align: center;
}

footer p {
    color: #666;
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-links a {
    color: #0077b5;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 15px;
    border: 2px solid #0077b5;
    border-radius: 5px;
    transition: all 0.3s;
}

.social-links a:hover {
    background: #0077b5;
    color: white;
}

/* ============================================
   MEDIA QUERIES PARA MÓVIL (768px hacia abajo)
============================================ */

@media (max-width: 768px) {
    /* Ajustes generales */
    body {
        padding: 10px;
    }
    
    .container {
        gap: 15px;
    }
    
    /* HEADER */
    .header-section {
        padding: 20px 15px;
    }
    
    .header-section h1 {
        font-size: 24px;
        letter-spacing: 1px;
        margin-bottom: 15px;
    }
    
    .header-section nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-section nav a {
        padding: 12px;
        width: 100%;
        text-align: center;
    }
    
    /* INTRO SECTION */
    .intro-section {
        padding: 20px;
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .foto-circle {
        max-width: 250px;
        margin: 0 auto;
    }
    
    .datos-personales {
        padding: 20px;
        text-align: center;
        font-size: 14px;
    }
    
    /* SOBRE MI */
    .sobre-mi-box {
        padding: 20px;
    }
    
    .sobre-mi-box h2 {
        font-size: 20px;
        text-align: center;
    }
    
    .sobre-mi-box p {
        text-align: justify;
        font-size: 14px;
    }
    
    /* INTERESES */
    .intereses-box h3 {
        font-size: 20px;
    }
    
    .intereses-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .interes-item {
        padding: 15px 10px;
        font-size: 16px;
    }
    
    /* SKILLS */
    .skills-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .hard-skill-box,
    .soft-skill-box {
        padding: 20px;
    }
    
    .hard-skill-box h2,
    .soft-skill-box h2 {
        font-size: 20px;
        text-align: center;
    }
    
    .skill-list li {
        padding: 12px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .skill-list span {
        font-size: 14px;
    }
    
    /* PROYECTOS */
    .proyectos-section {
        padding: 20px;
    }
    
    .proyectos-section h2 {
        font-size: 24px;
    }
    
    .proyectos-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .proyecto-card {
        padding: 20px;
    }
    
    .proyecto-card h3 {
        font-size: 18px;
    }
    
    /* CONTACTO */
    .contacto-section {
        padding: 20px;
    }
    
    .contacto-section h2 {
        font-size: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .contact-form input,
    .contact-form textarea {
        padding: 12px;
        font-size: 14px;
    }
    
    .submit-btn {
        width: 100%;
        padding: 15px;
    }
    
    /* FOOTER */
    footer {
        padding: 20px;
    }
    
    footer p {
        font-size: 14px;
    }
    
    .social-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .social-links a {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   MEDIA QUERIES PARA MÓVIL PEQUEÑO (480px hacia abajo)
============================================ */

@media (max-width: 480px) {
    .header-section h1 {
        font-size: 20px;
    }
    
    .header-section nav a {
        font-size: 14px;
        padding: 10px;
    }
    
    .foto-circle {
        width: 200px;
        height: 200px;
    }
    
    .intereses-grid {
        grid-template-columns: 1fr;
    }
    
    .interes-item {
        padding: 12px;
    }
    
    .proyecto-card h3 {
        font-size: 16px;
    }
    
    .proyecto-card p {
        font-size: 14px;
    }
    
    .contacto-section h2 {
        font-size: 20px;
    }
}

/* ============================================
   AJUSTES ESPECÍFICOS ADICIONALES
============================================ */

/* Mejorar visibilidad en móvil */
@media (max-width: 768px) {
    /* Asegurar que los textos sean legibles */
    h2, h3 {
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    /* Mejorar espaciado entre secciones */
    section {
        margin-bottom: 20px !important;
    }
    
    /* Ajustar la foto y datos personales */
    .foto-box {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .datos-personales {
        width: 100%;
        max-width: 300px;
    }
    
    /* Ajustar el grid de intereses */
    .intereses-item {
        min-height: 80px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    /* Mejorar botones y enlaces */
    a, button {
        min-height: 44px; /* Tamaño mínimo para tocar fácilmente */
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ============================================
   ORIENTACIÓN HORIZONTAL EN MÓVIL
============================================ */

@media (max-height: 500px) and (orientation: landscape) {
    .container {
        gap: 10px;
    }
    
    .intro-section {
        grid-template-columns: 200px 1fr;
    }
    
    .intereses-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   VISUALIZACIÓN EN DISPOSITIVOS TÁCTILES
============================================ */

@media (hover: none) and (pointer: coarse) {
    /* Remover efectos hover que no funcionan bien en táctil */
    .interes-item:hover {
        transform: none;
    }
    
    .proyecto-card:hover {
        transform: none;
    }
    
    /* Mejorar feedback táctil */
    a:active,
    button:active {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

/* ============================================
   SECCIÓN PROYECTOS (ESTILOS MODIFICADOS)
============================================ */

/* Estilo para la imagen del proyecto */
.proyecto-imagen img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* Quitar el emoji predeterminado */
.proyecto-imagen:not(:has(img)) {
    font-size: 48px;
    margin-bottom: 15px;
}

/* Estilo para el título como enlace */
.proyecto-card h3 a {
    color: #0077b5;
    text-decoration: none;
    transition: color 0.3s;
}

.proyecto-card h3 a:hover {
    color: #005885;
    text-decoration: underline;
}

/* Estilo para el botón PDF */
.pdf-btn {
    display: inline-block;
    background: #28a745;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    margin-top: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.pdf-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(40, 167, 69, 0.3);
}

/* Ajustar el enlace "Ver más" original */
.proyecto-link {
    display: inline-block;
    color: #0077b5;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 15px;
    border: 2px solid #0077b5;
    border-radius: 5px;
    transition: all 0.3s;
    margin-top: 10px;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.proyecto-link:hover {
    background: #0077b5;
    color: white;
}

/* ============================================
   AJUSTES PARA PROYECTOS
============================================ */

@media (max-width: 768px) {
    .proyecto-imagen img {
        height: 150px;
    }
    
    .pdf-btn,
    .proyecto-link {
        padding: 12px;
        font-size: 14px;
    }
}