/* Blog-specific styles - extends main styles.css */

/* Blog content links */
.content a {
    color: #458588;
    text-decoration: none;
    transition: color 0.3s;
}

.content a:hover {
    color: #83a598;
    text-decoration: underline;
}

.content a:visited {
    color: #458588;
}

/* Light theme blog links (Gruvbox) */
html:has(#theme-light:target) .content a {
    color: #076678;
}

html:has(#theme-light:target) .content a:hover {
    color: #458588;
}

html:has(#theme-light:target) .content a:visited {
    color: #076678;
}

ul,
ol {
    margin-left: 30px;
    margin-bottom: 15px;
}

ul {
    list-style-type: disc;
}

ol {
    list-style-type: decimal;
}

li {
    margin-bottom: 5px;
}

/* Blog content area */
.content {
    max-width: 95%;
    margin: 40px auto;
    background-color: #161925;
    border: 2px solid #282828;
    padding: 20px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.08);
    line-height: 1.6;
}

h1 {
    color: #f38ba8;
    border-bottom: 1px solid #303030;
    padding-bottom: 5px;
}

h2 {
    color: #f8f8f2;
    border-bottom: 1px solid #303030;
    padding-bottom: 5px;
}

.content h1 {
    margin-bottom: 20px;
    font-size: 1.5em;
}

.content h2 {
    margin: 30px 0 15px 0;
    font-size: 1.3em;
}

/* Subtitle styling - H2 immediately following H1 */
.content h1 + h2 {
    margin-top: -15px;
    margin-bottom: 25px;
    font-size: 1.1em;
    color: #b8b8b8;
    border-bottom: none;
    font-style: italic;
}

p, pre {
    margin: 10px 0;
}

.content p {
    margin-bottom: 15px;
}

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

.content strong {
    font-weight: bold;
}

.content em {
    font-style: italic;
}

/* Nano editor footer */
.nano-footer {
    background-color: #161925;
    color: #b8b8b8;
    padding: 5px 10px;
    border-top: 2px solid #303030;
    display: flex;
    justify-content: space-around;
    font-size: 0.9em;
}

.nano-key {
    background-color: #555;
    padding: 2px 4px;
    margin: 0 2px;
    border-radius: 3px;
    font-weight: bold;
}

/* Cursor animation */
.cursor {
    display: inline-block;
    width: 10px;
    height: 20px;
    margin-left: 2px;
    animation: blink 1s infinite;
}

@keyframes blink {
    from, to {
        background-color: transparent;
    }
    50% {
        background-color: #D9E0EE;
    }
}

/* Light theme adjustments for blog-specific elements */
html:has(#theme-light:target) .content {
    background-color: #f2e5bc;
    color: #3c3836;
}

/* Light theme subtitle styling */
html:has(#theme-light:target) .content h1 + h2 {
    color: #665c54;
}

html:has(#theme-light:target) .nano-footer {
    background-color: #d5c4a1;
    color: #3c3836;
    border-top-color: #928374;
}

html:has(#theme-light:target) .nano-key {
    background-color: #928374;
    color: #f2e5bc;
}

html:has(#theme-light:target) .cursor {
    background-color: #3c3836;
}

/* Light theme blink animation */
html:has(#theme-light:target) .cursor {
    animation: blink-light 1s infinite;
}

@keyframes blink-light {
    from, to {
        background-color: transparent;
    }
    50% {
        background-color: #3c3836;
    }
}
