*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } /*Reseteo básico para evitar inconsistencias entre navegadores*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --azul-claro: hsl(202, 100%, 50%, 1);
    --azul-medio:hsl(214, 100%, 34%, 1);
    --azul-oscuro:hsl(215, 96%, 18%, 1);
    --color-parrafos:hsl(0, 0%, 13%);
    --color-fondo: hsl(0, 0%, 100%);

    --primary-color: #2a0f0f;
    --secondary-color: #293b1e;
    --accent-color: hsl(202, 100%, 50%, 1);
    --accent-light: hsl(214, 100%, 34%, 1);
    --text-light: #ffffff;
    --text-muted: hsl(215, 96%, 18%, 1); /*Menu*/
    --border-color: #cbd5e1;
}

body {
    font-family: "montserrat", sans-serif;
    background: linear-gradient(135deg, var(--azul-oscuro) 0%, #1a1f35 100%);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* HEADER Y NAVEGACIÓN */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: #ffffffcc;
    backdrop-filter: blur(10px);
    box-shadow: 0px 0px 3px var(--color-texto-subtitulos);
    z-index: 1000;
    padding: 1rem 2rem;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    height: 50px;
    margin-top: 10px;
}

.logo img {
    max-height: 100%;
    max-width: 250px;
    width: auto;
    object-fit: contain;
}

nav {
    display: flex;
    gap: 3rem;
    list-style: none;
}

nav a {
    color: var(--azul-oscuro);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 300;
    font-size: 1.2rem;
}

nav a:hover, nav a.active {
    color: var(--azul-claro);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: transparent;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--azul-claro);
    margin: 5px 0;
    transition: 0.3s;
}

/* HERO SECTION */
.hero {
    margin-top: 80px;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 6rem 2rem;
    width: 100vw;
    text-align: center;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../img/fondo-inicio.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 4vw, 4rem);
    margin-bottom: 1rem;
    line-height: 1.2;
    color: white;
}

.hero-content h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--azul-claro);
}

.hero-subtitle {
    font-size: 2.64rem;
    margin-bottom: 1.5rem;
    color: var(--azul-claro);
}

.hero-description {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    color: white;
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(-90deg, var(--azul-claro), var(--azul-medio));
    border-color: var(--azul-claro);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--azul-medio);
}

.btn-secondary {
    background: linear-gradient(-90deg, var(--azul-claro), var(--azul-medio));
    border-color: var(--azul-claro);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 1px 8px var(--azul-medio);
}

/* SECCIONES */
.section {
    padding: 3rem 0rem;
    max-width: 100%;
    margin: 0 auto;
    background: rgb(235, 235, 235);
    color: var(--azul-oscuro);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 0rem;
    text-align: center;
    color: hsl(214, 100%, 34%, 1);
}

.section-subtitle {
    text-align: center;
    color: hsl(215, 96%, 18%, 1);
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.section-subtitle-light {
    color: var(--azul-claro);
}

/* SOBRE MÍ */
.about-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    max-width: 1200px;
    margin: 0rem auto;
    padding: 0rem;
    flex-wrap: wrap;
}

.foto-perfil {
    width: clamp(400px, 20vw, 2150px);
    height: clamp(400px, 20vw, 250px);
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0; /*Evita que la imagen se reduzca demasiado en pantallas pequeñas*/
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease;
}

.foto-perfil:hover {
    border-color: var(--azul-claro);
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.about-text {
    max-width: 600px;
    flex: 1;
    min-width: 250px;
}

.about-text h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--azul-claro);
    text-align: center;
}

.about-text p {
    margin-bottom: 1rem;
    color: #333;
    line-height: 1.8;
    text-align: justify;
    font-size: 1.1rem;
}



/* PROYECTOS */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 350px;
    max-height: 700px;
    margin: 0 auto;
}

.project-card:hover {
    border-color: var(--azul-claro);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.project-header {
    background: linear-gradient(135deg, var(--azul-claro), var(--azul-medio));
    padding: 2rem;
    text-align: center;
}

.project-header h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: white;
}

.project-year {
    font-size: 0.9rem;
    opacity: 0.9;
    color: white;
}

.project-body {
    padding: 1.5rem;
    position: relative;
}

.project-body p {
    color: #333;
    margin-bottom: 1rem;
    transition: opacity 0.3s ease;
}

.project-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;

}

.project-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.75rem;
}

.project-card:hover .project-body p,
.project-card:hover .project-tags {
    opacity: 0;
    visibility: hidden;
}

.project-card:hover .project-image {
    opacity: 1;
    visibility: visible;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-header img {
    display: block;
    margin: 0 auto 1rem;
}

.tag {
    background: rgba(14, 165, 233, 0.15);
    color: var(--azul-claro);
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    border: 1px solid var(--azul-claro);
}

/* SERVICIOS */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: #f5f5f5;
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid #e0e0e0;
    text-align: center;
    transition: all 0.3s ease;
    max-width: 320px;
    max-height: 280px;
    margin: 0 auto;
}

.service-card:hover {
    border-color: var(--azul-claro);
    background: #efefef;
    transform: translateY(-5px);
}

.service-card img {
    display: block;
    margin: 0 auto 1rem;
}

.service-card h3 {
    color: var(--azul-claro);
    margin-bottom: 1rem;
}

.service-card p {
    color: #555;
}

/* CERTIFICACIONES */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    margin: 2rem auto 0;
    max-width: 900px;
}

