/*
Theme Name: dds_kiaorabro.com
Author: Никита Орлов
Description: Тема для информационного сайта о графическом дизайне и портфолио. Японский минимализм, холодная бумажная база и медный акцент.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: kiaogd
*/

:root {
    --paper: #F3F5F7;
    --paper-alt: #FFFFFF;
    --ink: #2A2E34;
    --copper: #C87A4F;
    --copper-soft: #DFB19A;
    --muted: #88929E;
    --rule: #D3D9E0;
    --night: #1A1D21;
    --font-head: "Futura", "Century Gothic", "Trebuchet MS", "Segoe UI", sans-serif;
    --font-body: "Source Serif Pro", "Literata", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    overflow-x: hidden;
    background-color: var(--paper);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 640'%3E%3Ctext x='0' y='560' font-family='Georgia,serif' font-size='720' fill='%232A2E34' fill-opacity='0.03'%3EA%3C/text%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left bottom;
    background-attachment: fixed;
    background-size: auto 100vh;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.75;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: 0.01em;
    color: var(--ink);
    margin: 0 0 0.7em;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.05em; }

a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: var(--copper);
    text-underline-offset: 4px;
}

a:hover, a:focus { text-decoration-style: solid; }

.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

.home .shell { width: min(85%, 1240px); }

/* Кнопки */

.btn {
    display: inline-block;
    padding: 0.72em 1.6em;
    border: 2px solid var(--copper);
    border-radius: 4px;
    background: transparent;
    color: var(--copper);
    font-family: var(--font-head);
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-decoration: none;
    cursor: pointer;
    transition: none;
}

.btn:hover, .btn:focus {
    background: var(--copper);
    color: #FFFFFF;
    text-decoration: none;
}

.btn-small { padding: 0.5em 1.1em; font-size: 0.86rem; }

/* Шапка */

.topbar {
    background: var(--paper-alt);
    border-bottom: 1px solid var(--rule);
    position: static;
}

.topbar-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.4rem;
    padding: 1.5rem 0;
}

.brand { display: flex; align-items: center; gap: 0.95rem; min-width: 0; flex: 1 1 320px; }
.brand-link { display: block; line-height: 0; text-decoration: none; }
.brand-logo { display: block; max-height: 60px; width: auto; }
.brand-mark { display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }

.brand-name {
    font-family: var(--font-head);
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.02em;
}

.brand-desc {
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--muted);
    margin-top: 0.25rem;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5em 0.9em;
    border: 2px solid var(--copper);
    border-radius: 4px;
    background: transparent;
    color: var(--copper);
    font-family: var(--font-head);
    cursor: pointer;
}

.nav-toggle-bar { display: block; width: 18px; height: 2px; background: var(--copper); }
.nav-toggle-label { font-size: 0.9rem; }

.site-nav { flex: 0 1 auto; }

.nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-list a {
    font-family: var(--font-head);
    font-size: 0.95rem;
    text-decoration: none;
    border-bottom: 1px dotted transparent;
    padding-bottom: 2px;
}

.nav-list a:hover, .nav-list .current-menu-item > a {
    border-bottom-color: var(--copper);
    color: var(--copper);
}

.nav-list .sub-menu {
    display: block;
    margin: 0.4rem 0 0;
    padding: 0 0 0 0.8rem;
    list-style: none;
    border-left: 1px solid var(--rule);
}

/* Общая раскладка */

.site-main { display: block; }

.page-wrap { padding: 2.6rem 0 4.5rem; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 6%;
    align-items: start;
}

.layout-single { display: block; }

.layout-single .content-area {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
    min-width: 0;
}

.content-area { min-width: 0; }

.page-title {
    font-size: 2.4rem;
    margin-bottom: 0.6em;
}

.crumbs {
    font-family: var(--font-head);
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 2rem;
}

.crumbs a { text-decoration: none; color: var(--muted); border-bottom: 1px dotted var(--copper-soft); }
.crumbs a:hover { color: var(--copper); border-bottom-color: var(--copper); }
.crumbs-sep { color: var(--copper-soft); margin: 0 0.35rem; }

.archive-note { color: var(--muted); margin-bottom: 1.8rem; }
.empty-note { color: var(--muted); }

/* Секции главной */

