*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: content-box;
}

:root {
    --white-primary: rgb(236, 236, 236);
    --black-bg: rgb(21, 21, 21);
    --grey-accent: rgb(179, 179, 179);
}

/* Font
    .readex-pro-<uniquifier> {
    font-family: "Readex Pro", sans-serif;
    font-optical-sizing: auto;
    font-weight: <weight>;
    font-style: normal;
    font-variation-settings:
        "HEXP" 0;
*/

body {
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.02rem;
    background-color: var(--black-bg);
    color: var(--white-primary);

    font-family: "Readex Pro", sans-serif;
    font-optical-sizing: auto;
    font-variation-settings:
        "HEXP" 0;
}

video,
img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Header CSS */

header {
    position: sticky;
    z-index: 10;
    top: 0;
    width: 100%;
    display: flex;
}

.header_link {
    margin: auto;
    padding-top: 25px;
    width: 30vw;
    max-width: 200px;
}

/* contact content CSS */

.contact_main_section {
    width: 80%;
    max-width: 1200px;
    margin: auto;
    margin-top: min(7%, 80px);
}

h1 {
    font-size: min(4vw, 40px);
    text-align: center;
    margin-bottom: 40px;
}


h1 {
    position: relative;
    text-align: center;
}

h1::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    transform: translateX(-50%);
    width: 50%;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.8),
            transparent);
    filter: blur(1px);
}



ul {
    list-style: none;
    display: grid;
    margin: auto;
    margin-top: min(5%, 50px);
    padding: 40px;
    padding-left: 70px;
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
    gap: 50px;
    width: fit-content;
}

li {
    padding-inline: 25px;
}

li a {
    position: relative;
    text-decoration: none;
    color: inherit;

    display: flex;
    flex-direction: column;
    gap: 6px;
    text-transform: capitalize;
}

li a::before,
li a::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -20px;
    background-color: var(--white-primary);
    opacity: 0;
    transform: translateX(-5px);
    transition: opacity 150ms linear, transform 150ms ease-in-out;
}

li a::before {
    width: 20px;
    height: 1px;
}

li a::after {
    width: 1px;
    height: 20px;
}

.person-name {
    font-size: 24px;
    font-weight: 600;
}

.person-role {
    font-size: 16px;
    color: var(--grey-accent);
}

.person-mail {
    font-weight: 100;
    text-transform: lowercase;
    font-size: 14px;
    color: var(--grey-accent);
    transition: transform 150ms ease-in-out, color 150ms ease-in-out;
}

li a:hover .person-mail {
    color: var(--white-primary);
    transform: translateX(3px);
}

li a:hover {
    animation: autoFocus 350ms linear;
}

li a:hover::before,
li a:hover::after {
    opacity: 1;
    transform: translateX(0);
}

@keyframes autoFocus {
    0% {
        filter: blur(3px);
    }

    100% {
        filter: blur(0);
    }
}

/* Nav CSS */

nav {
    z-index: 10;
    margin: auto;
    margin-top: 60px;
    display: flex;
    gap: 2px;
    height: 44px;
    align-items: center;
    width: fit-content;
}

nav a {
    position: relative;
    text-decoration: none;
    color: var(--white-primary);
    font-size: 12px;
    font-weight: 300;
    padding: 10px;
    background-color: rgba(60, 60, 60, 0.4);
    backdrop-filter: blur(5px);
    overflow: hidden;
    transition: color 250ms ease-in-out;
}

nav a::after,
nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background-color: var(--white-primary);
    z-index: -1;
    transition: height 250ms ease-in-out;
}

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

nav a:hover::after,
nav a:hover::before {
    height: 100%;
}


.nav-contact {
    border-radius: 100px 0 0 100px;
    padding-left: 13px;
}

.nav_social_linkedin {
    border-radius: 0 100px 100px 0;
    padding-right: 15px;
}

.nav_social {
    display: flex;
}

.nav_social svg {
    width: 15px;
}

.footer_wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 50px 0 30px 0;
    font-size: 15px;
    font-weight: 100;
    white-space: nowrap;
}


footer a {
    color: var(--white-primary);
    text-decoration: none;
    text-transform: none;
    transition: color 150ms ease-out;
}

footer a:hover {
    color: var(--grey-accent);
}

.footer_privacy_links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: fit-content;
    margin-left: auto;
}

.footer_social_links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.footer_social_links a svg {
    width: 25px;
}

