:root {
    /* Light Mode Colors */
    --primary-color: #6a1b9a;
    --primary-light: #9c4dcc;
    --primary-dark: #38006b;
    --secondary-color: #f3e5f5;
    --accent-color: #ff9800;
    --text-color: #212121;
    --text-light: #757575;
    --background: #ffffff;
    --surface: #f5f5f5;
    --error: #d32f2f;
}

[data-theme="dark"] {
    /* Dark Mode Colors */
    --primary-color: #9c4dcc;
    --primary-light: #ce93d8;
    --primary-dark: #7b1fa2;
    --secondary-color: #121212;
    --accent-color: #ffb74d;
    --text-color: #e0e0e0;
    --text-light: #b0b0b0;
    --background: #121212;
    --surface: #1e1e1e;
    --error: #f44336;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    background-color: var(--background);
    overflow-x: hidden;
    position: relative;
}

p {
    text-align: justify;
}

/* Animated Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(-45deg, var(--primary-dark), var(--primary-color), var(--primary-light), var(--secondary-color));
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    opacity: 0.1;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Header Controls Container */
.header-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 100;
    padding: 10px 15px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

[data-theme="dark"] .header-controls {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Bandera Mexicana */
.fi-mx {
    font-size: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.fi-mx:hover {
    transform: scale(1.1);
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.dark-mode-toggle:hover {
    transform: scale(1.05);
}

.dark-mode-toggle i {
    position: absolute;
    transition: opacity 0.3s;
}

.dark-mode-toggle .fa-moon {
    opacity: 1;
}

.dark-mode-toggle .fa-sun {
    opacity: 0;
}

[data-theme="dark"] .dark-mode-toggle .fa-moon {
    opacity: 0;
}

[data-theme="dark"] .dark-mode-toggle .fa-sun {
    opacity: 1;
}

.dark-mode-toggle i {
    position: absolute;
    transition: opacity 0.3s;
}

.dark-mode-toggle .fa-moon {
    opacity: 1;
}

.dark-mode-toggle .fa-sun {
    opacity: 0;
}

[data-theme="dark"] .dark-mode-toggle .fa-moon {
    opacity: 0;
}

[data-theme="dark"] .dark-mode-toggle .fa-sun {
    opacity: 1;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-title span {
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
    position: relative;
    z-index: 1;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 35px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: -1;
    animation: glow-border 2s ease-in-out infinite alternate;
}

@keyframes glow-border {
    0% {
        box-shadow: 0 0 3px rgba(255, 255, 255, 0.2), 0 0 5px rgba(255, 255, 255, 0.1);
    }
    100% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.3), 0 0 8px rgba(255, 255, 255, 0.2);
    }
}

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

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

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

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-light);
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--text-light);
    border-radius: 15px;
    margin-top: 10px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: var(--text-light);
    border-radius: 2px;
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
    0% { top: 5px; opacity: 1; }
    50% { top: 15px; opacity: 0.5; }
    100% { top: 5px; opacity: 1; }
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 60px;
    text-align: center;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.section-divider {
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

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

.about-text p {
    margin-bottom: 20px;
    text-align: justify;
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-placeholder {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    position: relative;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.2);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
    transition: all 0.3s ease;
}

.image-placeholder:hover {
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--primary-light);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    margin-bottom: 30px;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-date {
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
}

.timeline-content {
    padding: 20px;
    background-color: var(--surface);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

.timeline-content h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--text-light);
}

.timeline-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: justify;
}

/* Education Grid */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.education-card {
    background-color: var(--surface);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

.education-icon {
    width: 70px;
    height: 70px;
    background-color: var(--primary-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
}

.education-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.education-card .institution {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.education-card .year {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 600;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: center;
}

.action-btn {
    padding: 15px 25px;
    background-color: var(--surface);
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: var(--text-color);
}

.action-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.action-btn i {
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .timeline::before {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

:root {
    /* Light Mode Colors */
    --primary-color: #6a1b9a;
    --primary-light: #9c4dcc;
    --primary-dark: #38006b;
    --secondary-color: #f3e5f5;
    --accent-color: #ff9800;
    --text-color: #212121;
    --text-light: #757575;
    --background: #ffffff;
    --surface: #f5f5f5;
    --error: #d32f2f;
}

[data-theme="dark"] {
    /* Dark Mode Colors */
    --primary-color: #9c4dcc;
    --primary-light: #ce93d8;
    --primary-dark: #7b1fa2;
    --secondary-color: #121212;
    --accent-color: #ffb74d;
    --text-color: #e0e0e0;
    --text-light: #b0b0b0;
    --background: #121212;
    --surface: #1e1e1e;
    --error: #f44336;
}

/* ... (mantener todo el CSS anterior igual hasta el .dark-mode-toggle) ... */

/* Header Controls */
.header-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    z-index: 100;
}

/* Bandera Mexicana */
.fi-mx {
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Bandera Mexicana */
.fi-fr {
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ... (mantener el resto del CSS exactamente igual que antes) ... */