/* ===== CSS VARIABLES & ROOT STYLING ===== */

:root {
    /* Colors - Light Mode */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --accent: #f59e0b;
    --danger: #ef4444;

    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-hover: #e5e7eb;

    /* Text */
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;

    /* Borders */
    --border-color: #e5e7eb;
    --border-color-light: #f3f4f6;

    /* Other */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition: all 0.3s ease;
}

/* Dark Mode */
[data-theme="dark"] {
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --primary-light: #a5b4fc;
    --secondary: #34d399;
    --accent: #fbbf24;

    --bg-primary: #000;
    /* --bg-secondary: #1e293b; */
    --bg-secondary: #101010;
    --bg-tertiary: #334155;
    --bg-hover: #475569;

    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;

    --border-color: #334155;
    --border-color-light: #1e293b;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.3);
}

/* ===== GLOBAL STYLES ===== */

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

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

code {
    background-color: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== NAVIGATION ===== */

.navbar {
    position: sticky;
    top: 0;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.3em;
    color: var(--primary);
}

.logo {
    font-size: 1.5em;
}

.brand-name {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.3em;
    cursor: pointer;
    transition: var(--transition);
    padding: 5px;
    border-radius: 50%;
}

.theme-toggle:hover {
    background-color: var(--bg-tertiary);
}

.language-toggle {
    background: none;
    border: 1px solid var(--border-color);
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    padding: 6px 12px;
    border-radius: 50%;
    color: var(--text-primary);
    min-width: 36px;
}

.language-toggle:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== BUTTONS ===== */

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    text-align: center;
    font-size: 1em;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: white;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.1em;
}

/* ===== HERO SECTION ===== */

.hero {
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero h1 {
    font-size: 3.5em;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3em;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mockup {
    /* width: 280px; */
    width: auto;
    background-color: var(--bg-tertiary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: float 3s ease-in-out infinite;
}

.mockup-header {
    background-color: var(--primary);
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: white;
    font-weight: 600;
}

.mockup-body {
    padding: 20px;
}

.mockup-line {
    height: 12px;
    background-color: var(--border-color);
    border-radius: 4px;
    margin-bottom: 15px;
}

.mockup-line.short {
    width: 70%;
}

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

/* ===== FEATURES SECTION ===== */

.features,
.blog-section,
.tech-stack,
.cta-section {
    padding: 80px 20px;
    border-bottom: 1px solid var(--border-color);
}

.features h2,
.blog-section h2,
.tech-stack h2,
.cta-section h2 {
    font-size: 2.5em;
    margin-bottom: 60px;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--bg-secondary);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: var(--primary);
}

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

/* ===== BLOG SECTION ===== */

.blog-posts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.blog-post {
    background-color: var(--bg-secondary);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.blog-post:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.post-header h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: var(--primary);
}

.post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.9em;
    color: var(--text-tertiary);
}

.post-meta span {
    display: flex;
    align-items: center;
}

.category {
    background-color: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.post-content {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.post-content ul,
.post-content ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.post-content li {
    margin-bottom: 10px;
}

.read-more {
    color: var(--primary);
    font-weight: 600;
    display: inline-block;
    transition: var(--transition);
}

.read-more:hover {
    gap: 5px;
    margin-left: 5px;
}

/* ===== TECH STACK ===== */

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.tech-item {
    background-color: var(--bg-secondary);
    /* background: linear-gradient(135deg, #202020, #101010); */
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.tech-item h4 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.2em;
}

.tech-item ul {
    list-style: none;
}

.tech-item li {
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.tech-item li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* ===== CTA SECTION ===== */

.cta-section {
    /* background: linear-gradient(135deg, var(--primary), var(--secondary)); */
    background: linear-gradient(135deg, #202020, #101010);
    color: white;
    text-align: center;
}

.cta-section h2 {
    color: white;
    margin-bottom: 15px;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn-primary {
    background-color: white;
    color: var(--primary);
}

.cta-buttons .btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.cta-buttons .btn-secondary {
    background-color: transparent;
    border-color: white;
    color: white;
}

.cta-buttons .btn-secondary:hover {
    background-color: white;
    color: var(--primary);
}

/* ===== FOOTER ===== */

.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 20px 20px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: var(--primary);
}

.footer-column p {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 10px;
}

.footer-column a {
    color: var(--text-secondary);
    transition: var(--transition);
}

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

.social-links {
    display: flex;
    gap: 15px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-tertiary);
}

/* ===== DOCUMENTATION STYLES ===== */

.docs-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.docs-sidebar {
    background-color: var(--bg-secondary);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    height: fit-content;
    position: sticky;
    top: 90px;
}

.sidebar-header {
    margin-bottom: 20px;
}

.sidebar-header h3 {
    color: var(--primary);
    font-size: 1.2em;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 10px;
}

.sidebar-link {
    color: var(--text-secondary);
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: var(--transition);
}

.sidebar-link:hover {
    background-color: var(--bg-tertiary);
    color: var(--primary);
}

.sidebar-section {
    color: var(--text-tertiary);
    font-weight: 600;
    font-size: 0.9em;
    margin-top: 20px;
    margin-bottom: 10px;
}

.docs-content {
    background-color: var(--bg-secondary);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.doc-section {
    margin-bottom: 60px;
    scroll-margin-top: 90px;
}

.doc-section h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: var(--primary);
}

.doc-section h2 {
    font-size: 1.8em;
    margin-top: 50px;
    margin-bottom: 20px;
    color: var(--primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.doc-section h3 {
    font-size: 1.3em;
    margin-top: 30px;
    margin-bottom: 15px;
}

.doc-intro {
    font-size: 1.1em;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.doc-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.doc-section ul,
.doc-section ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.doc-section li {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.feature-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.feature-list li {
    padding: 12px;
    background-color: var(--bg-tertiary);
    border-radius: 6px;
    border-left: 4px solid var(--primary);
}

.code-block {
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.code-block code,
.code-block pre {
    color: var(--text-primary);
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9em;
    line-height: 1.6;
}

.architecture-diagram,
.flow-diagram {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.layer,
.flow-step {
    background-color: var(--bg-tertiary);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.layer h4,
.flow-step {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 8px;
}

.layer p {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.flow-arrow {
    text-align: center;
    font-size: 1.5em;
    color: var(--primary);
}

.features-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.feature-item {
    background-color: var(--bg-tertiary);
    padding: 20px;
    border-radius: 8px;
}

.feature-item h3 {
    margin-bottom: 10px;
}

.tech-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 20px;
}

.tech-category {
    background-color: var(--bg-tertiary);
    padding: 20px;
    border-radius: 8px;
}

.tech-category h3 {
    color: var(--primary);
    margin-bottom: 15px;
}

.security-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.security-list li {
    background-color: var(--bg-tertiary);
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid var(--secondary);
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.support-card {
    background-color: var(--bg-tertiary);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.support-card h4 {
    color: var(--primary);
    margin-bottom: 10px;
}

.support-card p {
    font-size: 0.9em;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    .navbar-container {
        flex-wrap: wrap;
    }

    .nav-menu {
        gap: 15px;
    }

    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.5em;
    }

    .docs-container {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        position: static;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .tech-details {
        grid-template-columns: 1fr;
    }

    .support-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .hero h1 {
        font-size: 2em;
    }

    .hero-subtitle {
        font-size: 1em;
    }

    .features h2,
    .blog-section h2,
    .tech-stack h2,
    .cta-section h2 {
        font-size: 1.8em;
    }

    .nav-link {
        font-size: 0.9em;
    }

    .post-meta {
        flex-direction: column;
        gap: 10px;
    }
}
