/* General Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #5C6BC0; /* Indigo */
    --secondary-color: #ECEFF1; /* Blue Grey 50 */
    --accent-color: #8C9EFF; /* Indigo 200 */
    --text-color: #37474F; /* Blue Grey 800 */
    --light-text-color: #607D8B; /* Blue Grey 500 */
    --background-color: #FFFFFF;
    --light-background-color: #F8F8F8;
    --border-color: #CFD8DC; /* Blue Grey 100 */
    --code-bg: #263238; /* Dark Blue Grey */
    --code-text: #EEFF41; /* Lime A200 */
    --font-inter: 'Inter', sans-serif;
    --font-fira-code: 'Fira Code', monospace;
}

body {
    font-family: var(--font-inter);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

/* Header */
.main-header {
    background-color: var(--background-color);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-fira-code);
    font-size: 1.8em;
    color: var(--primary-color);
    font-weight: 700;
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li {
    margin-left: 30px;
}

.main-nav ul li a {
    text-decoration: none;
    color: var(--light-text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav ul li a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background-color: var(--light-background-color);
    text-align: center;
    padding: 80px 0;
    margin-bottom: 40px;
}

.hero h2 {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.hero .tagline {
    font-size: 1.2em;
    color: var(--light-text-color);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons .btn {
    display: inline-block;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    margin: 0 10px;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.cta-buttons .btn.primary {
    background-color: var(--primary-color);
    color: var(--background-color);
    border: 2px solid var(--primary-color);
}

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

.cta-buttons .btn.secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

/* Syntax Showcase */
.syntax-showcase {
    padding: 60px 0;
    background-color: var(--background-color);
}

.syntax-showcase h3 {
    text-align: center;
    font-size: 2.2em;
    margin-bottom: 40px;
    color: var(--text-color);
}

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

.code-block {
    background-color: var(--light-background-color);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.code-block h4 {
    font-size: 1.2em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.code-block pre {
    background-color: var(--code-bg);
    color: var(--code-text);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: var(--font-fira-code);
    font-size: 0.9em;
    line-height: 1.5;
}

.code-block code {
    display: block; /* Ensure newlines are respected */
    white-space: pre-wrap; /* For better word wrapping */
}

/* About Section */
.about-section {
    background-color: var(--secondary-color);
    padding: 60px 0;
    text-align: center;
    margin-top: 40px;
}

.about-section h3 {
    font-size: 2.2em;
    margin-bottom: 30px;
    color: var(--text-color);
}

.about-section p {
    max-width: 800px;
    margin: 0 auto 20px auto;
    font-size: 1.1em;
    color: var(--light-text-color);
}


/* Footer */
.main-footer {
    background-color: var(--code-bg);
    color: var(--secondary-color);
    padding: 30px 0;
    text-align: center;
    margin-top: auto; /* Push footer to the bottom */
}

.main-footer p {
    font-size: 0.9em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
    }

    .main-nav ul {
        margin-top: 15px;
    }

    .main-nav ul li {
        margin: 0 10px;
    }

    .hero h2 {
        font-size: 2.2em;
    }

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

    .cta-buttons .btn {
        display: block;
        margin: 15px auto;
        width: 80%;
    }

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

.pixel-grid {
        background-image: radial-gradient(circle, #000 0.8px, transparent 0.8px);
        background-size: 35px 35px;
        animation: grid-drift 40s linear infinite;
    }

    .noise-overlay {
        background-image: url("https://grainy-gradients.vercel.app/noise.svg");
    }

    @keyframes grid-drift {
        from { background-position: 0 0; }
        to { background-position: 35px 35px; }
    }

    @keyframes float {
        0%, 100% { transform: translateY(0) rotate(-1deg); }
        50% { transform: translateY(-15px) rotate(1deg); }
    }
    .animate-float {
        animation: float 10s ease-in-out infinite;
    }

    @keyframes reveal-up {
        from { transform: translateY(30px); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }
    .animate-reveal {
        animation: reveal-up 1s cubic-bezier(0.77, 0, 0.175, 1) forwards;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    .animate-fade-in {
        animation: fadeIn 1.5s ease-out forwards;
    }

    ::selection {
        background: black;
        color: white;
    }