/*
Theme Name: dds_antonmoek.com
Theme URI: https://antonmoek.com/
Author: Денисов Михаил
Author URI: https://antonmoek.com/
Description: Тема для блога 3D-дизайнера. Тёмная палитра с акцентами в стиле неонового рендер-окна, скошенные кнопки, сетка карточек и поддержка боковой панели.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dds_antonmoek
*/

/* ===== Сброс и базовые переменные ===== */
:root {
    --bg-page: #121212;
    --bg-card: #181a1d;
    --bg-card-hover: #1d2024;
    --text-main: #E0E0E0;
    --text-muted: #9aa0a6;
    --text-heading: rgba(255, 255, 255, 0.92);
    --accent-cyan: #00D2FF;
    --accent-magma: #FF3B6F;
    --border-cyan: rgba(0, 210, 255, 0.2);
    --border-cyan-strong: rgba(0, 210, 255, 0.45);
    --border-soft: rgba(255, 255, 255, 0.06);
    --shadow-cyan: 0 0 24px rgba(0, 210, 255, 0.18);
    --shadow-magma: 0 0 24px rgba(255, 59, 111, 0.22);
    --content-width: 1180px;
    --skew-clip: polygon(0 0, calc(100% - 14px) 0, 100% 100%, 0 100%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg-page);
    color: var(--text-main);
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color .2s, text-shadow .2s;
}
a:hover {
    color: #6fe2ff;
    text-shadow: 0 0 6px rgba(0, 210, 255, 0.6);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
    font-family: 'Orbitron', 'Inter', system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: 0.01em;
    margin: 1.4em 0 .6em;
    line-height: 1.25;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

ul, ol { padding-left: 1.4em; }

blockquote {
    margin: 1.4em 0;
    padding: 1em 1.4em;
    color: var(--text-main);
    background: linear-gradient(90deg, rgba(0,210,255,0.05), rgba(255,59,111,0.04));
    border: 1px solid var(--border-cyan);
    position: relative;
}
blockquote::before,
blockquote::after {
    content: '';
    position: absolute;
    width: 14px; height: 14px;
    border: 1px solid var(--accent-cyan);
}
blockquote::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
blockquote::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; border-color: var(--accent-magma); }

code, pre, kbd, samp {
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: .92em;
}
code {
    background: rgba(0, 210, 255, 0.08);
    padding: .12em .4em;
    border: 1px solid var(--border-cyan);
    color: #c8eaff;
}
pre {
    background: #0d0f12;
    border: 1px solid var(--border-cyan);
    padding: 1em;
    overflow-x: auto;
    position: relative;
}
pre code { background: none; border: none; padding: 0; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    border: 1px solid var(--border-cyan);
}
th, td {
    border: 1px solid var(--border-cyan);
    padding: .6em .9em;
    text-align: left;
}
th { background: rgba(0, 210, 255, 0.08); color: var(--text-heading); }

/* Cookie banner — правило с [hidden] до основных стилей (правило A11) */
.cookie-banner[hidden] { display: none !important; }

/* ===== Layout ===== */
.site-wrap { display: flex; flex-direction: column; min-height: 100vh; }
.container {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.site-content { flex: 1; padding: 32px 0 56px; }

.layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
}
.layout-grid.has-sidebar {
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
}
@media (max-width: 960px) {
    .layout-grid.has-sidebar { grid-template-columns: minmax(0, 1fr); }
}

.content-wide { max-width: 85%; margin: 0 auto; }
@media (max-width: 960px) { .content-wide { max-width: 100%; } }

