:root {
    --primary-color: rgb(53, 130, 196);
    --secondary-color: rgb(52, 152, 219);
    --black-color: rgb(0, 0, 0);
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-color: #ecf0f1;
    --white-color: #fff;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: var(--text-color);
    line-height: 1.6;
    background-color: #f5f7fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-image:
    linear-gradient(to right, rgba(53, 130, 196, 0.8),
    rgba(255, 255, 255, 0.73)),
    url('../img/fondo_02.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    line-height: 1.6;
}

/* Contenedor principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    width: 100%;
}

/* Estilos de navegación */
header {
    background-color: var(--primary-color);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
}
.logo a{
    text-decoration: none;
    color: var(--white-color);
}

.logo span {
    color: var(--black-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--black-color);
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px;
    transition: var(--transition);
}


.sobre-mi .container p,
.experiencia .container p,
.sobre-mi .container h2,
.sobre-mi .container h3,
.experiencia .container h2,
.portafolio .container h2,
.contacto .container h2{
    color: var(--black-color);
}

.hero, .experiencia, .contacto{
    background-color: rgba(0, 0, 0,.3);
    width: 90%;
    margin: 0 auto;
    padding: 5% 5%;
}

.sobre-mi, .portafolio{
    background-color: rgba(255, 255, 255, 0.3);
    height: 100vh;
    width: 90%;
    margin: 0 auto;
    padding: 5% 5%;
}


p{
    text-align: justify;
    text-indent: 1.5rem;
    font-weight: bold;
}
/* Hero section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--white-color);
}

.hero h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 500;
    color: var(--black-color);
}
.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: bold;
    color: var(--white-color);
}

.hero-image {
    flex: 0 0 400px;
    height: 400px;
    border-radius: 50%;
    overflow: hidden;
    border: 10px solid rgba(255, 255, 255, 0.1);
    margin-left: 2rem;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cta-btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.cta-btn:hover {
    background-color: #6ac4ff;
    color: var(--black-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Section styles */
section {
    padding: 5rem 0;
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--primary-color);
    position: relative;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
}

/* About section */
.about-content {
    display: flex;
    justify-content: space-between;
    gap: 3rem;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.skills {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item h4 {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.progress-bar {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--secondary-color);
    border-radius: 5px;
}

/* Experience section */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--light-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 2rem 0;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 3rem;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 3rem;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: white;
    border: 4px solid var(--black-color);
    border-radius: 50%;
    top: 2.5rem;
    z-index: 1;
}

.timeline-item:nth-child(odd)::after {
    right: -10px;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

.timeline-content {
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    position: relative;
}

.timeline-content::after {
    content: '';
    position: absolute;
    top: 2rem;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

.timeline-item:nth-child(odd) .timeline-content::after {
    border-left-color: white;
    right: -20px;
}

.timeline-item:nth-child(even) .timeline-content::after {
    border-right-color: white;
    left: -20px;
}

.timeline-date {
    color: var(--secondary-color);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.timeline-company {
    font-style: italic;
    margin-bottom: 1rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* Portfolio section */
.portfolio-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.portfolio-item {
    flex: 1 1 300px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    height: 250px;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 62, 80, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-title {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.portfolio-category {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Contact section */
.contact-content {
    display: flex;
    justify-content: space-between;
    gap: 3rem;
}
.contact-content h4, p, .contact-form{
    color: #fff;
}
.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.contact-icon img,
.footer-content img{
    width: 20px;
}
.contact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
}

.form-control {
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
}

.copyright {
    margin-top: 1rem;
    opacity: 0.8;
}

/* Responsive styles */
@media screen and (max-width: 1024px) {
    .hero h1 {
        font-size: 3rem;
    }

    .hero-image {
        flex: 0 0 300px;
        height: 300px;
    }
}

@media screen and (max-width: 892px){
    .sobre-mi, .portafolio{
        height: auto;
        padding-bottom: 10%;
    }
}

@media screen and (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: 0;
        height: 100vh;
        top: 0;
        background-color: rgba(52, 152, 219, 0.7);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        transform: translateX(100%);
        transition: var(--transition);
        z-index: 99;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .burger {
        display: block;
        z-index: 100;
    }

    .burger.toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .burger.toggle .line2 {
        opacity: 0;
    }

    .burger.toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero-inner {
        flex-direction: column;
        text-align: center;
    }

    .hero {
        padding: 4rem 0;
        min-height: auto;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-image {
        margin: 3rem 0 0;
        width: 200px;
        height: 200px;
        flex: 0 0 200px;
        
    }

    .about-content, 
    .contact-content {
        flex-direction: column;
    }

    .timeline::before {
        left: 2rem;
    }

    .timeline-item {
        width: 100%;
        padding-left: 4rem;
        left: 0;
    }

    .timeline-item:nth-child(odd) {
        padding-right: 0;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item::after {
        left: 2rem;
    }

    .timeline-item:nth-child(odd) .timeline-content::after {
        border-left-color: transparent;
        border-right-color: white;
        right: auto;
        left: -20px;
    }
}

@media screen and (max-width: 480px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .hero-image {
        width: 150px;
        height: 150px;
        flex: 0 0 150px;
    }

    section h2 {
        font-size: 2rem;
    }

    .portfolio-item {
        flex-basis: 100%;
    }
}