html {
    background-color: rgb(0, 0, 0);
    height: 100%;
    color: rgb(255, 255, 255);
    scrollbar-width: none;
    padding-bottom: 0%;
}

#home:target,
body:not(:has(:target)) #home {
    display: block;
}

.light-theme *, .light-theme html,*,html {
    transition: 0.7s ease-in-out;
    transition-duration: 0.7s;
}

body {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin-left: 5%;
    margin-right: 5%;
}

.fs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url(../images/estrellado.png);
    background-repeat: initial;
    background-size: cover;
    animation: fondo 180s linear infinite;
}

.light-theme .fs {
    background: none;
    background: linear-gradient(900deg, #d2d2d2, #d1d1d1);
}

.c {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    color: rgb(255, 255, 255);
    text-align: center;
    margin: 0;
}

.light-theme .c {
    color: rgb(60, 60, 60);
}

/* --- ESTILOS DEL HEADER Y NAVEGACIÓN --- */
header {
    position: relative;
    display: flex;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    padding: 0 10px 0 10px;
    margin-bottom: 10px;
    margin-top: -10px;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    animation: none;
    font-family: "Michroma";
}

header button,
header i {
    font-size: 15px;
    background-color: #d0d0d000;
    border: 0;
    color: #fff700;
    transition: transform 0.7s ease-in-out, text-shadow 0.3s ease-in-out;
}
header button:hover {
    transform: scale(150%);
    cursor: pointer;
    color: #ffd900;
    text-shadow: 0 0 20px #fdff7c, 0 0 30px #fcff53;
}
.light-theme header i {
    text-shadow: none;
    color: rgb(211, 144, 0);
    display: inline-block;
    transition: color 0ms, transform infinite;
}
.light-theme header button i:hover {
    text-shadow: none;
    transition-duration: color 0s, 5s;
    transform: rotate(30deg) scale(120%);
}
.cont {
    display: flex;
    gap: 1.3vw;
}
nav {
    padding: 1dvw;
}
a {
    padding-left: 1dvw;
    padding-right: 1dvw;
    transition: 0.5s ease;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    font-family: 'Epilogue', sans-serif;
    color: rgba(187, 187, 187, 0.726);
}
.light-theme a {
    color: #4a4a4a;
}

a:hover {
    font-weight: 900;
    color: white;
    text-shadow: 0 0 10px #ffffff, 0 0 10px #a8bfff, 0 0 20px #ffffff, 0 0 50px #ffffff;
    transition-duration: 0.3s;
    animation: 77ms;
}
.light-theme a:hover {
    color: rgb(0, 0, 0);
    text-shadow: none;
}
nav a.active {
    font-weight: 800;
    color: rgb(255, 255, 255);
    text-shadow: 0 0 10px #ffffff;
}
.light-theme nav a.active {
    color: rgb(0, 0, 0);
}

header a h1 {
    font-size: 150%;
    font-family: "Michroma";
    color : #dedede;

}
.light-theme header a h1 {
    color: rgb(0, 0, 0);
}
/* ------ FIN ESTILOS DEL HEADER Y NAVEGACIÓN ------ */

/* --- ESTILOS DEL CONTENIDO PRINCIPAL --- */

section {
    display: none;
    border-radius: 10px;
    padding: 20px 30px 20px 30px;
    margin-bottom: 15px;
    margin-top: 15px;
}

article,
section:target {
    display: block;
}
h2 {
    font-family: 'Lexend';
    font-size: 20px;
    font-weight: 200px;
}
article {
    text-align: justify;
    font-family: 'Epilogue';
    font-weight: 100px;
    border-radius: 10px;
    padding: 1mm 4mm 3mm 4mm;
    margin-top: 3mm;
    margin-bottom: 3mm;
    background-color: #000000ae;
}
.light-theme article {
    background-color: rgba(255, 255, 255, 0.693);
}
article h3 {
    font-family: 'Lexend';
    font-size: 18px;
    font-weight: 400;
    text-align: left;
    padding-left: 5%;
}
@media (max-width: 700px) {
    .page-to{
        flex: 1 1 100%;
        min-height: auto; /* en móvil permite altura natural */
        padding: 10px;
    }
    .page-to img {
        max-height: none; /* permitir que la imagen crezca si es necesario en móvil */
        width: 45%;
    }
}

.grid_pos {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center; /* centra las columnas en el contenedor */
    align-items: flex-start; /* evita que los .page-to se estiren en altura */
}
/* Cada bloque individual */
.page-to {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.14);
    margin: 5px;
    max-width: 300px;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s ease;
    padding: 20px;
    box-sizing: border-box;
    min-height: 220px;
}
/* Tema claro */
.light-theme .page-to {
background: #ededed;
box-shadow: inset 5px 5px 4px #b6b6b672,
            inset -5px -5px 4px #ffffff;
    }
        /* Las imágenes dentro del div */
