:root {
    --primary: #e67e5c;
    --primary-dark: #d06846;
    --accent: #3a3a3a;
    --text: #333;
    --text-light: #666;
    --bg: #f5f5f8;
    --bg-white: #fff;
    --border: #e0e0e0;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;
    --max-width: 1100px;
    --radius: 6px;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-hover: 0 6px 20px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color .2s ease;
}
a:hover { color: var(--primary-dark); }

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--accent);
    line-height: 1.3;
    margin: 0 0 .6em;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== HEADER ========== */
.site-header {
    background: var(--bg-white);
    border-bottom: 3px solid var(--primary);
    box-shadow: var(--shadow);
}

.header-mid {
    padding: 30px 20px 20px;
    text-align: center;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0;
    color: var(--accent);
}
.site-title a {
    color: var(--accent);
    text-decoration: none;
}
.site-title a:hover { color: var(--primary); }

.site-description {
    margin: 6px 0 0;
    font-size: 0.95rem;
    color: var(--text-light);
    font-style: italic;
}

.header-nav {
    background: var(--accent);
}

.main-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.main-nav li { margin: 0; }

.main-nav a {
    display: block;
    padding: 14px 20px;
    color: #fff;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: background .2s ease;
}

.main-nav a:hover {
    background: var(--primary);
    color: #fff;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    padding: 14px 20px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    transition: all .2s ease;
}

/* ========== MAIN LAYOUT ========== */
.site-main { padding: 30px 0; }

.site-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

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

/* ========== BREADCRUMB ========== */
.breadcrumb {
    font-size: 0.88rem;
    color: var(--text-light);
    margin-bottom: 20px;
    padding: 10px 0;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 8px; color: var(--border); }

/* ========== HERO ========== */
.hero-section {
    margin-bottom: 30px;
}

.hero-card {
    display: flex;
    gap: 30px;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    color: var(--text);
    transition: box-shadow .2s ease, transform .2s ease;
}
.hero-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    color: var(--text);
}

.hero-image {
    flex: 0 0 55%;
    overflow: hidden;
}
.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 320px;
}

.hero-content {
    flex: 1;
    padding: 30px 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-title {
    font-size: 2rem;
    margin: 10px 0 15px;
    color: var(--accent);
}

.hero-excerpt {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0;
}

/* ========== POST GRID (Home) ========== */
.home-section {
    margin-bottom: 40px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
}

.section-title {
    font-size: 1.6rem;
    margin: 0;
    color: var(--accent);
}

.section-more {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 500;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.grid-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}
.grid-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.grid-card .card-link {
    display: block;
    color: var(--text);
}
.grid-card .card-link:hover { color: var(--text); }

.card-thumbnail {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--bg);
}
.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.grid-card:hover .card-thumbnail img {
    transform: scale(1.05);
}

.card-content { padding: 15px; }

.card-category {
    display: inline-block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 6px;
}

.card-title {
    font-size: 1.05rem;
    margin: 0 0 8px;
    color: var(--accent);
    line-height: 1.35;
}

