:root {
    --brand-orange: #ff9900; 
    --text-color: #333;
    --sidebar-width: 300px;
}

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

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background: #fff;
}

/* Скрываем полоску по умолчанию, она будет только в сайдбаре */
#header-border {
    display: none;
}

/* --- МОБИЛЬНАЯ ШАПКА (видна только на экранах < 768px) --- */
.mobile-header {
    display: none;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand-logo {
    font-weight: bold;
    font-size: 1.5rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #000;
    text-decoration: none;
}

.brand-logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.burger-btn {
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

/* --- ОСНОВНАЯ РАЗМЕТКА (Сайдбар + Контент) --- */
.layout-wrapper {
    display: flex;
    /* Убираем max-width и margin auto, чтобы контейнер занимал всю ширину */
    width: 100%;
}

/* --- САЙДБАР (ЛЕВОЕ МЕНЮ) --- */
aside.sidebar {
    width: var(--sidebar-width);
    padding: 40px 20px;
    flex-shrink: 0;
    border-right: 1px solid #eee;
    background: #fff;
    position: relative;
    /* Прилипаем к левому краю */
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

/* Полоска на всю ширину экрана сверху */
aside.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background-color: #ffb900;
    border-top: 8px solid #ff8c00;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-section h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: bold;
}

.sidebar-nav a {
    display: block;
    color: #333;
    text-decoration: none;
    padding: 5px 0;
    font-size: 1.1rem;
}

.sidebar-nav a:hover {
    color: var(--brand-orange);
    text-decoration: underline;
}

.input-group {
    display: flex;
    gap: 5px;
}
.input-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
}
.input-group button {
    background: var(--brand-orange);
    border: none;
    color: white;
    padding: 0 10px;
    cursor: pointer;
    font-weight: bold;
}

/* --- ОСНОВНОЙ КОНТЕНТ --- */
main {
    flex-grow: 1;
    /* Ограничиваем ширину контента и центрируем его */
    max-width: 900px;
    padding: 40px;
    margin: 0 auto;
}

main h1 {
    font-size: 1.9rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

main h2 {
    font-size: 2rem;
    margin: 2rem 0 1.5rem;
    line-height: 1.2;
}

main p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* --- СЕКЦИЯ "ОБО МНЕ" --- */
.intro-section {
    margin-bottom: 0rem;
    padding-bottom: 0.1rem;
    border-bottom: 2px solid #eee;
}

/* --- ЛЕНТА БЛОГПОСТОВ --- */
.blog-feed {
    margin-top: 2rem;
}

.blog-post {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.blog-post:last-child {
    border-bottom: none;
}

.post-meta {
    margin-bottom: 0.5rem;
}

.post-meta time {
    color: #999;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-title {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.post-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.post-title a:hover {
    color: var(--brand-orange);
}

.post-excerpt {
    margin-bottom: 1rem;
    color: #555;
    font-size: 1.05rem;
}

.read-more {
    color: var(--brand-orange);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.read-more:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* --- СТРАНИЦА ОТДЕЛЬНОГО ПОСТА --- */
.single-post {
    max-width: 750px;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.back-link {
    color: var(--brand-orange);
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

.post-date {
    color: #999;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.post-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

.post-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.post-content pre {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

/* --- АДАПТИВ (ДЛЯ МОБИЛЬНЫХ) --- */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }

    .layout-wrapper {
        flex-direction: column;
    }

    aside.sidebar {
        display: none; 
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-top: 10px;
        position: static;
        height: auto;
    }

    aside.sidebar.active {
        display: block;
    }

    .desktop-only-logo {
        display: none;
    }
    
    main {
        padding: 20px;
    }
    
    main h1 {
        font-size: 2rem;
    }
    
    main h2 {
        font-size: 1.5rem;
    }
    
    .post-title {
        font-size: 1.4rem;
    }
    
    .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}