.header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 7%;
    padding: 0 5vw;
    border-bottom: 1px solid transparent; /* Transparente inicialmente */
    position: fixed;
    top: 0;
    left: 0 !important;
    right: 0 !important;
    z-index: 1001;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-sizing: border-box;
    transition: border-bottom-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-1000px);
    animation: header_animation 2s ease-in-out forwards;
}

/* Clase que se agrega al hacer scroll */
.header.scrolled {
    border-bottom-color: var(--grey);
}

.content_logo{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 10%;
    height: 100%;
    border-right: 1px solid transparent; /* Transparente inicialmente */
    border-left: 1px solid transparent; /* Transparente inicialmente */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Clase que se agrega al hacer scroll */
.header.scrolled .content_logo {
    border-right-color: var(--grey);
    border-left-color: var(--grey);
}

.content_logo:hover{
    background-color: var(--dark-grey);
}

.content_logo h1{
    font-family: 'Technor', sans-serif;
    font-size: 1.5rem;
    color: var(--white);
    text-transform: uppercase;
    font-weight: 400;
    cursor: pointer;
}

nav{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60%;
    height: 100%;
}

nav .nav_links{
    display: flex;
    align-items: center;
    justify-content: left;
    gap: 20%;
    width: 100%;
    height: 100%;
}

nav .nav_links li a{
    background-color: transparent;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

nav .nav_links li a:hover{
    background-color: transparent;
    animation: text-hack 0.6s ease-in-out;
    text-shadow: 0 0 8px var(--white);
}

nav a.active {
  color: var(--white);
}

.content_social{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20%;
    height: 100%;
}

.content_social p, a, i{
    font-size: 1.2rem;
    color: var(--grey);
    cursor: pointer;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s ease-in-out;
}

.content_social p:hover, a:hover{
    color: var(--white);
    background-color: var(--dark-grey);
}

.content_social p{
    width: 30%;
    border-right: 1px solid transparent; /* Transparente inicialmente */
    border-left: 1px solid transparent; /* Transparente inicialmente */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Clase que se agrega al hacer scroll */
.header.scrolled .content_social p {
    border-right-color: var(--grey);
    border-left-color: var(--grey);
}

.content_social a{
    width: 70%;
    padding-left: 20%;
    border-left: 1px solid transparent; /* Transparente inicialmente */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Clase que se agrega al hacer scroll */
.header.scrolled .content_social a {
    border-left-color: var(--grey);
}

.content_social a:hover i{
    color: var(--white);
}

/* Por defecto, oculta extras en nav */
.nav_extras {
    display: none;
}

/* Responsive Header */
/* Oculta el menú hamburguesa en escritorio */
.menu-toggle {
    display: none;
    position: absolute;
    right: 2.5%;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    background: transparent;
    border: 1px solid transparent; /* Transparente inicialmente */
    border-radius: 12px;
    justify-content: center;
    align-items: center;
    z-index: 1201;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-direction: column;
    gap: 7px;
    padding: 1%;
}

/* Clase que se agrega al hacer scroll */
.header.scrolled .menu-toggle {
    border-color: var(--dark-grey);
}

.menu-toggle:hover {
    border-color: var(--white) !important;
}

.menu-toggle span {
    display: block;
    height: 1px;
    width: 32px;
    background: var(--grey);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(.4,2,.6,1);
    position: relative;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background: var(--white);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background: var(--white);
}

@media screen and (max-width: 1500px) {
    .header h1,p,a,i{
        font-size: 0.9rem;
    }
}

/* Responsive nav */
@media (max-width: 1200px) {
    .header {
        padding: 0% 5%;
    }
    nav {
        width: 100%;
        position: fixed;
        top: 0;
        right: -100vw;
        height: 100vh;
        background: var(--dark-grey);
        border-left: 1px solid var(--grey);
        border-bottom: none;
        z-index: 2000;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: right 0.4s cubic-bezier(.4,2,.6,1);
        flex-direction: column;
    }
    nav.open {
        right: 0;
        z-index: 3000;
    }
    nav .nav_links {
        flex-direction: column;
        gap: 40px;
        width: 100%;
        height: auto;
        align-items: center;
        justify-content: center;
    }
    nav .nav_links li {
        width: 100%;
        text-align: center;
    }
    nav .nav_links a {
        font-size: 2rem;
        color: var(--grey);
        width: 100%;
        display: block;
        padding: 20px 0;
        border-bottom: 1px solid var(--grey);
        background: transparent;
        transition: background 0.2s, color 0.2s;
    }
    nav .nav_links a.active,
    nav .nav_links a:hover {
        color: var(--white);
        background: var(--grey);
    }
    .content_logo {
        width: 20%;
        min-width: 70px;
        border: none;
    }

    .content_logo h1{
        font-size: 1.5rem;
    }

    .content_social {
        display: none;
    }
    .menu-toggle {
        display: flex;
        z-index: 4000;
        width: auto;
        height: auto;
    }
    .nav_extras {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-self: center;
        gap: 20px;
        width: 100%;
        margin-top: 0;
    }
    .nav_extras .lang,
    .nav_extras .github-link {
        font-size: 1.5rem;
        color: var(--grey);
        background: none;
        border: none;
        width: 100%;
        text-align: center;
        padding: 20px 0;
        cursor: pointer;
        transition: color 0.2s, background 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        border-bottom: 1px solid var(--grey);
    }
    .nav_extras .lang:hover,
    .nav_extras .github-link:hover {
        color: var(--white);
        background: var(--grey);
    }
    .nav_extras .github-link {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        font-size: 1.5rem;
        color: var(--grey);
        background: none;
        border: none;
        width: 100%;
        text-align: center;
        padding: 20px 0;
        cursor: pointer;
        transition: color 0.2s, background 0.2s;
        border-bottom: 1px solid var(--grey);
    }

    .nav_extras .github-link i{
        font-size: 1.5rem;
        width: 10%;
    }

    .nav_extras .github-link:hover {
        color: var(--white);
        background: var(--grey);
    }
}

@media (max-width: 600px) {
    .header {
        height: 8dvh;
        padding: 0 5% 0 5%;
    }

    .content_logo {
        margin-left: 5%;
    }

    .content_logo h1 {
        font-size: 1.2rem;
    }
    .menu-toggle {
        width: auto;
        height: auto;
        padding: 0.5rem;
        margin-right: 5%;
    }
    .menu-toggle span {
        width: 28px;
        height: 1px;
    }
}

@media (max-width: 600px) {
    nav .nav_links a,
    .nav_extras .lang,
    .nav_extras .github-link {
        font-size: 1.1rem;
        padding: 10px 0;
    }
}

.anim-slide-down {
  opacity: 0;
  transform: translateY(-120px);
  transition: opacity 1.6s cubic-bezier(.4,0,.2,1), transform 1.6s cubic-bezier(.4,0,.2,1);
}
.anim-slide-down.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Efecto Hacking Text */
.hacking-text {
    position: relative;
    overflow: hidden;
}

.hacking-text::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    color: var(--white);
    animation: hacking-glitch 0.3s infinite;
}

.hacking-text:hover::before {
    opacity: 1;
}

@keyframes hacking-glitch {
    0% { content: attr(data-text); }
    5% { content: "H4ck1ng..."; }
    10% { content: "░░░░░░░░"; }
    15% { content: "####"; }
    20% { content: ">>>[]: "; }
    25% { content: "3rr0r"; }
    30% { content: "01101010"; }
    35% { content: "XXXX"; }
    40% { content: "████"; }
    45% { content: "@#$%"; }
    50% { content: "!@#$%^&*"; }
    55% { content: "LOADING..."; }
    60% { content: "[$_$]"; }
    65% { content: "C0D3"; }
    70% { content: "▓▓▓▓▓"; }
    75% { content: "H4X"; }
    80% { content: ">>_"; }
    85% { content: "SYS_ERR"; }
    90% { content: "░█░█░"; }
    95% { content: "[OK]"; }
    100% { content: attr(data-text); }
}

.content_logo h1 {
    transition: all 0.3s ease-in-out;
}

.content_logo:hover h1 {
    animation: logo-hack 0.8s ease-in-out;
    text-shadow: 0 0 10px var(--white);
}

@keyframes logo-hack {
    0%, 100% {
        transform: none;
        filter: none;
    }
    10% {
        transform: scale(1.05);
        filter: hue-rotate(90deg);
    }
    20% {
        transform: scale(0.95);
        filter: contrast(2);
    }
    30% {
        transform: scale(1.02);
        filter: brightness(1.5);
    }
    40% {
        transform: scale(0.98);
        filter: saturate(0);
    }
    50% {
        transform: scale(1.01);
        filter: invert(1);
    }
    60% {
        transform: scale(1);
        filter: none;
    }
}

@keyframes text-hack {
    0%, 100% {
        opacity: 1;
    }
    5% {
        opacity: 0.8;
        text-shadow: 2px 0 #00ff00, -2px 0 #ff0080;
    }
    10% {
        opacity: 0.6;
        transform: skew(5deg);
    }
    15% {
        opacity: 0.9;
        filter: blur(1px);
    }
    20% {
        opacity: 1;
        text-shadow: none;
        transform: none;
        filter: none;
    }
}

.hacking-active {
    position: relative;
    color: var(--white) !important;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
}

.hacking-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.2), transparent);
    animation: scan-line 0.5s ease-in-out;
}

@keyframes scan-line {
    0% { left: -100%; }
    100% { left: 100%; }
}

.typing-cursor::after {
    content: '_';
    animation: cursor-blink 1s infinite;
    color: var(--white);
}

@keyframes cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes header_animation{
    0%{
        transform: translateY(-1000px);
    }
    100%{
        transform: translateY(0);
    }
}