/**
 * эска.бел — жёлтая тёплая тема, личный бренд
 * Ультра-компактный одноэкранный layout
 */

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

:root {
    --bg: #121008;
    --bg-warm: #1a1610;
    --bg-card: #1f1b14;
    --bg-elevated: #282318;
    --text: #f0ece4;
    --text-muted: #a09882;
    --yellow: #f5c518;
    --yellow-hover: #ffd84d;
    --yellow-dim: rgba(245, 197, 24, 0.12);
    --yellow-glow: rgba(245, 197, 24, 0.06);
    --amber: #e8a317;
    --border: rgba(245, 197, 24, 0.1);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-muted { color: var(--color-text-muted, #888); }

a { color: var(--yellow); text-decoration: none; }
a:hover { color: var(--yellow-hover); }

/* === Navbar === */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(18, 16, 8, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.navbar .container {
    display: flex; align-items: center; gap: 14px;
    padding: 8px 20px;
}
.nav-brand-group {
    display: flex; align-items: center; gap: 10px;
}
.logo-1c {
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 1.1rem; color: var(--bg);
    background: var(--yellow); padding: 2px 8px; border-radius: 4px;
    text-decoration: none; line-height: 1.2; letter-spacing: -0.02em;
    transition: background 0.2s;
}
.logo-1c:hover { background: var(--yellow-hover); color: var(--bg); }
.nav-brand {
    font-weight: 700; font-size: 1.1rem;
    color: var(--yellow); text-decoration: none;
    border-left: 1px solid var(--border);
    padding-left: 10px;
}
.nav-menu { display: flex; list-style: none; gap: 16px; margin-left: auto; }
.nav-link {
    color: var(--text-muted); text-decoration: none; font-size: 0.88rem; font-weight: 500;
    transition: color 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-franchise {
    font-size: 0.68rem; color: var(--yellow); border: 1px solid var(--yellow);
    padding: 3px 10px; border-radius: 20px; white-space: nowrap;
    text-decoration: none; transition: all 0.2s;
    text-transform: uppercase; letter-spacing: 0.03em; font-weight: 600;
}
.nav-franchise:hover { background: var(--yellow-dim); color: var(--yellow); }
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); }

/* === Hero === */
.hero {
    padding: 56px 0 20px;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(245, 197, 24, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(232, 163, 23, 0.03) 0%, transparent 50%),
        var(--bg);
}
.hero-inner { max-width: 600px; }
.hero-greeting {
    color: var(--yellow); font-size: 0.85rem; font-weight: 600;
    margin-bottom: 6px; letter-spacing: 0.02em;
}
.hero-title {
    font-size: 1.8rem; font-weight: 800; line-height: 1.15;
    margin-bottom: 8px; color: var(--text);
}
.hero-title .accent { color: var(--yellow); }
.hero-sub {
    color: var(--text-muted); font-size: 0.92rem; line-height: 1.5;
    margin-bottom: 14px; max-width: 500px;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* === Buttons === */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 7px 18px; border-radius: 6px;
    font-weight: 600; font-size: 0.88rem;
    transition: all 0.2s; border: none; cursor: pointer;
    text-decoration: none;
}
.btn-primary {
    background: var(--yellow); color: var(--bg);
}
.btn-primary:hover { background: var(--yellow-hover); color: var(--bg); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(245, 197, 24, 0.3); }
.btn-outline {
    background: transparent; color: var(--text);
    border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--yellow); color: var(--yellow); }

/* === Section titles === */
.section-title {
    font-size: 1.2rem; font-weight: 700; margin-bottom: 12px; color: var(--text);
}

/* === About === */
.about {
    padding: 20px 0 24px;
    background: var(--bg-warm);
    border-top: 1px solid var(--border-subtle);
}
.about-intro {
    max-width: 720px; margin-bottom: 14px;
}
.about-intro p {
    color: var(--text-muted); margin-bottom: 6px; line-height: 1.55; font-size: 0.88rem;
}
.about-intro strong { color: var(--yellow); }

/* Competencies grid */
.competencies {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
    margin-bottom: 14px;
}
.comp-block {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 12px 14px;
    transition: border-color 0.2s;
}
.comp-block:hover { border-color: rgba(245, 197, 24, 0.25); }
.comp-block h3 {
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--yellow); margin-bottom: 8px; font-weight: 700;
}
.comp-block ul { list-style: none; }
.comp-block li {
    color: var(--text-muted); font-size: 0.78rem; padding: 1.5px 0;
    padding-left: 12px; position: relative; line-height: 1.4;
}
.comp-block li::before {
    content: ''; position: absolute; left: 0; top: 8px;
    width: 4px; height: 4px; border-radius: 50%;
    background: var(--yellow); opacity: 0.4;
}

.about-note {
    color: var(--text-muted); font-size: 0.88rem; line-height: 1.5;
    max-width: 720px; margin-bottom: 14px; font-style: italic;
    padding-left: 12px; border-left: 2px solid var(--yellow); opacity: 0.8;
}

/* Experience counters */
.about-experience {
    display: flex; gap: 28px; padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}
.exp-item { display: flex; flex-direction: column; }
.exp-number {
    font-size: 1.3rem; font-weight: 800; color: var(--yellow);
    line-height: 1;
}
.exp-label {
    font-size: 0.72rem; color: var(--text-muted); margin-top: 2px;
}

/* === Blog section === */
.blog-section {
    padding: 20px 0;
    background: var(--bg);
}
.blog-header {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 12px;
}
.blog-all {
    font-size: 0.85rem; color: var(--yellow); font-weight: 600;
}

/* Featured article */
.featured-article {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    text-decoration: none; color: inherit;
    transition: border-color 0.2s, transform 0.2s;
    margin-bottom: 12px;
}
.featured-article:hover { border-color: var(--yellow); transform: translateY(-1px); color: inherit; box-shadow: 0 6px 24px rgba(245, 197, 24, 0.08); }
.featured-image {
    aspect-ratio: 1200/630; overflow: hidden;
}
.featured-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s;
}
.featured-article:hover .featured-image img { transform: scale(1.03); }
.featured-body {
    padding: 16px 20px; display: flex; flex-direction: column; justify-content: center;
}
.featured-label {
    font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--yellow); font-weight: 700; margin-bottom: 6px;
    background: var(--yellow-dim); padding: 2px 8px; border-radius: 3px;
    display: inline-block; width: fit-content;
}
.featured-body h3 {
    font-size: 1.05rem; font-weight: 700; line-height: 1.3;
    margin-bottom: 6px; color: var(--text);
}
.featured-body p {
    color: var(--text-muted); font-size: 0.82rem; line-height: 1.5;
    margin-bottom: 6px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.featured-date { font-size: 0.75rem; color: var(--text-muted); }

/* Articles grid */
.articles-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
.article-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    cursor: pointer; text-decoration: none; display: flex; flex-direction: column; color: inherit;
    transition: border-color 0.2s, transform 0.2s;
}
.article-card:hover { border-color: var(--yellow); transform: translateY(-1px); color: inherit; }
.article-card-image { aspect-ratio: 16/9; overflow: hidden; }
.article-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.article-card:hover .article-card-image img { transform: scale(1.03); }
.article-card-body { padding: 10px 14px 14px; }
.article-card h3 { font-size: 0.88rem; font-weight: 600; margin-bottom: 4px; color: var(--text); line-height: 1.35; }
.article-card .date { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; }
.article-card p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.loading { text-align: center; padding: 20px; color: var(--text-muted); grid-column: 1 / -1; font-size: 0.88rem; }