.skill-card {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.skill-card:hover {
    border-color: var(--azul-claro);
    background: #efefef;
    transform: translateY(-5px);
}

.skill-card h4 {
    color: var(--azul-claro);
    font-size: 1.0rem;
    text-align: center;
}

.skill-card p {
    color: #555;
    font-size: 1.1rem;
    text-align: center;
}

.skill-card img {
    display: block;
    margin: 0 auto 1rem;
}

/* CONTACTO */
.contact-section {
    text-align: center;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 3rem auto;
    align-items: start;
}

.contact-form-section {
    background: #f8f8f8;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--azul-oscuro);
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    font-family: "montserrat", sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    color: #333;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--azul-claro);
    box-shadow: 0 0 5px rgba(42, 165, 233, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .btn {
    width: 100%;
    align-self: flex-start;
}

.contact-info-section {
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-info {
    display: inline-block;
    justify-content: center;
    color: var(--azul-oscuro);
}

.contact-section-p {
    color: var(--azul-oscuro);
    font-size: 1.3rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* CRONOLOGÍA */
.timeline {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 43px;
    left: 5%;
    right: 5%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--azul-claro) 20%, var(--azul-claro) 80%, transparent);
    z-index: 1;
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    z-index: 2; /*Asegura que los elementos estén por encima de la línea*/
}

.timeline-marker {
    width: 25px;
    height: 25px;
    background: linear-gradient(135deg, var(--azul-claro), var(--azul-medio));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    margin-bottom: 2rem;
    flex-shrink: 0; /*Evita que el marcador se reduzca demasiado en pantallas pequeñas*/
    position: relative;
}

.timeline-dot {
    width: 15px;
    height: 15px;
    background:white;
    border-radius: 50%;
    box-shadow: inset 0 0 0 3px var(--azul-claro);
}

.timeline-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.98));
    padding: 2rem;
    border-radius: 1rem;
    border-top: 5px solid var(--azul-claro);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(42, 165, 255, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 2px 50px rgba(0, 0, 0, 0.25);
    border-color: var(--azul-medio);
}

.timeline-content:hover::before {
    opacity: 1;
}

.timeline-content h3 {
    color: var(--azul-oscuro);
    font-size: 1.15rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.timeline-date {
    color: var(--azul-claro);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    background: linear-gradient(135deg, var(--azul-claro), var(--azul-medio));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.timeline-description {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    font-weight: 500;
}

.timeline-content p {
    margin: 0;
    font-size: 1rem;
}

.contact-item {
    font-size: 1.2rem;
    color: var(--azul-oscuro);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-weight: 900;
    margin-top: 0 auto;
}

.contact-item a {
    font-size: 1.2rem;
    color: var(--azul-oscuro);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 300;
}

.contact-item a:hover {
    color: var(--azul-claro);
}

.contact-item p {
    color: var(--azul-oscuro);
    font-weight: 300;;
}

/* ICONOS */
.iconos {
    width: clamp(2rem, 8vw, 4rem);
    height: clamp(2rem, 8vw, 4rem);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* Variantes de tamaño para iconos */
.iconos-pequeño {
    width: clamp(1.5rem, 5vw, 2.5rem);
    height: clamp(1.5rem, 5vw, 2.5rem);
}

.iconos-mediano {
    width: clamp(2rem, 8vw, 4rem);
    height: clamp(2rem, 8vw, 4rem);
}

.iconos-grande {
    width: clamp(3rem, 12vw, 6rem);
    height: clamp(3rem, 12vw, 6rem);
}

/* Efectos adicionales para iconos */
.iconos:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

/* FOOTER */
footer {
    background: var(--azul-oscuro);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    color: white;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1rem;
}

.footer-links a:hover {
    color: var(--azul-claro);
}

/* RESPONSIVE */
/* TABLETS: 769px - 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    .timeline {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }

    .timeline::before {
        top: 50px;
    }

    .timeline-content {
        padding: 1.8rem;
    }

    .timeline-content h3 {
        font-size: 1.1rem;
    }

    .timeline-date {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 82px;
        right: 0;
        background: #ffffffec;
        width: 100%;
        padding: 2rem;
        gap: 1rem;
    }

    nav.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .foto-perfil {
    width: clamp(300px, 20vw, 250px);
    height: clamp(300px, 20vw, 250px);
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);  
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline::before {
        display: none;
    }

    .timeline {
        grid-template-columns: 1fr;
        padding: 2rem 1rem;
        gap: 3rem;
        position: relative;
    }

    .timeline-item {
        width: 100%;
        margin: 0 auto;
        padding-left: 3rem;
        position: relative;
    }

    .timeline-item::before {
        content: '';
        position: absolute;
        left: 24px;
        top: 60px;
        bottom: -60px;
        width: 3px;
        background: linear-gradient(180deg, var(--azul-claro), transparent);
        z-index: 0;
    }

    .timeline-item:last-child::before {
        display: none;
    }

    .timeline-marker {
        position: absolute;
        left: 13px;
        top: 30px;
        width: 25px;
        height: 25px;
    }

    .timeline-content {
        padding: 1.5rem;
        border-radius: 0.8rem;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    }

    .timeline-content h3 {
        font-size: 1.05rem;
    }

    .timeline-date {
        font-size: 0.95rem;
    }

    .timeline-description {
        font-size: 0.9rem;
    }

    .skills-grid {
    gap: 1rem;
    }

    .skill-card {
        width: 90%;
        margin: 0 auto;
    }

    .contact-info {
        gap: 1.5rem;
    }

    .hero {
        padding: 4rem 1rem;
        margin-top: 70px;
    }

    .section {
        padding: 4rem 1rem;
    }
}
