/* =========================================
   CORE RESETS / BASE
========================================= */

html, body {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    background: radial-gradient(circle at 50% 20%, #1A2540 0%, #0B1020 60%);
    color: #E5E7EB;
    font-family: 'Inter', sans-serif;
}

/* prevent layout jump from fixed header */
:root {
    --header-h: 88px;
}
body {
    padding-top: var(--header-h);
}

/* =========================================
   NAVBAR (COSMIC DARK)
========================================= */

#site-header {
    transition: background 0.25s ease, box-shadow 0.25s ease,
                padding 0.25s ease, backdrop-filter 0.25s ease;
}

#site-header nav {
    background: rgba(17, 26, 46, 0.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid #2A375F;
    color: #E5E7EB;
    transition: all 0.25s ease;
}

/* scrolled state */
#site-header.scrolled nav {
    background: rgba(11, 16, 32, 0.95);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    padding-top: .35rem !important;
    padding-bottom: .35rem !important;
}

/* nav link base style */
#site-header .nav-link {
    color: #9CA3AF;
    font-weight: 600;
    position: relative;
    padding-bottom: 2px;
    transition: color 0.18s ease;
}

/* hover + active */
#site-header .nav-link:hover {
    color: #C084FC;
}
#site-header .nav-link.active {
    color: #7C3AED;
}

/* underline animated bar */
#site-header .nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg,#7C3AED,#2563EB);
    box-shadow: 0 0 12px rgba(124,58,237,0.7);
    transform: translateX(-50%);
    transition: width .2s ease;
}
#site-header .nav-link:hover::after,
#site-header .nav-link.active::after {
    width: 56%;
}

/* logo hover */
.logo-img {
    transition: transform 0.2s ease, filter 0.3s ease;
}
.logo-img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(124,58,237,0.6));
}

/* scroll progress bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg,#7C3AED,#2563EB,#C084FC);
    width: 0%;
    z-index: 2000;
    transition: width 0.1s linear;
}

/* =========================================
   USER MENU (DESKTOP)
========================================= */

.user-button {
    background: rgba(26,37,64,0.9);
    border: 1px solid #2A375F;
    color: #E5E7EB;
}

.user-menu {
    background: #111A2E;
    border: 1px solid #2A375F;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

/* hover states */
.user-menu a:hover {
    background: rgba(124,58,237,0.15);
}
.user-menu button:hover {
    background: rgba(239,68,68,0.15);
}

/* =========================================
   MOBILE MENU
========================================= */

.mobile-menu-panel {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    width: 100%;
    background: #111A2E;
    color: #E5E7EB;
    border-top: 1px solid #2A375F;
    box-shadow: 0 20px 25px rgba(0,0,0,0.6);
    z-index: 1500;
}

.mobile-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 0.75rem 1rem;
    color: #9CA3AF;
    letter-spacing: .1em;
}

/* links inside mobile drawer */
.mobile-menu-panel a {
    color: #D1D5DB;
    padding: 0.75rem 1rem;
    display: block;
}
.mobile-menu-panel a:hover {
    background: rgba(124,58,237,0.15);
}

/* =========================================
   HAMBURGER ICON
========================================= */

.hamburger,
.hamburger::before,
.hamburger::after {
    content: "";
    display: block;
    width: 22px;
    height: 2px;
    background: #E5E7EB;
    transition: all 0.25s ease;
    border-radius: 2px;
}

.hamburger::before {
    transform: translateY(-6px);
}
.hamburger::after {
    transform: translateY(4px);
}

/* =========================================
   ANIMATION: Fade-In
========================================= */

.fade-in {
    opacity: 0;
    transform: translateY(6px);
    animation: fadeIn .6s ease forwards;
}
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   FOOTER
========================================= */

footer {
    background: #080C17;
    color: #9CA3AF;
    border-top: 1px solid #2A375F;
}
footer a:hover {
    color: #C084FC;
}

/* =========================================
   UTILITIES
========================================= */

.text-arcane {
    color: #7C3AED;
}

.text-crystal {
    color: #38BDF8;
}

.shadow-cosmic {
    box-shadow: 0 0 25px rgba(124,58,237,0.4);
}