/* ========================================
   BLOG-SPECIFIC STYLES - DIGITAL BRUTALISM
   ======================================== */

/* Blog Main Container */
.blog-main {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 160px 60px 80px;
}

/* Blog Header Block */
.blog-header-block {
    margin-bottom: 80px;
}

.blog-title {
    font-family: 'Archivo Black', 'Arial Black', sans-serif;
    font-size: clamp(80px, 12vw, 140px);
    font-weight: 900;
    line-height: 0.85;
    letter-spacing: -0.05em;
    margin-bottom: 20px;
    text-transform: uppercase;
    text-shadow: 4px 4px 0 #000;
    color: #FFF;
    -webkit-text-stroke: 2px #000;
    paint-order: stroke fill;
}

.blog-subtitle {
    font-family: 'Space Mono', 'Courier New', monospace;
    font-size: 16px;
    letter-spacing: 0.2em;
    font-weight: 700;
}

/* Posts Container */
.posts-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.loading,
.no-posts {
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    text-align: center;
    padding: 100px 0;
    letter-spacing: 0.1em;
}

/* Post Items (List View) */
.post-item {
    background: #FFF;
    border: 4px solid #000;
    text-decoration: none;
    color: #000;
    display: block;
    position: relative;
    z-index: 2;
    transition: none;
}

.post-item:hover {
    box-shadow: 12px 12px 0 #000;
    transform: translate(-6px, -6px);
}

.post-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 4px solid #000;
    background: #000;
    color: #FFF;
    flex-wrap: wrap;
    gap: 20px;
}

.post-item-date {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: #FFF;
}

.post-item-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.post-item-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    padding: 4px 10px;
    border: 2px solid #FFF;
    letter-spacing: 0.05em;
    font-weight: 700;
    text-transform: uppercase;
    background: transparent;
    color: #FFF;
}

.post-item-body {
    padding: 30px 25px;
}

.post-item-title {
    font-family: 'Archivo Black', sans-serif;
    font-size: clamp(20px, 2.5vw, 26px);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 15px;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: #000;
}

.post-item-description {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
    font-weight: 500;
    color: #333;
}

/* Post View */
.post-view {
    animation: none;
}

.post-back {
    margin-bottom: 40px;
}

.back-link {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.1em;
    color: #000;
    text-decoration: none;
    border: 3px solid #000;
    padding: 12px 24px;
    display: inline-block;
    background: #E8E8E8;
    font-weight: 700;
    box-shadow: 6px 6px 0 #000;
    position: relative;
    z-index: 2;
}

.back-link:hover {
    background: #fff;
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 #000;
}

/* Post Article */
.post-article {
    background: #FFF;
    border: 4px solid #000;
    padding: 60px;
    box-shadow: 12px 12px 0 #000;
    position: relative;
    z-index: 2;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 4px solid #000;
    flex-wrap: wrap;
    gap: 20px;
}

.post-date {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.post-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.post-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    padding: 4px 10px;
    border: 2px solid #000;
    letter-spacing: 0.05em;
    font-weight: 700;
    text-transform: uppercase;
    background: #E8E8E8;
}

