:root {
    --bg-color: #0b0f1a;
    --card-bg: #161b22;
    --primary: #58a6ff;
    --text: #c9d1d9;
    --muted: rgba(201, 209, 217, 0.75);
}

body {
    background-color: var(--bg-color);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    margin: 0;
    overflow-x: hidden;
}

.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.bg-light { background-color: #0d1117; }
.highlight { color: var(--primary); }

.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 50px;
    font-weight: 700;
}

.text-center { text-align: center; }

.about-content p {
    line-height: 1.65;
    color: var(--muted);
    font-size: 1.05rem;
}

/* =========================
   Buttons (NEW)
========================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
    user-select: none;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0px); opacity: 0.9; }

.btn-primary {
    background: var(--primary);
    color: #000;
}

.btn-outline {
    background: transparent;
    border-color: rgba(88,166,255,0.55);
    color: var(--text);
}

.btn-small {
    padding: 10px 14px;
    font-size: 0.95rem;
}

/* Email button */
.btn-email {
    margin-top: 10px;
}

/* CTA row */
.cta-row {
    margin-top: 14px;
    display: flex;
    justify-content: flex-start;
}

/* /* =========================
   Navbar (Responsive Pro)
========================= */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(11, 15, 26, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
    padding: 15px 0;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between; /* ✅ clave */
    position: relative;
    gap: 12px;
}

/* Brand */
.nav-brand {
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    letter-spacing: 0.3px;
    opacity: 0.95;
}
.nav-brand:hover { opacity: 1; }

/* Links desktop */
.nav-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 26px;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 0.9rem;
    opacity: 0.9;
}
.nav-links a:hover { opacity: 1; }

/* Actions right */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Language Toggle Button */
.lang-toggle {
    background: rgba(22, 27, 34, 0.9);
    border: 1px solid rgba(88,166,255,0.55);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.2s;
    white-space: nowrap; /* ✅ no se rompe */
}
.lang-toggle:hover {
    transform: translateY(-1px);
    border-color: var(--primary);
}

/* Hamburger (hidden desktop) */
.menu-toggle {
    display: none;
    background: rgba(22, 27, 34, 0.9);
    border: 1px solid rgba(88,166,255,0.55);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 999px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.menu-toggle:hover {
    transform: translateY(-1px);
    border-color: var(--primary);
}

/* ✅ Mobile: dropdown menu + language always visible */
@media (max-width: 768px) {

    /* show hamburger */
    .menu-toggle {
        display: inline-flex;
    }

    /* hide desktop inline links */
    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 12px);
        left: 0;
        right: 0;
        background: rgba(13, 17, 23, 0.98);
        border: 1px solid rgba(88,166,255,0.18);
        border-radius: 14px;
        padding: 14px;
        flex-direction: column;
        gap: 12px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.45);
        z-index: 200;
    }

    /* when opened */
    .nav-links.open {
        display: flex;
    }

    .nav-links li a {
        padding: 10px 12px;
        border-radius: 10px;
        display: block;
    }

    .nav-links li a:hover {
        background: rgba(88,166,255,0.08);
    }
}

/* =========================
   Hero
========================= */
.hero-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
    align-items: center;
    padding: 80px 0;
}

.hero-image {
    width: 320px;
    height: 320px;
    overflow: hidden;
    border-radius: 50%;
    border: 3px solid var(--primary);
    margin: 0 auto;
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    transform: scale(1.2);
}

.hero-text h1 { font-size: 3.2rem; margin: 0; }
.hero-text h2 { margin-top: 8px; }
.hero-text p { color: var(--muted); }

.hero-btns { margin: 25px 0; display: flex; gap: 12px; flex-wrap: wrap; }

/* Social links */
.social-links { display: flex; gap: 14px; margin-top: 10px; }
.social-links a {
    color: var(--text);
    font-size: 1.6rem;
    opacity: 0.9;
    transition: 0.2s;
}
.social-links a:hover { opacity: 1; transform: translateY(-1px); }

/* Experience header */
.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
}
.date { color: var(--muted); }

/* ================================
   Carousels Principal (Exterior)
================================ */
.section-slider-container { position: relative; }

.main-slider {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    gap: 40px;
    padding-bottom: 20px;

    scrollbar-width: none;
    -ms-overflow-style: none;
}
.main-slider::-webkit-scrollbar { display: none; }

.slider-item {
    flex: 0 0 100%;
    width: 100%;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-sizing: border-box;
    scroll-snap-align: start;
}

.media-caption { color: var(--muted); line-height: 1.55; }

/* ================================
   Carrusel de Imágenes Interno
================================ */
.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.media-carousel {
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    width: 100%;

    scrollbar-width: none;
    -ms-overflow-style: none;
}
.media-carousel::-webkit-scrollbar { display: none; }

.carousel-track { display: flex; }

.carousel-track img,
.carousel-track .video-container {
    flex: 0 0 100%;
    width: 100%;
    height: 450px;
    object-fit: contain;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Botones Navegación Interna */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--primary);
    color: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}
.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* Botones Navegación Externa (Secciones) */
.section-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: #000;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: 0.3s;
}
.sec-prev { left: -60px; }
.sec-next { right: -60px; }

/* =========================
   Skills (FIXED ALIGN)
========================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    text-align: center;
}

.skill-card {
    background: var(--card-bg);
    padding: 18px 15px;
    border-radius: 12px;

    /* ✅ CLAVE: logo arriba + texto centrado debajo */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.skill-card img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.skill-card span {
    display: block;
    font-weight: 600;
}

/* =========================
   Footer socials
========================= */
.footer-socials {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 18px;
}

.footer-socials a {
    color: var(--text);
    font-size: 1.6rem;
    opacity: 0.9;
    transition: 0.2s;
}
.footer-socials a:hover {
    opacity: 1;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 1100px) {
    .sec-prev { left: -10px; }
    .sec-next { right: -10px; }
}

@media (max-width: 768px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-image { width: 250px; height: 250px; }

    .hero-btns { justify-content: center; }
    .social-links { justify-content: center; }

    .section-title { font-size: 2.2rem; }

    .carousel-track img,
    .carousel-track .video-container {
        height: 250px;
    }
    .carousel-container { height: 250px; }

    .section-nav-btn { width: 40px; height: 40px; }

    /* Navbar toggle en móvil */
    .lang-toggle {
        position: static;
        margin-left: 12px;
    }
}
