/* ══════════ NAV ══════════ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 300;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6%;
    background: rgba(10, 12, 16, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
}

.logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #5b8dee, #818cf8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.9rem;
    color: #fff;
}

.logo-text {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
}

.logo-text span {
    color: var(--accent);
}

.logo-img {
    height: 36px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 1rem;
    height: 64px;
    color: var(--muted);
    text-decoration: none;
    font-size: 1.05rem;
    cursor: pointer;
    transition: color .2s;
    white-space: nowrap;
}

.nav-menu > li > a:hover, .nav-menu > li > a.active-menu {
    color: var(--text);
}

.nav-menu > li > a .arr {
    font-size: 0.55rem;
    transition: transform .2s;
}

.nav-menu > li:hover > a .arr {
    transform: rotate(180deg);
}

.dropdown {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    background: rgba(10, 12, 16, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.5rem 0;
    min-width: 180px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    z-index: 400;
}

.nav-menu > li:hover .dropdown {
    display: block;
}

.dropdown a {
    display: block;
    padding: 0.6rem 1.2rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: all .15s;
    cursor: pointer;
}

.dropdown a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    padding-left: 1.5rem;
}

.dropdown .dd-sep {
    height: 1px;
    background: var(--border);
    margin: 0.4rem 0;
}

.nav-cta {
    background: transparent;
    color: var(--accent);
    border: 0.5px solid rgba(91, 141, 238, 0.5);
    padding: 0.45rem 1.2rem;
    border-radius: 7px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}

.nav-cta:hover {
    background: rgba(91, 141, 238, 0.1);
    border-color: rgba(91, 141, 238, 0.8);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.nav-ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(91,141,238,0.13);
    border: 1px solid rgba(91,141,238,0.5);
    box-shadow: 0 0 14px rgba(91,141,238,0.25), inset 0 0 8px rgba(91,141,238,0.06);
    padding: 6px 15px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    white-space: nowrap;
    cursor: default;
}
.nav-ai-star {
    color: var(--accent);
    font-size: 0.72rem;
    display: inline-block;
    animation: navAiStarPulse 2s ease-in-out infinite;
}
@keyframes navAiStarPulse {
    0%,100% { opacity:0.5; transform:scale(1) rotate(0deg); }
    50% { opacity:1; transform:scale(1.4) rotate(20deg); }
}
.nav-ai-text {
    background: linear-gradient(135deg, #7ab3ff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* ── ACTIVE NAV TAB ── */
.nav-menu > li[data-page].active > a {
    color: var(--accent);
    font-weight: 700;
    text-shadow: 0 0 16px rgba(91,141,238,0.8), 0 0 32px rgba(91,141,238,0.3);
    position: relative;
}

.nav-menu > li[data-page].active > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--accent);
    animation: navLinePulse 1.8s ease-in-out infinite;
}

@keyframes navLinePulse {
    0%, 100% { opacity: 0.3; box-shadow: 0 0 4px rgba(91,141,238,0.4); }
    50% { opacity: 1; box-shadow: 0 0 12px rgba(91,141,238,1), 0 0 24px rgba(91,141,238,0.5); }
}

.nav-menu > li[data-page].active > a .arr {
    color: var(--accent);
}

/* 홈 화면에서는 nav active 스타일 제거 */
body:has(#page-home.active) .nav-menu > li[data-page].active > a {
    color: var(--muted);
    font-weight: 400;
    text-shadow: none;
}
body:has(#page-home.active) .nav-menu > li[data-page].active > a::after {
    display: none;
}
body:has(#page-home.active) .nav-menu > li[data-page].active > a .arr {
    color: var(--muted);
}
