/* Artistic Overhaul Styles */

:root {
  --cursor-size: 20px;
  --cursor-color: rgba(255, 255, 255, 0.8);
  --accent-glow: radial-gradient(
    circle,
    rgba(130, 82, 224, 0.4) 0%,
    rgba(0, 0, 0, 0) 70%
  );
}

/* 1. Grain Overlay */
.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998; /* Below cursor, above content */
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  animation: grain-dance 1s steps(4) infinite;
}

@keyframes grain-dance {
  0%,
  100% {
    transform: translate(0, 0);
  }
  10% {
    transform: translate(-5%, -10%);
  }
  20% {
    transform: translate(-15%, 5%);
  }
  30% {
    transform: translate(7%, -25%);
  }
  40% {
    transform: translate(-5%, 25%);
  }
  50% {
    transform: translate(-15%, 10%);
  }
  60% {
    transform: translate(15%, 0%);
  }
  70% {
    transform: translate(0%, 15%);
  }
  80% {
    transform: translate(3%, 35%);
  }
  90% {
    transform: translate(-10%, 10%);
  }
}

/* 2. Custom Cursor */
body {
  cursor: none; /* Hide default cursor */
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--cursor-size);
  height: var(--cursor-size);
  border: 1px solid var(--cursor-color);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out, opacity 0.2s ease;
  mix-blend-mode: difference;
}

.custom-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 4px;
  height: 4px;
  background-color: var(--cursor-color);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}

.custom-cursor.hovering {
  transform: translate(-50%, -50%) scale(2.5);
  background-color: rgba(255, 255, 255, 0.1);
  border-color: transparent;
}

/* Hide on touch devices */
@media (hover: none) and (pointer: coarse) {
  .custom-cursor,
  .custom-cursor-dot {
    display: none;
  }
  body {
    cursor: auto;
  }
}

/* 3. Scroll Reveal Animation */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------------------------------------------------------------- */
/*                                Sticky Navigation                           */
/* -------------------------------------------------------------------------- */

#artistic-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.1); /* Frosted glass base */
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 8px;
    align-items: center;
    transition: all 0.3s ease;
    opacity: 0; /* Hidden initially until JS injects and fades in */
    animation: navFadeIn 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.5s;
    max-width: 95vw;
    overflow-x: auto; /* Allow scrolling on very small screens */
    scrollbar-width: none; /* Hide scrollbar Firefox */
}

#artistic-nav::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome/Safari */
}

.nav-link {
    text-decoration: none;
    color: rgba(0, 0, 0, 0.7); /* Dark text for light mode assumption, adjustable */
    font-family: 'Inter', sans-serif; /* Or site default */
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
}

/* Hover State */
.nav-link:hover {
    color: #000;
    background: rgba(255, 255, 255, 0.2);
}

/* Active State */
.nav-link.active {
    color: #fff;
    background: rgba(0, 0, 0, 0.8); /* Strong contrast for active */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Dark Mode Adjustments (If site has dark mode class on body) */
@media (prefers-color-scheme: dark) {
    #artistic-nav {
        background: rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    .nav-link {
        color: rgba(255, 255, 255, 0.7);
    }
    .nav-link:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.1);
    }
    .nav-link.active {
        color: #000;
        background: rgba(255, 255, 255, 0.9);
    }
}

@keyframes navFadeIn {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}
