/* CONFIGURACION GENERAL */
:root {
    --fondo: #081120;
    --tarjeta: #111e32;
    --principal: #38bdf8;
    --texto: #e5edf8;
    --secundario: #9baec7;
    --borde: #263a54;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--fondo);
    color: var(--texto);
    line-height: 1.7;
}

/* NAVEGACION */
header {
    background: #0e1a2c;
    border-bottom: 1px solid var(--borde);
    padding: 20px;
}

nav {
    display: flex;
    justify-content: center;
    gap: 35px;
    flex-wrap: wrap;
}

nav a {
    color: var(--texto);
    text-decoration: none;
    font-weight: 600;
}

nav a:hover {
    color: var(--principal);
}

/* CONTENIDO */
main {
    max-width: 1150px;
    margin: auto;
    padding: 30px 25px;
}

section {
    margin-bottom: 80px;
}

h1, h2, h3 {
    line-height: 1.3;
}

h2 {
    font-size: 30px;
    margin-bottom: 30px;
}

h3 {
    color: #ffffff;
    margin-bottom: 12px;
}

p {
    color: var(--secundario);
}

/* PRESENTACION */
#inicio {
    text-align: center;
    padding: 110px 20px;
    background: linear-gradient(
        135deg,
        #102f53,
        #0a1729 70%
    );
    border: 1px solid var(--borde);
    border-radius: 24px;
}

#inicio h1 {
    font-size: clamp(32px, 5vw, 54px);
    max-width: 850px;
    margin: 0 auto 25px;
}

#inicio p {
    font-size: 19px;
    max-width: 650px;
    margin: 0 auto 35px;
}

/* ENLACES Y BOTONES */
#inicio a,
#proyectos a {
    display: inline-block;
    background: var(--principal);
    color: #061525;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.2s;
}

#inicio a:hover,
#proyectos a:hover {
    background: #7dd3fc;
    transform: translateY(-2px);
}

/* TARJETAS */
#servicios,
#proyectos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
}

#servicios h2,
#proyectos h2 {
    grid-column: 1 / -1;
}

article {
    background: var(--tarjeta);
    border: 1px solid var(--borde);
    border-radius: 16px;
    padding: 30px;
    transition: 0.2s;
}

article:hover {
    transform: translateY(-4px);
    border-color: var(--principal);
}

#proyectos article a {
    margin-top: 20px;
}

/* CONTACTO */
#contacto {
    text-align: center;
    padding: 50px 25px;
    background: var(--tarjeta);
    border: 1px solid var(--borde);
    border-radius: 20px;
}

/* PIE DE PAGINA */
footer {
    text-align: center;
    padding: 30px;
    border-top: 1px solid var(--borde);
}

/* DISEÑO PARA CELULARES */
@media (max-width: 768px) {
    nav {
        gap: 15px;
    }

    main {
        padding: 20px 15px;
    }

    #inicio {
        padding: 65px 20px;
    }

    #servicios,
    #proyectos {
        grid-template-columns: 1fr;
    }

    h2 {
        font-size: 26px;
    }

    article {
        padding: 24px;
    }
}

/* BOTON DE CONTACTO */
#contacto .boton-contacto {
    display: inline-block;
    margin-top: 25px;
    padding: 14px 28px;
    background: #38bdf8;
    color: #061525;
    text-decoration: none;
    font-weight: bold;
    border-radius: 10px;
    transition: 0.2s;
}

#contacto .boton-contacto:hover {
    background: #7dd3fc;
    transform: translateY(-2px);
}

#contacto .contacto-nota {
    margin-top: 20px;
    font-size: 14px;
}

/* FORMULARIO EMERGENTE */
#contacto button.boton-contacto {
    border: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.modal-presupuesto {
    width: min(94%, 520px);
    max-height: 90vh;
    margin: auto;
    padding: 30px;
    background: #111e32;
    color: #e5edf8;
    border: 1px solid #263a54;
    border-radius: 18px;
    overflow-y: auto;
}

.modal-presupuesto::backdrop {
    background: rgba(0, 0, 0, 0.78);
}

.modal-cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
}

.modal-cabecera h2 {
    font-size: 25px;
    margin: 0;
}

#cerrar-presupuesto {
    background: transparent;
    border: 0;
    color: white;
    font-size: 32px;
    cursor: pointer;
}

#form-presupuesto {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

#form-presupuesto label {
    font-weight: 600;
}

#form-presupuesto input,
#form-presupuesto select,
#form-presupuesto textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #40536c;
    border-radius: 8px;
    background: #081120;
    color: white;
    font: inherit;
}

#form-presupuesto input:focus,
#form-presupuesto select:focus,
#form-presupuesto textarea:focus {
    outline: 2px solid #38bdf8;
}

