/* === NxTForge 3D — Global Styles === */

:root {
    --bg: #0a0a0a;
    --text: #e0e0e0;
    --text-dim: #888;
    --text-muted: #555;
    --text-faint: #444;
    --border-focus: #f97316;
    --accent: #f97316;
    --accent-hover: #fb923c;
    --surface: #111;
    --surface-hover: #1a1a1a;
    --border: #333;
    --border-subtle: #222;
    --glow: rgba(249, 115, 22, 0.1);
    --particle-color: #f97316;
    --bg-grad: linear-gradient(135deg, #0a0a0a 0%, #111 50%, #0a0a0a 100%);
    --radius: 12px;
}
[data-theme="light"] {
    --bg: #f5f5f5;
    --text: #1a1a1a;
    --text-dim: #666;
    --text-muted: #999;
    --text-faint: #aaa;
    --accent: #ea580c;
    --accent-hover: #f97316;
    --surface: #fff;
    --surface-hover: #fafafa;
    --border: #ddd;
    --glow: rgba(249, 115, 22, 0.06);
    --particle-color: #ea580c;
    --bg-grad: linear-gradient(135deg, #f5f5f5 0%, #eee 50%, #f5f5f5 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-grad);
    color: var(--text);
    min-height: 100vh;
    transition: background 0.4s, color 0.4s;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(249,115,22,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(249,115,22,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* Nav */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 2rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    backdrop-filter: blur(12px);
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}
.nav-logo img { width: 28px; height: 28px; }
.nav-logo .nx {
    background: linear-gradient(135deg, var(--accent), #fb923c, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nav-logo span { color: var(--text); }
.nav-location {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 12px;
    max-width: calc(100vw - 10rem);
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.theme-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    line-height: 1;
    transition: all 0.3s;
}
.theme-toggle .icon-moon,
.theme-toggle .icon-sun {
    opacity: 0.65;
    transition: opacity 0.3s;
}
.theme-toggle .active-icon {
    opacity: 1;
    color: var(--accent);
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle:hover .icon-moon,
.theme-toggle:hover .icon-sun { opacity: 0.6; }
.theme-toggle:hover .active-icon { opacity: 1; }

/* Footer */
footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
}
footer a {
    color: var(--text-dim);
    text-decoration: none;
}
footer a:hover { color: var(--accent); }

/* Mouse glow */
.mouse-glow {
    position: fixed;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 2;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    opacity: 0;
}
.mouse-glow.visible { opacity: 1; }

/* Center glow */
.center-glow {
    position: fixed;
    width: 700px; height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

/* Particles */
.particles {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}
.particle {
    position: absolute;
    width: 2px; height: 2px;
    background: var(--particle-color);
    border-radius: 50%;
    opacity: 0;
    animation: floatUp linear infinite;
}
@keyframes floatUp {
    0% { opacity: 0; transform: translateY(0) scale(1); }
    10% { opacity: 0.8; }
    90% { opacity: 0.3; }
    100% { opacity: 0; transform: translateY(-100vh) scale(0.5); }
}

/* 3D Cube background */
.cube-container {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    perspective: 600px;
    opacity: 0.06;
    pointer-events: none;
}
.cube {
    width: 300px; height: 300px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 20s linear infinite;
}
.cube .face {
    position: absolute;
    width: 300px; height: 300px;
    border: 2px solid var(--accent);
    background: transparent;
}
.cube .front  { transform: translateZ(150px); }
.cube .back   { transform: rotateY(180deg) translateZ(150px); }
.cube .right  { transform: rotateY(90deg) translateZ(150px); }
.cube .left   { transform: rotateY(-90deg) translateZ(150px); }
.cube .top    { transform: rotateX(90deg) translateZ(150px); }
.cube .bottom { transform: rotateX(-90deg) translateZ(150px); }
@keyframes rotateCube {
    0%   { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

@media (max-width: 640px) {
    nav {
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 0.8rem 1rem;
        gap: 0;
    }
    .nav-location {
        position: static;
        transform: none;
        order: 3;
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
        max-width: none;
    }
}
