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

:root {
    --paper: #f8f5ef;
    --soft: #f1ebe0;
    --ink: #11100f;
    --muted: #33465d;
    --line: rgba(17, 16, 15, 0.34);
    --soft-line: rgba(17, 16, 15, 0.13);
    --sage: #62715f;
    --sepia: #8a7449;
    --wine: #84413e;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--ink);
    font-family: "Cormorant Garamond", Georgia, serif;
    background:
        repeating-linear-gradient(0deg, rgba(17, 16, 15, 0.018) 0 1px, transparent 1px 12px),
        radial-gradient(circle at 18% 8%, rgba(51, 70, 93, 0.1), transparent 28%),
        var(--paper);
}

a {
    color: inherit;
}

.blog-page {
    width: min(1440px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 18px 0 34px;
}

.paper-header {
    position: relative;
    padding: 12px 0 28px;
    text-align: center;
    border-bottom: 4px double var(--ink);
}

.back-btn {
    position: absolute;
    left: 0;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px;
    color: var(--ink);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--ink);
    font-family: "Cinzel", serif;
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: 4px 4px 0 rgba(17, 16, 15, 0.16);
}

.paper-kicker,
.section-label,
.blog-meta-row,
.article-footer,
.topic-list span,
.code-strip {
    font-family: "Cinzel", serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
}

.paper-kicker {
    display: inline-block;
    padding: 4px 14px;
    color: var(--muted);
    font-size: 0.78rem;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.paper-header h1 {
    margin-top: 22px;
    font-family: "Playfair Display", Didot, Georgia, serif;
    font-size: clamp(4.2rem, 3.4vw, 9.5rem);
    font-weight: 900;
    line-height: 0.92;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.i-star {
    position: relative;
    display: inline-block;
}

.i-star::after {
    content: "✦";
    position: absolute;
    left: 50%;
    top: -0.25em;
    transform: translateX(-50%);
    font-family: Georgia, serif;
    font-size: 0.22em;
    line-height: 1;
}

.paper-rule {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    width: min(900px, 78%);
    margin: 1px auto 5px;
}

.paper-rule span {
    height: 1px;
    background: var(--ink);
}

.paper-rule i {
    font-style: normal;
    font-size: 1.5rem;
}

.paper-header p {
    font-size: clamp(0.8rem, 1.4vw, 3.6rem);
    font-style: italic;
    font-weight: 600;
}

.blog-grid {
    display: grid;
    grid-template-columns: minmax(240px, 0.85fr) minmax(560px, 1.8fr) minmax(280px, 0.9fr);
    gap: 28px;
    padding: 34px 0;
    border-bottom: 4px double var(--ink);
}

.editorial-note,
.articles-column,
.topic-panel,
.article-card {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.28);
}

.editorial-note,
.topic-panel {
    position: relative;
    padding: 24px;
}

.blog-sticker {
    display: block;
    width: 96px;
    margin: -10px auto 12px;
}

.section-label {
    display: block;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 0.86rem;
}

.drop-copy {
    margin-bottom: 18px;
    font-size: 1.46rem;
    font-weight: 700;
    line-height: 1.18;
}

.drop-copy span {
    float: left;
    padding: 8px 9px 0 0;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 5rem;
    line-height: 0.72;
}

.editorial-note p:not(.drop-copy) {
    margin-bottom: 22px;
    font-size: 1.18rem;
    line-height: 1.38;
}

pre {
    overflow: hidden;
    padding: 16px;
    color: #efe8dc;
    background: #171716;
    border: 6px solid #d8cdbd;
    box-shadow: 7px 7px 0 rgba(17, 16, 15, 0.12);
}

code {
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.82rem;
    line-height: 1.55;
}

.articles-column {
    padding: 24px;
}

.section-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ink);
}

.section-title h2,
.topic-panel h2 {
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2rem, 2vw, 3.4rem);
    line-height: 0.96;
    text-transform: uppercase;
}

.section-title > span {
    color: var(--muted);
    font-family: "Cinzel", serif;
    font-weight: 800;
}

.article-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.article-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    min-height: 238px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 5px 5px 0 rgba(17, 16, 15, 0.09);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 8px 8px 0 rgba(17, 16, 15, 0.13);
}

