/* ========================================
   RESET Y BASE
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #1a1a1a;
    min-height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* ========================================
   LAYOUT PRINCIPAL
======================================== */
.container {
    background-color: #2d2d2d;
    border-radius: 30px;
    width: 90%;
    max-width: 1200px;
    min-height: 90vh;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.tu-contenedor {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-area {
    text-align: center;
    flex: 1 1 auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    color: white;
    overflow-y: auto;
    min-height: 0;
}

.action-area {
    padding: 20px 40px;
    background-color: #252525;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: auto;
}

/* ========================================
   ENCABEZADOS Y TEXTO
======================================== */
h1 {
    font-weight: 100;
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    margin-bottom: 20px;
    letter-spacing: 2px;
    color: white;
}

h2 {
    font-weight: 100;
    font-size: 1.4rem;
    letter-spacing: 2px;
    text-align: left;
    color: white;
}

h3 {
    margin-top: 20px;
    font-weight: 100;
    font-size: 1.1rem;
    font-style: italic;
    letter-spacing: 2px;
    text-align: left;
    color: white;
}

h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 300;
    text-align: left;
    color: white;
}

p {
    text-align: justify;
    line-height: 1.6;
    color: #b3b3b3;
    max-width: 720px;
    margin-bottom: 10px;
}

/* ========================================
   COMPONENTES
======================================== */

/* --- Avatar --- */
.avatar {
    width: clamp(120px, 12vw, 160px);
    height: clamp(120px, 12vw, 160px);
    border-radius: 50%;
    background-color: #404040;
    background-image: url('https://godev.red5.cl/src/img/gogowar.jpg');
    background-size: cover;
    background-position: center;
    border: 4px solid #4a4a4a;
    flex-shrink: 0;
    aspect-ratio: 1;
}
.nikken-logo {
    margin-top: 20px;
}

/* --- Botones --- */

.ptflio-button {
    background-color: #d4d4d4;
    color: #2c2c2c;
    border: none;
    padding: 12px 10px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: 500;
    text-decoration: none;
    width: 80%;
    max-width: 230px;
    display: inline-block;

}

.ptflio-button:hover {
    background-color: #ffffff;
}

.cv-button {
    flex-shrink: 0; /* evita que se reduzca */
    flex-grow: 0; /* evita que crezca */
    background-color: #4a4a4a;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    max-width: 500px;
    min-width: 300px;
}

.cv-button:hover {
    background-color: #5a5a5a;
}

/* --- Iconos sociales --- */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
}

.social-icons a {
    color: #b3b3b3;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: white;
}
.social-icons .fab.fa-github {
    font-size: 1.6rem;
}
.social-icons a:hover .fab.fa-github {
    color: #ffffff;
}
.social-icons .fa-facebook {
    width: 28px;
    font-size: 1.6rem;
    transition: filter 0.3s;
    /* transform: translateY(-2px); *//* Mueve el ícono 2px hacia arriba */
}

.social-icons a:hover .fa-facebook {
    color: #3358ff;
}

.social-icons .instagram-icon-social {
    font-size: 1.8rem;
    margin-top: 4px;
}

.social-icons a:hover .fab.fa-instagram {
    color: #d633ff;
}

.social-icons .fa-phone {
    font-size: 1.5rem;
    margin-top: 2px;
}

.social-icons a:hover .fa-phone {
    color: #ffdd48;
}

.social-icons .whatsapp-icon {
    filter: brightness(0.7) grayscale(1);
    transition: filter 0.3s;
}

.social-icons a:hover .whatsapp-icon {
    filter: brightness(1) grayscale(0);
}

.social-icons .telegram-icon {
    filter: brightness(1.2) hue-rotate(10deg) saturate(0.7);
    transition: filter 0.3s;
}

.social-icons a:hover .telegram-icon {
    filter: brightness(1) grayscale(0);
}

/* --- Menú de navegación --- */
.menu {
    background-color: #1e1e1e;
    padding: 18px;
    display: flex;
    justify-content: center;
    gap: 30px;
    align-items: center;
}

.menu-item {
    color: #b3b3b3;
    text-decoration: none;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: color 0.3s;
}

.menu-item:hover,
.menu-item.active {
    color: white;
}

.menu-item i {
    font-size: 1.4rem;
}

/* --- Sección de habilidades --- */
.skill-category {
    border-radius: 15px;
    padding: 10px;
    max-width: 860px;
    margin: 0 auto 0px;
}

.category-title {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: #b3b3b3;
    text-align: center;
    font-weight: 300;
    letter-spacing: 1px;
}

.skill-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    /*background-color: #333;
    border-radius: 8px;*/
    transition: all 0.3s ease;
    min-width: 90px;
    /* border: 1px solid #444; */
}

.skill-item:hover {
    /* background-color: #444; */
    transform: scale(1.05);
    border-color: #555;
}

.generic-icon {
    width: 35px;
    height: 35px;
    object-fit: contain;
    border-radius: 4px;
}
.instagram-icon {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 4px;
}
.whatsapp-icon {
    width: 30px;
    object-fit: contain;
    border-radius: 4px;
}
.telegram-icon {
    width: 30px;
    object-fit: contain;
    border-radius: 4px;
}
.skill-name {
    font-size: 0.75rem;
    text-align: center;
    color: #b3b3b3;
    font-weight: 300;
}

