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

:root {
    --primary-dark: #0A0E1A;
    --primary: #1A2340;
    --primary-light: #2E3D6B;
    --accent: #6B8FC8;
    --accent-light: #8BA8E0;
    --accent-hover: #5A7FB8;
    --background: #FFFFFF;
    --surface: #F0F4F8;
    --text-primary: #1A1A1A;
    --text-secondary: #4A5568;
    --border: #D1D9E6;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background-color: var(--background);
    width: 100%;
    overflow-x: hidden;
}

/* Navegación Lateral */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    padding: 2rem 0;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    text-align: center;
    padding: 0 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1rem;
    object-fit: cover;
    background: var(--primary-light);
}

.sidebar-header h2 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.sidebar-header p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.sidebar-nav {
    padding: 2rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-link i {
    margin-right: 0.8rem;
    width: 20px;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--accent);
}

.cv-links {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cv-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin: 0;
    transition: background 0.3s ease;
    font-size: 0.9rem;
}

.cv-link:hover {
    background: var(--accent);
}

/* Menú Hamburguesa */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    padding: 1rem;
    z-index: 2000;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.mobile-header h2 {
    color: #ffffff;
    font-size: 1.2rem;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

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



/* Contenido Principal */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    width: calc(100% - 280px);
}

section {
    padding: 5rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Override section styles for full-width sections */
#inicio,
#contacto {
    max-width: none;
    width: 100%;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent);
}

/* Hero Section */
#inicio {
    color: white;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 0;
    max-width: none;
    width: 100%;
    margin: 0;
}

.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    z-index: 0;
}

#inicio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 5rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.typing-text {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    min-height: 2.5rem;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

.btn-outline {
    border: 2px solid white;
    color: white;
}

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

.social-links {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

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

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.highlights {
    background: var(--surface);
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid var(--accent);
}

.highlights h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.highlights ul {
    list-style: none;
}

.highlights li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
}

.highlights li i {
    color: var(--accent);
    margin-right: 0.8rem;
}

.languages {
    margin-top: 1.5rem;
}

.language-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    margin: 0.3rem;
    font-size: 0.9rem;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Symbol", "Segoe UI", sans-serif;
}

/* Experience Section */
.experience-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2rem;
    display: flex;
    gap: 2rem;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

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

.company-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.experience-details h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.company-name {
    color: var(--accent);
    font-weight: 600;
    font-size: 1.1rem;
}

.experience-meta {
    color: var(--text-secondary);
    margin: 0.5rem 0 1rem;
}

.experience-bullets {
    list-style: none;
    margin: 1rem 0;
}

.experience-bullets li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.experience-bullets li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.badge {
    padding: 0.4rem 0.8rem;
    background: white;
    border-radius: 5px;
    font-size: 0.85rem;
    color: var(--primary);
}

/* Projects Section */
#proyectos {
    background: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

/* Project Card Link Wrapper */
.project-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.project-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--accent);
}

/* Featured Badge */
.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

.featured-badge i {
    font-size: 0.9rem;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(255, 165, 0, 0.6);
    }
}

/* Project Image with Background */
.project-image {
    width: 100%;
    height: 280px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 35, 64, 0.7), rgba(107, 143, 200, 0.5));
    opacity: 0.3;
    transition: opacity 0.4s ease;
}

.project-card:hover .project-image::before {
    opacity: 0.1;
}

/* Project Overlay */
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(10, 14, 26, 0.85), rgba(26, 35, 64, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-overlay-content {
    text-align: center;
    color: white;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-overlay-content {
    transform: translateY(0);
}

.project-overlay-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.project-overlay-content .project-description {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.project-overlay-content .project-links {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Project Content */
.project-content {
    padding: 1.5rem;
    background: white;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.project-meta {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.project-category {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.project-year {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.project-status {
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.project-status.published {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.project-status.in-progress {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.project-content h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    transition: color 0.3s ease;
}

.project-card:hover .project-content h3 {
    color: var(--accent);
}

.project-content .project-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.project-content .tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Project Links */
.project-links {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.project-link {
    padding: 0.7rem 1.4rem;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(107, 143, 200, 0.3);
}

.project-link:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 143, 200, 0.4);
}

.project-link.secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--accent);
    box-shadow: none;
}

.project-link.secondary:hover {
    background: var(--surface);
    border-color: var(--accent-hover);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.skill-category {
    background: var(--surface);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.skill-category h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-category h3 i {
    color: var(--accent);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    padding: 0.6rem 1.2rem;
    background: white;
    border-radius: 5px;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* Education Section */
#educacion {
    background: white;
}

.education-timeline {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.education-card {
    background: var(--surface);
    border-radius: 10px;
    padding: 2rem;
    display: flex;
    gap: 2rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.education-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.university-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.education-details h3 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.education-meta {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.gpa {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: white;
    border-radius: 5px;
    font-weight: 600;
    color: var(--accent);
    margin-right: 1rem;
}

/* Contact Section */
#contacto {
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 5rem 3rem;
    max-width: none;
    width: 100%;
    margin: 0;
}

#contacto .background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    z-index: 0;
}

#contacto::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

#contacto .section-title {
    color: white;
    position: relative;
    z-index: 2;
}

#contacto .section-title::after {
    background: var(--accent);
    left: 50%;
    transform: translateX(-50%);
}

.contact-subtitle {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto 3rem;
    position: relative;
    z-index: 2;
}

.contact-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.contact-item i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.contact-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.contact-item a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    word-break: break-all;
}

.contact-item a:hover {
    opacity: 1;
    text-decoration: underline;
}

.availability {
    font-size: 1.1rem;
    padding: 1.5rem;
    background: rgba(74, 144, 226, 0.2);
    border-radius: 10px;
    max-width: 600px;
    margin: 2rem auto 0;
    position: relative;
    z-index: 2;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    animation: fadeInUp 1.2s ease forwards;
    animation-fill-mode: both;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .mobile-header {
        display: flex;
    }

    .main-content {
        margin-left: 0;
        padding-top: 60px;
        width: 100%;
    }

    section {
        padding: 3rem 1.5rem;
    }

    .about-content,
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .typing-text {
        font-size: 1.3rem;
    }

    .experience-card,
    .education-card {
        flex-direction: column;
        text-align: center;
    }

    .company-logo,
    .university-logo {
        margin: 0 auto;
    }

    /* Project cards responsive */
    .project-image {
        height: 220px;
    }

    .featured-badge {
        top: 10px;
        right: 10px;
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }

    .project-overlay {
        padding: 1.5rem;
    }

    .project-overlay-content h3 {
        font-size: 1.3rem;
    }

    .project-overlay-content .project-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .typing-text {
        font-size: 1.1rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* Project cards mobile */
    .project-image {
        height: 200px;
    }

    .project-meta {
        flex-wrap: wrap;
    }

    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
}