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


:root {
    --primary-bg: #FAF7F2;          
    --secondary-bg: #FFFFFF;         
    --accent-color: #C4704F;         
    --accent-hover: #A85A3A;         
    --accent-light: #E8C4B8;         
    --text-color: #2D2A26;           
    --text-muted: #6B6560;           
    --border-color: #E8E2D9;         
    --shadow-color: rgba(45, 42, 38, 0.08);
    --shadow-hover: rgba(196, 112, 79, 0.15);
}


body {
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-color);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}


.header {
    background-color: var(--secondary-bg);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: -0.5px;
    position: relative;
    transition: color 0.3s ease;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
    transform: scaleX(0.5);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.logo:hover {
    color: var(--accent-color);
}

.logo:hover::after {
    transform: scaleX(1);
}


.nav-container {
    display: flex;
}

.nav {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.95rem;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav a:hover {
    color: var(--text-color);
}

.nav a:hover::after {
    width: calc(100% - 2.4rem);
}


.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
    transition: border-color 0.3s ease;
}

.burger-menu:hover {
    border-color: var(--accent-color);
}

.burger-line {
    width: 20px;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
    position: absolute;
}

.burger-line:nth-child(1) {
    top: 12px;
}

.burger-line:nth-child(2) {
    top: 19px;
}

.burger-line:nth-child(3) {
    top: 26px;
}

.burger-menu.active .burger-line:nth-child(1) {
    transform: rotate(45deg);
    top: 19px;
    background-color: var(--accent-color);
}

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
    transform: rotate(-45deg);
    top: 19px;
    background-color: var(--accent-color);
}


.main-content {
    flex: 1;
    padding: 3rem 0;
}

.main-content .container {
    display: flex;
    flex-direction: row;
    gap: 3rem;
    width: 100%;
}


.sidebar {
    flex: 0 0 280px;
    order: -1; 
    background-color: var(--secondary-bg);
    padding: 1.75rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px var(--shadow-color);
    height: fit-content;
    position: relative;
    border: 1px solid var(--border-color);
}

.sidebar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1.5rem;
    bottom: 1.5rem;
    width: 4px;
    background: linear-gradient(180deg, var(--accent-color), var(--accent-light));
    border-radius: 0 4px 4px 0;
}

.sidebar h2 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--text-color);
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    padding-left: 1rem;
    font-weight: 600;
}


.content {
    flex: 1;
    background-color: var(--secondary-bg);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px var(--shadow-color);
    border: 1px solid var(--border-color);
}


h1 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--text-color);
    margin-bottom: 1.25rem;
    font-size: 2.25rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

h2 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.35;
}

h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1.4;
}


p {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
    line-height: 1.8;
}


.recent-posts {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 0 0 1rem !important;
}

.recent-posts li {
    margin-bottom: 0 !important;
    padding: 0.85rem 0 !important;
    border-bottom: 1px solid var(--border-color) !important;
    position: relative;
}

.recent-posts li:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.recent-posts a {
    color: var(--text-color) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    display: block !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    padding-left: 0 !important;
}

.recent-posts a:hover {
    color: var(--accent-color) !important;
    padding-left: 6px !important;
}


.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--secondary-bg);
    padding: 0.75rem 1.75rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px var(--shadow-hover);
}

.btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--shadow-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    box-shadow: none;
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: var(--secondary-bg);
}


.footer {
    background-color: var(--text-color);
    padding: 3rem 0 2rem;
    margin-top: auto;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--accent-color) 0%, 
        var(--accent-light) 25%, 
        var(--accent-color) 50%, 
        var(--accent-light) 75%, 
        var(--accent-color) 100%);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
}

.footer-logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-bg);
}

.footer-nav {
    display: flex;
    list-style: none;
    gap: 2rem;
    justify-content: center;
}

.footer-nav a {
    color: var(--accent-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--secondary-bg);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: right;
}


.posts-list {
    list-style: none;
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
}

.post-item {
    background-color: var(--secondary-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.post-item:hover {
    border-color: var(--accent-light);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-hover);
}

.post-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-item:hover .post-image img {
    transform: scale(1.08);
}

.post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-item h3 {
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
}

.post-item h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-item h3 a:hover {
    color: var(--accent-color);
}

.post-item p {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    flex: 1;
}

.post-item .btn {
    align-self: flex-start;
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
}


.article-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.article-content {
    margin-bottom: 2rem;
}

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

.article-content img,
.content img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 12px;
    box-shadow: 0 4px 16px var(--shadow-color);
}


