/*
Theme Name: dds_romaingerardin.com
Author: Анна Лебедева
Description: Информационная тема о карьерном переходе, портфолио, резюме и самопрезентации. Тёплая «бумажная» эстетика с типографскими акцентами.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: rgardin
*/

/* ==========================================================================
   Переменные
   ========================================================================== */
:root {
    --bg-paper:   #FBF7F0;
    --bg-linen:   #F0EBE0;
    --bg-footer:  #2C2A28;
    --bg-side:    #FFFFFF;
    --ink:        #1A1817;
    --terra:      #B45F3B;
    --ochre:      #D4A373;
    --muted:      #8A8178;
    --line-soft:  #E6DFD6;
    --card-line:  #E8E0D5;
    --card-shadow:#D1C9BE;
    --graphite:   #2C2A28;

    --font-head: "Arial Black", "Helvetica Neue", Impact, system-ui, sans-serif;
    --font-body: "Helvetica Neue", Arial, "Segoe UI", system-ui, sans-serif;
    --font-type: "Courier New", "Consolas", monospace;
}

/* ==========================================================================
   Сброс / база
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background-color: var(--bg-paper);
    /* Вертикальные линии в линию (как блокнот), очень бледные, шаг 100px */
    background-image: repeating-linear-gradient(
        to right,
        transparent 0,
        transparent 99px,
        var(--line-soft) 99px,
        var(--line-soft) 100px
    );
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.75;
    font-weight: 300;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Декоративный SVG — рука с карандашом, левый нижний угол, 15% прозрачности */
body::after {
    content: "";
    position: fixed;
    left: 0;
    bottom: 0;
    width: 240px;
    height: 240px;
    pointer-events: none;
    z-index: 0;
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%23D4A373' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' opacity='0.15'%3E%3Cpath d='M40 150 q10 -25 35 -40 q20 -12 45 -14'/%3E%3Cpath d='M118 96 l52 -52 l14 14 l-52 52 z'/%3E%3Cpath d='M118 96 l-8 26 l26 -8'/%3E%3Cpath d='M60 132 q6 8 16 10 q12 3 24 -2'/%3E%3Cpath d='M52 140 q-4 10 2 18'/%3E%3C/g%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; }

a { color: var(--terra); }

/* Текстовые ссылки в контенте — пунктирное подчёркивание охрой */
.entry-content a,
.widget-text a,
.breadcrumbs a {
    color: var(--terra);
    text-decoration: underline;
    text-decoration-style: dashed;
    text-decoration-color: var(--ochre);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: transform .15s ease;
    display: inline-block;
}
.entry-content a:hover,
.widget-text a:hover,
.breadcrumbs a:hover {
    text-decoration-style: solid;
    transform: skewX(-6deg);
}

p { margin: 0 0 1.1em; }

h1, h2, h3, h4 {
    font-family: var(--font-head);
    color: var(--ink);
    line-height: 1.12;
    letter-spacing: .01em;
    margin: 0 0 .6em;
}

/* ==========================================================================
   Контейнер ширины — единый источник (A12.7)
   ========================================================================== */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
    position: relative;
    z-index: 1;
}
.shell-wide {
    width: 85%;
    max-width: 1320px;
    margin-inline: auto;
    position: relative;
    z-index: 1;
}
@media (max-width: 600px) {
    .shell-wide { width: 90%; }
}

/* ==========================================================================
   Кнопки — прямоугольные, скошен только правый нижний угол
   ========================================================================== */
.btn,
.entry-content .btn,
.wp-block-button__link {
    display: inline-block;
    font-family: var(--font-type);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-size: .9rem;
    color: var(--bg-paper);
    background-color: var(--terra);
    /* мелкий шум поверх заливки */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='60' height='60' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
    border: 2px solid transparent;
    border-radius: 0;
    /* скос только правого нижнего угла */
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
    padding: .7em 1.5em;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover,
.wp-block-button__link:hover {
    transform: translate(2px, 2px);
    border-color: var(--ochre);
    color: #fff;
}

/* Зачёркивание клише — двойная линия, терракота */
.strike {
    text-decoration: line-through;
    text-decoration-style: double;
    text-decoration-color: var(--terra);
    text-decoration-thickness: 2px;
    color: var(--terra);
}

/* ==========================================================================
   Заголовки секций — линия · точка · линия, смещение влево
   ========================================================================== */
.section-heading {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin: 0 0 1.8rem;
    padding-left: 8%;
}
.section-heading::before {
    content: "";
    width: 42px;
    height: 2px;
    background: var(--muted);
    flex: 0 0 auto;
}
.section-heading::after {
    content: "";
    flex: 1 1 auto;
    height: 2px;
    background: var(--muted);
    min-width: 0;
}
.section-heading h2 {
    margin: 0;
    font-size: 2rem;
    white-space: nowrap;
    position: relative;
    padding-right: .9rem;
}
/* жирная точка-акцент между текстом и правой линией */
.section-heading h2::after {
    content: "";
    position: absolute;
    right: -.55rem;
    top: 50%;
    transform: translateY(-50%);
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--terra);
}

