/* * ==========================================
 * NERODYN DESIGN TOKENS
 * ========================================== */
:root {
    --bg-base: #000000;
    --text-primary: #ffffff;
    --text-muted: #8a8a93;
    
    /* Physics */
    --liquid-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --spring-ease: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Layout */
    --nav-height: 4.5rem;
    --glass-bg: rgba(10, 10, 12, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --hero-px: clamp(1.5rem, 8vw, 10vw);
}

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

body { 
    background-color: var(--bg-base); 
    color: var(--text-primary); 
    font-family: 'Inter', sans-serif; 
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* * ==========================================
 * NAVIGATION ENGINE
 * ========================================== */
#nerodyn-nav {
    position: fixed;
    top: 1.5rem;
    left: 0; right: 0; margin: 0 auto;
    height: var(--nav-height);
    width: calc(100vw - 3rem);
    max-width: 1200px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    z-index: 9999;
    overflow: hidden;
    transition: all 0.7s var(--liquid-ease);
    will-change: width, height, border-radius, transform;
    display: flex;
    align-items: center;
}

/* Collapsed Island State */
#nerodyn-nav.collapsed {
    width: 140px;
    height: 52px;
    border-radius: 99px;
    background: rgba(15, 15, 18, 0.95);
    cursor: pointer;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 2rem;
    min-width: 100%;
    transition: opacity 0.4s ease, filter 0.4s ease, transform 0.6s var(--liquid-ease);
}

#nerodyn-nav.collapsed .nav-content {
    opacity: 0;
    filter: blur(10px);
    transform: scale(0.85);
    pointer-events: none;
}

.nav-brand { font-family: 'DM Serif Display', serif; font-size: 1.5rem; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 2.5rem; }
.nav-link { 
    text-decoration: none; color: var(--text-muted); font-size: 0.875rem; 
    transition: color 0.3s ease;
}
.nav-link:hover { color: var(--text-primary); }

.cta-button {
    background: transparent; color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 99px;
    padding: 0.6rem 1.5rem; cursor: pointer; font-weight: 500;
    transition: transform 0.1s linear, border-color 0.4s ease;
}

/* Island Icon Physics */
.nav-icon {
    position: absolute; top: 50%; left: 50%; width: 20px; height: 14px;
    transform: translate(-50%, -50%) scale(0) rotate(-45deg);
    opacity: 0; display: flex; flex-direction: column; justify-content: space-between;
    transition: all 0.6s var(--liquid-ease);
}
.nav-icon span { width: 100%; height: 1.5px; background: #fff; border-radius: 2px; }
#nerodyn-nav.collapsed .nav-icon { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }

/* * ==========================================
 * HERO SECTION ARCHITECTURE
 * ========================================== */
.hero-container {
    position: relative;
    width: 100%;
    min-height: 100dvh;
    /* FIX: Unblocking padding */
    padding: clamp(180px, 28vh, 350px) var(--hero-px) 10vh var(--hero-px); 
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background-color: #000000;
    overflow: hidden;
}

.hero-content { position: relative; z-index: 5; max-width: 1200px; }

.kicker {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem; color: var(--text-muted);
    letter-spacing: 0.2em; margin-bottom: 2.5rem;
    opacity: 0; transform: translateY(15px);
}

.hero-h1 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(3.2rem, 9.5vw, 8rem);
    line-height: 0.92; letter-spacing: -0.04em;
    margin-bottom: 3.5rem; color: #ffffff;
    display: flex; flex-wrap: wrap;
}

/* Kinetic character logic */
.char {
    display: inline-block; opacity: 0; filter: blur(12px);
    transform: translateY(40px) rotateX(-50deg);
    will-change: transform, opacity, filter;
}

.hero-body {
    font-size: clamp(1.1rem, 1.4vw, 1.3rem); line-height: 1.6;
    color: #a1a1aa; max-width: 650px; margin-bottom: 4rem;
    opacity: 0; transform: translateY(20px);
}

.primary-cta {
    background: #fff; color: #000; padding: 1.25rem 2.75rem;
    border-radius: 99px; font-weight: 500; border: none;
    cursor: pointer; display: flex; align-items: center; gap: 1rem;
    transition: transform 0.1s linear, box-shadow 0.4s ease;
}

/* Flourishes */
.grain-overlay {
    position: absolute; inset: 0; pointer-events: none; z-index: 2;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.05;
}

.hero-glow {
    position: absolute; top: -10%; left: 50%; width: 100vw; height: 80vh;
    background: radial-gradient(circle at center, rgba(100, 100, 255, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
    transform: translateX(-50%); filter: blur(80px);
    z-index: 1; pointer-events: none;
}

.is-revealed { opacity: 1 !important; transform: translateY(0) !important; transition: all 1.2s var(--liquid-ease); }

/* MOBILE REFINEMENT */
@media (max-width: 768px) {
    #nerodyn-nav { top: 1rem; width: calc(100vw - 2rem); }
    #nerodyn-nav:not(.collapsed) { height: auto; padding-bottom: 3rem; align-items: flex-start; padding-top: 2rem; }
    .nav-content { flex-direction: column; gap: 2.5rem; }
    .nav-links { flex-direction: column; align-items: center; gap: 1.5rem; }
    .cta-button { width: 100%; }
}

/* * ==========================================
 * INTERACTIVE BACKGROUND & BUTTON GLINT
 * ========================================== */

#hero-interactive-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Sits behind content, above OLED black */
    pointer-events: none;
    opacity: 0.6;
}

/* Enhanced Magnetic Buttons with Internal Spotlight */
.magnetic-target {
    position: relative;
    overflow: hidden; /* Contains the internal glare */
    isolation: isolate;
}

.shimmer-layer {
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--liquid-ease);
    z-index: 0;
}

.magnetic-target:hover .shimmer-layer {
    opacity: 1;
}

/* Ensure text stays above the internal glare */
.magnetic-target span, 
.magnetic-target svg {
    position: relative;
    z-index: 2;
}

/* Kinetic Scale on Hover */
.primary-cta:active, .cta-button:active {
    transform: scale(0.96) !important;
    transition: transform 0.1s var(--liquid-ease);
}