.fs { padding: 80px 0 40px; }
.fs-hero { background: var(--paper-alt); padding: 70px 0 60px; }
.fs-line { background: transparent; }
.fs-posts { background: var(--paper-alt); }
.fs-zig { background: var(--paper); }
.fs-gloss { background: linear-gradient(160deg, #F3F5F7 0%, #F9F6F4 100%); padding-bottom: 80px; }

.sec-title {
    position: relative;
    font-size: 1.85rem;
    padding-left: 30px;
    margin-bottom: 0.5em;
}

.sec-title .mark, .hero-title .mark {
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 10px;
    height: 10px;
    background: var(--copper);
}

.sec-lead {
    max-width: 62ch;
    color: var(--muted);
    margin-bottom: 2.2rem;
}

/* Hero */

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 4rem;
    align-items: center;
}

.hero-text { min-width: 0; }

.hero-title {
    position: relative;
    font-size: 3.5rem;
    line-height: 1.12;
    padding-left: 34px;
    margin-bottom: 0.55em;
}

.hero-title .mark { top: 0.5em; }

.hero-lead { font-size: 1.16rem; max-width: 52ch; }
.hero-note { color: var(--muted); max-width: 54ch; margin-bottom: 1.9rem; }
.hero-art { min-width: 0; }
.hero-art svg { display: block; width: 100%; height: auto; }

/* Таймлайн */

.tline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 2.6rem;
    position: relative;
}

.tline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--copper-soft);
}

.tline-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 0 0 2.6rem;
    min-width: 0;
}

.tline-item:last-child { padding-bottom: 0; }

.tline-dot {
    position: absolute;
    left: -2.6rem;
    top: 0.55rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--copper);
}

.tline-num {
    flex: 0 0 auto;
    font-family: var(--font-head);
    font-size: 2.4rem;
    line-height: 1;
    color: var(--copper-soft);
    letter-spacing: 0.05em;
}

.tline-body { min-width: 0; }

.tline-year {
    display: block;
    font-family: var(--font-head);
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.tline-head { font-size: 1.2rem; margin-bottom: 0.45em; }
.tline-body p { margin: 0; max-width: 68ch; }

/* Карточки записей */

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.7rem;
}

.cards-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

.card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--rule);
    border-radius: 0;
    background: var(--paper-alt);
    overflow: hidden;
    min-width: 0;
}

.card:hover { border-color: var(--copper); }

.card-thumb { position: relative; overflow: hidden; }

.card-thumb a { display: block; }

.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    filter: grayscale(1);
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.4rem 1.5rem 1.5rem;
    min-width: 0;
}

.card-date {
    font-family: var(--font-head);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.6rem;
}

.card-title { font-size: 1.18rem; margin-bottom: 0.6em; }
.card-title a { text-decoration: none; }
.card-title a:hover { color: var(--copper); }

.card-excerpt { flex: 1; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more { margin: 1.1rem 0 0; }

/* Горизонтальные карточки в лентах */

.cards-list .card {
    flex-direction: row;
    align-items: stretch;
}

.cards-list .card-thumb {
    flex: 0 0 220px;
    position: relative;
    overflow: hidden;
}

.cards-list .card-thumb a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}

.cards-list .card-thumb img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    display: block;
}

.posts-more { margin: 2.2rem 0 0; }

/* Zigzag */

.zig-row {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 3.2rem;
    align-items: center;
    margin-bottom: 3.4rem;
}

.zig-row:last-child { margin-bottom: 0; }
.zig-row-rev .zig-pic { order: 2; }
.zig-row-rev .zig-text { order: 1; }
.zig-pic, .zig-text { min-width: 0; }

.polaroid {
    margin: 0;
    background: var(--paper-alt);
    border: 1px solid var(--rule);
    padding: 10px 10px 0;
}

.polaroid img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    filter: grayscale(1);
}

.polaroid figcaption {
    font-family: var(--font-head);
    font-size: 0.85rem;
    color: var(--muted);
    padding: 0.9rem 0.2rem 1rem;
}

.zig-text h3 { font-size: 1.45rem; }
.zig-text p { max-width: 60ch; }

/* Глоссарий */

.gloss { margin: 0; }

.gloss-row {
    display: grid;
    grid-template-columns: minmax(0, 0.32fr) minmax(0, 0.68fr);
    gap: 1.8rem;
    padding: 1.4rem 0;
    align-items: start;
}