/* ==========================================================================
   Секции: чередование фонов + разделитель графитом, точка-маркер слева
   ========================================================================== */
.front-section {
    padding: 3.5rem 0;
    position: relative;
    border-bottom: 2px solid var(--graphite);
}
.front-section:last-of-type { border-bottom: 0; }
.front-section.alt { background: var(--bg-linen); }

/* одиночная жирная точка-маркер по левому краю, выступает за контейнер */
.front-section::before {
    content: "";
    position: absolute;
    left: max(1.5%, calc(50% - 610px));
    top: 3.5rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--terra);
    z-index: 2;
}

/* ==========================================================================
   Блок 1 — Hero
   ========================================================================== */
.hero {
    padding: 4.5rem 0 3.8rem;
    border-bottom: 2px solid var(--graphite);
    position: relative;
    overflow: hidden;
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 3rem;
    align-items: center;
}
.hero-name {
    font-family: var(--font-type);
    font-weight: 700;
    color: var(--terra);
    letter-spacing: .18em;
    text-transform: uppercase;
    font-size: .95rem;
    margin: 0 0 1rem;
    transform: rotate(-1.5deg);
    display: inline-block;
}
.hero-title {
    font-size: 3.5rem;
    line-height: 1.02;
    margin: 0 0 1.2rem;
    font-weight: 900;
}
.hero-sub {
    font-size: 1.15rem;
    color: var(--ink);
    max-width: 34ch;
    margin: 0 0 1.8rem;
}
.hero-art {
    position: relative;
    min-width: 0;
}
.hero-art svg { width: 100%; height: auto; display: block; }
/* декоративная скошенная цветная линия-разделитель внизу hero */
.hero-divider {
    height: 8px;
    margin-top: 3.2rem;
    background: linear-gradient(90deg, var(--terra) 0 55%, var(--ochre) 55% 100%);
    clip-path: polygon(0 0, 100% 0, 98% 100%, 2% 100%);
}

/* ==========================================================================
   Блок 2 — Статистика «Честные цифры», ярлыки с рваным краем
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.4rem;
}
.stat-card {
    background: var(--bg-paper);
    border: 1px solid var(--card-line);
    padding: 1.6rem 1.4rem;
    text-align: center;
    box-shadow: 0 10px 20px -12px var(--card-shadow);
    /* рваный нижний край (словно вырвано из блокнота) */
    clip-path: polygon(0 0,100% 0,100% 88%,92% 96%,84% 89%,76% 97%,68% 90%,60% 97%,52% 89%,44% 96%,36% 90%,28% 97%,20% 89%,12% 96%,4% 90%,0 96%);
    min-width: 0;
}
.stat-num {
    font-family: var(--font-head);
    font-size: 2.9rem;
    font-weight: 900;
    color: var(--terra);
    line-height: 1;
    margin: 0 0 .4rem;
}
.stat-num .dot { color: var(--ochre); }
.stat-label {
    font-size: .95rem;
    color: var(--muted);
    margin: 0;
}

/* ==========================================================================
   Блок 3 — Таймлайн «Путь к офферу», вертикальная линия по центру
   ========================================================================== */
.timeline {
    position: relative;
    margin: 1rem 0 0;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 0;
    transform: translateX(-50%);
    /* пунктирная серая полоса */
    border-left: 3px dashed var(--muted);
}
.tl-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
    align-items: center;
    gap: 0;
    margin-bottom: 1.6rem;
}
.tl-side {
    background: var(--bg-side);
    border: 1px solid var(--card-line);
    padding: 1.1rem 1.3rem;
    box-shadow: 0 8px 16px -12px var(--card-shadow);
    min-width: 0;
}
.tl-side h4 { margin: 0 0 .3rem; font-size: 1.05rem; }
.tl-side p { margin: 0; font-size: .95rem; color: var(--muted); }
.tl-left  { text-align: right; }
.tl-right { text-align: left; }
/* маленький терракотовый прямоугольник-стикер вместо точки */
.tl-mark {
    justify-self: center;
    width: 20px;
    height: 20px;
    background: var(--terra);
    transform: rotate(45deg);
    box-shadow: 0 0 0 4px var(--bg-paper);
    z-index: 2;
}
/* для чередующихся строк прячем пустую сторону */
.tl-row.rev .tl-left  { visibility: hidden; }
.tl-row .tl-right.empty,
.tl-row .tl-left.empty { visibility: hidden; }

