body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #121212;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 50px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 100px;
}

.header .name a {
    font-size: 28px;
    font-weight: bold;
    color: #cccccc; 
    text-decoration: none; 
}

.header .name a:hover {
    color: #ffffff; 
    border-bottom: 2px solid #ffffff;
    transition: border-bottom-color 0.3s;
}
.navbar a {
    color: #cccccc;
    text-decoration: none;
    margin-left: 20px;
    font-size: 18px;
    font-weight: bold;
}

.navbar a:hover {
    color: #ffffff;
    border-bottom: 2px solid #ffffff;
    transition: border-bottom-color 0.3s;
}
/* Main Content */
.page-title {
    font-size: 28px;
    margin-bottom: 30px;
    font-weight: bold;
    color: #ffffff;
}

/* Blogs Section */
.blogs-list {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Reduced spacing between cards */
}

.blog-card {
    display: flex;
    align-items: flex-start;
    gap: 15px; /* Reduced gap between image and content */
    background-color: #1f1f1f;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-card:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

.blog-image img {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #ffffff;
}

.blog-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px; /* Reduced gap between title, description, and tags */
}

.blog-title {
    font-size: 20px;
    font-weight: bold;
    color: #cccccc;
    margin: 0; /* Removed extra margin */
}

.blog-description {
    font-size: 16px;
    line-height: 1.4;
    color: #cccccc;
    margin: 0; /* Removed extra margin */
    text-align: justify;
}

.blog-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 5px; /* Reduced margin above tags */
}

.blog-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.tag {
    background-color: #333333;
    color: #ffffff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.tag:hover {
    background-color: #555555;
}


.footer {
    margin-top: 50px;
    text-align: center;
    color: #bbbbbb;
}

.footer p {
    font-size: 14px;
}

.footer .links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.footer .links img {
    width: 24px; 
    height: 24px; 
}

.date {
    font-size: 14px;
    color: #aaaaaa;
    margin: 0;
    /* text-align: right; */
}


/* ============================= */
/* Blog Post Page Styles         */
/* ============================= */

/* Wrapper for blog post */
.post {
    color: #e6e6e6;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.7;
}

/* Post meta (date + tags) */
/* Post meta (subtitle + date) */
.post-meta {
    font-size: 18px;
    color: #9b9b9b;
    margin-top: 8px;
    line-height: 1.6;
}

/* Separator between subtitle/date */
.meta-sep {
    margin: 0 8px;
    color: #666;
}

/* Tags block (now on its own line) */
.post-tags {
    margin-top: 6px; /* Space below the meta line */
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* Individual tags */
.post-tags .tag {
    background-color: #333;
    color: #fff;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: bold;
}

/* Section headings inside blog post */
.post-section h2 {
    color: #ffffff;
    font-size: 20px;
    margin-top: 24px;
    margin-bottom: 8px;
}

/* Paragraphs inside blog post */
.post-section p {
    color: #cccccc;
    line-height: 1.75;
    font-size: 16px;
    margin: 10px 0 16px;
    text-align: justify;
}

/* Links inside post */
.post-section a {
    color: #d7d7ff;
    text-decoration: none;
}
.post-section a:hover {
    text-decoration: underline;
}

/* Optional: style code blocks if you add them later */
pre, code {
    background: #0e0e0e;
    border: 1px solid rgba(255,255,255,0.06);
    color: #eaeaea;
    font-family: "Courier New", monospace;
    font-size: 13px;
    padding: 10px;
    border-radius: 6px;
    overflow-x: auto;
}

/* Optional: figure captions for images */
figcaption {
    font-size: 13px;
    color: #bdbdbd;
    margin-top: 6px;
}

.result-set {
    display: flex;
    align-items: center; /* center + and = */
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

.result-set img {
    width: 100%;          /* fill available space */
    max-width: 250px;     /* don’t get bigger than original size */
    height: auto;         /* maintain aspect ratio */
    border-radius: 8px;
    border: 2px solid #ffffff;
    object-fit: cover;
}


.result-set span {
    font-size: 32px;
    color: white;
    font-weight: bold;
}

.code-block {
    /* background-color: #f5f5f5; Light grey */
    color: #333;
    padding: 12px 16px;
    border-radius: 6px;
    font-family: "Arial", "Courier New", monospace;
    font-size: 15px;
    line-height: 1.5;
    overflow-x: auto;
    border: 1px solid #ddd;
    tab-size: 4; /* Makes tabs consistent */
    -moz-tab-size: 4;
}

/* Remove unintended leading spaces from code */
.code-block code {
    display: block;
    white-space: pre; /* preserve formatting */
}

/* Optional: auto-trim leading indentation from every line */
.code-block code {
    white-space: pre-wrap; /* allow wrapping */
}


@media (max-width: 700px) {
    .container {
        padding: 20px;
    }

    .header {
        margin-bottom: 50px;
        flex-direction: column;
        align-items: flex-start;
    }

    .header .name {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .header .name a {
        font-size: 24px;
        align-items: center;
    }

    .navbar {
        margin-top: 20px;
        display: flex;
        justify-content: center;
        width: 100%;
        margin-left: 10px;
    }

    .navbar a {
        margin-left: 0;
        margin-right: 10px;
    }

    .blog-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .blog-image img {
        width: 50%;
        height: auto;
    }

    .page-title {
        text-align: center;
    }

    .blog-content {
        align-items: justify;
        text-align: justify;
    }

    .blog-title {
        text-align: center;
    }

    .blog-tags {
        justify-content: center;
    }
    .blog-description {
    font-size: 12px;
}

    .footer .links {
        flex-direction: row;
        gap: 10px;
    }

    .date {
        font-size: 12px;
        text-align: center;
    }
    .post {
        padding: 10px;      /* add some padding for small screens */
        font-size: 15px;    /* slightly smaller font for mobile */
        line-height: 1.6;   /* tighter spacing */
    }

    .post-section h2 {
        font-size: 18px;    /* smaller headings */
        margin-top: 20px;
        margin-bottom: 6px;
        text-align: center; /* optional: center headings on small screens */
    }

    .post-section p {
        font-size: 14px;    /* smaller paragraphs */
        text-align: justify;
        margin: 8px 0 12px;
    }

    .post-tags {
        justify-content: center;
        gap: 5px;
    }

    .post-tags .tag {
        font-size: 11px;
        padding: 2px 6px;
    }

    pre, code, .code-block {
        font-size: 12px;      /* smaller code blocks for mobile */
        padding: 8px;
    }

    figcaption {
        font-size: 11px;
    }

    .result-set {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .result-set span {
        font-size: 24px; /* smaller + and = signs */
    }
    .result-set::after {
        content: "";
        display: block;
        width: 80%;            /* line width */
        height: 1px;           /* line thickness */
        background-color: #555; /* color of the line */
        margin: 15px 0 0 0;    /* spacing above the line */
    }
}