/* ========================================
CVE IN SPACE — Stylesheet
Theme: Space / Cosmic
======================================== */

/* --- RESET & BASE --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #0d111d;
    --bg-card: #111827;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.4);
    --cyan: #22d3ee;
    --cyan-glow: rgba(34, 211, 238, 0.3);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: rgba(99, 102, 241, 0.2);
    --critical: #ef4444;
    --high: #f97316;
    --medium: #eab308;
    --low: #22c55e;
    --gradient-hero: linear-gradient(135deg, #6366f1 0%, #22d3ee 50%, #a855f7 100%);
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-primary);
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Cosmic Background */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08), transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(34, 211, 238, 0.08), transparent 40%);
    z-index: -1;
}

/* Stars */
.stars, .stars2, .stars3 {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: -1;
}
.stars { background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48Y2lyY2xlIGN4PSIxMCIgY3k9IjEwIiByPSIwLjgiIGZpbGw9IiNmZmYiIG9wYWNpdHk9IjAuNiIvPjxjaXJjbGUgY3g9IjE1MCIgY3k9IjQwIiByPSIwLjUiIGZpbGw9IiNmZmYiIG9wYWNpdHk9IjAuNCIvPjxjaXJjbGUgY3g9IjgwIiBjeT0iMTIwIiByPSIwLjciIGZpbGw9IiNmZmYiIG9wYWNpdHk9IjAuNSIvPjxjaXJjbGUgY3g9IjE5MCIgY3k9IjE3MCI rPSIwLjYiIGZpbGw9IiNmZmYiIG9wYWNpdHk9IjAuMyIvPjwvc3ZnPg=='); }

/* Global Typography */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 800; letter-spacing: 1px; }

/* NAVBAR */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    padding: 1.2rem 0;
    background: #0a0e1a;
}
.navbar.scrolled {
    background: #0a0e1a;
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 0;
}

.nav-container {
    max-width: 1240px; 
    margin: 0 auto; 
    padding: 0 1.5rem;
    display: flex; 
    align-items: center; 
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    z-index: 10002;
}
.logo-icon img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: 0.3s;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    object-fit: cover;
    display: block;
}
.nav-logo:hover .logo-icon img {
    border-color: var(--cyan);
    box-shadow: 0 0 15px var(--cyan-glow);
    transform: rotate(5deg) scale(1.05);
}
.logo-text {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 1px;
}
.accent { color: var(--cyan); text-shadow: 0 0 10px var(--cyan-glow); }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
}
.nav-link {
    text-decoration: none;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    padding: 0.5rem 0;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-hero);
    transition: 0.3s ease;
}
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* HAMBURGER */
.hamburger {
    display: none; width: 32px; height: 24px; cursor: pointer;
    flex-direction: column; justify-content: space-between;
    z-index: 10001 !important; background: transparent; border: none;
    padding: 0; position: relative;
    -webkit-tap-highlight-color: transparent;
}
.hamburger .bar {
    width: 100%; height: 4px;
    background: #fff; border-radius: 0;
}

/* HERO */
.hero { 
    min-height: 100vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 100px 1.5rem 60px; 
    position: relative; 
    gap: 4rem; 
    overflow: hidden; 
}
.hero-content { flex: 1; max-width: 700px; text-align: left; z-index: 10; }

@media (max-width: 1024px) {
    .hero { flex-direction: column; text-align: center; padding-top: 120px; }
    .hero-content { text-align: center; }
    .hero-buttons { justify-content: center; }
    .hero-stats { justify-content: center; }
}

.hero-badge {
    display: inline-flex; align-items: center; gap: 10px; padding: 0.6rem 1.2rem;
    background: rgba(99, 102, 241, 0.1); border: 1px solid var(--border);
    border-radius: 100px; color: var(--cyan); font-size: 0.8rem; font-weight: 800;
    letter-spacing: 1px; margin-bottom: 2rem; text-transform: uppercase;
}
.badge-dot { width: 8px; height: 8px; background: var(--cyan); border-radius: 50%; box-shadow: 0 0 10px var(--cyan); animation: pulse 2s infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: 0.5; } 100% { transform: scale(1); opacity: 1; } }

