:root {
    --primary-color: #7928CA;
    --secondary-color: #FF0080;
    --dark-color: #232323;
    --light-color: #f9f9f9;
    --text-color: #333;
    --accent-color: #00C9A7;
}

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

body {
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* ANIMACIONES */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* HERO SECTION */
.hero {
    height: 100vh;
    background: linear-gradient(-45deg, var(--primary-color), var(--secondary-color), var(--accent-color), #5551FF);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100px;
    bottom: 0;
    background: linear-gradient(to top, var(--light-color), transparent);
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: fadeIn 1s ease-out;
}

.hero p {
    font-size: 1.5rem;
    max-width: 700px;
    margin: 0 auto 30px;
    animation: fadeIn 1s ease-out 0.3s forwards;
    opacity: 0;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: fadeIn 1s ease-out 0.6s forwards;
    opacity: 0;
}

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

/* NAVEGACION */
nav {
    position: fixed;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.3s;
}

nav.scrolled {
    background-color: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 15px 50px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    transition: all 0.3s;
}

nav.scrolled .logo {
    color: var(--primary-color);
}

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

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

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

nav.scrolled .nav-links a {
    color: var(--text-color);
}

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

/* SECCIONES GENERALES */
section {
    padding: 100px 10%;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-align: center;
    position: relative;
}

.section-title:after {
    content: '';
    position: absolute;
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    left: 50%;
    bottom: -15px;
    transform: translateX(-50%);
    border-radius: 10px;
}

/* SOBRE MI */
.about {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.about-text {
    flex: 1;
    min-width: 300px;
    padding-right: 40px;
}

.profile-img {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.profile-img img {
    max-width: 65%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.profile-img img:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.15);
}

/* EXPERIENCIA */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background: linear-gradient(var(--primary-color), var(--secondary-color));
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    border-radius: 10px;
}

.container {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.left::before {
    content: "";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid white;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent white;
}

.right::before {
    content: "";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid white;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
}

.right::after {
    left: -13px;
}

.content {
    padding: 20px 30px;
    background-color: white;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.content h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.date {
    color: var(--secondary-color);
    font-weight: bold;
}

/* HABILIDADES */
.skills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.skill-card {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    width: 200px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* PROYECTOS */
.projects {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.project-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    width: 320px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.project-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.project-img {
    height: 200px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s;
}

.project-card:hover .project-img img {
    transform: scale(1.1);
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.project-info p {
    margin-bottom: 15px;
}

.project-link {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s;
}

.project-link:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

/* CONTACTO */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(121, 40, 202, 0.1);
}

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

.submit-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.submit-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15);
}

/* SOCIAL LINKS */
.social-links {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 20px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: white;
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.social-icon:hover {
    transform: translateY(-5px);
    color: var(--secondary-color);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15);
}

/* FOOTER */
footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 30px 0;
}

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

    .hero p {
        font-size: 1rem;
    }

    nav {
        padding: 15px 20px;
    }

    nav.scrolled {
        padding: 10px 20px;
    }

    .timeline::after {
        left: 31px;
    }

    .container {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .container::before {
        left: 60px;
        border: medium solid white;
        border-width: 10px 10px 10px 0;
        border-color: transparent white transparent transparent;
    }

    .left::after, .right::after {
        left: 18px;
    }

    .right {
        left: 0%;
    }

    .navbar {
        transition: all 0.3s ease;
        padding: 15px 0;
    }
    
    .navbar.scrolled {
        background-color: #fff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        padding: 10px 0;
    }

    .language-selector {
        margin-left: 15px;
    }
    
    .language-selector img {
        width: 24px;
        height: 16px;
        margin-right: 5px;
        border: 1px solid #ddd;
    }
    
    .dropdown-item img {
        width: 24px;
        height: 16px;
        margin-right: 8px;
        border: 1px solid #ddd;
    }

    .profile-toggle {
        display: flex;
        align-items: center;
        background-color: #f8f9fa;
        border-radius: 30px;
        padding: 5px;
        margin-right: 15px;
        border: 1px solid #dee2e6;
    }
    
    .profile-toggle-btn {
        padding: 5px 10px;
        border-radius: 20px;
        border: none;
        background: transparent;
        cursor: pointer;
        font-size: 0.85rem;
        transition: all 0.3s;
    }
    
    .profile-toggle-btn.active {
        background-color: #0d6efd;
        color: white;
    }

    
    .angled-bottom {
        clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    }

    .angled-top {
        clip-path: polygon(0 10%, 100% 0, 100% 100%, 0 100%);
    }
}