/* --- VARIABLES Y ESTILOS GLOBALES --- */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --background-color: #f4f6f8;
    --text-color: #333;
    --card-bg-color: #ffffff;
    --white-color: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Lato', sans-serif;
    --transition: all 0.3s ease-in-out;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.7;
}

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

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.2;
}

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

h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

.section {
    padding: 80px 0;
}

.card {
    background-color: var(--card-bg-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 30px;
    transition: var(--transition);
}

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

/* --- BOTONES --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white-color);
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white-color);
    border-color: var(--white-color);
}

.btn-secondary:hover {
    background-color: var(--white-color);
    color: var(--primary-color);
}


/* --- HEADER Y HERO --- */
.main-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    color: var(--white-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--primary-color);
    z-index: 1000;
    transition: var(--transition);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 35px;
}

.nav-menu a {
    color: var(--white-color);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--white-color);
    font-size: 1.5rem;
    cursor: pointer;
}

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    padding-top: 150px;
    padding-bottom: 100px;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3.5rem;
    color: var(--white-color);
}

.hero-text .subtitle {
    font-size: 1.5rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin: 10px 0;
}

.hero-text .description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex-basis: 350px;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    border: 8px solid var(--secondary-color);
}

/* --- EXPERIENCIA --- */
.experience-grid {
    display: grid;
    gap: 30px;
}

.card-header {
    margin-bottom: 15px;
}

.card-header h3 {
    font-size: 1.4rem;
}

.card-header p {
    color: var(--secondary-color);
    font-weight: 600;
}

.card-body ul {
    list-style-position: inside;
    padding-left: 5px;
}

/* --- HABILIDADES --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    text-align: center;
}

.skill-category i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    margin-bottom: 8px;
}

/* --- EDUCACIÓN --- */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.education-grid .card {
    text-align: center;
}

/* --- CONTACTO --- */
.contact-section {
    background-color: var(--primary-color);
    color: var(--white-color);
    text-align: center;
}

.contact-section h2, .contact-section h2::after {
    color: var(--white-color);
    border-color: var(--secondary-color);
}

.contact-section p {
    max-width: 600px;
    margin: 0 auto 40px;
}

.contact-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--white-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: var(--transition);
}

.contact-item:hover {
    color: var(--secondary-color);
    transform: scale(1.05);
}

.contact-item i {
    font-size: 1.8rem;
}

/* --- FOOTER --- */
.main-footer {
    background-color: #212f3d;
    color: var(--white-color);
    text-align: center;
    padding: 20px 0;
}

/* --- ANIMACIONES --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
    }
    .hero-text .description {
        margin: 0 auto 30px;
    }
    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    h2 {
        font-size: 2rem;
    }
    .nav-menu {
        position: fixed;
        top: 69px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 69px);
        background-color: var(--primary-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
    }
    .nav-menu.active {
        left: 0;
    }
    .hamburger {
        display: block;
    }
    nav {
        padding: 15px 20px;
    }
    html {
        scroll-padding-top: 69px;
    }
    .hero {
        padding-top: 120px;
    }
    .hero-text h1 {
        font-size: 2.8rem;
    }
}
