:root {
    --bg-dark: #0F172A;
    --bg-card: rgba(30, 41, 59, 0.7);
    --primary: #10B981;
    --primary-hover: #059669;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --nav-bg: rgba(15, 23, 42, 0.85);
    /* Borde y sombras para efecto Glass/Premium */
    --border-light: rgba(255, 255, 255, 0.08);
    --shadow-card: 0 8px 32px rgba(0,0,0,0.4);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Tipografía Básica */
h1, h2, h3, h4 { color: var(--text-main); font-weight: 600; }
p { color: var(--text-muted); }
a { text-decoration: none; color: inherit; }

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

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    letter-spacing: -0.5px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* --- NAVEGACIÓN FLOTANTE --- */
.navbar {
    position: fixed;
    top: 25px; 
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    padding: 15px 40px;
    border-radius: 50px;
    display: flex;
    justify-content: center;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    padding: 12px 40px;
    top: 15px;
    width: 85%;
}

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

.nav-brand {
    display: flex;
    align-items: center;
}

.brand-logo {
    height: 75px;
    width: auto;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3)); /* Para que resalte bien */
}

.brand-logo:hover {
    transform: scale(1.05);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    transition: color 0.3s;
    opacity: 0.8;
}

.nav-links a:hover {
    color: var(--primary);
    opacity: 1;
}

/* --- HERO SECTION --- */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.image-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
}

.hero-image {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.video-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(15,23,42,0.95) 0%, rgba(15,23,42,0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 0 20px;
    transform: translateY(20px);
    opacity: 0;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.2s;
}

.hero-content h1 {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(to right, #F8FAFC, #94A3B8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.hero-content h2 {
    font-size: 1.6rem;
    color: var(--primary);
    margin-bottom: 25px;
    font-weight: 400;
}

.hero-content p {
    font-size: 1.15rem;
    margin-bottom: 45px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    display: inline-block;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    margin-left: 20px;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.08);
    border-color: #fff;
}

/* --- ABOUT SECTION --- */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: transform 0.3s, border-color 0.3s;
}

.about-card:hover {
    transform: translateY(-8px);
    border-color: rgba(16, 185, 129, 0.4);
}

.about-card .icon {
    font-size: 3rem;
    margin-bottom: 25px;
}

.about-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* --- EXPERIENCE GALLERY --- */
.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.exp-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 35px;
    box-shadow: var(--shadow-card);
    transition: border-color 0.3s;
}

.exp-card:hover { border-color: rgba(255,255,255,0.15); }

.exp-header { margin-bottom: 25px; }

.exp-header h3 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.exp-header h4 {
    font-size: 1rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 12px;
}

.date-badge {
    display: inline-block;
    background: rgba(16, 185, 129, 0.1);
    color: var(--text-main);
    border: 1px solid rgba(16,185,129,0.2);
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
}

.exp-list { list-style: none; }

.exp-list li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.exp-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

.accordion-content.open {
    max-height: 500px;
    opacity: 1;
    margin-top: 15px;
    border-top: 1px solid var(--border-light);
    padding-top: 15px;
}

.btn-toggle {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
}

.btn-toggle:hover { text-decoration: underline; color: #fff; }

/* --- EDUCATION TABS --- */
.tabs-header {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid var(--border-light);
    transition: all 0.3s;
}

.tab-btn.active, .tab-btn:hover {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active { display: block; }

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

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: rgba(255,255,255,0.05); /* Ligeramente más visible */
    top: 0; bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

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

.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; }

.timeline-dot {
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    top: 25px;
    z-index: 1;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.timeline-item:nth-child(odd) .timeline-dot { right: -7px; }
.timeline-item:nth-child(even) .timeline-dot { left: -7px; }

.timeline-content {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.timeline-content h3 { font-size: 1.1rem; color: #fff; margin-bottom: 5px; }
.timeline-content h4 { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 15px; }
.timeline-content .year { display: inline-block; padding: 4px 10px; background: rgba(16,185,129,0.1); border-radius: 4px; font-size: 0.85rem; margin-bottom: 12px; color: var(--primary); font-weight: 500;}

/* CERTS GRID */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.cert-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    border-top: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    transition: transform 0.3s;
}
.cert-card:hover { transform: translateX(8px); }
.cert-card h4 { font-size: 1.05rem; margin-bottom: 10px; color: #fff;}
.cert-card p { font-size: 0.9rem; color: var(--text-muted);}

/* --- SKILLS --- */
.skills-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.skills-wrapper h3 { margin-bottom: 20px;}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tag {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-main);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s;
    cursor: default;
}

.skill-tag:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.lang-bars { display: flex; flex-direction: column; gap: 20px; }
.lang-item { width: 100%; }
.lang-info { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.95rem; color: #fff;}
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
}
.progress {
    height: 100%;
    background: linear-gradient(90deg, #10B981 0%, #34D399 100%);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

/* --- FOOTER --- */
.footer {
    background: rgba(15, 23, 42, 0.8);
    border-top: 1px solid var(--border-light);
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 40px;
}

.footer-info h2 { font-size: 2.2rem; margin-bottom: 15px;}
.footer-info p { font-size: 1.1rem; max-width: 500px;}

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

.social-link {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.05rem;
    transition: color 0.3s, transform 0.3s;
}

.social-link:hover { color: var(--primary); transform: translateX(5px);}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- MEDIA QUERIES --- */
@media (max-width: 900px) {
    .skills-wrapper { grid-template-columns: 1fr; gap: 40px;}
    .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 40px;}
    .contact-links { align-items: center; }
    .footer-info p { margin: 0 auto; }
    .timeline::after { left: 40px; }
    .timeline-item { width: 100%; padding-left: 80px; padding-right: 0; }
    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) { left: 0; text-align: left; }
    .timeline-item:nth-child(odd) .timeline-dot, .timeline-item:nth-child(even) .timeline-dot { left: 33px; }
    .social-link:hover { transform: translateY(-5px); translateX(0);}
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-content { justify-content: center; }
    .navbar { padding: 15px;}
    .hero-content h1 { font-size: 3rem; }
    .btn-secondary { margin-left: 0; margin-top: 15px; display: block; width: fit-content; margin-inline: auto;}
    .section-container { padding: 60px 20px; }
    .section-title { font-size: 2rem;}
}

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.flex-heading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inline-icon {
    vertical-align: middle;
    margin-right: 6px;
    margin-bottom: 2px;
}

/* --- MODAL FORM --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--primary);
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: var(--primary);
}