/* ===== Header ===== */
.site-header {
    position: relative;
    background: linear-gradient(180deg, #0e1014 0%, #121212 100%);
    border-bottom: 1px solid var(--border-cyan);
    overflow: hidden;
}
.site-header::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(0,210,255,0.07), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255,59,111,0.06), transparent 45%);
    pointer-events: none;
}
.header-grid {
    background-image:
        linear-gradient(rgba(0,210,255,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,210,255,0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    position: absolute; inset: 0;
    opacity: .5;
    pointer-events: none;
    animation: gridDrift 40s linear infinite;
}
@keyframes gridDrift {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 60px 60px, 60px 60px; }
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 0;
    position: relative;
    z-index: 1;
}
.brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand-logo {
    width: 56px; height: 56px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(0,210,255,0.35));
}
.brand-text { min-width: 0; }
.brand-title {
    margin: 0;
    font-family: 'Orbitron', 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-heading);
    line-height: 1.2;
}
.brand-title a { color: inherit; }
.brand-title a:hover { color: var(--accent-cyan); text-shadow: none; }
.brand-tagline {
    margin: 4px 0 0;
    font-size: .85rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.primary-nav { display: flex; align-items: center; gap: 18px; }
.primary-nav ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.primary-nav li a {
    display: inline-block;
    padding: 8px 14px;
    color: var(--text-main);
    font-weight: 500;
    border: 1px solid transparent;
    transition: all .2s;
    position: relative;
}
.primary-nav li a::after {
    content: '';
    position: absolute;
    left: 14px; right: 14px; bottom: 4px;
    height: 1px;
    background: var(--accent-cyan);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s;
}
.primary-nav li a:hover {
    color: var(--accent-cyan);
    text-shadow: 0 0 6px rgba(0,210,255,0.5);
}
.primary-nav li a:hover::after { transform: scaleX(1); }
.primary-nav li.current-menu-item > a { color: var(--accent-cyan); }
.primary-nav li.current-menu-item > a::after { transform: scaleX(1); }

.menu-toggle {
    display: none;
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-cyan);
    width: 40px; height: 40px;
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
}
.menu-toggle:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.menu-toggle svg { width: 20px; height: 20px; }

@media (max-width: 960px) {
    .menu-toggle { display: inline-flex; }
    .primary-nav ul {
        position: absolute;
        left: 0; right: 0; top: 100%;
        flex-direction: column;
        gap: 0;
        background: #0e1014;
        border-top: 1px solid var(--border-cyan);
        border-bottom: 1px solid var(--border-cyan);
        padding: 8px 0;
        display: none;
        z-index: 10;
    }
    .primary-nav ul.is-open { display: flex; }
    .primary-nav li { width: 100%; }
    .primary-nav li a {
        display: block;
        padding: 12px 24px;
        border-bottom: 1px solid var(--border-soft);
    }
    .primary-nav li a::after { display: none; }
}

/* ===== Buttons (скошенные справа) ===== */
.btn,
.search-form button,
input[type="submit"],
button[type="submit"] {
    display: inline-block;
    padding: 10px 22px 10px 18px;
    font-family: inherit;
    font-size: .95rem;
    font-weight: 600;
    color: #0a0d10;
    background: var(--accent-cyan);
    border: none;
    cursor: pointer;
    clip-path: var(--skew-clip);
    transition: transform .2s, box-shadow .2s, background .2s;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.btn:hover,
.search-form button:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-cyan);
    color: #0a0d10;
    text-shadow: none;
    background: #6fe2ff;
}
.btn--magma {
    background: var(--accent-magma);
    color: #fff;
}
.btn--magma:hover {
    background: #ff6a93;
    box-shadow: var(--shadow-magma);
    color: #fff;
}
.btn--ghost {
    background: transparent;
    color: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
    clip-path: none;
    padding: 9px 22px;
}
.btn--ghost:hover {
    background: rgba(0,210,255,0.08);
    color: var(--accent-cyan);
}

/* Inputs */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea,
select {
    background: #0e1014;
    color: var(--text-main);
    border: 1px solid var(--border-cyan);
    padding: 10px 14px;
    font-family: inherit;
    font-size: .95rem;
    width: 100%;
    transition: border-color .2s, box-shadow .2s;
}
input[type="text"]:focus,
input[type="search"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0,210,255,0.18);
}

/* ===== Search form ===== */
.search-form {
    display: flex;
    gap: 8px;
}
.search-form input[type="search"] { flex: 1; }

/* ===== Breadcrumbs ===== */
.breadcrumbs {
    margin: 0 0 24px;
    font-size: .85rem;
    color: var(--text-muted);
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent-cyan); }
.breadcrumbs .sep { margin: 0 8px; color: rgba(255,255,255,0.18); }
.breadcrumbs .current { color: var(--text-heading); }

