/* ============================= */
/* RESET GLOBAL         */
/* ============================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    box-shadow: none;
    scroll-behavior: smooth;
    text-decoration: none;
    list-style: none;
}



body {
    font-family: 'Noto Sans', sans-serif;
    background: #050a0f;
    color: #eee;
}

body.menu-open {
    overflow: hidden; /* Evita scroll al abrir el menú */
}

/* ============================= */
/* HEADER              */
/* ============================= */
.header,
.footer {
    background: #1C1C1E;
    color: #F5F5F7;
    padding: 20px 0;
    text-align: center;
    position: relative;
}


.header h1 {
    color: #F5F5F7;
    margin: 0;
    font-size: 2.5em;
}

.header h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.2em;
    margin: 10px auto 0 auto;
    font-weight: 300;
    text-align: center;
    display: inline-block; /* importante para medir ancho */
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid #F5F5F7;

    max-width: 0;
    animation: typing 4s steps(64, end) forwards,  /* 64 = cantidad de caracteres */
               blink-caret .75s step-end infinite;
}

@keyframes typing {
    from { max-width: 0; }
    to   { max-width: 64ch; }  /* coincide con steps */
}

@keyframes blink-caret {
    from, to { border-right-color: transparent; }
    50% { border-right-color: #F5F5F7; }
}


.while { color: #F8D148; }
.string { color: #A2E05B; }

/* ============================= */
/* NAVEGACIÓN (NAV)       */
/* ============================= */
nav {
    display: flex;
    justify-content: center; /* todo al centro */
    align-items: center;
    padding: 0 20px;
    height: 80px;
    background-color: #181616;
    position: sticky;
    top: 0;
    z-index: 9999;
}
.navbar-links {
    display: flex;
    align-items: center;
    gap: 20px;
    position: sticky;
    top: 0;
    
}
.navbar-links ul {

    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    float: none; /* ya estaba */
}

.navbar-links ul li {
    
    display: inline-block;
    line-height: 80px;
    margin: 0 5px;
}

.navbar-links ul li a {
    color: #44cef6;
    font-size: 18px;
    padding: 7px 13px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: bold;
    transition: background 0.5s;
}

.navbar-links ul li a.active,
.navbar-links ul li a:hover {
    background: #44cef6;
    color: #fff;
}

.menu-icon {
    font-size: 30px;
    float: right;
    line-height: 80px;
    margin-right: 40px;
    cursor: pointer;
    display: none;
    position: fixed;
    top: 25px;
    right: 20px;
    z-index: 10000; /* Ícono siempre arriba */
}

#mobile-menu {
    display: none;
}

@media(max-width: 768px){
    .menu-icon {
        display: block;
        line-height: 60px;
        margin: auto 5px;
        top: 60px;
        background-color: #2c2a2a9d;
        border-radius: 5px; 
        width: 40px;
        height: 40px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .navbar-links ul {
        position: fixed;
        width: 100%;
        height: 100vh;
        background-color: rgb(24, 22, 22);
        top: 0;
        left: -100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: all .5s;
        z-index: 9999; /* Menú sobre todo */
    }

    .navbar-links ul li {
        display: block;
        margin: 0;
        line-height: normal;
    }

    .navbar-links ul li a {
        font-size: 22px;
    }

    #mobile-menu:checked ~ .navbar-links ul {
        left: 0;
    }
}

/* ============================= */
/* BOTÓN IDIOMA/TEMA      */
/* ============================= */
.idioma-tema {
    display: grid;
    justify-content: end;
    grid-auto-flow: column;
    gap: 10px;
    position: fixed;
    top: 25px;
    right: 70px; /* Separado del icono de menú */
    z-index: 999;
}

.idioma-tema button {
    background: transparent;
    border: 2px solid #44cef6;
    border-radius: 5px;
    padding: 5px 10px;
    color: #44cef6;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.idioma-tema button:hover {
    background: #81021f;
    color: #fff9ec;
    transform: scale(1.1);
    border: none;
}

/* ============================= */
/* ABOUT              */
/* ============================= */
.div__about {
    margin: 20px auto;
    max-width: 800px;
    padding: 20px;
    background: #2c2a2a;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.div__about h2 {
    text-transform: uppercase;
    color: #44cef6;
    font-size: 1.5em;
    text-align: center;
}

.div__about .contenido {
    display: flex;
    width: 100%;
    gap: 20px;
    align-items: flex-start;
}

.div__about .contenido img {
    min-width: 100px;
    max-width: 200px;
    border-radius: 50%;
    border: 3px solid #44cef6;
}

.div__about .contenido p {
    flex: 1;
    color: #fff;
    text-align: justify;
    line-height: 1.6;
}

.div__about a.ver-mas {
    margin-top: 10px;
    background: #44cef6;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.5s;
}

.div__about a.ver-mas:hover {
    background: #81021f;
}

/* ============================= */
/* CARRUSEL             */
/* ============================= */
.projects {
    padding: 50px 0;
    text-align: center;
}

.projects h2 {
    font-size: 2.5em;
    margin-bottom: 30px;
    color: #44cef6;
}

.proyectos {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.carousel-container {
    position: relative;
    width: 90%;
    max-width: 800px;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
    z-index: 1;
}

.carousel-slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
    position: relative;
    z-index: 1;
}

.carousel-slide {
    min-width: 100%;
    height: auto;
    display: block;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    z-index: 1;
    transition: background-color 0.3s ease;
    font-size: 1.5rem;
    border-radius: 50%;
}

.carousel-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.prev { left: 10px; }
.next { right: 10px; }

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 1;
}

.dot {
    height: 10px;
    width: 10px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: #44cef6;
}

.projects .ver-mas {
    margin-top: 10px;
    background: #44cef6;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.5s;
}

.projects .ver-mas:hover {
    background: #81021f;
}

/* ============================= */
/* FOOTER             */
/* ============================= */
.footer {
    background: #222;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    padding-bottom: 60px;
}

.footer .social-media {
    margin-top: 10px;
}

.footer .social-media a {
    color: #44cef6;
    text-decoration: none;
    margin: 0 10px;
}

.footer .social-media a:hover {
    text-decoration: underline;
}

/* ============================= */
/* SKILLS             */
/* ============================= */
.section__skills {
  text-align: center;
  padding: 40px 20px;
}

.section__skills h3 {
  font-size: 2em;
  color: #44cef6;
  margin-bottom: 20px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}
.skills-grid1 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 600px;
  margin: 50px auto;
}