.card-excerpt {
    font-size: 0.88rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

/* ========== ARTICLE (Single) ========== */
.single-article {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 35px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.entry-header { margin-bottom: 20px; }

.entry-title {
    font-size: 2.2rem;
    margin: 0 0 10px;
    color: var(--accent);
}

.post-thumbnail {
    margin: 0 0 25px;
    border-radius: var(--radius);
    overflow: hidden;
}
.post-thumbnail img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.entry-content {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.8;
}

.entry-content h2 {
    font-size: 1.55rem;
    margin-top: 1.6em;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
    color: var(--accent);
}

.entry-content h3 {
    font-size: 1.25rem;
    margin-top: 1.4em;
    color: var(--accent);
}

.entry-content p { margin: 0 0 1.1em; }

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 15px 0;
}

.entry-content ul,
.entry-content ol { padding-left: 22px; margin: 0 0 1em; }
.entry-content li { margin-bottom: .4em; }

.entry-content a {
    color: var(--primary);
    text-decoration: underline;
}

.entry-content blockquote {
    border-left: 4px solid var(--primary);
    margin: 1.5em 0;
    padding: .5em 1.2em;
    background: var(--bg);
    color: var(--text-light);
    font-style: italic;
}

/* ========== RELATED ========== */
.related-posts {
    margin-top: 40px;
}

.related-posts .section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

/* ========== CATEGORY PAGE ========== */
.category-header {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 25px 30px;
    margin-bottom: 25px;
    border-left: 5px solid var(--primary);
    box-shadow: var(--shadow);
}

.category-title {
    font-size: 2rem;
    margin: 0 0 8px;
    color: var(--accent);
}

.category-description {
    color: var(--text-light);
    margin: 0;
    font-style: italic;
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-card {
    display: flex;
    gap: 20px;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow .2s ease;
}
.post-card:hover { box-shadow: var(--shadow-hover); }

.post-card-thumb {
    flex: 0 0 230px;
    overflow: hidden;
}
.post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 160px;
}

.post-card-content {
    flex: 1;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-card-title {
    font-size: 1.3rem;
    margin: 6px 0 10px;
}
.post-card-title a { color: var(--accent); }
.post-card-title a:hover { color: var(--primary); }

.post-card-excerpt {
    color: var(--text-light);
    margin: 0 0 12px;
    font-size: 0.95rem;
}

.read-more {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary);
    align-self: flex-start;
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 14px;
    border-radius: var(--radius);
    background: var(--bg-white);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.9rem;
    text-decoration: none;
}
.pagination a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.pagination .page-current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ========== SIDEBAR ========== */
.sidebar {
    flex: 0 0 300px;
    min-width: 0;
}

.widget {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 1.1rem;
    margin: 0 0 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
    color: var(--accent);
}

.recent-posts {
    list-style: none;
    margin: 0;
    padding: 0;
}

.recent-posts li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.recent-posts li:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-posts a {
    display: flex;
    gap: 12px;
    align-items: center;
    color: var(--text);
}
.recent-posts a:hover { color: var(--primary); }

.recent-posts img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.recent-title {
    font-size: 0.88rem;
    line-height: 1.35;
    font-weight: 500;
}

.cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cat-list li {
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
}
.cat-list li:last-child { border-bottom: 0; }
.cat-list a {
    color: var(--text);
    display: block;
    font-size: 0.95rem;
}
.cat-list a:hover { color: var(--primary); padding-left: 4px; }

/* ========== FOOTER ========== */
.site-footer {
    background: var(--accent);
    color: #ddd;
    padding: 25px 0;
    margin-top: 40px;
    text-align: center;
    font-size: 0.88rem;
}
.site-footer a {
    color: #fff;
    text-decoration: underline;
}
.site-footer a:hover { color: var(--primary); }

/* ========== BACK TO TOP ========== */
.back-to-top {
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: #fff;
    border: 0;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: var(--shadow-hover);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease, background .2s ease;
    z-index: 1000;
}
.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover { background: var(--primary-dark); }

/* ========== 404 ========== */
.error-404 {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 60px 35px;
    text-align: center;
    box-shadow: var(--shadow);
}
.error-404 h1 {
    font-size: 6rem;
    color: var(--primary);
    margin: 0;
    line-height: 1;
}
.error-404 h2 {
    margin: 10px 0 20px;
}
.btn-home {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 11px 26px;
    border-radius: var(--radius);
    font-weight: 500;
    margin-top: 10px;
}
.btn-home:hover {
    background: var(--primary-dark);
    color: #fff;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .site-content {
        flex-direction: column;
    }
    .sidebar {
        flex: 1;
        width: 100%;
    }
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-card {
        flex-direction: column;
    }
    .hero-image {
        flex: 0 0 auto;
    }
    .hero-image img {
        min-height: 220px;
    }
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .site-title { font-size: 2.2rem; }

    .menu-toggle { display: block; }

    .main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
    }
    .main-nav.is-open {
        display: flex;
    }
    .main-nav li {
        width: 100%;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    .main-nav a {
        padding: 12px 20px;
        text-align: center;
    }

    .post-card {
        flex-direction: column;
    }
    .post-card-thumb {
        flex: 0 0 auto;
        width: 100%;
    }
    .post-card-thumb img {
        height: 200px;
    }

    .single-article { padding: 22px; }
    .entry-title { font-size: 1.7rem; }

    .header-nav .container {
        padding: 0;
    }
}

@media (max-width: 480px) {
    .post-grid {
        grid-template-columns: 1fr;
    }
    .related-grid {
        grid-template-columns: 1fr;
    }
    .site-title { font-size: 1.9rem; }
    .hero-content { padding: 20px; }
    .hero-title { font-size: 1.4rem; }
    .category-header { padding: 18px 20px; }
    .category-title { font-size: 1.5rem; }
    .section-title { font-size: 1.3rem; }
    .back-to-top {
        right: 15px;
        bottom: 15px;
        width: 40px;
        height: 40px;
    }
}
