/* --- Variables y Reset --- */
:root {
    --primary-color: #0f172a;
    /* Slate 900 */
    --secondary-color: #334155;
    /* Slate 700 */
    --accent-color: #3b82f6;
    /* Blue 500 */
    --accent-hover: #2563eb;
    /* Blue 600 */
    --text-color: #334155;
    /* Slate 700 */
    --text-light: #64748b;
    /* Slate 500 */
    --bg-color: #f8fafc;
    /* Slate 50 */
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    /* Slate 200 */
    --white: #ffffff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.section {
    padding: 80px 0;
}

.bg-light {
    background-color: #f1f5f9;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: var(--primary-color);
    text-align: center;
    font-weight: 700;
}

.section-title i {
    margin-right: 12px;
    color: var(--accent-color);
}

/* --- Navegación --- */
.navbar {
    background: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

.nav-links {
    display: flex;
    gap: 25px;
}

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

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

/* Mobile Menu */
.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--white);
    padding: 120px 0 ;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.hero h2 {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 20px;
    color: #cbd5e1;
}

.accent {
    color: var(--accent-color);
}

.hero-contact-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
    color: #94a3b8;
    font-size: 0.95rem;
}

.hero-contact-info span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero p {
    font-size: 1.1rem;
    color: #cbd5e1;
    max-width: 600px;
    margin: 0 auto 30px;
}

.hero-btns {
    margin-top: 30px;
}

.btn {
    padding: 12px 28px;
    border-radius: 6px;
    margin: 0 10px;
    font-weight: 600;
    display: inline-block;
    transition: var(--transition);
    font-size: 0.95rem;
}



.primary-btn {
    background: var(--accent-color);
    color: var(--white);
    border: 2px solid var(--accent-color);
}

.primary-btn:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

@keyframes heartbeat-cta {
    0%, 100% { transform: scale(1); }
    5% { transform: scale(1.05); box-shadow: 0 0 15px rgba(255, 255, 255, 0.4); }
    10% { transform: scale(1); }
    15% { transform: scale(1.05); box-shadow: 0 0 15px rgba(218, 203, 120, 0.4); }
    20% { transform: scale(1); }
}

.secondary-btn {
    border: 2px solid #cbd5e1;
    color: var(--white);
    background: transparent;
    position: relative;
    animation: heartbeat-cta 7s ease-in-out 3;
}

.secondary-btn:hover {
    background: #cbd5e1;
    color: var(--primary-color);
    transform: translateY(-2px) scale(1.02);
    animation: none;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* --- Cards & Grid --- */
.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.profile-card p {
    margin-bottom: 15px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.profile-card p:last-child {
    margin-bottom: 0;
}

/* Skills */
.grid-skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 25px;
}

.skill-item {
    text-align: center;
    padding: 40px 20px;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: #cbd5e1;
}

.skill-item i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.skill-item h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-weight: 600;
}

.skill-item p {
    color: var(--text-light);
}

/* Project */
.tech-stack {
    background: #f1f5f9;
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

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

.project-card ul {
    margin-left: 20px;
    list-style-type: none;
}

.project-card li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 15px;
    color: var(--text-color);
}

.project-card li::before {
    content: "•";
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* --- Split Layout (Exp & Edu) --- */
.split-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
}

.timeline-item {
    background: var(--card-bg);
    padding: 25px;
    margin-bottom: 25px;
    border-left: 4px solid var(--accent-color);
    box-shadow: var(--shadow-sm);
    border-radius: 0 8px 8px 0;
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.timeline-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.timeline-item .date {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-color);
    background: #eff6ff;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.timeline-item h3 {
    margin-bottom: 5px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.timeline-item h4 {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 12px;
    font-weight: 500;
}

.timeline-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.edu-card h3,
.training-card h3,
.soft-skills-card h3,
.lang-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.15rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.edu-card ul,
.training-card ul,
.soft-skills-card ul {
    list-style: none;
    margin-top: 15px;
}

.edu-card li,
.training-card li,
.soft-skills-card li {
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
    font-size: 0.95rem;
}

.edu-card li::before,
.training-card li::before,
.soft-skills-card li::before {
    content: "✓";
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.training-card ul ul {
    margin-top: 8px;
    margin-left: 5px;
}

.training-card ul ul li::before {
    content: "•";
    color: var(--text-light);
}

.lang-card p {
    margin-bottom: 10px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

footer h2 {
    margin-bottom: 15px;
    font-size: 2rem;
}

footer p {
    color: #94a3b8;
}

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

.contact-link,
.location {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.copyright {
    margin-top: 50px;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    color: #64748b;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .split-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }

    .hero {
        padding: 80px 0;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

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

    .hero-contact-info {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .hero-btns {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .hero-btns .btn {
        margin: 0;
        width: 100%;
        max-width: 300px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 0;
        background: var(--white);
        width: 100%;
        text-align: center;
        padding: 20px 0;
        box-shadow: var(--shadow-md);
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .card {
        padding: 20px;
    }

    .split-layout {
        gap: 30px;
    }

    .contact-info {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 40px 0;
    }

    .hero {
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .timeline-item {
        padding: 15px;
    }
    
    .timeline-item h3 {
        font-size: 1.1rem;
    }
}

.flag-icon {
    vertical-align: middle;
    border-radius: 2px;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
}