.hero-title { font-size: clamp(2.5rem, 8vw, 5rem); margin-bottom: 2rem; line-height: 1; color: #fff; text-shadow: 0 0 30px rgba(99, 102, 241, 0.3); }
.hero-subtitle { 
    font-size: 1.25rem; 
    color: var(--text-secondary); 
    max-width: 600px; 
    margin: 0 auto 3rem auto; 
    line-height: 1.6; 
}

.hero-buttons { 
    display: flex; 
    gap: 1.25rem; 
    margin: 0 auto 4rem auto; 
    flex-wrap: wrap;
    justify-content: center;
}

.hero-stats { 
    display: flex; 
    align-items: center; 
    gap: clamp(1.5rem, 4vw, 3rem); 
    margin: 0 auto;
    justify-content: center;
}
.stat-item { display: flex; flex-direction: column; gap: 8px; }
.stat-number { 
    font-family: var(--font-heading); font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 900; 
    background: var(--gradient-hero); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 2px; font-weight: 700; }
.stat-divider { width: 1px; height: 50px; background: linear-gradient(to bottom, transparent, var(--border), transparent); }

/* HERO VISUAL */
.hero-visual { flex: 1; display: flex; justify-content: center; align-items: center; position: relative; min-height: 400px; }
.planet { width: 300px; height: 300px; border-radius: 50%; position: relative; background: radial-gradient(circle at 30% 30%, #6366f1, #1e1b4b 70%, #0a0e1a 100%); box-shadow: inset -20px -20px 50px rgba(0,0,0,0.5), 0 0 60px rgba(99, 102, 241, 0.3); animation: float 6s ease-in-out infinite; }
.planet-surface { position: absolute; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1), transparent 50%); }
.planet-ring { position: absolute; top: 50%; left: 50%; width: 450px; height: 150px; border: 2px solid rgba(34, 211, 238, 0.2); border-radius: 50%; transform: translate(-50%, -50%) rotateX(75deg); animation: spin 20s linear infinite; }
.orbit-line { position: absolute; top: 50%; left: 50%; width: 500px; height: 500px; border: 1px dashed rgba(255,255,255,0.05); border-radius: 50%; transform: translate(-50%, -50%); animation: spin 30s linear infinite reverse; }
.satellite { position: absolute; top: -10px; left: 50%; font-size: 1.5rem; transform: translateX(-50%); }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
@keyframes spin { from { transform: translate(-50%, -50%) rotateX(75deg) rotateZ(0deg); } to { transform: translate(-50%, -50%) rotateX(75deg) rotateZ(360deg); } }

/* SEARCH & FILTERS */
.search-container { margin-bottom: 4rem; max-width: 700px; margin-left: auto; margin-right: auto; }
.search-box { position: relative; margin-bottom: 2rem; }
.search-input {
    width: 100%; padding: 1.2rem 1.5rem 1.2rem 3.5rem; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 20px; color: #fff; font-size: 1.1rem;
}
.search-input:focus { border-color: var(--cyan); outline: none; box-shadow: 0 0 20px rgba(34, 211, 238, 0.2); }
.search-icon { position: absolute; left: 1.2rem; top: 50%; transform: translateY(-50%); width: 22px; color: var(--text-muted); }

.filter-tags { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.filter-tag {
    padding: 0.6rem 1.5rem; border-radius: 100px; background: rgba(255,255,255,0.03);
    border: 1px solid var(--border); color: var(--text-dim); cursor: pointer; transition: 0.3s;
    font-weight: 700; font-size: 0.9rem;
}
.filter-tag:hover, .filter-tag.active { border-color: var(--cyan); color: #fff; background: rgba(34, 211, 238, 0.1); }

/* GRIDS & CARDS */
.container { max-width: 1240px; margin: 0 auto; padding: 0 1.5rem; width: 100%; }
.section { padding: 100px 0; position: relative; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-title { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1rem; color: #fff; }
.section-subtitle { color: var(--text-secondary); max-width: 600px; margin: 0 auto; font-size: 1.1rem; }

.cve-grid, .tools-grid, .projects-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; margin-top: 4rem;
}

.cve-card, .tool-card, .project-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 24px; padding: 2rem;
    text-decoration: none; color: inherit; display: block;
}
.cve-card:hover, .tool-card:hover {
    border-color: var(--cyan);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.section-tag {
    display: inline-block; padding: 0.5rem 1.2rem;
    background: rgba(99, 102, 241, 0.1); border: 1px solid var(--accent);
    border-radius: 50px; color: var(--cyan); font-weight: 800; font-size: 0.8rem;
    letter-spacing: 2px; margin-bottom: 1.5rem;
}

/* BUTTONS */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 1rem 2.5rem; border-radius: 16px; font-weight: 700;
    transition: 0.3s; text-decoration: none; cursor: pointer; border: none;
}
.btn-primary { background: var(--gradient-hero); color: #fff; box-shadow: 0 10px 30px var(--accent-glow); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 40px var(--accent-glow); }

.footer { 
    border-top: 1px solid var(--border); 
    padding: 6rem 0 3rem; 
    background: rgba(10, 14, 26, 0.9); 
    position: relative;
    z-index: 10;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand {
    max-width: 400px;
}

.footer-logo {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-links h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-secondary);
    transition: 0.3s;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--cyan);
    padding-left: 5px;
}

.footer-bottom { 
    text-align: center; 
    border-top: 1px solid rgba(255, 255, 255, 0.05); 
    padding-top: 2rem; 
    opacity: 0.6; 
    font-size: 0.9rem; 
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    .footer-brand {
        margin: 0 auto;
    }
}

/* ============================================
   MOBILE MENU — centered, glowing, blur-fade animation
   No darkening overlay, no backdrop-filter
   ============================================ */
.menu-overlay { display: none !important; }

@media (max-width: 900px) {
    .navbar { padding: 1rem 0; }
    .hamburger { display: flex; }

    /* Full-screen solid panel; centered links */
    .nav-menu {
        position: fixed !important;
        top: 0; left: 0;
        width: 100vw; height: 100vh;
        background: #0a0e1a !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        margin: 0;
        padding: 0;
        z-index: 10000 !important;
        list-style: none;

        /* Closed state — invisible + blurred, NOT interactive */
        opacity: 0;
        visibility: hidden;
        filter: blur(12px);
        -webkit-filter: blur(12px);
        pointer-events: none;
        transition:
            opacity 0.35s ease,
            filter 0.35s ease,
            -webkit-filter 0.35s ease,
            visibility 0s linear 0.35s !important;
    }
    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        filter: blur(0);
        -webkit-filter: blur(0);
        pointer-events: auto;
        transition:
            opacity 0.35s ease,
            filter 0.35s ease,
            -webkit-filter 0.35s ease,
            visibility 0s linear 0s !important;
    }

    .nav-item { list-style: none; }

    .nav-link {
        display: inline-block;
        padding: 0.5rem 1rem;
        font-family: var(--font-heading);
        font-size: 1.6rem;
        font-weight: 900;
        letter-spacing: 2px;
        text-transform: uppercase;
        color: #ffffff !important;
        text-shadow:
            0 0 6px rgba(34, 211, 238, 0.85),
            0 0 14px rgba(34, 211, 238, 0.5),
            0 0 24px rgba(34, 211, 238, 0.3);
        opacity: 1 !important;
        transform: none !important;
        background: transparent;
    }
    .nav-link::after { display: none !important; }
    .nav-link.active {
        color: #22d3ee !important;
        text-shadow:
            0 0 8px #22d3ee,
            0 0 18px rgba(34, 211, 238, 0.7),
            0 0 30px rgba(34, 211, 238, 0.4);
    }

    /* Hamburger / X */
    .hamburger { z-index: 10002 !important; }
    .hamburger.active .bar { background: #22d3ee !important; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(10px) rotate(45deg); }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

    .hero-title { font-size: 2.5rem; }
    .section-title { font-size: 2rem; }
    .cve-grid { grid-template-columns: 1fr; }
    .hero-stats { flex-wrap: wrap; gap: 1.5rem; }
    .stat-divider { display: none; }
}

@media (max-width: 480px) {
    .hero-title { font-size: clamp(2rem, 7vw, 2.8rem); }
    .hero-buttons { flex-direction: column; align-items: center; }
    .btn { width: 100%; max-width: 280px; }
    .planet { width: 150px; height: 150px; }
    .planet-ring { width: 230px; height: 230px; }
    .orbit-line { width: 210px; height: 210px; }
}

/* Utility */
.hamburger { z-index: 9999 !important; pointer-events: auto !important; position: relative; }
.nav-menu { z-index: 9998 !important; }
.stars, .stars2, .stars3 { pointer-events: none !important; }

/* TOOLS SECTION */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.tool-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
    padding: 1.8rem;
    text-decoration: none; color: inherit; display: block; position: relative; overflow: hidden;
}
.tool-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--cyan)); opacity: 0;
}
.tool-card:hover { border-color: var(--accent); box-shadow: 0 10px 40px rgba(99, 102, 241, 0.15); }
.tool-card:hover::before { opacity: 1; }
.tool-icon { font-size: 2.5rem; margin-bottom: 1rem; display: block; }
.tool-title { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text-primary); }
.tool-desc { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; }
.tool-badge {
    display: inline-block; margin-top: 0.8rem; padding: 0.3rem 0.8rem;
    background: rgba(34, 211, 238, 0.1); border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 50px; font-size: 0.75rem; color: var(--cyan); font-weight: 600;
}

/* ===== CRISP OVERRIDE — disable all blur/transition/hover-transform ===== */
*, *::before, *::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: none !important;
}
.cve-card:hover, .tool-card:hover, .project-card:hover,
.btn:hover, .nav-link:hover, .filter-tag:hover,
.logo-icon img, .nav-logo:hover .logo-icon img {
    transform: none !important;
}
