/* Navbar Load Animation */
@keyframes navFadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes navFadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0px;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.navbar.scrolled {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.navbar-logo {
    display: flex;
    align-items: center;
    z-index: 1001;
    margin-left: 40px;
    opacity: 0;
    animation: navFadeInLeft 0.6s ease-out forwards;
    animation-delay: 0.1s;
}
.navbar-logo img {
    height: 32px;
    width: auto;
}
.navbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1001;
    margin-right: 40px;
    cursor: pointer;
    opacity: 0;
    animation: navFadeInRight 0.6s ease-out forwards;
    animation-delay: 0.2s;
}
.navbar-accent {
    position: relative;
    font-family: "Courier New", monospace;
    font-size: 18px;
    color: white;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.5;
}
.navbar-accent::before,
.navbar-accent::after {
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.navbar-accent:first-child::before {
    content: "◄";
    right: 100%;
    transform: translateX(8px);
    font-size: 10px;
    top: 50%;
    margin-top: -5px;
}
.navbar-accent:last-child::after {
    content: "►";
    left: 100%;
    transform: translateX(-8px);
    font-size: 10px;
    top: 50%;
    margin-top: -5px;
}
.navbar-right:hover .navbar-accent {
    opacity: 1;
}
.navbar-right:hover .navbar-accent:first-child {
    transform: translateX(-6px);
}
.navbar-right:hover .navbar-accent:last-child {
    transform: translateX(6px);
}
.navbar-right:hover .navbar-accent:first-child::before,
.navbar-right:hover .navbar-accent:last-child::after {
    opacity: 0.6;
    transform: translateX(0);
}
.navbar-toggle {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}
.navbar-toggle .hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: white;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger animation when open */
.navbar-toggle.active .hamburger-line:first-child {
    transform: translateY(4px) rotate(45deg);
}
.navbar-toggle.active .hamburger-line:last-child {
    transform: translateY(-4px) rotate(-45deg);
}

/* Nav Menu Overlay */
.nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    background: black;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.nav-menu.active {
    opacity: 1;
    visibility: visible;
}

/* Left column */
.nav-menu-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 100px 50px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-menu-left .nav-decoration {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}
.nav-menu.active .nav-menu-left .nav-decoration {
    opacity: 1;
    transform: translateY(0);
}
.nav-menu-left .nav-ascii {
    font-family: monospace;
    font-size: 12px;
    color: white;
    opacity: 0.3;
    white-space: pre;
    line-height: 1.4;
}
.nav-menu-left .nav-contact-info {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
}
.nav-menu.active .nav-menu-left .nav-contact-info {
    opacity: 1;
    transform: translateY(0);
}
.nav-menu-left .nav-label {
    font-family: "Lexend";
    font-size: 12px;
    color: white;
    opacity: 0.4;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.nav-menu-left .nav-email {
    font-family: "Lexend";
    font-size: 14px;
    color: white;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}
.nav-menu-left .nav-email:hover {
    opacity: 1;
}

/* Center - Main nav links */
.nav-menu-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 50px 80px;
    gap: 0;
}
.nav-menu .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px 0;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.nav-menu.active .nav-link {
    opacity: 1;
    transform: translateX(0);
}
.nav-menu.active .nav-link:nth-child(1) { transition-delay: 0.1s; }
.nav-menu.active .nav-link:nth-child(2) { transition-delay: 0.15s; }
.nav-menu.active .nav-link:nth-child(3) { transition-delay: 0.2s; }
.nav-menu.active .nav-link:nth-child(4) { transition-delay: 0.25s; }

.nav-menu .nav-link:last-child {
    border-bottom: none;
}
.nav-menu .nav-link-index {
    font-family: "Lexend";
    font-size: 12px;
    color: white;
    opacity: 0.3;
    min-width: 24px;
    transition: opacity 0.3s ease;
}
.nav-menu .nav-link-text {
    font-family: "Lexend";
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 300;
    color: white;
    text-transform: uppercase;
    letter-spacing: -1px;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), letter-spacing 0.4s ease;
}
.nav-menu .nav-link-line {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 1px;
    background: white;
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.nav-menu .nav-link:hover .nav-link-index {
    opacity: 1;
}
.nav-menu .nav-link:hover .nav-link-text {
    transform: translateX(15px);
    letter-spacing: 2px;
}
.nav-menu .nav-link:hover .nav-link-line {
    width: 100px;
}

/* Right column */
.nav-menu-right {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 100px 50px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-menu-right .nav-socials {
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.35s, transform 0.5s ease 0.35s;
}
.nav-menu.active .nav-menu-right .nav-socials {
    opacity: 1;
    transform: translateY(0);
}
.nav-menu-right .nav-socials a {
    font-family: "Lexend";
    font-size: 13px;
    color: white;
    text-decoration: none;
    opacity: 0.5;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.nav-menu-right .nav-socials a:hover {
    opacity: 1;
    transform: translateX(5px);
}

/* Prevent body scroll when menu is open */
body.nav-open {
    overflow: hidden;
}

/* Page content transition when menu opens */
.site-main,
.site-footer {
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1),
                opacity 0.5s ease,
                filter 0.5s ease;
}
body.nav-open .site-main,
body.nav-open .site-footer {
    transform: scale(0.98);
    opacity: 0.3;
    filter: blur(5px);
}

/* Tablet breakpoint */
@media (max-width: 900px) {
    .nav-menu {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
    }
    .nav-menu-left {
        display: none;
    }
    .nav-menu-content {
        padding: 100px 50px 40px;
        justify-content: center;
    }
    .nav-menu-right {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding: 30px 50px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .nav-menu-right .nav-socials {
        flex-direction: row;
        gap: 24px;
    }
}

/* Mobile breakpoint */
@media (max-width: 600px) {
    .nav-menu-content {
        padding: 90px 30px 30px;
    }
    .nav-menu .nav-link {
        padding: 18px 0;
        gap: 15px;
    }
    .nav-menu .nav-link-text {
        font-size: clamp(24px, 8vw, 36px);
    }
    .nav-menu .nav-link-index {
        font-size: 10px;
        min-width: 20px;
    }
    .nav-menu .nav-link:hover .nav-link-line {
        width: 50px;
    }
    .nav-menu-right {
        padding: 24px 30px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .nav-menu-right .nav-socials {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }
    .nav-menu-right .nav-socials a {
        font-size: 12px;
    }
}

@media (max-width: 506px) {
    .navbar-right {
        margin-right: 20px;
    }
    .navbar-logo {
        margin-left: 20px;
    }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .navbar-logo,
    .navbar-right {
        animation: none;
        opacity: 1;
    }
}


