/* Blog-specific styles - adapted to match main site colors */

:root {
    --bg-primary: #0a0e14;
    --bg-card: #272E33;
    --bg-card-hover: #2D353B;
    --text-primary: #D3C6AA;
    --text-muted: #9DA9A0;
    --accent-green: #A7C080;
    --accent-green-alt: #83C092;
    --accent-cyan: #7FBBB3;
    --accent-pink: #D699B6;
    --border-color: #374247;
    --shadow: rgba(0, 0, 0, 0.3);
}

/* Override body styles for blog */
body {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Container layout */
#container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    padding: 2rem;
    padding-left: 2rem;
}

/* Sidebar */
#sidebar {
    width: 280px;
    background: var(--bg-card);
    padding: 2rem 1.5rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent-cyan);
    box-shadow: 0 4px 12px var(--shadow);
    height: fit-content;
    position: fixed;
    top: 2rem;
    left: calc(50vw - 600px + 2rem);
    min-width: 0;
    z-index: 100;
}

#sidebar h1 {
    font-size: 1.8rem;
    color: var(--accent-green);
    margin-bottom: 0.5rem;
}

#sidebar h1 a {
    color: var(--accent-green);
    text-decoration: none;
}

#sidebar h1 a:hover {
    color: var(--accent-green-alt);
}

.profile-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

#bio {
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem 0;
    margin: 1rem 0;
    font-size: 0.85rem;
}

#bio p {
    margin: 0.3rem 0;
    color: var(--text-muted);
}

/* Sidebar nav */
#sidebar nav {
    margin: 1.5rem 0;
}

#sidebar nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
    flex-shrink: 0;
}

#sidebar nav li a {
    display: block;
    padding: 0.7rem 1rem;
    background: var(--bg-primary);
    color: var(--accent-green-alt);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    min-height: auto;
    line-height: 1.4;
}

#sidebar nav li a::after {
    display: none;
}

#sidebar nav li a:hover {
    background: var(--bg-card-hover);
    border-left-color: var(--accent-cyan);
    color: var(--accent-green);
    transform: translateX(3px);
}

/* Specific style for back home link */
#sidebar nav li a[href="index.html"] {
    background: var(--bg-card);
    border-left: 3px solid var(--accent-cyan);
    font-weight: 600;
    margin-bottom: 1rem;
}

.credit {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.6;
    text-align: center;
}

.credit a {
    color: inherit;
}

/* Main content area */
main {
    flex: 1;
    max-width: 700px;
    margin-left: calc(280px + 4rem);
}

/* Pinned sections (status and filters) */
.pinned {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--accent-green);
    box-shadow: 0 2px 8px var(--shadow);
}

.pinned summary {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--accent-cyan);
    cursor: pointer;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    list-style: none;
}

.pinned summary::-webkit-details-marker {
    display: none;
}

.pinned time {
    float: right;
    font-size: 0.85rem;
    font-weight: normal;
    color: var(--text-muted);
}

/* Status list */
#status ul {
    background: var(--bg-primary);
    margin: 1rem 0 0.5rem 0;
    padding: 0.8rem;
    border-radius: 6px;
    list-style: none;
}

#status li {
    padding: 0.3rem 0.5rem;
    line-height: 1.4;
}

#status li:nth-child(odd) {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent-green);
}

#status li:nth-child(even) {
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    margin-bottom: 0.5rem;
}

/* Quote of the week */
#quote-of-week blockquote {
    margin: 1rem 0 0 0;
    padding: 1rem 1.2rem;
    background: var(--bg-primary);
    border-left: 3px solid var(--accent-cyan);
    border-radius: 0 4px 4px 0;
    font-style: italic;
    color: var(--text-primary);
}

#quote-of-week p {
    margin: 0 0 0.8rem 0;
    line-height: 1.6;
}

#quote-of-week cite {
    display: block;
    text-align: right;
    font-style: normal;
    color: var(--accent-green);
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Tag filters */
#tag-filters label {
    display: inline-block;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.3rem 0.8rem;
    margin: 0.5rem 0.3rem 0 0;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

#tag-filters label:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-cyan);
}

#tag-filters label:has(input:checked) {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    font-weight: 600;
    border-color: var(--accent-cyan);
}

#tag-filters input {
    display: none;
}

/* Blog posts */
.post {
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 8px;
    border-left: 3px solid var(--accent-green);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow);
    transition: all 0.3s ease;
}

.post:hover {
    box-shadow: 0 4px 12px var(--shadow);
    border-left-color: var(--accent-cyan);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.8rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    font-size: 0.9rem;
}

.post-author {
    color: var(--accent-cyan);
    font-weight: 600;
}

.post time {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.post h2 {
    color: var(--accent-green);
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    border: none;
    padding: 0;
}

.post h3 {
    color: var(--accent-pink);
    font-size: 1.2rem;
    margin: 1.5rem 0 0.8rem 0;
}

.post p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.post ul,
.post ol {
    margin: 1rem 0 1rem 1.5rem;
    line-height: 1.7;
}

.post li {
    margin-bottom: 0.5rem;
}

.post a {
    color: var(--accent-green-alt);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.post a::after {
    display: none;
}

.post a:hover {
    color: var(--accent-green);
    border-bottom-color: var(--accent-green);
}

.post code {
    background: var(--bg-primary);
    color: var(--accent-cyan);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

.post img {
    max-width: 100%;
    border-radius: 6px;
    margin: 1rem 0;
}

/* Read more */
.readmore {
    margin: 1rem 0;
}

.readmore summary {
    color: var(--accent-cyan);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: inline-block;
    padding: 0.3rem 0;
}

.readmore summary::-webkit-details-marker {
    display: none;
}

.readmore summary:hover {
    color: var(--accent-green);
    text-decoration: underline;
}

.readmore[open]>summary {
    display: none;
}

.readmore[open] {
    border-top: 2px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}

/* Tags */
.tags {
    border-top: 2px solid var(--border-color);
    padding-top: 0.8rem;
    margin-top: 1rem;
}

.tags a,
.tags span {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    text-decoration: none;
}

.tags a {
    color: var(--accent-green-alt);
    background: var(--bg-primary);
}

.tags a::after {
    display: none;
}

.tags a:hover {
    background: var(--bg-card-hover);
    color: var(--accent-green);
}

.tags span {
    color: var(--accent-pink);
    background: transparent;
}

/* Tag filtering CSS magic */
.tagged:has(input:checked) article {
    display: none;
}

.tagged:has(#all:checked) article,
.tagged:has(#tech:checked) article[class~="tech"],
.tagged:has(#personal:checked) article[class~="personal"],
.tagged:has(#projects:checked) article[class~="projects"],
.tagged:has(#games:checked) article[class~="games"] {
    display: block;
}

/* Page nav */
#page-nav {
    text-align: center;
    margin: 2rem 0;
}

#page-nav a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: 0.9rem;
}

#page-nav a::after {
    display: none;
}

#page-nav a:hover {
    color: var(--accent-green);
    text-decoration: underline;
}

/* Mobile responsive */
@media (max-width: 900px) {
    #container {
        flex-direction: column;
        padding: 1rem;
    }

    #sidebar {
        width: 100%;
        position: static;
        margin-bottom: 2rem;
    }

    main {
        max-width: 100%;
    }

    .post {
        padding: 1rem;
    }

    .post h2 {
        font-size: 1.3rem;
    }
}