.gloss-row + .gloss-row { border-top: 1px solid var(--rule); }

.gloss dt {
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 700;
    min-width: 0;
}

.gloss dd {
    margin: 0;
    min-width: 0;
    border-left: 6px solid var(--copper);
    padding: 0.1rem 0 0.1rem 20px;
}

/* Запись и страница */

.single-meta {
    font-family: var(--font-head);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.6rem;
}

.single-thumb { margin-bottom: 2rem; }
.single-thumb img { display: block; width: 100%; height: auto; }

.entry h2 { margin-top: 1.9em; }
.entry h3 { margin-top: 1.6em; }
.entry img { display: block; height: auto; }

.entry ul, .entry ol { padding-left: 1.3rem; }
.entry li { margin-bottom: 0.5em; }

.entry blockquote {
    margin: 1.8rem 0;
    border-left: 6px solid var(--copper);
    background: var(--paper-alt);
    padding: 1.3rem 1.6rem 1.3rem 20px;
}

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

.entry table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6rem 0;
    border: 1px solid var(--rule);
}

.entry th, .entry td {
    border: 1px solid var(--rule);
    padding: 0.7rem 0.9rem;
    text-align: left;
}

.entry th { background: var(--paper); font-family: var(--font-head); }

.entry code {
    background: #E9EDF1;
    padding: 0.1em 0.35em;
    font-size: 0.92em;
}

.entry pre {
    background: #E9EDF1;
    padding: 1.1rem 1.2rem;
    overflow-x: auto;
}

/* Сайдбар и виджеты */

.sidebar { min-width: 0; }

.sidebar .widget {
    background: var(--paper-alt);
    border: 1px solid var(--rule);
    padding: 1.5rem 1.6rem;
    margin-bottom: 1.6rem;
    color: var(--ink);
}

.sidebar .widget-title {
    position: relative;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    padding-left: 22px;
    margin-bottom: 1rem;
    color: var(--ink);
}

.sidebar .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 10px;
    height: 10px;
    background: var(--copper);
}

.sidebar .widget ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar .widget li {
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--rule);
}

.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--ink); }
.sidebar .widget a:hover { color: var(--copper); }
.sidebar .widget .post-date { display: block; color: var(--muted); font-size: 0.82rem; }

/* Пагинация */

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2.6rem;
}

.pager .page-numbers {
    display: inline-block;
    min-width: 44px;
    text-align: center;
    padding: 0.5em 0.85em;
    border: 2px solid var(--copper);
    border-radius: 4px;
    font-family: var(--font-head);
    font-size: 0.92rem;
    color: var(--copper);
    text-decoration: none;
}

.pager a.page-numbers:hover { background: var(--copper); color: #FFFFFF; }

.pager .page-numbers.current {
    background: var(--copper);
    color: #FFFFFF;
}

.pager .page-numbers.dots {
    border-color: transparent;
    color: var(--muted);
}

.comments .pagination, .comments .nav-links { margin-top: 1.6rem; }

/* Комментарии */

.comments { margin-top: 3.2rem; border-top: 1px solid var(--rule); padding-top: 2.2rem; }
.comments-title { font-size: 1.4rem; }
.comment-list, .comment-list .children { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list .children { margin-top: 1.2rem; padding-left: 1.6rem; border-left: 1px solid var(--rule); }

.comment-item {
    border: 1px solid var(--rule);
    background: var(--paper-alt);
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.2rem;
}

.comment-head { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: baseline; margin-bottom: 0.6rem; }
.comment-author { font-family: var(--font-head); font-weight: 600; }
.comment-date { font-size: 0.82rem; color: var(--muted); }
.comment-wait { color: var(--muted); font-size: 0.9rem; }
.comment-reply a { font-family: var(--font-head); font-size: 0.88rem; }

.comment-respond { margin-top: 1.6rem; }
.comment-form label { display: block; font-family: var(--font-head); font-size: 0.9rem; margin-bottom: 0.35rem; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--rule);
    border-radius: 4px;
    background: var(--paper-alt);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
}

.comment-form .submit {
    display: inline-block;
    padding: 0.72em 1.6em;
    border: 2px solid var(--copper);
    border-radius: 4px;
    background: transparent;
    color: var(--copper);
    font-family: var(--font-head);
    cursor: pointer;
}

.comment-form .submit:hover { background: var(--copper); color: #FFFFFF; }

/* Поиск */

.searchform { margin: 1.6rem 0; }
.searchform-label { display: block; }
.searchform-caption { display: block; font-family: var(--font-head); font-size: 0.9rem; margin-bottom: 0.4rem; }
.searchform-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.searchform-input {
    flex: 1 1 200px;
    min-width: 0;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--rule);
    border-radius: 4px;
    background: var(--paper-alt);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
}

.lead-404 { max-width: 60ch; }
.back-home { margin-top: 1.6rem; }

/* Подвал */

.site-foot {
    background: var(--night);
    color: #E4E8EC;
    padding: 3.4rem 0 2rem;
    margin-top: 3rem;
}

.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
}

