/* ============================================================
   oid.su — editorial minimal
   Всё оформление живёт здесь. Меняй переменные ниже под себя.
   ============================================================ */

:root {
    --bg: #f4f1ea; /* кремовый фон */
    --ink: #1b1b19; /* основной текст, почти чёрный */
    --muted: #8a857c; /* мета, навигация */
    --rule: #ddd8cc; /* волосяные линии */
    --code-bg: #e6e1d4; /* плашки кода */
    --link: #1b1b19;
    --link-acc: #b5532f; /* акцент для ссылок при наведении */

    --measure: 680px; /* ширина колонки чтения */

    --serif: "PT Serif", Georgia, "Times New Roman", serif;
    --display: "Playfair Display", Georgia, serif;
    --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 20px;
    line-height: 1.65;
    font-feature-settings: "kern", "liga";
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.wrap {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 4.5rem 1.5rem 8rem;
}

/* ---------- Шапка ---------- */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--ink);
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg);
    flex: 0 0 auto;
}

.brand-name {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.site-nav {
    display: flex;
    gap: 1.4rem;
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
}

.site-nav a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.site-nav a:hover {
    color: var(--ink);
}

.rule {
    border: none;
    border-top: 1px solid var(--rule);
    margin: 1.6rem 0 0;
}

/* ---------- Мета (дата · раздел · время) ---------- */

.meta {
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin: 0 0 0.9rem;
}

/* ---------- Список постов (главная / архив) ---------- */

.post-list {
    list-style: none;
    margin: 4rem 0 0;
    padding: 0;
}

.post-item {
    margin: 0 0 3.2rem;
}

.post-item-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 2rem;
    line-height: 1.12;
    margin: 0;
    letter-spacing: -0.01em;
}

.post-item-title a {
    color: var(--ink);
    text-decoration: none;
}
.post-item-title a:hover {
    color: var(--link-acc);
}

.summary {
    margin-top: 0.7rem;
    color: #4a463f;
}

/* ---------- Пост ---------- */

.post {
    margin-top: 3.5rem;
}

.post-title {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(2.6rem, 6vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -0.015em;
    margin: 0.2rem 0 2.2rem;
}

.post-body {
    font-size: 1.05rem;
}

.post-body p {
    margin: 0 0 1.4rem;
}

/* Подзаголовки в теле — каллиграфический курсив, как на макете */
.post-body h2 {
    font-family: var(--display);
    font-style: italic;
    font-weight: 600;
    font-size: 1.9rem;
    line-height: 1.15;
    margin: 3rem 0 1.2rem;
}

.post-body h3 {
    font-family: var(--display);
    font-style: italic;
    font-weight: 600;
    font-size: 1.45rem;
    margin: 2.2rem 0 0.9rem;
}

.post-body a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--rule);
    text-underline-offset: 3px;
}
.post-body a:hover {
    text-decoration-color: var(--link-acc);
    color: var(--link-acc);
}

.post-body em {
    font-style: italic;
}
.post-body strong {
    font-weight: 700;
}

.post-body blockquote {
    margin: 1.6rem 0;
    padding-left: 1.2rem;
    border-left: 2px solid var(--rule);
    color: #4a463f;
    font-style: italic;
}

.post-body ul,
.post-body ol {
    padding-left: 1.4rem;
    margin: 0 0 1.4rem;
}
.post-body li {
    margin: 0.3rem 0;
}

/* ---------- Код ---------- */

code {
    font-family: var(--mono);
    font-size: 0.86em;
    background: var(--code-bg);
    padding: 0.12em 0.4em;
    border-radius: 4px;
}

pre {
    background: var(--code-bg);
    border-radius: 8px;
    padding: 1.1rem 1.2rem;
    overflow-x: auto;
    margin: 0 0 1.6rem;
    line-height: 1.5;
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: 0.84rem;
}

/* ---------- Мелочи ---------- */

::selection {
    background: #e3c9a0;
}

@media (max-width: 540px) {
    body {
        font-size: 18px;
    }
    .wrap {
        padding: 3rem 1.2rem 5rem;
    }
    .post-item-title {
        font-size: 1.7rem;
    }
}
