html {
    background-color: rgb(0, 0, 0);
    min-height: 100vh;
    color: rgb(255, 255, 255);
    scrollbar-width: none;
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    overflow-x: hidden;
}

#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;
    min-height: 100vh;
    margin: 0 5% 0 5%;
}

.strellatto_layer {
    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 .strellatto_layer {
    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);
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    padding: 0 10px 0 30px;
    margin-bottom: 10px;
    margin-top: 0;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    font-family: "Michroma";
    background: rgba(29, 29, 29, 0.8);
    backdrop-filter: blur(10px);
}

header a h1 {
    font-family: "Michroma";
    font-size: 150%;
    transition: color 0.3s ease-in-out, text-shadow 0.3s ease-in-out;
}

.light-theme header a h1 {
    color: #131313b8;
}

.light-theme header h1:hover {
    cursor: pointer;
    color: #000000;
    text-shadow: 0 0 10px #5f5f5f58, 0 0 15px #4d4d4d6e;
}

header h1:hover {
    cursor: pointer;
    color: #ffffff;
    text-shadow: 0 0 10px #ffffff40, 0 0 15px #4d4d4d6e;
}

header button,
header i {
    font-size: 15px;
    background-color: #d0d0d000;
    border: 0;
    color: #ffff69;
    transition: transform 0.7s ease-in-out, text-shadow 0.3s ease-in-out;
}

header button:hover {
    cursor: pointer;
    color: #ffd900;
    text-shadow: 0 0 20px #fdff7c, 0 0 30px #fcff53;
}

.light-theme header i {
    text-shadow: none;
    color: rgb(193, 106, 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(1.2);
}

.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 {
    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: 20ms;
}

.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: rgba(0, 0, 0, 0.841);
}

section {
    display: none;
    border-radius: 10px;
    padding: 20px 30px 20px 30px;
    margin-bottom: 15px;
    margin-top: 15px;
}

article,
section:target {
    display: block;
}

article {
    text-align: justify;
    font-family: 'Epilogue';
    font-weight: 100px;
    border-radius: 10px;
    padding: 1mm 4mm 10mm 4mm;
    margin-top: 7mm;
    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%;
}

.subsection_grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
}

.subarticle {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background-color: rgb(255 255 255 / 8%);
    margin: 5px;
    width: 300px;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s ease;
    padding: 10px;
    box-sizing: border-box;
    min-height: 400px;
}

.subarticle p {
    text-align: left;
    hyphens: auto;
    font-size: 14px;
    flex-grow: 1;
}

.subarticle h2 {
    font-size: 15px;
    margin-bottom: 12px;
    text-align: left;
    line-height: 1.2;
}

.light-theme .subarticle {
    background: #ededed;
    box-shadow: inset 5px 5px 4px #b6b6b672, inset -5px -5px 4px #ffffff;
}

.subarticle img {
    align-self: center;
    border-radius: 10px;
    user-select: none;
    max-width: 100%;
    max-height: 100%;
    margin-bottom: 6%;
    width: auto;
    height: auto;
    transition: transform 0.2s ease-in-out;
    object-fit: contain;
}

.subarticle img:hover {
    transform: scale(1.01);
    cursor: pointer;
}

pre {
    border-radius: 10px;
    padding: 6px 6px 6px 6px;
    color: white;
    background-color: #000000;
}

.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: #000000;
    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;
}

.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: #000000;
    background-color: #ffffff;
}

.light-theme ::selection {
    color: rgb(0, 0, 0);
    background-color: #ffff00;
    text-shadow: none;
    animation: 2s;
}

html::-webkit-scrollbar {
    display: none;
}

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;
}

.light-theme .fin p {
    color: #000000;
}

p {
    line-height: 1.6;
    word-spacing: 0.2em;
}

b {
    font-weight: 900;
}

.light-theme b {
    color: #000000;
}

.watermark {
    position: fixed;
    bottom: 20%;
    right: 10px;
    font-family: 'Michroma', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.712);
    z-index: 9999;
    pointer-events: none;
    user-select: none;
    border: 1px solid rgba(255, 255, 255, 0.575);
    padding: 10px 5px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-weight: 200px;
}

.light-theme .watermark {
    color: rgba(0, 0, 0, 0.418);
    border: 0.8px solid rgba(20, 20, 20, 0.268);
}

h2 {
    font-family: 'Lexend';
    font-size: 20px;
    font-weight: 200px;
}

.light-theme h2 {
    color: #000000;
}

img {
    -webkit-user-drag: none;

    user-select: none;
    pointer-events: none;
}

a img {
    pointer-events: auto;
}

/* --- CORRECCIONES PARA MÓVIL --- */
@media (max-width: 768px) {
    body {
        margin: 0 2% !important;
    }

    .subsection_grid {
        flex-direction: column;
        align-items: center;
    }

    .subarticle {
        width: 95% !important;
        min-height: auto !important;
    }

    header {
        padding: 10px;
    }

    .content {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .watermark {
        display: none;
    }
}