/* ==========================================================================
   Блок 4 — Рубрикатор «клейкие» плашки
   ========================================================================== */
.rubric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.4rem;
}
.rubric {
    display: block;
    text-decoration: none;
    color: #fff;
    padding: 1.8rem 1.5rem;
    min-height: 170px;
    position: relative;
    border-radius: 0;
    transition: clip-path .2s ease, transform .2s ease;
    /* слегка «клейкая» плашка со скосом правого нижнего угла */
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
    min-width: 0;
}
.rubric:nth-child(odd)  { background: var(--terra); }
.rubric:nth-child(even) { background: var(--ochre); }
.rubric:hover {
    transform: translateY(-3px);
    /* «сминание» краёв */
    clip-path: polygon(2% 3%, 97% 0, 100% 94%, 94% 100%, 3% 97%, 0 6%);
}
.rubric-ico { width: 46px; height: 46px; margin-bottom: .9rem; display: block; }
.rubric h3 { color: #fff; margin: 0 0 .3rem; font-size: 1.25rem; }
.rubric p { margin: 0; font-size: .9rem; opacity: .92; color: #fff; }

/* ==========================================================================
   Карточки записей
   ========================================================================== */
.card {
    display: flex;
    flex-direction: column;
    background: var(--bg-side);
    border: 1px solid var(--card-line);
    border-radius: 0;
    box-shadow: 0 16px 28px -14px var(--card-shadow);
    position: relative;
    transition: box-shadow .2s ease, transform .2s ease;
    overflow: visible;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 34px -14px var(--card-shadow);
}
/* декоративный скотч в левом верхнем углу при наведении */
.card::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 18px;
    width: 66px;
    height: 22px;
    background: var(--ochre);
    opacity: 0;
    transform: rotate(-6deg);
    border-radius: 40%;
    transition: opacity .2s ease;
    z-index: 3;
}
.card:hover::before { opacity: .55; }

/* миниатюра сверху, центрирована с отступами (эффект визитки) */
.card-thumb {
    margin: 1.1rem 1.1rem 0;
    overflow: hidden;
    background: var(--bg-linen);
}
.card-thumb img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}
.card-body {
    flex: 1;
    padding: 1.2rem 1.3rem 1.4rem;
    min-width: 0;
}
.card-title { font-size: 1.2rem; margin: 0 0 .5rem; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--terra); }
.card-meta {
    font-family: var(--font-type);
    font-size: .78rem;
    color: var(--muted);
    margin: 0 0 .7rem;
    letter-spacing: .03em;
}
.card-excerpt { color: var(--ink); font-size: .95rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    display: inline-block;
    margin-top: .4rem;
    font-family: var(--font-type);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--terra);
    text-decoration: none;
    border-bottom: 2px dashed var(--ochre);
}
.card-more:hover { border-bottom-style: solid; }

/* сетка карточек */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}

/* ==========================================================================
   Раскладки с сайдбаром / без
   ========================================================================== */
.site-main { padding: 2.6rem 0 3.4rem; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 3%;
    align-items: start;
}
.layout-single .content-area { min-width: 0; }
.content-area { min-width: 0; }

/* список записей в одну колонку (архив/поиск/блог с сайдбаром) */
.post-list .card { margin-bottom: 1.6rem; }

/* ==========================================================================
   Сайдбар
   ========================================================================== */
.sidebar {
    background: var(--bg-side);
    border: 1px solid var(--card-line);
    padding: 1.5rem 1.4rem;
    min-width: 0;
    /* лёгкая «зернистость» */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='80' height='80' filter='url(%23g)' opacity='0.04'/%3E%3C/svg%3E");
}
.sidebar .widget { margin-bottom: 1.8rem; color: var(--ink); }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    font-size: 1.1rem;
    color: var(--ink);
    margin: 0 0 .9rem;
    padding-bottom: .4rem;
    border-bottom: 2px solid var(--terra);
    display: inline-block;
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li {
    padding: .35rem 0;
    border-bottom: 1px dotted var(--line-soft);
    color: var(--ink);
}
.sidebar a { color: var(--ink); text-decoration: none; }
.sidebar a:hover { color: var(--terra); }
.sidebar .post-date { color: var(--muted); font-size: .82rem; }

