/*
Theme Name: Kapitalnie
Description: Minimalistyczny motyw WordPress inspirowany nowoczesnym designem
Version: 1.0
Author: Your Name
Text Domain: kapitalnie
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
    --primary: #000;
    --secondary: #111;
    --accent: #333;
    --text: #fff;
    --text-muted: #888;
    --surface: rgba(255, 255, 255, 0.02);
    --border: rgba(255, 255, 255, 0.08);
    --glow: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    background: var(--primary);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Grain texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.03), transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(120, 119, 198, 0.03), transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 119, 198, 0.03), transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(20px) saturate(180%);
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid var(--border);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, #888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.95rem;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Main content */
main {
    padding-top: 100px;
    min-height: 100vh;
}

/* Hero Section for homepage */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero-content h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #fff 0%, #666 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Section */
.blog-section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 4rem;
    text-align: center;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glow), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover::before {
    transform: translateX(100%);
}

.post-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--glow);
    transform: translateY(-4px);
    text-decoration: none;
    color: var(--text);
}

.post-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-category {
    background: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.post-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.post-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Single post styles */
.single-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.post-header {
    text-align: center;
    margin-bottom: 3rem;
}

.post-header h1 {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.post-content h2 {
    font-size: 1.8rem;
    font-weight: 500;
    margin: 2rem 0 1rem;
    color: var(--text);
}

.post-content h3 {
    font-size: 1.4rem;
    font-weight: 500;
    margin: 1.5rem 0 1rem;
    color: var(--text);
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content strong {
    color: var(--text);
}

.post-content em {
    font-style: italic;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 4rem 0;
}

.pagination a,
.pagination span {
    padding: 0.75rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: var(--accent);
    border-color: var(--glow);
}

.pagination .current {
    background: var(--text);
    color: var(--primary);
}

/* Footer */
.site-footer {
    background: var(--secondary);
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    text-align: center;
    margin-top: 4rem;
}

.site-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .post-card {
        padding: 1.5rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .post-header h1 {
        font-size: 2rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* WordPress specific */
.wp-block-image {
    margin: 2rem 0;
}

.wp-block-quote {
    border-left: 3px solid var(--accent);
    margin: 2rem 0;
    padding-left: 1.5rem;
    font-style: italic;
    color: var(--text-muted);
}

.wp-block-code {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
}

/* WordPress Admin Bar Adjustments */
body.admin-bar header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar header {
        top: 46px;
    }
}

/* WordPress Post Navigation */
.post-navigation {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.nav-links {
    display: flex;
    justify-content: space-between;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-next {
    text-align: right;
}

/* WordPress Comments */
.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
}

/* WordPress Widgets */
.widget {
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text);
}