.skill-card {
  background: #1C1C1E;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0px 4px 10px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease;
}
.skill-card1{
        background: #414144;
        border-radius: 15px;
        padding: 20px;
        box-shadow: 0px 4px 10px rgba(0,0,0,0.3);
        display: flex;
        flex-direction: column;
        align-items: center;
        transition: transform 0.3s ease;
}
.skill-card:hover {
  transform: scale(1.05);
}
.skill-card1:hover {
  transform: scale(1.05);
}
.skill-card img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 10px;
}
.skill-card1 img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 10px;
}

.skill-card p {
  color: #fff;
  font-size: 18px;
  margin: 0;
}

/* ============================= */
/* MEDIA QUERIES           */
/* ============================= */

/* Asegura que las skills sean 2x2 en todas las pantallas */
@media (max-width: 480px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .header h2 {
        animation: none; /* Desactiva la animación de escritura en pantallas pequeñas */
        max-width: 100%;
        border-right: none;
    }
}
@media (max-width: 600px) {
    .div__about{
        padding: 20px;
        background: #1C1C1E;
        border-radius: 15px;
        overflow: hidden;
        width: 350px;

    }
    .contenido {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .div__about .contenido img {
        margin-bottom: 15px;
        max-width: 100%;
        height: 180px;
        object-fit: cover;
        margin: auto;
    }

    .div__about .contenido p {
        text-align: center;
        font-size: 0.9em;
        line-height: 1.4;

    }
    
}
@media (max-width: 500px) {
    .skill-card {
        padding: 15px;
    }

    .skill-card img {
        width: 60px;
        height: 60px;
    }

    .skill-card p {
        font-size: 16px;
    }
}
@media (max-width: 700px) {
    html, body {
    width: 100%;
    overflow-x: hidden; /* Evita scroll horizontal */
}
.header,
.footer {
    background: #1C1C1E;
    color: #F5F5F7;
    padding: 20px 0;
    text-align: center;
    position: relative;
}

.header .logo {
    max-width: 80px;
    margin-bottom: 10px;
    border-radius: 50%;
    position: absolute;
    top: 20px;
    left: 20px;
}

.header h1 {
    color: #F5F5F7;
    margin: 0;
    font-size: 2.5em;
}

.header h2 {
    font-family: 'Inter', sans-serif;
    font-size: .9em;
    margin: 10px auto 0 auto;
    font-weight: 300;
    text-align: center;
    display: inline-block; /* importante para medir ancho */
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid #F5F5F7;

    max-width: 0;
    animation: typing 4s steps(64, end) forwards,  /* 64 = cantidad de caracteres */
               blink-caret .75s step-end infinite;
}

@keyframes typing {
    from { max-width: 0; }
    to   { max-width: 64ch; }  /* coincide con steps */
}

@keyframes blink-caret {
    from, to { border-right-color: transparent; }
    50% { border-right-color: #F5F5F7; }
}
.footer {
    background: #222;
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

.footer .social-media {
    margin-top: 10px;
}

.footer .social-media a {
    font-size: .8em;
    color: #44cef6;
    text-decoration: none;
    margin: 0 10px;
}

.footer .social-media a:hover {
    text-decoration: underline;
}
.footer p{
    font-size: .8em;
    color: #aaa;
}
}
#home,
#about, 
#projects, 
#contact {
  scroll-margin-top: 100px;
}
