/* style.css */
/* --- CONFIGURACIÓN DE VARIABLES (Paleta Oscura por defecto) --- */
:root {
    --bg-main: #090d16;
    --bg-alt: #0f172a;
    --bg-card: #141f32;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --text-body: #cbd5e1;
    --border-color: #1e293b;
    --navbar-bg: rgba(9, 13, 22, 0.85);
}

/* --- VARIABLES PARA MODO CLARO --- */
body.light-mode {
    --bg-main: #f8fafc;
    --bg-alt: #f1f5f9;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-body: #334155;
    --border-color: #e2e8f0;
    --navbar-bg: rgba(248, 250, 252, 0.85);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Transición suave para todos los cambios de tema */
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-main);
    color: var(--text-body);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    background: var(--navbar-bg);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.logo span {
    color: #38bdf8;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}

.nav-links a:hover {
    color: #38bdf8;
}

/* Botón de Idioma de la Barra (Padding horizontal extendido) */
.nav-btn {
    background: transparent;
    border: 1px solid #38bdf8;
    color: #38bdf8;
    padding: 5px 18px; /* Modificado para dar más padding izquierda/derecha */
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}
.nav-btn:hover {
    background: #38bdf8;
    color: #090d16;
}

/* HERO */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 60px 8%;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.small-title {
    color: #38bdf8;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
}

.hero h1 {
    font-size: 54px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-main);
    letter-spacing: -1px;
    margin-bottom: 24px;
}

.hero-description {
    color: var(--text-muted);
    font-size: 19px;
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.hero-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.hero-img {
    width: 100%;
    max-width: 380px;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    object-fit: cover;
}

/* BUTTONS */
.primary-button,
.secondary-button {
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.primary-button {
    background: #38bdf8;
    color: #090d16;
}

.primary-button:hover {
    background: #0ea5e9;
    transform: translateY(-2px);
}

.secondary-button {
    border: 1px solid var(--border-color);
    color: var(--text-main);
    background: rgba(30, 41, 59, 0.1);
}

.secondary-button:hover {
    background: var(--bg-alt);
}

.icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* SECTIONS */
.section {
    padding: 100px 8%;
}

.section-container {
    max-width: 1100px;
    margin: 0 auto;
}

.bg-alt {
    background: var(--bg-alt);
}

.section h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.section-text {
    color: var(--text-body);
    font-size: 18px;
    max-width: 900px;
}

/* SKILLS */
.skill-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 35px 0 15px 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.skill-card {
    background: var(--bg-card);
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-body);
}

/* TIMELINE (EXPERIENCIA) */
.timeline {
    position: relative;
    border-left: 2px solid var(--border-color);
    padding-left: 30px;
    margin-left: 10px;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-date {
    font-weight: 700;
    color: #38bdf8;
    margin-bottom: 6px;
    font-size: 14px;
}

.timeline-content h3 {
    font-size: 22px;
    color: var(--text-main);
    font-weight: 600;
}

.timeline-content h4 {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 500;
}

.timeline-content p {
    color: var(--text-body);
    font-size: 16px;
    max-width: 850px;
}

/* EDUCATION */
.education-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.edu-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.edu-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-main);
}

.edu-institution {
    color: #38bdf8;
    font-weight: 500;
    margin-bottom: 8px;
}

.edu-date {
    color: var(--text-muted);
    font-size: 14px;
}

.edu-list {
    margin-top: 15px;
    padding-left: 20px;
    color: var(--text-body);
}

.edu-list li {
    margin-bottom: 8px;
}

/* GRAPHIC BREAK SECT */
.graphic-break {
    padding: 0;
}

.graphic-container {
    position: relative;
    height: 350px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #090d16;
}

.break-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
    z-index: 1;
}

.graphic-overlay {
    position: relative;
    z-index: 2;
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.graphic-overlay h2 {
    font-size: 32px;
    margin-bottom: 12px;
    color: #ffffff;
}

.graphic-overlay p {
    color: #cbd5e1;
    max-width: 600px;
    margin-bottom: 24px;
    font-size: 17px;
}

/* CONTACT */
.contact-section {
    background: var(--bg-main);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 20px;
}

.contact-info p {
    margin-bottom: 16px;
    font-size: 16px;
    color: var(--text-body);
}

.contact-info a {
    color: #38bdf8;
    text-decoration: none;
}

.contact-info a:hover {
    color: #0ea5e9;
}

.contact-links-box h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-main);
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-link {
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    transition: background 0.3s ease;
}

.youtube { background: #ae1f23; color: white; }
.youtube:hover { background: #cd201f; }
.github { background: #24292e; color: white; border: 1px solid #334155; }
.github:hover { background: #333; }
.linkedin { background: #0077b5; color: white; }
.linkedin:hover { background: #006294; }

/* BOTÓN FLOTANTE TEMA */
.theme-toggle-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #38bdf8;
    color: #090d16;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50px;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle-btn:hover {
    transform: scale(1.08);
}

/* FOOTER */
footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 968px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-image-wrapper {
        order: -1;
    }
    .hero h1 {
        font-size: 40px;
    }
    .hero-buttons {
        justify-content: center;
    }
    .education-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    .nav-links {
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .section {
        padding: 60px 6%;
    }
    .hero h1 {
        font-size: 32px;
    }
    .graphic-overlay h2 {
        font-size: 24px;
    }
    .graphic-container {
        height: 280px;
    }
}