.page-to img {
    align-self: center;
    border-radius: 10px;
    user-select: none;
    max-width: 100%;    /* nunca saldrá del ancho del contenedor */
    max-height: 100%;   /* limita la altura para que quepa dentro del min-height */
    margin-bottom: 6%;
    width: auto;        /* deja que el navegador calcule el ancho según la proporción */
    height: auto;
    transition: transform 0.2s ease-in-out;
    object-fit: contain; /* mantiene la imagen completa y centrada dentro del área disponible */
}
/* Hover suavito */
.page-to img:hover {
    transform: scale(1.01);
    cursor: pointer;
}
/* Responsive móvil */

pre {
    border-radius: 10px;
    padding: 6px 6px 6px 6px;
    color: white;
    background-color: #000000;
}
/* Mostrar la sección "home" por defecto si no hay ningún objetivo en la URL */

.edi {
    font-weight: bolder;
    text-align: justify;
}
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
}
.campo {
    display: flex;
    flex-direction: column;
}
.campo label {
    text-align: left;
    padding-left: 5%;
    font-size: 17px;
    font-weight: bold;
    margin-bottom: 0.5rem;
}
.campo input,.campo textarea {
    color: #ffffff;
    font-family: 'lexend', sans-serif;
    padding: 0.75rem;
    border: 1px solid #b8b8b8;
    border-radius: 4px;
    font-size: 1rem;
    resize: none;
    transition: box-shadow 0.5s ease;
    background-color: #000000;
}

.light-theme .campo input, .light-theme .campo textarea {
    transition-duration: 5ms;
    color: #272727;
    border: #ffffff;
    background: #fefefe;
    box-shadow: inset 3px 3px 5px #d4d4d4, inset -3px -3px 5px #efefef;
    transition: 1s;
}