.footer_contact_links {
    text-transform: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer_contact_links a {
    margin-top: 15px;
}

.footer_contact_madrid {
    font-weight: 300;
}

.footer_contact_address,
.footer_contact_postal {
    font-size: 12px;
}

.footer_copyright {
    text-align: center;
    padding-top: 15px;
    padding-bottom: 40px;
    font-size: 10px;
    font-weight: 100;
}



body {
    perspective: 1000px;
}

body::before {
    content: "";
    position: fixed;
    top: 12%;
    right: 8%;
    width: 150px;
    height: 150px;
    pointer-events: none;
    z-index: -1;
    background-image: url(../assets/photo/jupiter_planet.png);
    background-size: cover;
}

.nasa_easter_egg {
    position: fixed;
    top: 12%;
    right: 8%;
    width: 150px;
    height: 150px;
    z-index: 2;
}


body::after {
    content: "";
    position: fixed;
    min-height: 100dvh;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-image:
        /* small dim stars */
        radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 34% 72%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 56% 9%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 78% 44%, rgba(255, 255, 255, 0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 91% 81%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 7% 63%, rgba(255, 255, 255, 0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 23% 37%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 67% 55%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 45% 88%, rgba(255, 255, 255, 0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 83% 22%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
        /* medium brighter stars */
        radial-gradient(1.5px 1.5px at 28% 5%, rgba(255, 255, 255, 0.7) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 61% 31%, rgba(255, 255, 255, 0.6) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 15% 90%, rgba(255, 255, 255, 0.7) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 88% 67%, rgba(255, 255, 255, 0.6) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 50% 50%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
        /* large bright stars */
        radial-gradient(2px 2px at 5% 30%, rgba(255, 255, 255, 0.9) 0%, transparent 100%),
        radial-gradient(2px 2px at 73% 14%, rgba(255, 255, 255, 0.85) 0%, transparent 100%),
        radial-gradient(2px 2px at 39% 77%, rgba(255, 255, 255, 0.9) 0%, transparent 100%),

        linear-gradient(110deg, rgb(3, 2, 11), #060817 55%);
}

.moon-orbit {
    position: fixed;
    top: 12%;
    right: 8%;
    width: 140px;
    height: 140px;
    pointer-events: none;
}

/* shared moon style */
.moon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

/* orbit path (closer now) */
.moon.front {
    transform-origin: -30px 10px;
    animation: orbitBack 7s linear infinite;
    z-index: 1;
    background: linear-gradient(rgba(8, 106, 42, 0.8),
            rgba(18, 11, 3, 0.8));

    box-shadow: 0 0 4px rgba(27, 159, 73, 0.8);
}

.moon.back {
    transform-origin: -25px 10px;
    animation: orbitBack 10s linear reverse infinite;
    z-index: 1;
    width: 10px;
    height: 10px;

    background: linear-gradient(rgba(8, 52, 245, 0.8),
            rgba(234, 124, 14, 0.8));
    box-shadow: 0 0 4px rgb(234, 124, 14, 0.8);

}


@keyframes orbitBack {
    0% {
        transform: rotate(0deg) translateX(55px);
        opacity: 0;
    }

    10% {
        opacity: 0;
    }

    20% {
        opacity: 0.8;
        width: 8px;
        height: 8px;
    }

    70% {
        opacity: 0.6;
        width: 5px;
        height: 5px;
    }

    80% {
        opacity: 0;
    }

    100% {
        transform: rotate(360deg) translateX(55px);
        opacity: 0;
    }
}

@media (max-width: 900px) {
    .footer_wrapper {
        display: flex;
        flex-direction: column;
        gap: 30px;
        width: 33%;
        margin: auto;
    }

    .footer_privacy_links,
    .footer_contact_links {
        margin-left: 0;
    }

    .footer_social_links {
        justify-content: start;
    }

    ul {
        grid-template-columns: 1fr;
    }

    body::before {
        content: none;
    }

    .moon-orbit {
        display: none;
    }

    ul {
        padding-inline: 0;
        gap: 30px;
    }

    h2 {
        margin-top: 20px;
        margin-bottom: 30px;
    }

    .person-name {
        font-size: 20px;
    }

    .person-role {
        font-size: 15px;
    }

    .person-mail {
        font-size: 12px;
    }

    nav {
        margin-top: 20px;
    }

}

/* Fader CSS */

#fader {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    z-index: 999999;
    pointer-events: none;
    background: rgb(33, 33, 33);
    animation-duration: 700ms;
    animation-timing-function: ease-in-out;
}


@keyframes fade-out {
    from { opacity: 1 }
      to { opacity: 0 }
}

@keyframes fade-in {
    from { opacity: 0 }
      to { opacity: 1 }
}

#fader.fade-out {
    opacity: 0;
    animation-name: fade-out;
}
#fader.fade-in {
    opacity: 1;
    animation-name: fade-in;
}