.description {
    text-align: center;
    color: #b3b3b3;
    line-height: 1.2;
    margin-top: 8px;
    font-size: 0.95rem;
    font-style: italic;
}
/* --- Formulario de contacto (versión refinada) --- */
/* --- SECCIÓN DE CONTACTO: Diseño responsive --- */
.contactcontent {
    display: flex;
    flex-direction: row;           /* Por defecto: en fila (escritorio/tablet) */
    justify-content: center;       /* Centra ambos bloques horizontalmente */
    align-items: flex-start;       /* Alinea arriba para evitar centrado vertical excesivo */
    gap: 2rem;                     /* Espacio entre imagen y formulario */
    width: 100%;
    max-width: 1000px;             /* Limita el ancho total para pantallas grandes */
    margin: 2rem auto;             /* Centra toda la sección */
    padding: 0 1rem;               /* Espacio lateral en móviles */
    box-sizing: border-box;
}

/* --- Bloque de imagen --- */
.imagcontact {
    flex: 0 0 320px;               /* Ancho fijo para la imagen, no crece ni encoge */
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 280px;              /* Evita que se achique demasiado en tablets */
}

.img-contacto {
    width: 320px;
    height: 480px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.titulo-contacto {
    color: #fff;
    font-size: 1.5rem;
    text-align: center;
    margin-top: 0.5rem;
}

/* --- Bloque del formulario --- */
.contactform {
    flex: 1;                       /* Ocupa el espacio restante */
    max-width: 400px;              /* Limita el ancho del formulario */
    width: 100%;
    margin: 0 auto;
}

/* --- Formulario interno --- */
.form-group {
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #f3f3f3;
    font-size: 1rem;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.8rem;
    border: 1px solid #555;
    border-radius: 8px;
    background-color: #2e2e2e;
    color: #fff;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.form-group input::placeholder,
.form-group textarea::placeholder,
.form-group select:invalid {
    color: #aaa;
}

.form-group input[type="tel"]::placeholder {
    color: #aaa;
}

.form-group select {
    padding: 0.8rem;
    border: 1px solid #555;
    border-radius: 8px;
    background-color: #2e2e2e;
    color: #fff;
    font-size: 1rem;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.btn-enviar {
    background-color: #4a4a4a;
    color: white;
    border: none;
    padding: 0.9rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
    width: fit-content;
}

.btn-enviar:hover {
    background-color: #5a5a5a;
}

/* --- Responsive: Móvil (uno sobre otro) --- */
@media (max-width: 767.98px) {
    .contactcontent {
        flex-direction: column;    /* Apila verticalmente */
        gap: 1.5rem;               /* Un poco menos de espacio en móvil */
        padding: 0 1rem;
    }

    .imagcontact {
        flex: none;
        width: 100%;               /* Ocupa todo el ancho */
        max-width: 320px;
        margin: 0 auto;
    }

    .img-contacto {
        width: 100%;
        height: auto;
        max-width: 320px;
        max-height: 480px;
        object-fit: cover;
    }

    .contactform {
        max-width: 100%;           /* Ocupa todo el ancho disponible */
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .container {
        width: calc(100% - 8px);
        min-height: calc(100vh - 8px);
        max-height: calc(100vh - 8px);
        border-radius: 20px;
        margin: 4px;
    }

    .avatar {
        width: clamp(110px, 22vw, 130px);
        height: clamp(110px, 22vw, 130px);
    }

    .menu-item span {
        font-size: 0.8rem;
    }
}

/* --- Ajustes por altura de pantalla --- */
@media (max-height: 800px) {
    .container {
        min-height: 95vh;
        max-height: 98vh;
    }

    .content-area {
        padding: 20px;
    }

    .avatar {
        width: clamp(100px, 10vw, 130px);
        height: clamp(100px, 10vw, 130px);
    }

    h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
}

@media (min-height: 1000px) {
    .container {
        min-height: 85vh;
        max-height: 90vh;
    }

    .avatar {
        width: clamp(140px, 8vw, 180px);
        height: clamp(140px, 8vw, 180px);
    }
}

/* --- Escritorio: acciones en fila --- */
@media (min-width: 768px) {
    .action-area {
        flex-direction: row;
        gap: 4rem;
    }

    .cv-button {
        max-width: 300px;
        width: 100%;
        margin: 0;
    }

    .ptflio-button {
        max-width: 230px;
        width: 80%;
        margin-left: 4vw;
        margin-right: auto;
    }

    .social-icons {
        justify-content: center;
        gap: 2rem;
        width: auto;
        flex: none;
    }
}

.portfolio-links {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 100%;
    max-width: 800px;
   /* margin: 2rem auto;
    padding: 0 1rem; */
}

.portfolio-links a {
    flex: 0.5 1 auto;
}

.portfolio-links img {
    max-width: 130px;
    height: auto;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .portfolio-links {
        flex-direction: column;
        gap: 1.5rem;
    }
}

.buttonportaf{
    width:600px;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: center;
    padding-top: 20px; 
    padding-left: 0;
}

.buttonportaf .ptflio-button {
    margin-top: 20px;
    margin-left: 0;
    margin-right: auto;
    position: relative;
    left: 0;
}