/* ═══════════════════════════════════════════════════════════════════════════
   CyberHub — Hub Index Page Stylesheet
   Loaded by: index.html, security.html, ai.html + 84 content pages
   Consolidated from original inline styles (~1,450 lines → ~650 lines)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── BASE RESET & DESIGN TOKENS ───────────────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0a0e27;
    --bg-darker: #050711;
    --bg-card: #1a1f3a;
    --accent-cyan: #00d9ff;
    --accent-blue: #0066ff;
    --accent-purple: #8b5cf6;
    --text-primary: #e0e8ff;
    --text-secondary: #a0aec0;
    --border-color: #2d3748;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-attachment: fixed;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 217, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── NAVIGATION ───────────────────────────────────────────────────────────── */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
    padding: 1rem 0;
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover { transform: scale(1.05); }

nav ul {
    display: flex;
    gap: 3rem;
    list-style: none;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
    transition: width 0.3s ease;
}

nav a:hover { color: var(--accent-cyan); }
nav a:hover::after { width: 100%; }
nav a.nav-link { cursor: pointer; }

/* ── HERO SECTION ─────────────────────────────────────────────────────────── */
.hero {
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.1) 0%, transparent 70%);
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0px); }
    50% { transform: translateX(-50%) translateY(20px); }
}

.hero-content { position: relative; z-index: 2; }

h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -2px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 50%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ── CTA BUTTONS ──────────────────────────────────────────────────────────── */
.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
    color: var(--bg-darker);
    border: 2px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 217, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-cyan);
    border: 2px solid var(--accent-cyan);
}

.btn-secondary:hover {
    background: rgba(0, 217, 255, 0.1);
    transform: translateY(-2px);
}

/* ── FEATURE CARDS ────────────────────────────────────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 5rem 0;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.feature-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(26, 31, 58, 0.6) 100%);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 217, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.feature-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 217, 255, 0.15);
}

.feature-card:hover::before { left: 100%; }

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-cyan);
}

.feature-card p { color: var(--text-secondary); line-height: 1.6; }

/* ── SECTIONS ─────────────────────────────────────────────────────────────── */
.section {
    padding: 5rem 0;
    border-top: 1px solid rgba(0, 217, 255, 0.1);
    animation: fadeInUp 1s ease-out both;
}

.section:nth-child(odd) { animation-delay: 0.2s; }

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
}

/* ── CONTENT GRID ─────────────────────────────────────────────────────────── */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.content-item {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(0, 217, 255, 0.15);
    border-radius: 10px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.content-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue), var(--accent-purple));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.content-item:hover {
    transform: translateX(5px);
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.1);
}

.content-item:hover::before { transform: scaleX(1); }

.content-item h4 {
    font-size: 1.3rem;
    color: var(--accent-cyan);
    margin-bottom: 0.75rem;
}

.content-item p { color: var(--text-secondary); line-height: 1.6; }

/* Anchor card overrides */
a.feature-card, a.content-item {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* ── TAGS ─────────────────────────────────────────────────────────────────── */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    display: inline-block;
    background: rgba(0, 217, 255, 0.1);
    color: var(--accent-cyan);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(0, 217, 255, 0.3);
}

/* ── TECH STACK ───────────────────────────────────────────────────────────── */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 3rem 0;
    justify-content: center;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.tech-icon {
    font-size: 2.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 10px;
    border: 1px solid rgba(0, 217, 255, 0.2);
    transition: all 0.3s ease;
}

.tech-item:hover .tech-icon {
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 25px rgba(0, 217, 255, 0.2);
    transform: translateY(-5px);
}

.tech-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ── DIVIDER ──────────────────────────────────────────────────────────────── */
.divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    margin: 3rem 0;
}

/* ── SEARCH ───────────────────────────────────────────────────────────────── */
.search-btn {
    background: none;
    border: 1px solid rgba(0, 217, 255, 0.3);
    color: var(--text-secondary);
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.search-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 7, 17, 0.97);
    z-index: 1000;
    padding: 5rem 1rem 2rem;
    flex-direction: column;
    align-items: center;
}

.search-overlay.open { display: flex; }

.search-close {
    position: fixed;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.search-close:hover { color: var(--text-primary); }

.search-overlay input {
    width: 100%;
    max-width: 680px;
    padding: 1rem 1.5rem;
    font-size: 1.15rem;
    background: var(--bg-card);
    border: 2px solid var(--accent-cyan);
    border-radius: 8px;
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
}

.search-hint {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    align-self: flex-start;
    max-width: 680px;
    width: 100%;
}

.search-results {
    width: 100%;
    max-width: 680px;
    margin-top: 1rem;
    max-height: 60vh;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid rgba(0, 217, 255, 0.15);
}

.search-result-item {
    display: block;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 217, 255, 0.08);
    text-decoration: none;
    transition: background 0.2s ease;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-card); }

.result-title {
    color: var(--accent-cyan);
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.result-category { color: var(--text-secondary); font-size: 0.82rem; }
.no-results { color: var(--text-secondary); text-align: center; padding: 2rem; }

/* ── FOOTER ───────────────────────────────────────────────────────────────── */
footer {
    padding: 3rem 0;
    border-top: 1px solid rgba(0, 217, 255, 0.1);
    color: var(--text-secondary);
    text-align: center;
    margin-top: 5rem;
    animation: fadeInUp 1s ease-out 0.6s both;
}

footer p { margin-bottom: 0.5rem; }

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover { color: var(--accent-cyan); }

/* ── FADE-IN SECTIONS ─────────────────────────────────────────────────────── */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    nav ul { gap: 1.5rem; font-size: 0.9rem; }
    h1 { font-size: 2rem; }
    .hero { padding: 3rem 0; }
    .hero-subtitle { font-size: 1rem; }
    .cta-buttons { flex-direction: column; align-items: center; }
    .btn { width: 100%; max-width: 300px; }
    .tech-stack { gap: 1rem; }
    .tech-icon { padding: 0.75rem; font-size: 2rem; }
    .section { padding: 3rem 0; }
    .feature-card { padding: 1.5rem; }
    .nav-content { gap: 1rem; }
    .content-item { transform: none; }
    .content-item:hover { transform: translateX(3px); }
}