/* Specific overrides for the minimalistic index.php */
body {
    background-color: #f9fafb;
}

.layout-wrapper {
    max-width: 1440px;
    margin: 40px auto;
    display: flex;
    gap: 32px;
    padding: 0 20px;
    align-items: flex-start;
}

.index-page {
    flex: 1;
    min-width: 0;
    /* prevents flex blowout */
    padding: 40px 48px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    border: 1px solid #f3f4f6;
    box-sizing: border-box;
}

.sidebar-profile {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 40px;
    background: #ffffff;
    border-radius: 20px;
    padding: 32px;
    border: 1px solid #f3f4f6;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    box-sizing: border-box;
    text-align: center;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
    border: 4px solid #f3f4f6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.profile-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.profile-bio {
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.6;
    margin: 0 0 24px;
}

.profile-contacts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f9fafb;
    color: #111827;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    border: 1px solid #e5e7eb;
}

.contact-link:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.contact-link svg {
    color: #6b7280;
    transition: color 0.2s;
}

.contact-link:hover svg {
    color: #111827;
}

/* Sidebar Categories Styling */
.sidebar-section-title {
    margin-bottom: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    text-align: left;
}

.sidebar-cat-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-cat-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f9fafb;
    border-radius: 12px;
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    border: 1px solid #e5e7eb;
}

.sidebar-cat-link:hover {
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
    color: #111827 !important;
    text-decoration: none !important;
}

.sidebar-cat-link.active {
    background: #111827 !important;
    color: #ffffff !important;
    border-color: #111827 !important;
}

.cat-count {
    background: #e5e7eb;
    color: #6b7280;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.sidebar-cat-link.active .cat-count {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.toggle-cats-btn {
    background: none !important;
    border: none !important;
    color: #2563eb !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    padding: 8px 14px !important;
    text-align: left !important;
    width: fit-content !important;
    box-shadow: none !important;
    margin-top: 4px !important;
}

.toggle-cats-btn:hover {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
}

.index-header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.site-title-large {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
    color: #111827;
}

.site-title-large a {
    color: inherit;
    text-decoration: none;
}

.rss-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px;
    background: #f3f4f6;
    border-radius: 999px;
    transition: all 0.2s;
}

.rss-link:hover {
    color: #111827;
    background: #e5e7eb;
}

.index-subtitle {
    font-size: 1.1rem;
    color: #6b7280;
    margin: 0 0 32px;
    line-height: 1.6;
}

.minimal-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid #f3f4f6;
}

.minimal-cat {
    font-size: 0.95rem;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    padding: 6px 16px;
    border-radius: 999px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.minimal-cat:hover {
    color: #111827;
    background: #f3f4f6;
}

.minimal-cat.active {
    background: #111827;
    color: #ffffff;
    border-color: #111827;
}

.minimal-feed {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.minimal-article {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    /* Important for the image border radius */
    height: 100%;
    position: relative;
    /* For absolutely positioned category badge */
}

.category-badge-container {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

.category-badge {
    background-color: rgba(255, 255, 255, 0.9);
    color: #111827;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
}

.category-badge:hover {
    background-color: #ffffff;
    color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.category-badge-plus {
    background-color: rgba(17, 24, 39, 0.85);
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: help;
}

.minimal-article:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 24px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #d1d5db;
}

.minimal-article-image-link {
    display: block;
    width: 100%;
    height: 260px;
    background-color: #f3f4f6;
    /* Placeholder background */
    overflow: hidden;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.minimal-article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Interactive image hover */
.minimal-article:hover .minimal-article-image {
    transform: scale(1.05);
}

.minimal-article-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.minimal-article-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.minimal-article-meta {
    font-size: 0.9rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.meta-dot {
    color: #d1d5db;
}

.minimal-category {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
}

.minimal-category:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.minimal-article-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}

.minimal-article-title a {
    color: #111827;
    text-decoration: none;
}

.minimal-article-title a:hover {
    color: #2563eb;
}

.minimal-article-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: #4b5563;
    margin: 0 0 20px;
    flex-grow: 1;
    /* Pushes the read-more button to the bottom */
}

.minimal-read-more {
    display: inline-flex;
    align-items: center;
    color: #111827;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    gap: 4px;
    transition: gap 0.2s ease;
}

.minimal-read-more:hover {
    gap: 8px;
    color: #2563eb;
}

.modern-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0 20px;
}

.modern-pagination a,
.modern-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s;
}

.modern-pagination a {
    background: #ffffff;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.modern-pagination a:hover {
    background: #f3f4f6;
    color: #111827;
    border-color: #d1d5db;
}

.modern-pagination .current {
    background: #111827;
    color: #ffffff;
    border: 1px solid #111827;
    box-shadow: 0 4px 6px rgba(17, 24, 39, 0.2);
}

@media (max-width: 1200px) {
    .minimal-feed {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .layout-wrapper {
        flex-direction: column;
    }

    .sidebar-profile {
        width: 100%;
        position: static;
        order: -1;
        /* optionally put profile on top on mobile */
    }
}

@media (max-width: 860px) {
    .layout-wrapper {
        margin: 20px auto;
        padding: 0 10px;
    }

    .minimal-feed {
        grid-template-columns: 1fr;
    }

    .index-page {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .sidebar-profile {
        padding: 24px;
        border-radius: 16px;
        margin-bottom: 20px;
    }

    .index-header-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 20px;
    }
}