/* ===== Card grid (карточки записей) ===== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin: 0 0 32px;
}
@media (max-width: 960px) {
    .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .posts-grid { grid-template-columns: minmax(0, 1fr); }
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-cyan);
    overflow: hidden;
    transition: transform .25s, border-color .25s, box-shadow .25s;
    position: relative;
}
.card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 28px; height: 28px;
    border-top: 1px solid var(--accent-cyan);
    border-right: 1px solid var(--accent-cyan);
    pointer-events: none;
    opacity: .6;
}
.card:hover {
    transform: translateY(-4px);
    border-color: var(--border-cyan-strong);
    box-shadow: var(--shadow-cyan);
    background: var(--bg-card-hover);
}

.card-thumb-wrap {
    position: relative;
    overflow: hidden;
    background: #0a0c0f;
}
.card-thumb-wrap a {
    display: block;
}
.card-thumb-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform .5s;
}
.card:hover .card-thumb-wrap img { transform: scale(1.06); }

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 20px;
}
.card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px;
}
.cat-tag {
    display: inline-block;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 3px 10px;
    background: linear-gradient(135deg, rgba(0,210,255,0.18), rgba(0,210,255,0.04));
    border: 1px solid var(--border-cyan);
    color: var(--accent-cyan);
}
.cat-tag:nth-child(2n) {
    background: linear-gradient(135deg, rgba(255,59,111,0.16), rgba(255,59,111,0.03));
    border-color: rgba(255,59,111,0.3);
    color: var(--accent-magma);
}
.cat-tag:hover { color: #fff; text-shadow: none; }

.card-title {
    margin: 0 0 8px;
    font-size: 1.15rem;
    line-height: 1.3;
}
.card-title a {
    color: var(--text-heading);
}
.card-title a:hover { color: var(--accent-cyan); }

.card-meta {
    font-size: .8rem;
    color: var(--text-muted);
    margin: 0 0 12px;
}
.card-excerpt {
    color: var(--text-main);
    font-size: .92rem;
    margin: 0 0 14px;
    flex: 1;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}
.card-excerpt p:last-child { margin-bottom: 0; }
.card-more {
    margin-top: auto;
    align-self: flex-start;
    font-size: .82rem;
    padding: 8px 18px;
}

/* ===== Sidebar / Widgets ===== */
.sidebar { min-width: 0; }
.widget {
    margin: 0 0 28px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-cyan);
    position: relative;
}
.widget::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px;
    width: 18px; height: 18px;
    border-top: 1px solid var(--accent-magma);
    border-left: 1px solid var(--accent-magma);
}
.widget-title {
    margin: 0 0 14px;
    font-size: 1rem;
    color: var(--text-heading);
    text-transform: uppercase;
    letter-spacing: .05em;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-cyan);
}
.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: .92rem;
}
.widget li:last-child { border-bottom: none; }
.widget li a { color: var(--text-main); }
.widget li a:hover { color: var(--accent-cyan); }
.widget select { margin-top: 4px; }

/* ===== Pagination ===== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 32px 0 0;
    align-items: center;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    color: var(--text-main);
    background: var(--bg-card);
    border: 1px solid var(--border-cyan);
    font-weight: 600;
    transition: all .2s;
}
.pagination .page-numbers:hover {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    text-shadow: 0 0 6px rgba(0,210,255,0.5);
}
.pagination .page-numbers.current {
    background: var(--accent-cyan);
    color: #0a0d10;
    border-color: var(--accent-cyan);
}
.pagination .page-numbers.dots { border: none; background: none; }

/* ===== Front page ===== */
.feature-block {
    margin: 0 0 48px;
    padding: 36px;
    background: linear-gradient(135deg, rgba(0,210,255,0.05), rgba(255,59,111,0.04));
    border: 1px solid var(--border-cyan);
    position: relative;
    overflow: hidden;
}
.feature-block::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,210,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,210,255,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}
.feature-block > * { position: relative; z-index: 1; }
.feature-block h2 {
    margin-top: 0;
    font-size: 1.8rem;
}
.feature-block .lead {
    font-size: 1.05rem;
    color: var(--text-main);
    max-width: 70ch;
}
.feature-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 20px;
    margin-top: 22px;
}
@media (max-width: 800px) { .feature-cols { grid-template-columns: 1fr; } }
.feature-col {
    padding: 18px;
    background: rgba(13, 16, 20, 0.65);
    border-left: 2px solid var(--accent-cyan);
}
.feature-col:nth-child(2) { border-left-color: var(--accent-magma); }
.feature-col h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}
.feature-col p { margin: 0; font-size: .92rem; color: var(--text-muted); }

.section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 0 0 20px;
    gap: 16px;
}
.section-title h2 {
    margin: 0;
    font-size: 1.5rem;
}
.section-title .accent { color: var(--accent-cyan); }