.foot-col { min-width: 0; }
.site-foot .widget { margin-bottom: 1.6rem; color: #E4E8EC; }

.site-foot .widget-title {
    position: relative;
    font-size: 1rem;
    letter-spacing: 0.06em;
    padding-left: 22px;
    color: #FFFFFF;
    margin-bottom: 0.9rem;
}

.site-foot .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 10px;
    height: 10px;
    background: var(--copper-soft);
}

.site-foot p { color: #E4E8EC; }

.site-foot .widget ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-foot .widget li { padding: 0.35rem 0; }

.site-foot a {
    color: #EDF1F4;
    text-decoration-color: var(--copper-soft);
}

.site-foot a:hover { color: var(--copper-soft); }

.foot-copy {
    margin: 2.4rem 0 0;
    padding-top: 1.4rem;
    border-top: 1px solid #2E3339;
    font-size: 0.87rem;
    color: #9AA4AE;
}

/* Cookie-баннер */

.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.1rem 1.6rem;
    background: var(--night);
    border-top: 2px solid var(--copper);
    color: #E4E8EC;
}

.cookie-text { margin: 0; font-size: 0.92rem; max-width: 78ch; min-width: 0; }
.cookie-accept { flex: 0 0 auto; }

/* Адаптив */

@media (max-width: 960px) {
    body { font-size: 16px; }
    .home .shell { width: min(92%, 1240px); }
    .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; }
    .hero-title { font-size: 2.6rem; }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 2.6rem; }
    .layout-single .content-area { width: 100%; }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .zig-row { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
    .zig-row-rev .zig-pic, .zig-row-rev .zig-text { order: 0; }
    .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .topbar-inner { padding: 1.1rem 0; gap: 1rem; }
    .nav-toggle { display: inline-flex; }
    .site-nav { flex: 1 1 100%; display: none; }
    .site-nav.is-open { display: block; }
    .nav-list { flex-direction: column; gap: 0.75rem; padding-top: 0.6rem; }

    .fs { padding: 54px 0 30px; }
    .fs-hero { padding: 40px 0 44px; }
    .fs-gloss { padding-bottom: 54px; }
    .page-wrap { padding: 1.8rem 0 3rem; }

    h1 { font-size: 1.8rem; }
    .page-title { font-size: 1.85rem; }
    .hero-title { font-size: 2.1rem; padding-left: 26px; }
    .sec-title { font-size: 1.45rem; padding-left: 24px; }

    .cards { grid-template-columns: minmax(0, 1fr); }

    .cards-list .card { flex-direction: column; }
    .cards-list .card-thumb { flex: none; width: 100%; position: static; }
    .cards-list .card-thumb a { position: static; }
    .cards-list .card-thumb img { width: 100%; height: auto; aspect-ratio: 16 / 9; }

    .tline { padding-left: 2.1rem; }
    .tline-item { gap: 1rem; }
    .tline-dot { left: -2.1rem; width: 12px; height: 12px; }
    .tline-num { font-size: 1.8rem; }

    .gloss-row { grid-template-columns: minmax(0, 1fr); gap: 0.8rem; padding: 1.1rem 0; }
    .gloss dd { padding-left: 16px; }

    .foot-cols { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
    .cookie-banner { padding: 1rem 1.1rem; }
    .card-body { padding: 1.2rem 1.2rem 1.3rem; }
    .entry blockquote { padding: 1.1rem 1.1rem 1.1rem 16px; }
}
