:root {
    --bg-main: #0b0f19;
    --bg-card: rgba(17, 24, 39, 0.65);
    --bg-card-hover: rgba(30, 41, 59, 0.75);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(99, 102, 241, 0.3);
    
    --primary: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --primary-glow: rgba(99, 102, 241, 0.35);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(168, 85, 247, 0.15) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(15, 23, 42, 0.8) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Ambient Glows */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}
.glow-1 {
    top: -10%;
    left: 20%;
    width: 500px;
    height: 500px;
    background: rgba(99, 102, 241, 0.2);
}
.glow-2 {
    bottom: 10%;
    right: 10%;
    width: 600px;
    height: 600px;
    background: rgba(168, 85, 247, 0.15);
}

/* Header & Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.9rem 1.5rem;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: #fff;
}

.nav-btn {
    padding: 0.6rem 1.25rem;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: #fff;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.nav-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--border-highlight);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

/* Mobile Toggle Hamburger */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
}

/* Layout Wrapper */
.layout-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 2rem 0.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 30px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #c084fc;
    font-size: 0.85rem;
    font-weight: 600;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.5px;
    max-width: 900px;
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
    color: var(--text-muted);
    max-width: 720px;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Metric Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    width: 100%;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.3s ease;
}

.metric-card:hover {
    border-color: var(--border-highlight);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #818cf8;
    flex-shrink: 0;
}

.metric-info h4 {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
}

.metric-info p {
    font-size: 0.825rem;
    color: var(--text-muted);
}

/* Section Header */
.section-header {
    margin-bottom: 1.25rem;
}

.section-header h2 {
    font-size: clamp(1.2rem, 3.5vw, 1.5rem);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.section-header p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Glass Card Component */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.grid-2col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Feature Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.feature-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
}

.feature-box:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-highlight);
}

.feature-box .icon {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
    display: inline-block;
}

.feature-box h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-box p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Buttons & Touch Optimization */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 44px; /* Mobile touch target */
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Forms & Inputs Touch Optimized */
input[type="text"], input[type="email"], input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 0.95rem; /* Prevent iOS zoom on focus */
    outline: none;
    transition: all 0.2s ease;
    min-height: 44px;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

.code-block {
    background: #070a12;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    font-family: 'Fira Code', monospace, sans-serif;
    font-size: 0.825rem;
    color: #a5b4fc;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
}

/* Footer Section */
.footer {
    border-top: 1px solid var(--border-color);
    background: rgba(7, 10, 18, 0.9);
    padding: 3rem 1.5rem 2rem;
    margin-top: 3rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-brand h3 {
    font-size: 1.15rem;
    color: #fff;
    margin-bottom: 0.75rem;
}

.footer-brand p {
    font-size: 0.85rem;
    color: var(--text-dim);
    max-width: 320px;
}

.footer-col h4 {
    color: #fff;
    font-size: 0.925rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-col a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.875rem;
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.825rem;
    color: var(--text-dim);
}

.icp-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.icp-info a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s ease;
}

.icp-info a:hover {
    color: var(--text-muted);
}

/* ----------------------------------------------------
   RESPONSIVE MEDIA QUERIES (FULL MOBILE ADAPTATION)
   ---------------------------------------------------- */
@media (max-width: 992px) {
    .grid-2col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .nav-links {
        display: none; /* Collapsed by default on mobile */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(11, 15, 25, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-color);
        padding: 1.25rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-actions {
        display: none;
    }

    .layout-wrapper {
        padding: 1.5rem 1rem;
        gap: 2rem;
    }

    .glass-card {
        padding: 1.25rem;
        border-radius: var(--radius-md);
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .metric-card {
        padding: 1rem;
        gap: 0.75rem;
    }

    .metric-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .metric-info h4 {
        font-size: 1.2rem;
    }

    .metric-info p {
        font-size: 0.75rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
    }

    .hero-actions .btn {
        width: 100%;
    }

    /* Grid Adjustments */
    .grid-2col, .features-grid {
        grid-template-columns: 1fr;
    }

    /* Batch & Form Row Adjustments for Mobile */
    .batch-row-item {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        background: rgba(255, 255, 255, 0.03);
        padding: 10px;
        border-radius: 8px;
        position: relative;
    }

    .btn-remove-batch-row {
        justify-self: flex-end;
        width: auto !important;
        padding: 4px 12px !important;
    }

    /* Footer Mobile Stack */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr; /* Single column on small screens */
    }
}

/* ====================================================
   BLOG STYLES & LAYOUT COMPONENTS
   ==================================================== */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }
}

/* Posts Grid & Card */
.posts-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-card {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 1.25rem;
    align-items: flex-start;
}

@media (max-width: 600px) {
    .post-card {
        grid-template-columns: 1fr;
    }
}

.post-cover-emoji {
    font-size: 2.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
}

.post-category {
    background: rgba(99, 102, 241, 0.15);
    color: #c084fc;
    border: 1px solid rgba(192, 132, 252, 0.3);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.post-date {
    color: var(--text-dim);
}

.post-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.35;
}

.post-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-title a:hover {
    color: #818cf8;
}

.post-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.tag-pill {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
}

.post-author {
    color: var(--text-dim);
}

.read-more-link {
    color: #818cf8;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.read-more-link:hover {
    transform: translateX(4px);
    color: #c084fc;
}

/* Sidebar Widgets */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.widget-card {
    padding: 1.25rem;
}

.widget-header h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.author-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-gradient);
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.author-widget h4 {
    font-size: 1.05rem;
    font-weight: 700;
}

.author-widget p {
    font-size: 0.825rem;
    color: var(--text-muted);
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-item:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--border-highlight);
    color: #fff;
}

.highlight-widget {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
    border-color: var(--border-highlight);
}

.highlight-widget p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    min-height: auto;
}

/* Article Detail View */
.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #fff;
}

.post-detail-card {
    padding: 2.5rem;
}

@media (max-width: 768px) {
    .post-detail-card {
        padding: 1.5rem;
    }
}

.article-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.25rem;
}

.post-category-pill {
    display: inline-block;
    background: var(--primary-gradient);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.article-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 1rem;
}

.article-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.article-excerpt-box {
    background: rgba(99, 102, 241, 0.1);
    border-left: 4px solid var(--primary);
    padding: 1rem 1.25rem;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    color: #e2e8f0;
    margin-bottom: 2rem;
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #cbd5e1;
}

.article-body h3 {
    font-size: 1.35rem;
    color: #fff;
    margin: 1.75rem 0 0.75rem;
}

.article-body p {
    margin-bottom: 1.25rem;
}

.article-body blockquote {
    border-left: 3px solid #a855f7;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #94a3b8;
}

.article-body ol, .article-body ul {
    margin: 1rem 0 1.5rem 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.article-actions {
    display: flex;
    gap: 0.75rem;
}

.badge-lg {
    width: 56px;
    height: 56px;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.about-hero-card {
    padding: 3rem 2rem;
}

.about-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2.5rem;
}

.about-sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.about-body {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.about-body h2 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.about-action-row {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