/* ==========================================================================
   Хлебные крошки
   ========================================================================== */
.breadcrumbs {
    font-family: var(--font-type);
    font-size: .82rem;
    color: var(--muted);
    padding: 1.2rem 0 .2rem;
    letter-spacing: .02em;
}
.breadcrumbs a { color: var(--terra); }
.breadcrumbs .sep { margin: 0 .35rem; color: var(--muted); }

/* ==========================================================================
   Пагинация (type => plain, стили на .page-numbers)
   ========================================================================== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 2.4rem;
    justify-content: center;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 .7rem;
    background: var(--bg-side);
    border: 1px solid var(--card-line);
    color: var(--ink);
    text-decoration: none;
    font-family: var(--font-type);
    font-size: .9rem;
    transition: background .15s ease, color .15s ease;
}
.pagination a.page-numbers:hover { background: var(--ochre); color: #fff; }
.pagination .page-numbers.current {
    background: var(--terra);
    color: #fff;
    border-color: var(--terra);
}
.pagination .page-numbers.dots {
    border: 0;
    background: transparent;
}

/* ==========================================================================
   Контент записи / страницы
   ========================================================================== */
.entry-header { margin-bottom: 1.4rem; }
.entry-title { font-size: 2.4rem; margin: 0 0 .4rem; }
.entry-meta {
    font-family: var(--font-type);
    font-size: .82rem;
    color: var(--muted);
}
.entry-content { font-size: 1.05rem; }
.entry-content h2 { font-size: 1.8rem; margin-top: 1.8rem; }
.entry-content h3 { font-size: 1.35rem; margin-top: 1.5rem; }
.entry-content img { display: block; }
.entry-thumb { margin: 0 0 1.6rem; }
.entry-thumb img { width: 100%; max-height: 440px; object-fit: cover; display: block; }

/* Цитаты — диагональная штриховка «под копирку» */
.entry-content blockquote {
    margin: 1.6rem 0;
    padding: 1.4rem 1.6rem;
    color: var(--ink);
    border-left: 4px solid var(--terra);
    background-color: var(--bg-linen);
    background-image: repeating-linear-gradient(
        45deg,
        rgba(180,95,59,.06) 0,
        rgba(180,95,59,.06) 2px,
        transparent 2px,
        transparent 9px
    );
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

/* Акцентная плашка (глубокая терракота + крапинки, светлый текст) */
.callout {
    color: var(--bg-paper);
    background-color: var(--terra);
    background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px);
    background-size: 12px 12px;
    padding: 1.8rem 2rem;
    margin: 1.6rem 0;
    position: relative;
}
.callout p:last-child { margin-bottom: 0; }
.callout a { color: var(--bg-paper); }

/* Таблицы */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4rem 0;
}
.entry-content th,
.entry-content td {
    border: 1px solid var(--muted);
    padding: .6rem .8rem;
    text-align: left;
}
.entry-content th { background: var(--bg-linen); }

/* ==========================================================================
   Шапка
   ========================================================================== */
