/* Uniformar tamaño de h1 en section, article, nav y aside para compatibilidad futura (MDN) */
section h1, article h1, nav h1, aside h1 {
    font-size: 2em;
}
/* ===== CSS VARIABLES ===== */
:root {
    /* Colors */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #f59e0b;
    --accent-color: #10b981;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --background-primary: #ffffff;
    --background-secondary: #f9fafb;
    --background-dark: #111827;
    --border-color: #e5e7eb;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 10px 15px rgba(0, 0, 0, 0.1);
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Poppins', sans-serif;
    
    /* Sizes */
    --container-max-width: 1200px;
    --section-padding: 5rem 0;
    --border-radius: 0.5rem;
    --transition: all 0.3s ease;
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Prevent scroll restoration */
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    line-height: 1.6;
    background-color: var(--background-primary);
    /* Ensure body always starts from top */
    overflow-x: hidden;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: 2px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    font-weight: 600;
    text-shadow: none;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 1);
    color: var(--primary-dark);
    border-color: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
    text-decoration: none;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition);
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
    /* Ensure no unwanted transformations */
    transform: none;
    will-change: auto;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.6) 25%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.7) 75%,
        rgba(0, 0, 0, 0.85) 100%
    );
    z-index: 1;
}

.hero-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
    /* Ensure stable positioning */
    transform: none;
    will-change: auto;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    color: white;
    justify-content: center;
    min-height: calc(100vh - 80px);
    padding-top: 10vh;
    padding-bottom: 10vh;
    position: relative;
    transform: none;
    will-change: auto;
}

.hero-text {
    max-width: 600px;
    transform: none;
    position: relative;
    will-change: auto;
}

.hero-title {
    margin-bottom: 1.5rem;
}

.greeting {
    display: block;
    font-size: 1.5rem;
    color: #e2e8f0;
    font-weight: 400;
}

