/* Variables y Reset */
:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --dark-color: #b4b4b4;
    --light-color: #272727;
    --gray-color: #6c757d;
    --success-color: #4cc9f0;
    --warning-color: #f72585;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2em 20px;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
    color: var(--dark-color);
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--gray-color);
    margin-bottom: 2rem;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 15px 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
    display: none;
}

.nav ul {
    display: flex;
    gap: 30px;
}

.nav a {
    font-weight: 600;
    padding: 5px 0;
    position: relative;
    transition: var(--transition);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav a:hover::after {
    width: 100%;
}

.nav a.active {
    color: var(--primary-color);
}

.nav a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    padding: 150px 0 100px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.hero-content {
    flex: 1;
}

.hero-image {
    flex: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.hero h1{
    color: var(--light-color);
}

.hero h1 span {
    color: var(--primary-color);
}

/* About Section */
.about,.interest{
    padding: 100px 0;
    background-color: white;
}

.skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.skill-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.skill-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.skill-card h3 {
    margin-bottom: 15px;
}

/* Projects Section */
.projects {
    padding: 100px 0;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.project-image {
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-content {
    padding: 25px;
}

.project-meta {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* Resume Section */
.resume {
    padding: 150px 0 100px;
}

.resume-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.resume-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 50px;
}

.resume-sidebar {
    position: relative;
}

.profile-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 120px;
    text-align: center;
}

.profile-card img {
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 5px solid #f0f0f0;
}

.contact-info {
    margin: 30px 0;
    text-align: left;
}

.contact-info h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.contact-info ul li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.contact-info ul li i {
    margin-right: 10px;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.skills h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.skill-bar {
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin-top: 5px;
    overflow: hidden;
}

.skill-level {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
}

.languages h3 {
    font-size: 1.2rem;
    margin: 30px 0 15px;
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.languages ul li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.languages ul li span {
    color: var(--gray-color);
}

.resume-main {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--box-shadow);
}

.resume-section {
    margin-bottom: 50px;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10px;
    height: 100%;
    width: 2px;
    background-color: #eee;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 5px;
    left: -28px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 3px solid white;
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 5px;
}

.timeline-content h3 {
    margin-bottom: 5px;
}

.company {
    color: var(--gray-color);
    font-style: italic;
    margin-bottom: 10px;
}

.timeline-content ul {
    margin-left: 20px;
}

.timeline-content ul li {
    margin-bottom: 5px;
    position: relative;
}

.timeline-content ul li::before {
    content: '•';
    position: absolute;
    left: -15px;
    color: var(--primary-color);
}

.certifications {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.certification-item {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

/* Contact Section */
.contact {
    padding: 150px 0 100px;
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 50px;
}

.contact-info {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--box-shadow);
}

.info-card {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.info-card i {
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    background-color: #f0f4f8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.contact-form {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: var(--font-main);
    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(67, 97, 238, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.interests{
    padding: 2em !important;
    color: var(--dark-color) !important;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-image {
        margin-top: 50px;
        order: -1;
    }
    
    .resume-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-card {
        position: static;
        margin-bottom: 50px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block; /* muestra el menú hamburguesa sólo en móviles */
    }
    
    .nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        background-color: white;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        padding: 30px 0;
    }
    
    .nav.active {
        left: 0;
    }
    
    .nav ul {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .skills {
        grid-template-columns: 1fr;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 120px 0 80px;
    }
    
    .btn {
        padding: 10px 20px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

/* Animaciones y efectos */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

/* Accesibilidad */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

/* Modo oscuro opcional */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: var(--light-color);
    }
    
    .header,
    .skill-card,
    .project-card,
    .profile-card,
    .resume-main,
    .contact-info,
    .contact-form {
        background-color: #1e1e1e;
        color: var(--dark-color);
    }
    
    .project-card,
    .skill-card,
    .profile-card,
    .resume-main,
    .contact-info,
    .contact-form {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }
    
    .form-group input,
    .form-group textarea {
        background-color: #2d2d2d;
        border-color: #444;
        color: #f1f1f1;
    }
    
    .subtitle,
    .project-meta,
    .company,
    .timeline-date {
        color: #aaa;
    }
    
    .footer {
        background-color: #000;
    }
}