.error-page {
    text-align: center;
    padding: 4rem 2rem;
}

.error-code {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 8rem;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 0.5rem;
    line-height: 1;
    position: relative;
    display: inline-block;
}

.error-code::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.error-page h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    color: var(--text-color);
}

.error-page p {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.error-actions {
    margin: 2.5rem 0;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.error-suggestions {
    margin-top: 3rem;
    padding: 2rem;
    background-color: var(--primary-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.error-suggestions h3 {
    color: var(--text-color);
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
}

.error-suggestions ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
}

.error-suggestions li a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.error-suggestions li a:hover {
    background-color: var(--accent-color);
    color: var(--secondary-bg);
    border-color: var(--accent-color);
}


table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.75rem 0;
    background-color: var(--secondary-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px var(--shadow-color);
    border: 1px solid var(--border-color);
}

table th,
table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

table th {
    background-color: var(--accent-color);
    color: var(--secondary-bg);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table tr:hover {
    background-color: var(--primary-bg);
}

table tr:last-child td {
    border-bottom: none;
}


ul, ol {
    margin: 1.25rem 0;
    padding-left: 1.75rem;
    color: var(--text-muted);
}

ul li, ol li {
    margin-bottom: 0.6rem;
    line-height: 1.7;
}

ul li strong, ol li strong {
    color: var(--text-color);
}


@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.content {
    animation: fadeInUp 0.5s ease-out;
}

.sidebar {
    animation: slideInLeft 0.5s ease-out;
}


a:focus,
.btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}


@media (max-width: 1024px) {
    .posts-list {
        grid-template-columns: 1fr;
    }
    
    .post-item {
        flex-direction: row;
    }
    
    .post-image {
        width: 200px;
        height: auto;
        min-height: 160px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .burger-menu {
        display: flex;
    }
    
    .nav-container {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--secondary-bg);
        transition: left 0.3s ease;
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-container.active {
        left: 0;
    }
    
    .nav {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav a {
        font-size: 1.25rem;
        padding: 1rem 2rem;
    }
    
    .nav a::after {
        display: none;
    }
    
    .main-content {
        padding: 2rem 0;
    }
    
    .main-content .container {
        flex-direction: column;
        gap: 2rem;
    }
    
    .sidebar {
        order: 1;
        flex: 1;
    }
    
    .sidebar::before {
        left: 0;
        right: 0;
        top: 0;
        bottom: auto;
        width: auto;
        height: 4px;
        border-radius: 4px 4px 0 0;
    }
    
    .sidebar h2 {
        padding-left: 0;
        padding-top: 0.5rem;
    }
    
    .recent-posts {
        padding-left: 0 !important;
    }
    
    .content,
    .sidebar {
        padding: 1.75rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    
    .copyright {
        text-align: center;
    }
    
    .post-item {
        flex-direction: column;
    }
    
    .post-image {
        width: 100%;
        height: 200px;
    }
    
    
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    table th,
    table td {
        padding: 0.8rem;
        font-size: 0.9rem;
        min-width: 120px;
    }
    
    
    .error-code {
        font-size: 5rem;
    }
    
    .error-page h1 {
        font-size: 1.5rem;
    }
    
    .error-page p {
        font-size: 1rem;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .error-suggestions ul {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .content,
    .sidebar {
        padding: 1.25rem;
        border-radius: 10px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .post-content {
        padding: 1.25rem;
    }
    
    .error-code {
        font-size: 4rem;
    }
    
    table th,
    table td {
        padding: 0.6rem 0.5rem;
        min-width: 100px;
        font-size: 0.85rem;
    }
}


::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--primary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}


blockquote {
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    border-left: 5px solid var(--accent-color);
    margin: 2rem 0;
    padding: 1.75rem 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px var(--shadow-color);
    border: 1px solid var(--border-color);
    position: relative;
}

blockquote::after {
    content: '';
    position: absolute;
    right: 1.5rem;
    bottom: 1rem;
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    opacity: 0.08;
    border-radius: 50%;
}

blockquote p {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

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

blockquote cite {
    display: block;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.9rem;
    font-style: normal;
    color: var(--text-muted);
    margin-top: 1rem;
    font-weight: 600;
}

blockquote cite::before {
    content: '— ';
    color: var(--accent-color);
}


::selection {
    background-color: var(--accent-light);
    color: var(--text-color);
}