.post-title {
    font-family: 'Archivo Black', sans-serif;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 50px;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

/* Post Content - Markdown Styling */
.post-content {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 15px;
    line-height: 1.8;
    color: #000;
}

.post-content h1 {
    font-family: 'Archivo Black', sans-serif;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 900;
    margin: 60px 0 25px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    border-bottom: 4px solid #000;
    padding-bottom: 15px;
}

.post-content h1:first-child {
    margin-top: 0;
}

.post-content h2 {
    font-family: 'Archivo Black', sans-serif;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 900;
    margin: 50px 0 20px;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

.post-content h3 {
    font-family: 'Archivo Black', sans-serif;
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 900;
    margin: 40px 0 15px;
    line-height: 1.2;
    text-transform: uppercase;
}

.post-content h4 {
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    margin: 30px 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content strong,
.post-content b {
    font-weight: 700;
}

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

.post-content a {
    color: #000;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    font-weight: 600;
    transition: all 0.1s ease;
}

.post-content a:hover {
    background: #000;
    color: #fff;
    padding: 2px 4px;
    margin: -2px -4px;
}

/* Lists */
.post-content ul,
.post-content ol {
    margin: 25px 0;
    padding-left: 0;
    list-style: none;
}

.post-content ul li,
.post-content ol li {
    margin-bottom: 12px;
    padding-left: 30px;
    position: relative;
}

.post-content ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    font-weight: 700;
}

.post-content ol {
    counter-reset: list-counter;
}

.post-content ol li {
    counter-increment: list-counter;
}

.post-content ol li::before {
    content: counter(list-counter) '.';
    position: absolute;
    left: 0;
    font-weight: 700;
    font-family: 'Space Mono', monospace;
}

/* Inline Code */
.post-content code {
    font-family: 'IBM Plex Mono', monospace;
    background: #E8E8E8;
    padding: 3px 6px;
    border: 2px solid #000;
    font-size: 13px;
    font-weight: 600;
}

/* Code Blocks */
.post-content pre {
    background: #1a1a1a;
    color: #f8f8f2;
    padding: 30px;
    margin: 30px 0;
    overflow-x: auto;
    border: 4px solid #000;
    box-shadow: 8px 8px 0 #000;
    position: relative;
}

.post-content pre::before {
    content: '[CODE]';
    position: absolute;
    top: 0;
    left: 0;
    background: #000;
    color: #fff;
    padding: 6px 12px;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.post-content pre code {
    background: transparent;
    border: none;
    color: #f8f8f2;
    padding: 0;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.6;
}

/* Blockquotes */
.post-content blockquote {
    border-left: 6px solid #000;
    padding: 20px 30px;
    margin: 30px 0;
    background: #E8E8E8;
    font-style: normal;
    font-weight: 600;
    position: relative;
}

.post-content blockquote::before {
    content: '"';
    font-family: 'Archivo Black', sans-serif;
    font-size: 60px;
    position: absolute;
    top: -10px;
    left: 10px;
    color: #000;
    opacity: 0.2;
}

.post-content blockquote p {
    margin-bottom: 0;
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Horizontal Rules */
.post-content hr {
    border: none;
    border-top: 4px solid #000;
    margin: 50px 0;
}

/* Images */
.post-content img {
    max-width: 100%;
    height: auto;
    border: 4px solid #000;
    margin: 30px 0;
    box-shadow: 8px 8px 0 #000;
    display: block;
}

/* Tables */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    border: 4px solid #000;
}

.post-content th,
.post-content td {
    padding: 12px 15px;
    text-align: left;
    border: 2px solid #000;
}

.post-content th {
    background: #000;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
}

.post-content td {
    background: #fff;
}

.post-content tr:nth-child(even) td {
    background: #E8E8E8;
}

/* Error State */
.error {
    background: #fff;
    border: 4px solid #000;
    padding: 40px;
    text-align: center;
    font-family: 'Space Mono', monospace;
}

.error p {
    margin-bottom: 10px;
}

/* Post Footer */
.post-footer {
    margin-top: 60px;
}

/* Responsive */
@media (max-width: 1200px) {
    .blog-main {
        padding: 140px 40px 60px;
    }

    .post-article {
        padding: 50px;
    }
}

@media (max-width: 768px) {
    .blog-main {
        padding: 100px 15px 40px;
    }

    .blog-title {
        font-size: clamp(60px, 12vw, 100px);
    }

    .blog-header-block {
        margin-bottom: 50px;
    }

    .posts-container {
        gap: 25px;
    }

    .post-item {
        box-shadow: 6px 6px 0 #000;
    }

    .post-item:hover {
        box-shadow: 10px 10px 0 #000;
        transform: translate(-5px, -5px);
    }

    .post-article {
        padding: 25px 20px;
        box-shadow: 6px 6px 0 #000;
    }

    .post-content {
        font-size: 13px;
    }

    .post-content h1 {
        font-size: 22px;
        margin: 40px 0 20px;
        padding-bottom: 12px;
    }

    .post-content h2 {
        font-size: 18px;
        margin: 35px 0 15px;
    }

    .post-content h3 {
        font-size: 16px;
        margin: 25px 0 10px;
    }

    .post-content h4 {
        font-size: 14px;
        margin: 20px 0 10px;
    }

    .post-content pre {
        padding: 20px 15px;
        padding-top: 35px;
        box-shadow: 6px 6px 0 #000;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .post-content pre::before {
        padding: 4px 8px;
        font-size: 9px;
    }

    .post-content img {
        box-shadow: 6px 6px 0 #000;
    }

    .post-item-header {
        padding: 15px 20px;
    }

    .post-item-body {
        padding: 20px;
    }

    .post-meta {
        margin-bottom: 25px;
        padding-bottom: 15px;
    }

    .post-title {
        margin-bottom: 30px;
        font-size: clamp(28px, 5vw, 40px);
    }

    .post-content blockquote {
        padding: 15px 20px;
    }

    .post-content blockquote::before {
        font-size: 40px;
        top: -5px;
        left: 5px;
    }

    .post-content table {
        font-size: 12px;
    }

    .post-content th,
    .post-content td {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .blog-main {
        padding: 80px 15px 40px;
    }

    .blog-title {
        font-size: clamp(50px, 15vw, 80px);
        -webkit-text-stroke: 1.5px #000;
    }

    .blog-header-block {
        margin-bottom: 40px;
    }

    .posts-container {
        gap: 20px;
    }

    .post-item {
        box-shadow: 5px 5px 0 #000;
    }

    .post-item:hover {
        box-shadow: 8px 8px 0 #000;
        transform: translate(-4px, -4px);
    }

    .back-link {
        padding: 10px 16px;
        font-size: 11px;
        box-shadow: 4px 4px 0 #000;
    }

    .back-link:hover {
        box-shadow: 6px 6px 0 #000;
    }

    .post-article {
        padding: 20px 15px;
        box-shadow: 5px 5px 0 #000;
    }

    .post-title {
        font-size: clamp(24px, 8vw, 32px);
        margin-bottom: 25px;
    }

    .post-item-title {
        font-size: 16px;
    }

    .post-item-header {
        padding: 12px 15px;
        gap: 15px;
    }

    .post-item-body {
        padding: 15px;
    }

    .post-item-date {
        font-size: 12px;
    }

    .post-item-tag {
        font-size: 10px;
        padding: 3px 8px;
    }

    .post-content {
        font-size: 13px;
    }

    .post-content h1 {
        font-size: 20px;
    }

    .post-content h2 {
        font-size: 18px;
    }

    .post-content h3 {
        font-size: 16px;
    }

    .post-content pre {
        font-size: 11px;
        padding: 15px 12px;
        padding-top: 30px;
        box-shadow: 4px 4px 0 #000;
    }

    .post-content img {
        box-shadow: 4px 4px 0 #000;
        margin: 20px 0;
    }

    .post-content blockquote {
        padding: 12px 15px;
    }

    .post-content blockquote::before {
        font-size: 35px;
    }

    .post-content code {
        font-size: 12px;
        padding: 2px 5px;
    }

    .post-meta {
        padding-bottom: 12px;
        margin-bottom: 20px;
    }

    .post-date {
        font-size: 11px;
    }

    .post-tag {
        font-size: 10px;
        padding: 3px 8px;
    }
}