.campo input:hover, .campo textarea:hover {
    box-shadow: 0 0 10px #ffffff, 0 0 5px #7ba5ff, 0 0 3px #ffffff;
    backdrop-filter: contrast(180%);
}
.light-theme .campo input:hover, .light-theme .campo textarea:hover {
    color: #262626;
    background: #cfcfcf;
    box-shadow: inset 5px 5px 10px #acacac, inset 5px 5px 10px #f2f2f2;
    transition: 1s;
}
.light-theme .campo input:focus,
.light-theme .campo textarea:focus {
    transition-duration: 5ms;
    color: #000000;
    border: #525252;
    background: #dbdbdb;
    transition: 1s;
}
.contact button {
    font-family:'Epilogue';
    margin-left: 19%;
    margin-right: 19%;
    background-color: #000000;
    box-shadow: 0px 0 20px #48484863;
    color: rgba(255, 255, 255, 0.8);
    border: none;
    font-weight: 400;
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 4px;
    transition: all 500ms ease;
}
.light-theme .contact button {
    box-shadow: 8px 8px 15px #acacac,
        8px 8px 15px #f2f2f2;
    background: rgb(220, 220, 220);
    color: #000000;
}
.contact button:hover {
    cursor: pointer;
    font-weight: 700;
    transition-duration: 0.3s;
    animation: 77ms;
    color: rgb(0, 0, 0);
    box-shadow: 0 0 10px #ffffffd3, 0 0 9px #c0d4ffc2, 0 0 10px #e5efff69, 0 0 30px rgba(255, 255, 255, 0.151);
    backdrop-filter: contrast(180%);
    background-color: #ffffffd8;
}
.light-theme .contact button:hover {
    transform: none;
    background: #cfcfcf;
    box-shadow: inset 5px 5px 10px #acacac,
        inset 5px 5px 10px #f2f2f2;
}
.contact button:active {
    font-weight: 700;
    transition-duration: 0.3s;
    animation: 77ms;
    background-color: #ffffff;
    box-shadow: 0 0 50px #f1f5ff, 0 0 10px #ffffff, 0 0 9px #a8bfff, 0 0 8px #ffffff, 0 0 7px #ffffff;
    transform: scale(1.05);
    filter: brightness(1.2);
}
.light-theme .contact button:active {
    transition-duration: 0ms;
    transform: none;
    filter: none;
    box-shadow:
        inset 5px 5px 10px rgba(64, 64, 64, 0.177),
        inset 2px 2px 5px rgba(145, 145, 145, 0.697);
    background-color: #d8d8d8;
    font-weight: 900;
    transition-duration: 0.3s;
    animation: 77ms;
}
/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    form {
        padding-right: 1.5rem;
        padding-left: 1.5rem;
    }
}
@media (max-width: 480px) {
    form {
        padding-right: 1rem;
        padding-left: 1rem;
    }
    .contact button {
        width: 100%;
        backdrop-filter: contrast(180%);
    }
}
.content {
    flex: 1;
    padding-left: 2rem;
    padding-right: 2rem;
    margin-left: 5%;
    margin-right: 5%;
}
@keyframes fondo {
    0% {
        background-position: 0 0
    }
    100% {
        background-position: 0 -190%;
    }
}
@keyframes brillar {
    0%,
    100% {
        opacity: 1;
        filter: brightness(1);
    }
    50% {
        opacity: 1;
        filter: brightness(1.6);
    }
}
::selection {
    color: #c2fdff;
    text-shadow: 0 0 1px #72c0ff3d, 0 0 3px #a5deff77, 0 0 4px #c5fffa7c, 0 0 5px #a5deff83;
}
.light-theme ::selection {
    color: rgb(0, 0, 0);
    background-color: #ffff00;
    text-shadow: none;
    animation: 2s;
}
html::-webkit-scrollbar {
    display: none;
}
/* header,
footer,
section {
  background-color: rgba(61, 61, 61, 0.527);
  border: 1px solid #5a5a5ac2;
  backdrop-filter: blur(5px);
} */
/* header,
footer,
section {
background: rgba(54, 54, 54, 0.2);
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5px);
border: 1px solid rgba(255, 255, 255, 0.3);
} */

header,
footer,
section {
    box-shadow:
        inset 5px 5px 10px rgba(147, 147, 147, 0.177),
        inset 2px 2px 5px rgba(236, 236, 236, 0.307),
        inset -6px -6px 12px rgba(105, 105, 105, 0.175),
        inset -2px -2px 15px rgba(97, 97, 97, 0.297);
    background: rgba(29, 29, 29, 0.666);
    backdrop-filter: blur(7px) saturate(20%);
    border: 1px solid rgba(55, 55, 55, 0.4);
}
.light-theme header,
.light-theme footer,
.light-theme section {
    border: 1px solid rgba(255, 255, 255, 0);
    background: #e9e9e9;
    box-shadow: 5px 5px 10px rgba(81, 81, 81, 0.256),
        -5px -5px 10px #ffffff;
    
}
footer {
    display: block;
    border-radius: 10px 10px 0 0;
    padding: 20px 30px 20px 30px;
    margin-bottom: 0px;
    padding-bottom: 0%;
    padding-top: 0px;
    margin-top: 15px;
    user-select: none;
    font-weight: 300;
}
.fin p {
    align-items: center;
    text-align: center;
    font-family: 'Lexend', sans-serif;
    letter-spacing: 0.4dvw;
    transition: 0.6s all;
    font-weight: 600;
    font-size: 20px;
    padding: 0mm 4mm 0mm 4mm;
}

/* --- WATERMARK --- */
.watermark {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-family: 'Michroma', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.712); /* Muy sutil */
    z-index: 9999;
    pointer-events: none; /* Los clicks atraviesan el texto */
    user-select: none; /* No se puede seleccionar el texto */
    border: 1px solid rgba(255, 255, 255, 0.575);
    padding: 10px 5px; /* Ajustado para vertical */
    border-radius: 12px;
    backdrop-filter: blur(5px);
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.light-theme .watermark {
    color: rgba(255, 255, 255, 0.548);
    border: 0.8px solid rgba(255, 255, 255, 0.548);
}