/* === Contact === */
.contact {
    padding: 20px 0 24px;
    background: var(--bg-warm);
    border-top: 1px solid var(--border-subtle);
}
.contact-grid { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 8px; }
.contact-channels { display: flex; flex-direction: column; gap: 8px; }
.channel {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: var(--radius);
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text); text-decoration: none;
    transition: border-color 0.2s;
}
.channel:hover { border-color: var(--yellow); color: var(--text); }
.channel svg { flex-shrink: 0; width: 20px; height: 20px; }
.channel.telegram svg { color: #2AABEE; }
.channel.email svg { color: var(--yellow); }
.channel div { display: flex; flex-direction: column; }
.channel strong { font-size: 0.85rem; }
.channel span { font-size: 0.75rem; color: var(--text-muted); }
.contact-form {
    display: flex; flex-direction: column; gap: 8px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.contact-form input,
.contact-form textarea {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 6px; padding: 7px 12px;
    color: var(--text); font-size: 0.88rem; font-family: inherit;
    transition: border-color 0.2s;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-muted); }
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 2px var(--yellow-dim); }
.contact-form .btn { align-self: flex-start; }
.form-message { padding: 8px 12px; border-radius: 6px; display: none; font-size: 0.85rem; }
.form-message.success { background: rgba(34,197,94,0.15); color: #22c55e; display: block; }
.form-message.error { background: rgba(239,68,68,0.15); color: #ef4444; display: block; }

/* === Footer === */
.footer {
    padding: 14px 0; border-top: 1px solid var(--border-subtle);
    font-size: 0.75rem; color: var(--text-muted);
}
.footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.footer-links { display: flex; gap: 12px; }
.footer-links a { color: var(--text-muted); opacity: 0.5; font-size: 0.7rem; }
.footer-links a:hover { opacity: 0.8; color: var(--text-muted); }

/* ===== Article pages (articles.php, article.php) ===== */
.articles-page {
    background: var(--bg); padding: 80px 0 60px; margin-top: 42px; min-height: 60vh;
}
.page-title {
    font-size: 1.8rem; font-weight: 700; text-align: center;
    margin-bottom: 8px; color: var(--text);
}
.articles-search-wrapper { max-width: 500px; margin: 20px auto 28px; }
.search-box { position: relative; }
.search-input {
    width: 100%; padding: 10px 40px 10px 16px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 24px; color: var(--text); font-size: 0.95rem; font-family: inherit;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { outline: none; border-color: var(--yellow); }
.search-clear {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; font-size: 20px; color: var(--text-muted); cursor: pointer;
}

.article-page {
    background: var(--bg); padding: 80px 0 60px; margin-top: 42px; min-height: calc(100vh - 42px);
}
.article-header { margin-bottom: 28px; padding-bottom: 14px; border-bottom: 1px solid var(--border-subtle); }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.88rem; color: var(--text-muted); margin-bottom: 14px; }
.breadcrumbs a { color: var(--yellow); }
.breadcrumbs a:hover { opacity: 0.8; }
.breadcrumbs-sep { opacity: 0.5; }
.breadcrumbs > span:last-child { color: var(--text); }
.related-articles { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border-subtle); }
.related-articles h2 { font-size: 1.4rem; color: var(--text); margin-bottom: 20px; font-weight: 700; }
.related-articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 768px) { .related-articles-grid { grid-template-columns: 1fr; } }
.article-title { font-size: 2rem; font-weight: 700; color: var(--text); margin-bottom: 8px; line-height: 1.3; }
.article-date { color: var(--text-muted); font-size: 0.88rem; }
.article-cover { margin-bottom: 28px; border-radius: var(--radius); overflow: hidden; }
.article-cover img { width: 100%; height: auto; display: block; }
.article-content { max-width: none; margin: 0 auto; line-height: 1.8; color: var(--text-muted); }
.article-content h2 { color: var(--yellow); font-size: 1.5rem; margin: 32px 0 14px; font-weight: 700; }
.article-content h3 { color: var(--text); font-size: 1.2rem; margin: 24px 0 10px; font-weight: 600; }
.article-content p { margin-bottom: 14px; }
.article-content ol, .article-content ul { margin-bottom: 14px; padding-left: 24px; }
.article-content li { margin-bottom: 6px; }
.article-content a { color: var(--yellow); border-bottom: 1px solid transparent; }
.article-content a:hover { border-bottom-color: var(--yellow); }
.article-content strong { color: var(--text); }
.article-content pre {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 8px; padding: 14px; margin: 14px 0;
    overflow-x: auto; font-family: 'Courier New', monospace; font-size: 0.85rem;
    color: var(--text);
}
.article-content code {
    background: var(--bg-card); padding: 2px 6px; border-radius: 4px;
    font-family: 'Courier New', monospace; font-size: 0.85em; color: var(--yellow);
}
.article-content pre code { background: none; padding: 0; color: inherit; }
.article-content blockquote {
    border-left: 3px solid var(--yellow); padding: 10px 16px; margin: 14px 0;
    background: var(--yellow-dim); border-radius: 0 8px 8px 0;
    color: var(--text);
}
.article-content table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.article-content th, .article-content td {
    padding: 8px 12px; border: 1px solid var(--border); text-align: left;
}
.article-content th { background: var(--bg-card); color: var(--text); font-weight: 600; }
.article-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 20px 0; display: block; }
.article-image {
    max-width: 100%; height: auto; border-radius: 8px; margin: 20px 0; display: block;
    margin-left: auto; margin-right: auto;
}
.section-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 24px; font-size: 0.92rem; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); flex-direction: column; padding: 14px 20px; gap: 10px; border-bottom: 1px solid var(--border); }
    .nav-menu.active { display: flex; }
    .nav-franchise { display: none; }
    .nav-toggle { display: flex; }
    .hero { padding: 54px 0 16px; }
    .hero-title { font-size: 1.5rem; }
    .competencies { grid-template-columns: 1fr; }
    .about-experience { flex-wrap: wrap; gap: 16px; }
    .featured-article { grid-template-columns: 1fr; }
    .featured-image { aspect-ratio: 16/9; }
    .articles-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer .container { flex-direction: column; text-align: center; }
    .article-title { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.3rem; }
    .hero-sub { font-size: 0.85rem; }
    .hero-actions { flex-direction: column; }
    .btn { width: 100%; text-align: center; }
    .about-experience { flex-direction: column; gap: 10px; }
}