.name {
    display: block;
    font-size: 3.5rem;
    color: #ffffff;
    font-weight: 700;
    margin: 0.5rem 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.role {
    display: block;
    font-size: 2rem;
    color: #fbbf24;
    font-weight: 600;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.hero-description {
    margin-bottom: 2.5rem;
}

.hero-description p {
    font-size: 1.09rem; /* Cambiar de 1.125rem a 1.09rem */
    color: #e2e8f0;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-start;
    /* Ensure stable positioning */
    transform: none;
    will-change: auto;
}

/* Subir solo los botones del hero 6px */
.hero-buttons a.btn {
    position: relative;
    top: -6px;
    transform: none;
    transition: all 0.3s ease;
    will-change: auto;
}

.hero-buttons a.btn:hover {
    transform: translateY(-2px);
}

/* Remove old hero-image styles */
.hero-image,
.image-container {
    display: none;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: var(--section-padding);
    background-color: var(--background-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

/* ===== SERVICES SECTION ===== */
.services {
    padding: var(--section-padding);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: white;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== EXPERIENCE SECTION ===== */
.experience {
    padding: var(--section-padding);
    background-color: var(--background-secondary);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--primary-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 50%;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 0.75rem;
    left: 50%;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border: 4px solid white;
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 0 4px var(--primary-color);
    z-index: 2;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 2rem;
    text-align: right;
}

.timeline-item:nth-child(odd)::before {
    right: 0px;
    left: auto;
    transform: translateX(50%);
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 2rem;
    text-align: left;
}

.timeline-item:nth-child(even)::before {
    left: 0px;
    transform: translateX(-50%);
}

.timeline-date {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-content {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.timeline-content h4 {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 1rem;
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.timeline-content ul {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.timeline-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.timeline-content li::marker {
    color: var(--primary-color);
}

.experience-cta {
    text-align: center;
    margin-top: 3rem;
}

.experience-cta .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.experience-cta .btn i {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 70px !important;
        padding-right: 0 !important;
        text-align: left !important;
    }
    
    .timeline-item::before {
        left: 20px !important;
        transform: none !important;
        top: 0.75rem;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
    
    .experience-cta .btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}



/* ===== TECHNOLOGIES SECTION ===== */
.technologies {
    padding: var(--section-padding);
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
}

.tech-item:hover {
    background-color: var(--background-secondary);
    transform: translateY(-3px);
}

.tech-item i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.tech-item span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ===== TECHNOLOGIES IN ABOUT SECTION ===== */
.about .technologies {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.about .technologies .tech-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.about .technologies .tech-row:last-child {
    margin-bottom: 0;
}

/* Primera fila (6 tecnologías) */
.about .technologies .tech-row:nth-child(1) .tech-item {
    flex: 1;
    max-width: calc(16.666% - 0.833rem);
}

/* Segunda fila (5 tecnologías centradas) */
.about .technologies .tech-row:nth-child(2) {
    justify-content: center;
    gap: 1.5rem;
}

.about .technologies .tech-row:nth-child(2) .tech-item {
    flex: 0 0 auto;
    width: calc(16.666% - 0.833rem);
}

.about .technologies .tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.875rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    min-height: 75px;
}

.about .technologies .tech-item:hover {
    transform: translateY(-2px);
    background: rgba(37, 99, 235, 0.06);
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.12);
}

.about .technologies .tech-item img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    margin-bottom: 0.4rem;
    transition: transform 0.3s ease;
}

.about .technologies .tech-item:hover img {
    transform: scale(1.12);
}

.about .technologies .tech-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0.2rem;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .about .technologies .tech-row {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .about .technologies .tech-row:nth-child(1) .tech-item,
    .about .technologies .tech-row:nth-child(2) .tech-item {
        flex: 0 0 calc(50% - 0.25rem);
        max-width: calc(50% - 0.25rem);
        min-height: 65px;
    }
    
    .about .technologies .tech-item img {
        width: 32px;
        height: 32px;
    }
    
    .about .technologies .tech-label {
        font-size: 0.7rem;
    }
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: var(--section-padding);
    background-color: var(--background-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.contact-info p {
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.contact-methods {
    margin-bottom: 2rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-method i {
    width: 20px;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

.contact-form {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--background-dark);
    color: white;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-text p {
    margin-bottom: 0.5rem;
    color: #9ca3af;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure hero text animation completes properly */
.hero-text {
    animation: fadeInUp 0.8s ease-out forwards;
    max-width: 600px;
    transform: translateY(0);
    position: relative;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0;
        padding-left: 3rem;
        padding-right: 0;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
        padding-left: 3rem;
        padding-right: 0;
    }
    
    .timeline-date {
        left: -60px !important;
    }
}

@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
        padding-top: 100px;
    }
    
    .hero-overlay {
        background: linear-gradient(
            135deg,
            rgba(0, 0, 0, 0.85) 0%,
            rgba(0, 0, 0, 0.7) 30%,
            rgba(0, 0, 0, 0.5) 50%,
            rgba(0, 0, 0, 0.8) 100%
        );
    }
    
    .hero-content {
        padding-top: 10vh;
        padding-bottom: 8vh;
        text-align: center;
        align-items: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .name {
        font-size: 2.5rem !important;
    }
    
    .role {
        font-size: 1.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description p {
        font-size: 1rem;
    }
    
    .badge {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .hero {
        padding-top: 120px;
    }
    
    .name {
        font-size: 2rem !important;
    }
    
    .role {
        font-size: 1.25rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .floating-badges {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .service-card,
    .tech-category,
    .contact-form {
        padding: 1.5rem;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
}

/* ===== CV PAGE STYLES ===== */
.cv-header {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.cv-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 200"><path d="M0,100 C300,150 700,50 1000,100 L1000,200 L0,200 Z" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 100% 200px;
    background-repeat: no-repeat;
    background-position: bottom;
}

.cv-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.cv-title h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: white;
}

.cv-title h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.cv-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.cv-contact {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.cv-contact p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.cv-contact i {
    color: var(--secondary-color);
    width: 20px;
}

.cv-actions {
    display: flex;
    gap: 1rem;
}

.cv-actions .btn {
    padding: 1rem 2rem;
    font-weight: 600;
}

.cv-content {
    padding: 4rem 0;
    background-color: var(--background-secondary);
}

.cv-timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.cv-timeline::before {
    content: '';
    position: absolute;
    left: 150px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.cv-item {
    display: flex;
    margin-bottom: 3rem;
    position: relative;
}

.cv-item::before {
    content: '';
    position: absolute;
    left: 141px;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.cv-date {
    width: 130px;
    flex-shrink: 0;
    text-align: right;
    padding-right: 2rem;
}

.date-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.cv-content-item {
    flex: 1;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
    margin-left: 2rem;
}

.cv-header-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.cv-header-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.cv-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.cv-location i {
    color: var(--primary-color);
}

.cv-content-item h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.cv-content-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.cv-responsibilities {
    margin-top: 1.5rem;
}

.cv-responsibilities h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.cv-responsibilities ul {
    margin: 0;
    padding-left: 1.5rem;
}

.cv-responsibilities li {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.cv-responsibilities li::marker {
    color: var(--primary-color);
}

/* Navigation active state for CV page */
.nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cv-header {
        padding: 6rem 0 3rem;
    }
    
    .cv-header-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .cv-title h1 {
        font-size: 2.5rem;
    }
    
    .cv-title h2 {
        font-size: 2rem;
    }
    
    .cv-subtitle {
        font-size: 1.1rem;
    }
    
    .cv-contact {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .cv-contact p {
        justify-content: center;
    }
    
    .cv-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .cv-actions .btn {
        width: 100%;
        text-align: center;
    }
    
    .cv-timeline::before {
        left: 20px;
    }
    
    .cv-item {
        flex-direction: column;
        margin-left: 2rem;
    }
    
    .cv-item::before {
        left: 11px;
    }
    
    .cv-date {
        width: 100%;
        text-align: left;
        padding-right: 0;
        padding-bottom: 1rem;
    }
    
    .cv-content-item {
        margin-left: 0;
        padding: 1.5rem;
    }
    
    .cv-header-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cv-header-item h3 {
        font-size: 1.3rem;
    }
    
    .cv-location {
        margin-top: 0.5rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .cv-actions,
    .footer {
        display: none !important;
    }
    
    .cv-header {
        padding: 2rem 0;
        background: none !important;
        color: var(--text-primary) !important;
    }
    
    .cv-header::before {
        display: none;
    }
    
    .cv-title h1,
    .cv-title h2 {
        color: var(--text-primary) !important;
    }
    
    .cv-subtitle {
        color: var(--text-secondary) !important;
    }
    
    .cv-content {
        padding: 2rem 0;
    }
    
    .cv-timeline::before {
        background: #ccc !important;
    }
    
    .cv-item::before {
        background: #666 !important;
        box-shadow: none !important;
    }
    
    .date-badge {
        background: #666 !important;
        color: white !important;
    }
    
    .cv-content-item {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* ===== CLIENTS SECTION ===== */
.clients {
    padding: var(--section-padding);
    background-color: var(--background-primary);
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.client-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    height: 100px;
}

.client-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.client-item img {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.7);
    transition: var(--transition);
}

.client-item:hover img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

/* ===== BLOG STYLES ===== */

/* Blog Hero Section */
.blog-hero {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    padding: 6rem 0 4rem;
    text-align: center;
    position: relative;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    opacity: 0.9;
    z-index: 1;
}

.blog-hero .container {
    position: relative;
    z-index: 2;
}

.blog-hero-content h1 {
    font-family: var(--font-secondary);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

.blog-hero-content > p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 3rem;
    opacity: 0.95;
    line-height: 1.7;
    color: #f3f4f6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.blog-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-secondary);
    color: #fbbf24;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #f3f4f6;
}

/* Blog Content */
.blog-content {
    padding: 5rem 0;
    background: var(--background-secondary);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* Blog Cards */
.blog-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.blog-card.featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 300px;
}

.blog-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.blog-card.featured .blog-image {
    height: 100%;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(37, 99, 235, 0.95);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.blog-content-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.blog-date::before {
    content: "📅";
    margin-right: 0.5rem;
}

.blog-read-time::before {
    content: "⏱️";
    margin-right: 0.5rem;
}

.blog-title {
    font-family: var(--font-secondary);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.blog-card.featured .blog-title {
    font-size: 1.8rem;
}

.blog-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-top: auto;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--background-secondary);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.blog-read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
}

.blog-read-more:hover {
    color: var(--primary-dark);
}

.blog-read-more i {
    margin-left: 0.5rem;
    transition: var(--transition);
}

.blog-read-more:hover i {
    transform: translateX(3px);
}

/* Newsletter Section */
.blog-newsletter {
    background: var(--primary-color);
    color: white;
    padding: 3rem;
    border-radius: var(--border-radius);
    text-align: center;
}

.newsletter-content h3 {
    font-family: var(--font-secondary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.newsletter-content > p {
    font-size: 1.1rem;
    opacity: 1;
    color: #ffffff;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form {
    display: flex;
    max-width: 400px;
    margin: 0 auto 1rem;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.newsletter-form input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--secondary-color);
}

.newsletter-form .btn {
    white-space: nowrap;
    background: var(--secondary-color);
    border: none;
}

.newsletter-form .btn:hover {
    background: #d97706;
}

.newsletter-note {
    font-size: 0.85rem;
    opacity: 1;
    color: #e5e7eb;
}

/* Active Navigation Link */
.nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-card.featured {
        grid-column: span 1;
        display: block;
    }
    
    .blog-card.featured .blog-image {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .blog-hero-content h1 {
        font-size: 2.2rem;
    }
    
    .blog-hero-content > p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .blog-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-title {
        font-size: 1.2rem;
    }
    
    .blog-card.featured .blog-title {
        font-size: 1.4rem;
    }
    
    .blog-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .newsletter-form {
        flex-direction: column;
        max-width: 300px;
    }
    
    .blog-newsletter {
        padding: 2rem 1.5rem;
    }
    
    .newsletter-content h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .blog-content-card {
        padding: 1rem;
    }
    
    .blog-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .blog-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* Blog CTA Section */
.blog-cta {
    background: var(--background-secondary);
    padding: 4rem 0;
}

.blog-cta-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.blog-cta-text h2 {
    font-family: var(--font-secondary);
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.blog-cta-text > p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.blog-highlights {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.highlight-item i {
    color: var(--primary-color);
    font-size: 1.1rem;
    width: 20px;
}

.blog-cta-actions {
    text-align: center;
}

.blog-cta-actions .btn {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    padding: 0.875rem 2rem;
}

.blog-stats-mini {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.stat-mini {
    text-align: center;
}

.stat-mini .number {
    display: block;
    font-family: var(--font-secondary);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-mini .label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .blog-cta-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .blog-cta-text h2 {
        font-size: 1.8rem;
    }
    
    .blog-highlights {
        align-items: center;
    }
    
    .blog-stats-mini {
        gap: 1.5rem;
    }
    
    .stat-mini .number {
        font-size: 1.5rem;
    }
}

/* ===== ARTICLE PAGE STYLES ===== */

/* Article Header */
.article-header {
    padding: 8rem 0 3rem;
    background: var(--background-secondary);
}

.article-breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.article-breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.article-breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
}

.article-hero {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.article-category {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
}

.article-hero h1 {
    font-family: var(--font-secondary);
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.article-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 2rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.article-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.article-share {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.share-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1rem;
}

.share-linkedin {
    background: #0077b5;
    color: white;
}

.share-twitter {
    background: #1da1f2;
    color: white;
}

.share-facebook {
    background: #4267b2;
    color: white;
}

.share-whatsapp {
    background: #25d366;
    color: white;
}

.share-copy {
    background: var(--text-light);
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.article-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.article-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Article Content */
.article-content {
    padding: 4rem 0;
    background: white;
}

.article-body {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.article-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.article-intro {
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--background-secondary);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.article-text h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin: 3rem 0 1.5rem;
    font-weight: 600;
}

.article-text h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 2.5rem 0 1rem;
    font-weight: 600;
}

.article-text h4 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.article-text p {
    margin-bottom: 1.5rem;
}

.article-text ul,
.article-text ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-text li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.article-text li::marker {
    color: var(--primary-color);
}

.article-text blockquote {
    background: var(--background-secondary);
    border-left: 4px solid var(--secondary-color);
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-style: italic;
    position: relative;
}

.article-text blockquote::before {
    content: '"';
    font-size: 4rem;
    color: var(--secondary-color);
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    font-family: serif;
}

.article-text blockquote p {
    margin: 0;
    font-size: 1.125rem;
    color: var(--text-primary);
    padding-left: 3rem;
}

.article-highlight {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 2rem 0;
}

.article-highlight h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.article-highlight p {
    margin: 0;
    color: var(--text-primary);
}

.article-cta {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 3rem 0;
}

.article-cta h3 {
    color: white;
    margin-bottom: 1rem;
}

.article-cta p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.article-cta .btn {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.article-cta .btn:hover {
    background: #d97706;
    border-color: #d97706;
}

/* ===== RESPONSIVE STYLES FOR ARTICLES ===== */
@media (max-width: 768px) {
    .article-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .article-content {
        order: 1;
    }
    
    .article-sidebar {
        order: 2;
    }
    
    .article-hero-content h1 {
        font-size: 2rem;
    }
    
    .share-buttons {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .share-btn {
        min-width: auto;
        padding: 0.75rem;
    }
    
    .share-btn span {
        display: none;
    }
    
    .article-text h2 {
        font-size: 1.5rem;
    }
    
    .article-text h3 {
        font-size: 1.25rem;
    }
    
    .article-highlight,
    .article-cta {
        margin: 1.5rem 0;
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .article-hero-content h1 {
        font-size: 1.75rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .share-buttons {
        justify-content: flex-start;
    }
    
    .article-text {
        font-size: 1rem;
    }
    
    .article-text ul,
    .article-text ol {
        padding-left: 1.5rem;
    }
    
    .article-text blockquote {
        padding: 1rem;
        margin: 1.5rem 0;
    }
    
    .article-text blockquote p {
        font-size: 1rem;
        padding-left: 2rem;
    }
}
