/* ===== VARIABLES & RESET ===== */
:root {
    --bg: #050505;
    --card: #111111;
    --border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-gray: #a1a1aa;
    --primary: #6366f1;
    --accent: #06b6d4;
    --gradient: linear-gradient(135deg, #6366f1, #06b6d4);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== PERFORMANCE BACKGROUND ===== */
.fixed-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    z-index: -1; overflow: hidden; pointer-events: none;
}
.orb {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4;
    will-change: transform; /* Hardware Acceleration */
}
.orb-1 { width: 400px; height: 400px; background: var(--primary); top: -100px; left: -100px; }
.orb-2 { width: 300px; height: 300px; background: var(--accent); bottom: -50px; right: -50px; }

/* ===== NAVBAR ===== */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: rgba(5, 5, 5, 0.85); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 15px 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.logo { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; color: var(--text); text-decoration: none; }
.logo span { color: var(--accent); }

.nav-links { display: flex; gap: 30px; list-style: none; }
.nav-links a { color: var(--text-gray); text-decoration: none; font-weight: 500; transition: 0.3s; }
.nav-links a:hover { color: var(--text); }
.menu-btn { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; }

/* ===== HERO ===== */
.hero-section {
    min-height: 90vh; display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 0 20px;
}
.badge {
    display: inline-block; padding: 6px 16px; border-radius: 50px;
    background: rgba(255,255,255,0.05); border: 1px solid var(--border);
    font-size: 0.9rem; color: var(--accent); margin-bottom: 20px;
}
h1 { font-family: var(--font-heading); font-size: clamp(3rem, 8vw, 6rem); line-height: 1.1; margin-bottom: 20px; }
.text-gradient { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-content p { max-width: 600px; margin: 0 auto 30px; color: var(--text-gray); font-size: 1.1rem; }

.btn { padding: 14px 32px; border-radius: 50px; text-decoration: none; font-weight: 600; transition: 0.3s; display: inline-block; }
.btn-primary { background: var(--gradient); color: #fff; border: none; cursor: pointer; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3); }
.btn-glass { background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: #fff; }
.btn-glass:hover { background: rgba(255,255,255,0.1); }
.btn-group { display: flex; gap: 15px; justify-content: center; }

/* ===== SECTIONS ===== */
.section { padding: 100px 20px; }
.container { max-width: 1100px; margin: 0 auto; }

/* About Grid */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.feature-list { list-style: none; margin-top: 20px; }
.feature-list li { display: flex; gap: 10px; margin-bottom: 10px; color: var(--text-gray); }
.feature-list i { color: var(--primary); }

.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.stat-box { background: var(--card); padding: 30px; border-radius: 20px; border: 1px solid var(--border); text-align: center; transition: 0.3s; }
.stat-box:hover { border-color: var(--primary); transform: translateY(-5px); }
.stat-box h3 { font-size: 2.5rem; color: var(--accent); font-family: var(--font-heading); }

/* Blog Grid */
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-family: var(--font-heading); font-size: 2.5rem; margin-bottom: 20px; }
.filter-tabs { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.tab { background: transparent; border: 1px solid var(--border); color: var(--text-gray); padding: 8px 24px; border-radius: 30px; cursor: pointer; transition: 0.3s; }
.tab:hover, .tab.active { background: var(--text); color: #000; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.post-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 20px;
    overflow: hidden; cursor: pointer; transition: 0.3s; display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-8px); border-color: var(--primary); }
.post-img { width: 100%; height: 220px; object-fit: cover; }
.post-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.tag { color: var(--primary); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; margin-bottom: 10px; display: block; }
.post-content h3 { font-size: 1.25rem; margin-bottom: 10px; font-family: var(--font-heading); }
.post-content p { font-size: 0.9rem; color: var(--text-gray); margin-bottom: 20px; flex-grow: 1; }
.read-link { color: var(--accent); font-size: 0.9rem; font-weight: 600; }

/* Contact */
.contact-wrapper {
    display: grid; grid-template-columns: 1fr 1.5fr; gap: 50px;
    background: var(--card); border: 1px solid var(--border);
    padding: 50px; border-radius: 24px;
}
.contact-item { display: flex; gap: 15px; margin: 30px 0; align-items: center; }
.icon-box { width: 50px; height: 50px; background: rgba(255,255,255,0.05); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.2rem; }
.contact-item a { color: var(--text); text-decoration: none; }
.social-row { display: flex; gap: 15px; font-size: 1.5rem; }
.social-row a { color: var(--text-gray); transition: 0.3s; }
.social-row a:hover { color: var(--accent); }

.contact-form .input-group { margin-bottom: 20px; }
.contact-form input, .contact-form textarea {
    width: 100%; padding: 15px; background: rgba(0,0,0,0.3); border: 1px solid var(--border);
    border-radius: 10px; color: #fff; font-family: inherit; outline: none; transition: 0.3s;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--primary); background: rgba(0,0,0,0.5); }
.full-width { width: 100%; }

/* Footer */
footer { text-align: center; padding: 40px; border-top: 1px solid var(--border); color: var(--text-gray); font-size: 0.9rem; }
.brand { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.brand span { color: var(--accent); }

/* ===== MODAL (POPUP) ===== */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); z-index: 2000; display: none;
    align-items: center; justify-content: center; backdrop-filter: blur(5px);
}
.modal-card {
    background: #111; width: 90%; max-width: 800px; max-height: 90vh;
    border-radius: 20px; border: 1px solid var(--border); overflow-y: auto;
    position: relative; animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.close-btn {
    position: absolute; top: 15px; right: 15px; background: rgba(0,0,0,0.6);
    color: #fff; border: none; width: 40px; height: 40px; border-radius: 50%;
    cursor: pointer; font-size: 1.2rem; z-index: 10;
}
.modal-img-container img { width: 100%; height: 300px; object-fit: cover; }
.modal-body { padding: 30px; }
.modal-body h2 { font-size: 2rem; margin: 10px 0 20px; line-height: 1.2; font-family: var(--font-heading); }
.rich-text { color: #d4d4d8; font-size: 1.05rem; white-space: pre-line; }

/* Animations */
.fade-in { opacity: 0; transform: translateY(20px); transition: 0.8s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .menu-btn { display: block; }
    .about-grid, .contact-wrapper { grid-template-columns: 1fr; }
    .hero-section h1 { font-size: 3rem; }
    .contact-wrapper { padding: 25px; }
}