/* =================================================================== */
/* 1. Global Styles
/* =================================================================== */

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    background-color: #080819;
    color: #f8f8f2;
    overflow-x: hidden;
    box-sizing: border-box;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    width: 100%;
    padding: 20px;
    text-align: left;
}

/* =================================================================== */
/* 2. Typography & Base Elements
/* =================================================================== */

h1 {
    color: #8be9fd;
    margin-bottom: 0.3em;
    font-size: 2em; /* Default h1 size (from post page) */
}

h2 {
    color: #8be9fd;
    margin-bottom: 0.3em;
}

p,
li {
    color: #f8f8f2;
    font-size: 1.1em;
    line-height: 1.6;
}

a {
    color: #50fa7b;
    text-decoration: underline dotted;
}

a:hover {
    color: #ff79c6;
    text-decoration: underline solid;
}

blockquote {
    color: #6272a4;
    font-style: italic;
    border-left: 4px solid #44475a;
    padding-left: 10px;
    margin-left: 0;
}

/* =================================================================== */
/* 3. Main Page Layout (index.html)
/* =================================================================== */

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    border-bottom: 1px solid #44475a;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

.header-left h1 {
    font-size: 1.8em; /* Override default h1 for header */
    color: #8be9fd;
    margin: 0;
}

.header-right {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

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

.social-links a {
    color: #50fa7b;
    text-decoration: none;
    font-size: 1.3em;
    padding: 8px 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    background-color: rgba(80, 250, 123, 0.1);
    border-radius: 6px;
    white-space: nowrap;
}

.social-links a:hover {
    color: #ff79c6;
    background-color: rgba(255, 121, 198, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(255, 121, 198, 0.3);
    text-decoration: none;
}

.social-links i {
    min-width: 16px;
    text-align: center;
}

.tagline {
    color: #bd93f9;
    font-size: 1.3em;
    margin-top: 0;
    margin-bottom: 1.5em;
}

.section {
    margin-top: 40px;
}

/* =================================================================== */
/* 4. Blog Post List (index.html)
/* =================================================================== */

.blog-post {
    background-color: #1a1a2e;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #44475a;
    transition: border-color 0.3s ease;
}

.blog-post:hover {
    border-color: #6272a4;
}

.blog-post h3 {
    color: #ffb86c;
    margin-top: 0;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.blog-post h3 a {
    color: #ffb86c;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-post h3 a:hover {
    color: #ff79c6;
    text-decoration: none;
}

.blog-post-meta {
    font-size: 0.9em;
    color: #6272a4;
    margin-bottom: 15px;
}

.blog-post-meta a {
    color: #6272a4;
    text-decoration: underline dotted;
}

.blog-post-meta a:hover {
    color: #ff79c6;
}

.read-more {
    color: #50fa7b;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: #ff79c6;
    gap: 8px;
    text-decoration: none;
}

/* =================================================================== */
/* 5. Blog Post Page (posts/*.html)
/* =================================================================== */

.back-link {
    color: #50fa7b;
    text-decoration: none;
    font-size: 1.1em;
    margin-bottom: 20px;
    display: inline-block;
}

.back-link:hover {
    color: #ff79c6;
    text-decoration: none;
}

.post-meta {
    color: #6272a4;
    margin-bottom: 30px;
    font-size: 0.95em;
}

.post-meta a {
    color: #6272a4;
    text-decoration: underline dotted;
}

.post-meta a:hover {
    color: #ff79c6;
}

.post-content {
    color: #f8f8f2;
    font-size: 1.1em;
}

.post-content p {
    margin: 1em 0;
}

/* .post-content a and a:hover rules are covered by global styles */

.post-content pre {
    background-color: #1a1b26;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    color: #f8f8f2;
}

.post-content code {
    background-color: #44475a;
    padding: 3px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.post-content pre code {
    background-color: transparent;
    padding: 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5em auto;
    border-radius: 6px;
}

.post-content blockquote {
    color: #6272a4;
    font-style: italic;
    border-left: 4px solid #44475a;
    padding-left: 15px;
    margin-left: 0;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    color: #ffb86c;
    margin-top: 1.5em;
}

.post-content ul,
.post-content ol {
    padding-left: 2em;
}

/* =================================================================== */
/* 6. Media Queries (Responsive)
/* =================================================================== */

@media (max-width: 600px) {
    .site-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .tagline {
        justify-content: center;
        text-align: center;
    }

    .header-left {
        margin-bottom: 15px;
    }

    .header-right {
        justify-content: center;
        gap: 1.5em;
    }

    .social-links a {
        font-size: 1.3em;
        padding: 6px 10px;
    }
}
