/*
Theme Name: Inverted Minimal
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: A clean, minimalist blog theme inspired by invertedpassion.com
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: inverted-minimal
*/

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    font-size: 18px;
    line-height: 1.7;
    color: #333;
    background: #fff;
    max-width: 980px;
    margin: 0 auto;
    padding: 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #222;
}

h1 {
    font-size: 2.2rem;
    margin-top: 2rem;
}

h2 {
    font-size: 1.8rem;
    margin-top: 1.8rem;
}

h3 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
}

p {
    margin-bottom: 1.3rem;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Sticky Logo (fs.blog style - always visible on left) */
.sticky-logo {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    transition: all 0.3s ease;
}

.sticky-logo:hover {
    opacity: 0.8;
}

.sticky-logo a {
    display: block;
    line-height: 0;
}

.sticky-logo img {
    width: 50px;
    height: 50px;
    display: block;
    object-fit: contain;
}

/* Adjust body to avoid logo overlap on desktop */
@media (min-width: 769px) {
    body {
        padding-left: 90px;
    }
}

/* Header */
.site-header {
    text-align: center;
    padding: 20px 0 12px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

/* Minimal Header (for single posts) */
.site-header.minimal-header {
    padding: 2rem 0 1rem;
    margin-bottom: 2rem;
}

.site-header.minimal-header .site-title {
    font-size: 1.2rem;
    margin: 0;
    font-weight: 400;
}

.site-header.minimal-header .site-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.site-header.minimal-header .site-title a:hover {
    color: #0066cc;
}

/* Category Header (for category archive pages) */
.site-header.category-header {
    text-align: center;
    padding: 20px 0 12px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 2rem;
}

.category-branding {
    margin: 0;
}

.category-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.category-title a {
    color: #222;
    text-decoration: none;
}

.category-title a:hover {
    color: #0066cc;
}

.category-description {
    font-size: 1rem;
    color: #666;
    font-style: italic;
    margin: 0;
}

.site-title {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

.site-title a {
    color: #222;
    text-decoration: none;
}

.site-description {
    font-size: 0.95rem;
    color: #666;
    font-style: italic;
    margin-bottom: 0.8rem;
}

/* Navigation */
.main-navigation {
    margin-top: 12px;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.main-navigation li {
    display: inline;
}

.main-navigation a {
    color: #555;
    font-size: 0.95rem;
    text-decoration: none;
}

.main-navigation a:hover {
    color: #000;
}

/* Content Area */
.site-content {
    margin: 40px 0;
}

/* Extra top margin for logo-only pages (single posts) */
.single .site-content {
    margin-top: 60px;
}

/* Posts Listing */
.post-list {
    list-style: none;
}

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

.post-title {
    font-size: 1rem;
    margin-bottom: 0;
    font-weight: normal;
    display: inline;
}

.post-title a {
    color: #0066cc;
    text-decoration: none;
}

.post-title a:hover {
    text-decoration: underline;
}

/* Archive Header (Category Pages) */
.archive-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.archive-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.archive-subtitle {
    font-size: 1rem;
    color: #666;
    font-style: italic;
    margin-bottom: 0;
}

/* Home Intro */
.home-intro {
    margin-bottom: 1.5rem;
}

.home-intro h1 {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 0.8rem;
}

.home-intro p {
    margin-bottom: 0.5rem;
}

hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 1.5rem 0;
}

/* Two Column Section */
.two-column-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

/* Explore Section */
.explore-section {
    margin-bottom: 0;
}

.explore-section h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.explore-section p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.explore-section a {
    color: #0066cc;
    text-decoration: none;
}

.explore-section a:hover {
    text-decoration: underline;
}

.explore-categories {
    list-style: none;
    margin-left: 0;
    margin-bottom: 1rem;
}

.explore-categories li {
    margin-bottom: 0.3rem;
    padding-left: 0;
}

.cat-subtitle {
    color: #888;
    font-size: 0.9rem;
}

/* Recent Posts Section */
.recent-posts {
    margin-bottom: 0;
}

.recent-posts h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.recent-list {
    list-style: decimal;
    margin-left: 1.5rem;
}

.recent-list li {
    margin-bottom: 0.4rem;
}

.recent-list a {
    color: #0066cc;
    text-decoration: none;
}

.recent-list a:hover {
    text-decoration: underline;
}

/* All Posts Section */
.all-posts h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.year-links {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.year-links a {
    color: #0066cc;
    text-decoration: none;
}

.year-links a:hover {
    text-decoration: underline;
}

/* Year Sections */
.year-section {
    margin-bottom: 2rem;
}

.year-section h4 {
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #e0e0e0;
}

.year-posts {
    list-style: none;
}

.year-posts li {
    margin-bottom: 0.4rem;
}

.year-posts li::before {
    content: "• ";
    color: #666;
    margin-right: 0.3rem;
}

.year-posts a {
    color: #0066cc;
    text-decoration: none;
}

.year-posts a:hover {
    text-decoration: underline;
}

.post-cats {
    color: #888;
    font-size: 0.9rem;
}

/* Post Meta - Simplified */
.post-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1.5rem;
}

.post-meta a {
    color: #888;
}

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

/* Single Post */
.single-post .post-header {
    margin-bottom: 2rem;
}

.single-post .post-title {
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

.post-content {
    margin-top: 2rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
}

.post-content ul,
.post-content ol {
    margin-left: 2rem;
    margin-bottom: 1.3rem;
}

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

.post-content blockquote {
    border-left: 4px solid #e0e0e0;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #666;
}

.post-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

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

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin: 3rem 0 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    max-width: 48%;
}

.post-navigation a {
    color: #0066cc;
    text-decoration: none;
}

.post-navigation a:hover {
    text-decoration: underline;
}

/* Back to Home Link */
.back-to-home {
    text-align: center;
    margin: 2rem 0 3rem;
}

.back-to-home a {
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.back-to-home a:hover {
    color: #0066cc;
}

/* Categories/Tags */
.post-categories,
.post-tags {
    margin: 1.5rem 0;
}

.post-categories a,
.post-tags a {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f0f0;
    color: #555;
    font-size: 0.85rem;
    margin-right: 8px;
    margin-bottom: 8px;
    border-radius: 3px;
    text-decoration: none;
}

.post-categories a:hover,
.post-tags a:hover {
    background: #e0e0e0;
    color: #333;
}

/* Pagination */
.pagination {
    text-align: center;
    margin: 3rem 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 5px;
    background: #f5f5f5;
    color: #555;
    text-decoration: none;
    border-radius: 3px;
}

.pagination a:hover {
    background: #e0e0e0;
    color: #333;
}

.pagination .current {
    background: #333;
    color: #fff;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 40px 0 20px;
    border-top: 1px solid #e0e0e0;
    margin-top: 60px;
    color: #888;
    font-size: 0.9rem;
}

.site-footer a {
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        font-size: 16px;
        padding: 15px;
        padding-left: 15px !important; /* Override desktop left padding */
    }
    
    /* Smaller sticky logo on mobile */
    .sticky-logo {
        top: 10px;
        left: 10px;
        padding: 6px;
    }
    
    .sticky-logo img {
        width: 40px;
        height: 40px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .site-header {
        padding: 20px 0 12px;
        margin-bottom: 20px;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Stack 2-column layout on mobile */
    .two-column-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Utility Classes */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Category Icons */
.cat-icon {
    margin-right: 0.5rem;
    font-size: 1.1em;
}

.category-icon {
    margin-right: 0.5rem;
    font-size: 1em;
}