/* ===== Single post / Page ===== */
.entry-header {
    margin: 0 0 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-cyan);
}
.entry-title {
    margin: 0 0 10px;
    font-size: 2rem;
}
.entry-meta {
    font-size: .85rem;
    color: var(--text-muted);
}
.entry-thumb {
    margin: 0 0 24px;
    border: 1px solid var(--border-cyan);
    overflow: hidden;
}
.entry-thumb img { display: block; width: 100%; height: auto; }
.entry-content {
    font-size: 1rem;
    line-height: 1.7;
}
.entry-content img { display: block; margin: 1.4em auto; border: 1px solid var(--border-cyan); }
.entry-footer {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--border-cyan);
    font-size: .9rem;
    color: var(--text-muted);
}
.tags-list a {
    display: inline-block;
    padding: 2px 10px;
    margin: 2px 4px 2px 0;
    font-size: .8rem;
    border: 1px solid var(--border-cyan);
    color: var(--accent-cyan);
}

/* ===== Comments ===== */
.comments-area { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border-cyan); }
.comments-area .comments-title { margin: 0 0 18px; }
.commentlist { list-style: none; padding: 0; margin: 0 0 24px; }
.commentlist li.comment {
    padding: 16px;
    margin: 0 0 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-cyan);
    list-style: none;
}
.commentlist li.comment .children {
    list-style: none;
    margin: 14px 0 0;
    padding: 0 0 0 24px;
    border-left: 1px solid var(--border-cyan);
}
.comment-meta { font-size: .82rem; color: var(--text-muted); margin: 0 0 8px; }
.comment-meta .author-name { color: var(--accent-cyan); font-weight: 600; }
.comment-body p:last-child { margin-bottom: 0; }
.comment-respond .comment-form { display: grid; gap: 12px; }
.comment-respond label { display: block; margin-bottom: 4px; font-size: .9rem; color: var(--text-muted); }
.comment-form .form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 700px) { .comment-form .form-row { grid-template-columns: 1fr; } }

/* ===== Footer ===== */
.site-footer {
    background: linear-gradient(180deg, #0d0f12 0%, #08090b 100%);
    color: var(--text-main);
    border-top: 1px solid var(--border-cyan);
    padding: 40px 0 16px;
    margin-top: auto;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    margin: 0 0 28px;
}
@media (max-width: 800px) { .footer-cols { grid-template-columns: 1fr; } }
.footer-col .widget {
    background: transparent;
    border: 1px solid var(--border-cyan);
    margin: 0;
}
.footer-col p { color: var(--text-muted); }
.site-copyright {
    padding-top: 18px;
    border-top: 1px solid var(--border-cyan);
    font-size: .85rem;
    color: var(--text-muted);
    text-align: center;
}

/* ===== 404 ===== */
.error-404 {
    text-align: center;
    padding: 40px 20px;
}
.error-404 .big {
    font-family: 'Orbitron', sans-serif;
    font-size: 6rem;
    color: var(--accent-cyan);
    text-shadow: 0 0 24px rgba(0,210,255,0.6);
    margin: 0;
    line-height: 1;
}
.error-404 p { color: var(--text-muted); }
.error-404 .actions { display: flex; gap: 12px; justify-content: center; margin: 18px 0; flex-wrap: wrap; }

/* ===== Cookie banner (основные стили — после правила [hidden]) ===== */
.cookie-banner {
    position: fixed;
    left: 16px; right: 16px; bottom: 16px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: rgba(13, 16, 20, 0.96);
    border: 1px solid var(--accent-cyan);
    padding: 14px 18px;
    box-shadow: var(--shadow-cyan);
    backdrop-filter: blur(6px);
}
.cookie-banner p {
    margin: 0;
    flex: 1;
    min-width: 220px;
    font-size: .9rem;
    color: var(--text-main);
}
.cookie-banner button { white-space: nowrap; }

/* ===== Утилиты ===== */
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.alignleft  { float: left;  margin: 0 1.4em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.4em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

/* WP gallery / captions */
.wp-caption { margin: 1em 0; }
.wp-caption-text {
    font-size: .85rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 6px;
}

/* Sticky note for site (no sticky header — per spec) */

/* ===== Адаптив ===== */
@media (max-width: 600px) {
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }
    .entry-title { font-size: 1.5rem; }
    .feature-block { padding: 22px 18px; }
    .feature-block h2 { font-size: 1.4rem; }
    .container { padding: 0 16px; }

    /* Карточки в адаптиве — сброс позиционирования (правило A10) */
    .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card-thumb-wrap a { position: static; }
    .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}
