/* ─── 404 Page ─── */
.nf-wrap {
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
}

.nf-wrap nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 48px;
    border-bottom: 0.5px solid var(--color-border);
}

.nf-wrap .nav-logo {
    font-family: var(--font-header);
    font-weight: var(--fw-header);
    font-size: 20px;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
    text-decoration: none;
}

.nf-wrap .nav-logo span {
    color: var(--color-primary);
}

/* ─── Main ─── */
.nf-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
}

/* ─── Globe ─── */
.globe-wrap {
    position: relative;
    width: 260px;
    height: 260px;
    margin-bottom: 40px;
}

.globe-glow {
    position: absolute;
    inset: -30px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--color-primary-glow) 0%, transparent 70%);
}

canvas#nf-globe {
    border-radius: 50%;
}

/* ─── 404 Code ─── */
.nf-code {
    font-family: var(--font-header);
    font-weight: var(--fw-header);
    font-size: 96px;
    color: var(--color-text-primary);
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 16px;
    position: relative;
}

.nf-code .glitch-digit {
    display: inline-block;
    position: relative;
    animation: glitchShift 4s infinite;
}

.nf-code .glitch-digit:nth-child(2) {
    animation-delay: 0.3s;
}

.nf-code .glitch-digit:nth-child(3) {
    animation-delay: 0.6s;
}

.nf-code em {
    color: var(--color-primary);
    font-style: normal;
}

/* ─── Text ─── */
.nf-title {
    font-family: var(--font-title);
    font-weight: var(--fw-title);
    font-size: 20px;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
}

.nf-desc {
    font-family: var(--font-paragraph);
    font-size: 14px;
    color: var(--color-text-muted);
    max-width: 380px;
    line-height: 1.7;
    margin-bottom: 32px;
}

/* ─── Tag ─── */
.nf-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-primary-tint);
    border: 0.5px solid var(--color-primary-border);
    border-radius: 20px;
    padding: 5px 14px;
    margin-bottom: 28px;
}

.nf-tag-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-text-disabled);
}

.nf-tag span {
    font-family: var(--font-caption);
    font-size: 12px;
    color: var(--color-primary-light);
}

/* ─── Actions ─── */
.nf-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.nf-actions .btn-primary {
    text-decoration: none;
}

.nf-actions .btn-outline {
    text-decoration: none;
}

/* ─── Glitch Animation ─── */
@keyframes glitchShift {

    0%,
    100% {
        transform: translate(0, 0);
        opacity: 1;
    }

    92% {
        transform: translate(0, 0);
        opacity: 1;
    }

    93% {
        transform: translate(-3px, 1px);
        opacity: 0.8;
    }

    94% {
        transform: translate(2px, -1px);
        opacity: 1;
    }

    95% {
        transform: translate(-2px, 0);
        opacity: 0.7;
    }

    96% {
        transform: translate(0, 0);
        opacity: 1;
    }
}

/* ─── Mobile ─── */
@media (max-width: 768px) {
    .nf-wrap nav {
        padding: 16px 24px;
    }

    .nf-code {
        font-size: 64px;
    }

    .nf-title {
        font-size: 17px;
    }

    .globe-wrap {
        width: 200px;
        height: 200px;
    }

    canvas#nf-globe {
        width: 200px;
        height: 200px;
    }
}