/*
Theme Name: Minimalist Blog
Theme URI: https://example.com/
Author: Sevket
Author URI: https://example.com/
Description: Fast, minimalist, responsive and SEO optimized left-image, right-content blog theme.
Version: 1.1.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.2
Text Domain: minimal-blog
*/

/* 1. CSS Variables & Reset */
:root {
    --bg-color: #f8fafc; /* Soft slate 50 */
    --surface-color: #ffffff;
    --text-heading: #0f172a; /* Slate 900 */
    --text-main: #334155; /* Slate 700 */
    --text-muted: #64748b; /* Slate 500 */
    --border-color: #e2e8f0; /* Slate 200 */
    --accent-primary: #6366f1; /* Indigo 500 */
    --accent-hover: #4f46e5; /* Indigo 600 */
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --container-width: 1100px;
    --border-radius-lg: 20px;
    --border-radius-md: 12px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --shadow-hover: 0 20px 40px -10px rgba(99, 102, 241, 0.15);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, hsla(253,16%,7%,0.03) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,0.03) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(339,49%,30%,0.03) 0, transparent 50%);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 800;
    margin-bottom: 0.5em;
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

/* 2. Layout */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex-grow: 1;
    padding: 4rem 0;
}

.header-container,
.main-container,
.site-info {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.main-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

.content-area {
    flex: 1 1 650px;
}

#secondary {
    flex: 0 0 320px;
}

/* 3. Premium Header (Glassmorphism) */
.site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.site-title a {
    color: inherit;
}

.site-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-navigation a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-heading);
    position: relative;
    padding: 0.5rem 0;
}

/* Navigation Link Hover Effect */
.main-navigation a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background: var(--accent-gradient);
    border-radius: 3px;
    transition: var(--transition-smooth);
}

.main-navigation a:hover {
    color: var(--accent-primary);
}

.main-navigation a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    color: var(--text-heading);
    padding: 0.5rem;
    transition: var(--transition-smooth);
}

.menu-toggle:hover {
    background: var(--bg-color);
}

/* 4. The Loop: Beautiful Post Cards */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.minimal-post-card {
    display: flex;
    gap: 2rem;
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    align-items: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255,255,255,0.5);
    transition: var(--transition-smooth);
}

.minimal-post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(99, 102, 241, 0.2);
}

.post-thumbnail-wrapper {
    flex: 0 0 240px;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05); /* subtle inner border */
}

/* Fancy Thumbnail Overlay */
.post-thumbnail-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.2) 0%, transparent 50%);
    pointer-events: none;
}

.post-thumbnail-wrapper img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.minimal-post-card:hover .post-thumbnail-wrapper img {
    transform: scale(1.08); /* Zoom effect on whole card hover */
}

.post-image-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-image-placeholder::after {
    content: '🖼️';
    font-size: 2rem;
    opacity: 0.5;
}

.post-content-wrapper {
    flex: 1;
    padding-right: 1rem;
}

.entry-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.entry-title a {
    color: var(--text-heading);
    transition: var(--transition-smooth);
}

.entry-title a:hover {
    color: var(--accent-primary);
}

.entry-summary {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.entry-summary p {
    margin-bottom: 0;
}

/* 5. Pagination Buttons */
.pagination-area {
    margin-top: 3.5rem;
}

.nav-links {
    display: flex;
    gap: 1rem;
    font-weight: 600;
    justify-content: center;
}

.nav-links a, .nav-links span {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    background: var(--surface-color);
    color: var(--text-heading);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.nav-links a:hover {
    background: var(--accent-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-links .current {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

/* 6. Single Post & Page Styling */
.minimal-single-post, .minimal-page {
    background: var(--surface-color);
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 3rem;
}

.single-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.single-title, .page-title {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.entry-meta {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--bg-color);
    border-radius: 50px;
}

.single-post-thumbnail, .page-thumbnail {
    margin-bottom: 3rem;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.single-post-thumbnail img, .page-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.entry-content {
    font-size: 1.15rem;
    color: var(--text-main);
}

.entry-content p {
    margin-bottom: 1.75rem;
}

.entry-content h2, .entry-content h3 { 
    margin-top: 3rem; 
    color: var(--text-heading);
}

.entry-content ul, .entry-content ol { 
    margin-bottom: 1.75rem; 
    padding-left: 1.5rem; 
    background: var(--bg-color);
    padding: 1.5rem 1.5rem 1.5rem 3rem;
    border-radius: var(--border-radius-md);
}

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

.entry-content blockquote {
    background: linear-gradient(to right, rgba(99, 102, 241, 0.05), transparent);
    border-left: 4px solid var(--accent-primary);
    padding: 1.5rem 2rem;
    font-style: italic;
    color: var(--text-heading);
    margin: 2rem 0;
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
    font-size: 1.25rem;
    line-height: 1.5;
}

/* 7. Sidebar Widgets */
.widget-area {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.widget {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.widget:hover {
    box-shadow: var(--shadow-md);
}

.widget-title {
    font-size: 1.25rem;
    color: var(--text-heading);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 4px;
}

.widget ul {
    list-style: none;
}

.widget li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
}

.widget li::before {
    content: '❯';
    color: var(--accent-primary);
    font-size: 0.8rem;
    margin-right: 0.75rem;
}

.widget li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.widget a {
    color: var(--text-main);
}

.widget a:hover {
    color: var(--accent-primary);
    padding-left: 0.25rem;
}

/* 8. Modern Footer */
.site-footer {
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.02);
}

.site-footer a {
    font-weight: 600;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 9. Responsive / Mobile Enhancements */
@media (max-width: 900px) {
    .minimal-single-post, .minimal-page {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .site-main { padding: 2rem 0; }
    .site-header { padding: 1rem 0; }
    .header-container { flex-direction: column; align-items: stretch; gap: 1rem;}
    
    .site-branding {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .main-navigation ul {
        display: none;
        flex-direction: column;
        background: var(--surface-color);
        border-radius: var(--border-radius-md);
        padding: 1rem;
        box-shadow: var(--shadow-sm);
        margin-top: 0.5rem;
        gap: 0;
    }

    .main-navigation ul.toggled {
        display: flex;
    }
    
    .main-navigation a {
        display: block;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-navigation li:last-child a {
        border-bottom: none;
    }

    .menu-toggle { display: block; }

    .minimal-post-card {
        flex-direction: column;
        padding: 1rem;
        gap: 1.25rem;
    }

    .post-thumbnail-wrapper {
        flex: 0 0 auto;
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    .post-thumbnail-wrapper img {
        aspect-ratio: 16 / 9;
    }

    .post-content-wrapper {
        width: 100%;
        padding-right: 0;
    }

    .single-title, .page-title {
        font-size: 2rem;
    }
    
    .entry-title { font-size: 1.3rem; }
}
