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

/* Variables */
:root{
    --primary-color: #ffffff98;
    --secundary-color: #331a8dec;
    --nav-color: #2c3e50;

}


body{
    font-family: "Roboto Flex", sans-serif;
    line-height: 1.6;
    color: black;
    background-color: var(--primary-color);
    scroll-behavior: smooth;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


a{ 
    text-decoration: none;
    color: var(--secundary-color);
}

a:hover {
    color: blue;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.profile-img:hover{
    transform: translateY(-10px); 
    width: 20vw;
    height: auto;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

h1, h2, h3 {
    font-family: "Roboto Flex", sans-serif;
    margin-bottom: 0.8em;
    color: var(--secundary-color); 
}


h2 {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 1.5em;
    margin-top: 1.5em;
    position: relative;
}

/* Botones */

.btn{
    padding: 8px 15px;
    font-size: 0.9em;
    margin-right: 10px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    border: none;
    cursor: pointer;
    background-color: var(--secundary-color);
    color: #fff;
    margin-right: 15px;
    transition-duration: 0.5s;
}

.btn:hover{
    background-color: #000000;
    transform: translateY(-3px);

}

/* header */

.main-header {
    background-color: var(--nav-color); 
    color: #fff;
    padding: 20px 0;
    position: sticky; 

    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8em;
    font-weight: 700;
}

.logo a {
    color: #fff;
}

.logo .junior-tag {
    font-size: 0.6em;
    vertical-align: super; 
    margin-left: 5px;
    padding: 2px 5px;
    background-color: var(--secundary-color);
    border-radius: 3px;
    font-weight: normal;
}

.main-nav ul {
    display: flex;
}

.main-nav ul li {
    margin-left: 30px;
}

.main-nav ul li a {
    color: #fff;
    font-weight: 600;
    position: relative;
    padding-bottom: 5px; 
}

.about-section, .skill-section{
    background-color: #f9fbfb;
} 

.first-section {
    text-align: center;
    padding: 120px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh; 
}


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

.first-content h2 {
    font-size: 3.5em;
    margin-bottom: 0.3em;
}

.first-content p {
    font-size: 1.1em;
    margin-bottom: 2em;
    line-height: 1.8;
}

.profile-img {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border: 5px solid #000000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    margin: 0 auto 25px;
}

/* About Section*/
.about-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1em;
}

.about-content p {
    margin-bottom: 1.2em;
}

/*  Projects Section  */
.project-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
}

.project-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08); 
    overflow: hidden; /* para que la imagen no se salga */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px); 
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.project-card img {
    width: 100%;
    height: 250px;
    border-bottom: 1px solid #eee;
}

.project-card h3 {
    font-size: 1.5em;
    margin: 15px 15px 10px;
    color: #2c3e50;
}

.project-card p {
    padding: 0 15px 15px;
    font-size: 0.95em;
    flex-grow: 1; /* Permite que el parrafo ocupe el espacio restante */
}

.project-card .project-links {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: center; 
}


.project-card .btn {
    margin-right: 0; /*Centramos el boton */
}

/* Skills Section  */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    text-align: center;
}

.skill-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.skill-item h3 {
    color: var(--secundary-color);
    font-size: 1.4em;
    margin-bottom: 10px;
}

.skill-item p {
    font-size: 0.95em;
    color: #555;
}


.contact-section {
    text-align: center;
    padding-bottom: 100px;
}

.contact-section p {
    font-size: 1.1em;
    margin-bottom: 25px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.contact-info p {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.contact-info a {
    font-weight: bold;
}


/* Footer */
.main-footer {
    background-color: var(--nav-color);
    padding: 30px 0;
    text-align: center;
    font-size: 0.9em;
}

.main-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.main-footer .social-links a {
    color: #fff;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.main-footer .social-links a:hover {
    color: blue;
}

/* Media queries para responsividad */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        text-align: center;
    }

    .main-nav ul {
        margin-top: 15px;
        flex-wrap: wrap; 
        justify-content: center;
    }

    .first-section {
        padding: 80px 0 0;
        min-height: 50vh;
    }

    .first-content h2 {
        font-size: 2.4em;
    }
    h2 {
        font-size: 2em;
    }
}

/* Mobile (480px y menos)  */
@media (max-width: 480px) {
    .main-header {
        padding: 15px 0;
    }

    .logo {
        font-size: 1.5em;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
    }

    .main-nav ul li {
        margin: 0; 
    }

    .main-nav ul li a {
        display: block;
        padding: 5px 0;
    }

    .first-section {
        padding: 60px 0;
        min-height: 50vh;
    }

    .first-content h2 {
        font-size: 2.2em;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
        text-align: center;
        margin: 10px auto; 
        width: 80%; 
        max-width: 250px;
    }

    .project-card .btn{
        margin: 0;
    }

    section {
        padding: 50px 0;
    }

    h2 {
        font-size: 1.8em;
    }

    .projects-grid, .skills-grid {
        grid-template-columns: 1fr; /* Una sola columna para mobile */
        gap: 20px;
    }

    .project-card h3 {
        font-size: 1.3em;
    }

    
}
















