:root {
    --warning-bg: #2c2417;
    --warning-color: #ffc107;
}

#blog-section {
    display: flex;
    position: relative;
    min-height: 100vh;
    background-color: #1a1a1a;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
}

#blog-sidebar {
    width: 250px;
    padding: 2rem 2rem 5rem 2rem;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    background-color: #1a1a1a;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

#blog-header {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    text-align: center;
}

#blog-header a {
    text-decoration: none;
}

#blog-header h1 {
    font-size: 3.5rem;
    color: #fff;
    background-color: rgba(150, 150, 150, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: solid;
    border-width: 5px;
    border-color: #00FCFF;
    padding: 0;
    width: 1.8em;
    height: 1.8em;
    font-family: 'Space Grotesk', serif;
    font-weight: 300;
    margin: 0;
    transition: border-color 0.3s ease;
}

#blog-header h1:hover {
    border-color: #fff;
}

#blog-titles {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 1rem;
    overflow-y: auto;
    height: 100%;
}

.blog-title {
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    font-size: 0.9rem;
    color: #fff;
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
}

.blog-title:hover {
    opacity: 0.8;
}

.blog-title.active {
    opacity: 1;
}

#blog-content {
    margin-left: 250px;
    padding: 2rem 4rem;
    max-width: 800px;
    width: 100%;
}

.blog-post {
    margin-bottom: 6rem;
    position: relative;
}

/* Override main styles for blog post titles */
.blog-post h1 {
    font-size: 1.8rem !important;
    margin-bottom: 2rem !important;
    font-weight: 400 !important;
    position: relative !important;
    display: block !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
    color: #fff !important;
}

.blog-post h2 {
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
    font-weight: 400;
    opacity: 0.9;
    background: none;
    border: none;
    padding: 0;
    width: auto;
    height: auto;
}

.blog-post h1::before,
.blog-post h1::after {
    display: none;
}

.blog-post p {
    line-height: 1.6;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

#blog-content .blog-post blockquote {
    background-color: var(--warning-bg) !important;
    border-left: 3px solid var(--warning-color) !important;
    padding: 1rem 1.5rem !important;
    margin: 0 0 2rem 0 !important;
    border-radius: 0 4px 4px 0 !important;
    color: var(--warning-color) !important;
    font-size: 0.95rem !important;
    box-shadow: 0 0 0 1px var(--warning-bg) !important;
    display: block !important;
    position: relative !important;
    z-index: 1 !important;
}

#blog-content .blog-post blockquote p {
    margin: 0 !important;
    opacity: 1 !important;
    color: var(--warning-color) !important;
    background: none !important;
}

.blog-post a {
    color: #00ffff;
    text-decoration: none;
    border-bottom: 1px solid #00ffff;
}

.blog-post code {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9em;
}

.blog-post pre {
    background-color: #2a2a2a;
    padding: 1.5rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.blog-post pre code {
    background-color: transparent;
    padding: 0;
    font-size: 0.9em;
    line-height: 1.5;
}

.blog-post ul, .blog-post ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
    opacity: 0.8;
}

.blog-post li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.blog-post strong {
    color: #fff;
    font-weight: 400;
}

.blog-post em {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

/* Custom PrismJS theme overrides */
.blog-post .token.comment,
.blog-post .token.prolog,
.blog-post .token.doctype,
.blog-post .token.cdata {
    color: #666;
}

.blog-post .token.function {
    color: #00ffff;
}

.blog-post .token.keyword {
    color: #ff69b4;
}

.blog-post .token.string {
    color: #98fb98;
}

.blog-post .token.number {
    color: #ff8c00;
}

.blog-post .token.operator {
    color: #fff;
}

.blog-label {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.1em;
}

.post-date {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin: -1.5rem 0 2rem 0;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    display: block !important;
}

@media (max-width: 768px) {
    #blog-section {
        display: block;
        position: relative;
        height: 100vh;
        width: 100%;
        overflow: hidden;
    }

    #blog-sidebar {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 200px;
        padding: 10px 15px;
        background-color: #1a1a1a;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        z-index: 100;
    }

    #blog-content {
        position: absolute;
        height: calc(100% - 230px);
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0;
        padding: 20px;
        overflow-y: auto;
        box-sizing: border-box;
    }

    /* Header styling */
    #blog-header {
        margin-bottom: 0.5rem;
        text-align: center;
    }

    #blog-header h1 {
        font-size: 2.5rem;
        width: 1.6em;
        height: 1.6em;
        border-width: 3px;
        margin: 0 auto 0.5rem auto;
    }

    /* Blog titles styling */
    #blog-titles {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        gap: 1rem;
        padding: 0.5rem 0;
        padding-right: 20px;
        white-space: nowrap;
        height: auto;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    #blog-titles::-webkit-scrollbar {
        display: none;
    }

    #blog-titles::after {
        content: '';
        padding-right: 15px;
        flex-shrink: 0;
    }

    .blog-title {
        padding: 0.5rem 1rem;
        background-color: rgba(255, 255, 255, 0.05);
        border-radius: 20px;
        font-size: 0.85rem;
        opacity: 0.6;
        flex-shrink: 0;
        transition: opacity 0.3s ease, background-color 0.3s ease;
    }

    .blog-title.active {
        opacity: 1;
        background-color: rgba(255, 255, 255, 0.1);
    }

    /* Post styling */
    .blog-post {
        margin-bottom: 3rem;
    }

    /* Hide subscribe buttons */
    .subscribe-container, 
    .mobile-subscribe-container {
        display: none;
    }
}

/* Additional breakpoint for very small screens */
@media (max-width: 380px) {
    #blog-header h1 {
        font-size: 2rem;
    }

    .blog-post h1 {
        font-size: 1.3rem !important;
    }

    .blog-post p {
        font-size: 0.9rem;
    }
}

.subscribe-button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    padding: 0.5rem 1rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.subscribe-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
}

.subscribe-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.subscribe-form {
    background: #1a1a1a;
    padding: 2rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 300px;
    position: relative;
}

.subscribe-form label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: -0.5rem;
}

.subscribe-form input[type="email"] {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.75rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    border-radius: 4px;
}

.subscribe-form input[type="email"]:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
}

.subscribe-form input[type="submit"] {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.subscribe-form input[type="submit"]:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.subscribe-form p {
    margin: 0.5rem 0 0 0;
    font-size: 0.8rem;
    opacity: 0.5;
    text-align: center;
}

.subscribe-form p a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.subscribe-form p a:hover {
    border-bottom-color: rgba(255, 255, 255, 0.4);
}

.close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.close-button:hover {
    color: rgba(255, 255, 255, 0.8);
}

.subscribe-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 250px;
    padding: 1.5rem 2rem;
    text-align: center;
    background-color: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-subscribe-container {
    display: none;
}