#form-presupuesto .campo-trampa {
    display: none;
}

.aviso-datos {
    font-size: 12px;
}

.enviar-presupuesto {
    background: #38bdf8;
    color: #061525;
    padding: 14px;
    border: 0;
    border-radius: 9px;
    font-weight: bold;
    cursor: pointer;
}

.enviar-presupuesto:disabled {
    opacity: 0.6;
    cursor: wait;
}

#estado-presupuesto {
    text-align: center;
}

/* PRESENTACION PROFESIONAL */

.etiqueta-hero {
    color: #38bdf8;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 25px;
}

.acciones-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 30px;
}

#inicio .boton-secundario {
    background: transparent;
    border: 1px solid #38bdf8;
    color: #38bdf8;
}

#inicio .boton-secundario:hover {
    background: #193550;
    color: white;
}

#inicio .tecnologias-hero {
    margin-top: 40px;
    font-size: 14px;
    color: #9baec7;
    letter-spacing: 1px;
}

@media (max-width: 600px) {
    .acciones-hero {
        flex-direction: column;
    }

    .acciones-hero a {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
}

/* TARJETAS DE PROYECTOS */

#proyectos .proyecto-card {
    padding: 0;
    overflow: hidden;
}

.proyecto-imagen {
    display: block;
    width: 100%;
    height: 230px;
    object-fit: cover;
    object-position: center top;
    border-bottom: 1px solid #263a54;
}

.proyecto-contenido {
    padding: 28px;
}

.proyecto-contenido h3 {
    font-size: 23px;
    margin-top: 18px;
    margin-bottom: 15px;
}

.proyecto-contenido p {
    margin-bottom: 14px;
}

.proyecto-etiqueta {
    display: inline-block;
    padding: 6px 12px;
    background: #123b53;
    color: #7dd3fc;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
}

.proyecto-etiqueta.en-desarrollo {
    background: #47351d;
    color: #facc15;
}

.tecnologias-proyecto {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.tecnologias-proyecto span {
    padding: 5px 10px;
    border: 1px solid #344a65;
    border-radius: 6px;
    font-size: 12px;
    color: #cbd5e1;
}

#proyectos .proyecto-contenido a {
    margin-top: 25px;
}

@media (max-width: 768px) {
    .proyecto-imagen {
        height: 190px;
    }

    .proyecto-contenido {
        padding: 22px;
    }
}


/* SERVICIOS PROFESIONALES PASO 25 */

.servicios-intro {
    grid-column: 1 / -1;
    max-width: 750px;
    margin-top: -15px;
    margin-bottom: 15px;
    font-size: 17px;
}

#servicios .servicio-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 290px;
}

.servicio-numero {
    color: #38bdf8;
    font-size: 15px;
    font-weight: bold;
}

#servicios .servicio-card h3 {
    font-size: 22px;
    margin-bottom: 0;
}

#servicios .servicio-card p {
    line-height: 1.7;
}

.servicio-link {
    display: inline-block;
    align-self: flex-start;
    margin-top: auto;
    padding-top: 15px;
    color: #38bdf8;
    text-decoration: none;
    font-weight: bold;
}

.servicio-link:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

@media (max-width: 768px) {
    #servicios .servicio-card {
        min-height: auto;
    }
}

/* SECCION SOBRE MI */

#sobre-mi {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 45px;
    background: #101f33;
    border: 1px solid #263a54;
    border-radius: 20px;
}

.sobre-mi-etiqueta {
    display: block;
    color: #38bdf8;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

#sobre-mi h2 {
    margin-bottom: 20px;
}

#sobre-mi h3 {
    font-size: 21px;
    margin-bottom: 18px;
}

.sobre-mi-contenido p {
    margin-bottom: 15px;
}

.sobre-mi-boton {
    display: inline-block;
    margin-top: 18px;
    padding: 12px 22px;
    background: #38bdf8;
    color: #061525;
    text-decoration: none;
    border-radius: 9px;
    font-weight: bold;
}

.sobre-mi-boton:hover {
    background: #7dd3fc;
}

.sobre-mi-habilidades {
    padding: 28px;
    background: #0a1729;
    border: 1px solid #263a54;
    border-radius: 15px;
}

.sobre-mi-habilidades h3 {
    margin-bottom: 25px;
}

.habilidad {
    padding: 12px 0;
    border-bottom: 1px solid #263a54;
    color: #cbd5e1;
}

.habilidad:last-child {
    border-bottom: none;
}

.habilidad span {
    color: #38bdf8;
    margin-right: 12px;
    font-weight: bold;
}

@media (max-width: 768px) {
    #sobre-mi {
        grid-template-columns: 1fr;
        padding: 25px;
        gap: 25px;
    }
}