.site-header {
    background: rgba(251,247,240,.85);
    backdrop-filter: blur(4px);
    border-bottom: 2px solid var(--graphite);
    position: relative;
    z-index: 5;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.1rem 0;
    flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.brand-logo { display: block; max-height: 56px; width: auto; }
.brand-text { min-width: 0; }
.site-title {
    font-family: var(--font-head);
    font-size: 1.15rem;
    line-height: 1.1;
    margin: 0;
}
.site-title a { color: var(--ink); text-decoration: none; }
.site-desc {
    font-size: .82rem;
    color: var(--muted);
    margin: .2rem 0 0;
    max-width: 46ch;
}

/* Меню (не липкое) */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.4rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.main-nav a {
    color: var(--ink);
    text-decoration: none;
    font-family: var(--font-type);
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding-bottom: 3px;
    border-bottom: 2px dashed transparent;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    border-bottom-color: var(--terra);
    color: var(--terra);
}
.nav-toggle {
    display: none;
    background: none;
    border: 2px solid var(--ink);
    border-radius: 0;
    padding: .4rem .7rem;
    font-family: var(--font-type);
    cursor: pointer;
    color: var(--ink);
}

/* ==========================================================================
   Подвал
   ========================================================================== */
.site-footer {
    background: var(--bg-footer);
    color: #E7E1D8;
    padding: 3rem 0 1.6rem;
    position: relative;
    z-index: 1;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.2rem;
}
.footer-cols .widget { color: #E7E1D8; min-width: 0; }
.footer-cols .widget-title {
    color: #fff;
    font-size: 1.05rem;
    margin: 0 0 .9rem;
    padding-bottom: .4rem;
    border-bottom: 2px solid var(--ochre);
    display: inline-block;
}
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { padding: .3rem 0; }
.footer-cols a { color: var(--ochre); text-decoration: none; }
.footer-cols a:hover { color: #fff; text-decoration: underline; }
.footer-cols p { color: #C9C1B6; }
.site-copyright {
    margin-top: 2.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid #45413D;
    font-family: var(--font-type);
    font-size: .82rem;
    color: #9A928A;
    text-align: center;
}

/* ==========================================================================
   Cookie-баннер (A11 правило — до основного блока)
   ========================================================================== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background: var(--graphite);
    color: #EDE7DD;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    border-top: 2px solid var(--ochre);
}
.cookie-banner p { margin: 0; font-size: .9rem; max-width: 70ch; }
.cookie-banner .btn { flex: 0 0 auto; }

/* ==========================================================================
   Форма поиска
   ========================================================================== */
.search-form {
    display: flex;
    gap: .6rem;
    max-width: 480px;
    min-width: 0;
}
.search-form input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    padding: .6rem .8rem;
    border: 1px solid var(--muted);
    border-radius: 0;
    background: #fff;
    font-family: var(--font-body);
    font-size: .95rem;
}
.search-form button {
    flex: 0 0 auto;
    border: 0;
    background: var(--terra);
    color: #fff;
    padding: .6rem 1.1rem;
    border-radius: 0;
    font-family: var(--font-type);
    cursor: pointer;
}

/* ==========================================================================
   Комментарии
   ========================================================================== */
.comments-area { margin-top: 2.6rem; }
.comments-area .comment-list { list-style: none; margin: 0; padding: 0; }
.comments-area .comment-list ul { list-style: none; padding-left: 1.4rem; }
.comments-area li.comment { margin-bottom: 1.2rem; }
.comments-area .comment-body {
    background: var(--bg-side);
    border: 1px solid var(--card-line);
    padding: 1rem 1.2rem;
    min-width: 0;
}
.comment-author { font-weight: 700; }
.comment-metadata { font-size: .78rem; color: var(--muted); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .6rem .8rem;
    border: 1px solid var(--muted);
    border-radius: 0;
    background: #fff;
    font-family: var(--font-body);
    margin-top: .3rem;
}
.comment-form p { margin-bottom: .9rem; }

/* ==========================================================================
   404
   ========================================================================== */
.error-404 { text-align: center; padding: 3rem 0; }
.error-404 .code {
    font-family: var(--font-head);
    font-size: 6rem;
    color: var(--terra);
    line-height: 1;
    margin: 0;
}

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 960px) {
    .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .hero-title { font-size: 2.8rem; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rubric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); }
    .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sidebar { margin-top: 2rem; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .nav-toggle { display: inline-block; }
    .main-nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: .6rem;
        margin-top: .8rem;
    }
    .main-nav.open ul { display: flex; }
    .header-inner { flex-wrap: wrap; }
    .hero-title { font-size: 2.2rem; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
    .rubric-grid { grid-template-columns: minmax(0, 1fr); }
    .posts-grid { grid-template-columns: minmax(0, 1fr); }
    .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
    .section-heading { padding-left: 0; }
    .section-heading h2 { font-size: 1.5rem; white-space: normal; }
    .front-section::before { left: 1.5%; }

    /* Таймлайн в одну колонку слева */
    .timeline::before { left: 10px; }
    .tl-row { grid-template-columns: 30px minmax(0, 1fr); }
    .tl-row .tl-left {
        grid-column: 2;
        grid-row: 1;
        text-align: left;
    }
    .tl-mark { grid-column: 1; grid-row: 1; justify-self: start; }
    .tl-row .tl-right { grid-column: 2; }
    .tl-row.rev .tl-left { visibility: visible; }
    .card-thumb img { height: 190px; }
    .callout { padding: 1.4rem 1.4rem; }
    .entry-content blockquote { padding: 1.1rem 1.2rem; }
}
