/*
Theme Name: Cheese Theme Tech Blog
Description: A minimal, dark, text-and-code-focused theme.
Author: Gemini
Version: 1.0
*/

:root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
    --accent-color: #4ade80; /* Terminal Green */
    --code-bg: #000000;
    --border-color: #333333;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "Fira Code", Consolas, Monaco, "Courier New", Courier, monospace;
}

* {
    box-sizing: border-box;
}

body {
    border-top: 4px solid var(--accent-color);
    background-color: var(--bg-color);
	background-image: radial-gradient(#2a2a2a 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.site-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

header.site-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Changed to accommodate varying heights */
    flex-wrap: wrap;
    gap: 1.5rem;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
}

.site-title a {
    color: var(--heading-color);
    text-decoration: none;
    font-weight: bold;
}

.site-nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 1.5rem;
}

.site-nav a:hover {
    color: var(--accent-color);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
    margin-top: 2rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Post Styling */
.post {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px dashed var(--border-color);
}

.post-title {
    margin: 0 0 0.5rem 0;
}

.post-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1rem;
}

/* Code Blocks */
pre {
    background-color: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #a9b7c6;
}

code {
    background-color: var(--code-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

footer.site-footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
    font-size: 0.85rem;
    color: #666;
}

/* Responsive */
@media (max-width: 600px) {
    header.site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .site-nav a {
        margin-left: 0;
        margin-right: 1.5rem;
    }
}

/* Specific fix so the single page post doesn't hover/shift */
.single .post, .page .post {
    background-color: transparent;
    border: none;
    transform: none;
    padding: 0;
    margin: 0 0 3rem 0;
}

/* Blockquotes for notes or callouts */
blockquote {
    border-left: 4px solid var(--accent-color);
    margin: 1.5rem 0;
    padding: 0.5rem 0 0.5rem 1.5rem;
    background-color: #1a1a1a;
    color: #cccccc;
    font-style: italic;
    border-radius: 0 4px 4px 0;
}

/* =========================================
   COMMENTS STYLING
   ========================================= */

.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.comments-title, 
.comment-reply-title {
    font-size: 1.25rem;
    color: var(--heading-color);
    margin-bottom: 1.5rem;
}

/* Comment List */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    background-color: #181818;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.comment-meta {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #888;
}

.comment-meta a {
    color: var(--accent-color);
}

/* Comment Forms */
.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    background-color: var(--code-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.75rem;
    border-radius: 4px;
    font-family: var(--font-main);
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.comment-form input[type="submit"] {
    background-color: var(--accent-color);
    color: var(--code-bg);
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s;
    align-self: flex-start;
}

.comment-form input[type="submit"]:hover {
    opacity: 0.8;
}

.header-branding {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.site-logo img {
    max-width: 100%;
    max-height: 150px;
	width: auto;
    display: block;
}

.site-description {
    margin: 0;
    font-size: 0.85rem;
    color: #888;
    font-family: var(--font-mono); /* Gives the tagline a nice techy feel */
}

.header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

/* =========================================
   SEARCH FORM
   ========================================= */

.searchform div {
    display: grid;
    gap: 0.5rem;
	margin-top: 23px;
}

/* Hide the label visually to keep it clean */
.searchform .screen-reader-text {
    display: none; 
}

.searchform input[type="text"] {
    background-color: var(--code-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    width: 180px;
}

.searchform input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-color);
}

.searchform input[type="submit"] {
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.searchform input[type="submit"]:hover {
    background-color: var(--accent-color);
    color: var(--code-bg);
}

/* =========================================
   LIST THUMBNAILS
   ========================================= */

.list-post {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    
    /* NEW: Permanent Card Styling */
    background-color: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

/* NEW: The green border and movement on hover */
.list-post:hover {
    border-color: var(--accent-color);
    transform: translateX(4px);
}

.post-thumbnail img {
    border-radius: 4px;
    border: 1px solid var(--border-color);
    display: block;
    object-fit: cover;
}

.post-content-wrap {
    flex: 1; /* Tells the text to take up remaining space */
}

/* Update Mobile Styles for the new layout */
@media (max-width: 600px) {
    .header-actions {
        align-items: flex-start;
        width: 100%;
    }
    .search-form {
        width: 100%;
    }
    .search-form .search-field {
        flex: 1;
    }
    .list-post {
        flex-direction: column;
        gap: 1rem;
    }
}

/* =========================================
   POST TAGS
   ========================================= */

.post-tags {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-tags a {
    background-color: var(--code-bg);
    color: var(--accent-color);
    border: 1px solid var(--border-color);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: var(--font-mono); /* Uses your monospace tech font */
    text-transform: lowercase;     /* Forces lowercase for a coding vibe */
    text-decoration: none;
    transition: all 0.2s ease;
}

.post-tags a::before {
    content: "#"; /* Adds a hashtag before the tag text automatically */
    opacity: 0.6;
    margin-right: 0.15rem;
}

.post-tags a:hover {
    background-color: var(--accent-color);
    color: var(--code-bg);
    border-color: var(--accent-color);
}