﻿/* Navigation.css - Constellation Navigation System */

/* ================================
   CONSTELLATION NAVIGATION OVERLAY
   ================================ */

.constellation-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(10px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

    .constellation-nav-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
    }

.constellation-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.constellation-nodes {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 1200px;
    height: 80%;
    max-height: 800px;
}

/* Navigation Nodes (Stars) */
.nav-node {
    position: absolute;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-node-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-orange));
    box-shadow: 0 0 20px rgba(255, 111, 60, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    animation: pulse 2s ease-in-out infinite;
}

.nav-node:hover .nav-node-circle {
    transform: scale(1.2);
    box-shadow: 0 0 40px rgba(255, 111, 60, 1);
    animation: none;
}

.nav-node-label {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.nav-node:hover .nav-node-label {
    opacity: 1;
}

/* Node Positions - Constellation Layout */
.nav-node[data-page="home"] {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

    .nav-node[data-page="home"] .nav-node-circle {
        width: 80px;
        height: 80px;
        font-size: 2rem;
        background: linear-gradient(135deg, var(--accent-gold), var(--primary-orange));
    }

.nav-node[data-page="about"] {
    top: 20%;
    left: 30%;
}

.nav-node[data-page="experience"] {
    top: 20%;
    right: 30%;
}

.nav-node[data-page="projects"] {
    bottom: 20%;
    left: 30%;
}

.nav-node[data-page="contact"] {
    bottom: 20%;
    right: 30%;
}

.nav-node[data-page="blog"] {
    top: 50%;
    left: 15%;
}

.nav-node[data-page="resume"] {
    top: 50%;
    right: 15%;
}

/* Constellation Lines (SVG) */
.constellation-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.constellation-line {
    stroke: rgba(255, 111, 60, 0.3);
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 5, 5;
    animation: dashAnimation 20s linear infinite;
}

@keyframes dashAnimation {
    to {
        stroke-dashoffset: -100;
    }
}

/* Close Button */
.constellation-close {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 111, 60, 0.2);
    border: 2px solid var(--primary-orange);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
}

    .constellation-close:hover {
        background: var(--primary-orange);
        transform: rotate(90deg);
    }

/* Navigation Toggle Button */
.nav-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-orange));
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    z-index: 9998;
    box-shadow: 0 4px 20px rgba(255, 111, 60, 0.4);
    transition: all 0.3s ease;
}

    .nav-toggle:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 30px rgba(255, 111, 60, 0.6);
    }

    .nav-toggle span {
        width: 20px;
        height: 2px;
        background: white;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

/* Fallback Navigation (Mobile/Traditional) */
.nav-fallback {
    display: none;
}

@media (max-width: 768px) {
    .constellation-nav-overlay .constellation-nodes {
        width: 95%;
        height: 95%;
    }

    .nav-node-circle {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .nav-node[data-page="home"] .nav-node-circle {
        width: 65px;
        height: 65px;
        font-size: 1.5rem;
    }

    /* Adjust positions for mobile */
    .nav-node[data-page="about"] {
        top: 15%;
        left: 25%;
    }

    .nav-node[data-page="experience"] {
        top: 15%;
        right: 25%;
    }

    .nav-node[data-page="projects"] {
        bottom: 15%;
        left: 25%;
    }

    .nav-node[data-page="contact"] {
        bottom: 15%;
        right: 25%;
    }

    .nav-node[data-page="blog"] {
        top: 50%;
        left: 10%;
    }

    .nav-node[data-page="resume"] {
        top: 50%;
        right: 10%;
    }
}

/* Pulsing animation for nodes */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 111, 60, 0.6);
    }

    50% {
        box-shadow: 0 0 30px rgba(255, 111, 60, 0.9);
    }
}

/* Header Navigation */
.nav-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 111, 60, 0.1);
    z-index: 9997;
    transition: all 0.3s ease;
}

    .nav-header.scrolled {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
        border-bottom-color: var(--primary-orange);
    }

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

/* Footer Navigation */
.nav-footer {
    background: var(--card-bg);
    border-top: 1px solid rgba(255, 111, 60, 0.1);
    padding: 3rem 2rem 2rem;
    margin-top: 5rem;
}

.footer-nav-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.footer-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

    .footer-nav-link:hover {
        color: var(--primary-orange);
    }

.footer-copyright {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Stars background effect */
.stars-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

/* Accessibility */
.nav-node:focus {
    outline: 2px solid var(--primary-orange);
    outline-offset: 4px;
}

.constellation-close:focus {
    outline: 2px solid var(--primary-orange);
}

@media (prefers-reduced-motion: reduce) {
    .constellation-line,
    .nav-node-circle,
    .star {
        animation: none !important;
    }
}