.article-thumb {
    background-color: rgba(241, 235, 224, 0.85);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    border-right: 1px solid var(--line);
}

.ddd-card .article-thumb {
    background-image: url("../images/dddBg.png");
}

.mediatr-card .article-thumb {
    background-image: url("../images/mediatrBg.png");
}

.solid-card .article-thumb {
    background-image: url("../images/solidBg.png");
}

.token-card .article-thumb {
    background-image: url("../images/tokenBg.png");
}

.article-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
}

.blog-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.62rem;
}

.blog-badge {
    color: var(--muted);
}

.article-card h3 {
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.55rem, 1.1vw, 2.25rem);
    line-height: 1;
}

.article-card p {
    font-size: 1rem;
    line-height: 1.35;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    color: var(--muted);
    font-size: 0.68rem;
}

.topic-panel h2 {
    margin-bottom: 18px;
}

.topic-list {
    display: grid;
    gap: 9px;
    margin-bottom: 24px;
    list-style: none;
}

.topic-list li {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--soft-line);
    font-size: 1.08rem;
    font-weight: 700;
}

.topic-list span {
    color: var(--sage);
    font-size: 0.72rem;
}

.contact-note {
    padding-top: 16px;
    border-top: 2px solid var(--ink);
}

.contact-note h3 {
    margin-bottom: 8px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.6rem;
}

.contact-note p {
    font-size: 1.08rem;
    line-height: 1.35;
}

.blog-footer {
    padding-top: 28px;
    text-align: center;
}

.code-strip {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 15px 28px;
    color: #efe8dc;
    background: #171716;
    font-size: 0.78rem;
}

.code-strip span {
    padding: 6px 12px;
    border: 1px solid rgba(239, 232, 220, 0.25);
}

.social-footer {
    display: flex;
    justify-content: center;
    gap: 26px;
    margin-bottom: 18px;
}

.social-link {
    color: var(--muted);
    font-size: 1.65rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.social-link:hover {
    color: var(--ink);
    transform: translateY(-2px);
}

.copyright {
    color: rgba(17, 16, 15, 0.58);
    font-size: 1rem;
}

@media (max-width: 1180px) {
    .blog-page {
        width: min(100% - 32px, 940px);
        padding-top: 54px;
    }

    .back-btn {
        top: 12px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .article-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .blog-page {
        width: min(100% - 22px, 440px);
        padding-top: 76px;
    }

    .paper-header {
        padding-top: 48px;
        padding-bottom: 22px;
    }

    .back-btn {
        top: 0;
        min-height: 34px;
        padding: 0 12px;
        font-size: 0.78rem;
    }

    .paper-kicker {
        max-width: min(100%, 260px);
        line-height: 1.5;
        font-size: 0.68rem;
        padding-inline: 10px;
    }

    .paper-header h1 {
        margin-top: 18px;
        font-size: clamp(2.8rem, 12vw, 4.8rem);
        line-height: 0.92;
    }

    .paper-header p {
        font-size: clamp(1.1rem, 7vw, 1.55rem);
        line-height: 1.12;
        max-width: 300px;
        margin-inline: auto;
    }

    .paper-rule {
        width: 92%;
        gap: 12px;
        margin: 20px auto 18px;
    }

    .blog-grid {
        gap: 20px;
        padding: 24px 0;
    }

    .editorial-note,
    .articles-column,
    .topic-panel {
        padding: 18px 16px 20px;
    }

    .section-title {
        display: block;
    }

    .section-title h2 {
        margin-top: 8px;
        font-size: 2.2rem;
    }

    .article-card {
        grid-template-columns: 1fr;
    }

    .article-thumb {
        min-height: 128px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .blog-meta-row,
    .article-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .social-footer {
        gap: 20px;
        flex-wrap: wrap;
    }
}

@media (max-width: 390px) {
    .blog-page {
        width: calc(100% - 18px);
        padding-top: 72px;
    }

    .paper-header {
        padding-top: 44px;
    }

    .paper-kicker {
        max-width: 230px;
        font-size: 0.62rem;
    }

    .paper-header h1 {
        font-size: clamp(2.35rem, 14vw, 3.25rem);
    }

    .paper-header p {
        font-size: 1.08rem;
    }

    .paper-rule {
        margin: 14px auto 12px;
    }
}
