:root {
    --navy: #1c2d4a;
    --navy-deep: #14213a;
    --gold: #d9a441;
    --gold-soft: #f0dcb0;
    --ink: #1c1e22;
    --ink-soft: #5a5f66;
    --paper: #f7f6f2;
    --line: #e4e1d8;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* =========================
   HEADER
========================= */

header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(28, 45, 74, 0.03);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo a {
    font-family: "Source Serif 4", serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--navy);
    text-decoration: none;
}


/* =========================
   DESKTOP NAVIGATION
========================= */

.desktop-nav ul {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.desktop-nav a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

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


/* =========================
   MOBILE MENU
========================= */

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 7px;
}

.menu-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
}

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.mobile-overlay.active {
    display: block;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 85%;
    height: 100%;
    background: var(--navy-deep);
    padding: 80px 30px 30px;
    transition: right 0.3s ease;
    z-index: 1001;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.25);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav a {
    display: block;
    padding: 15px 0;
    color: #fff;
    text-decoration: none;
    font-family: "Source Serif 4", serif;
    font-size: 1.15rem;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}


/* =========================
   MAIN ARTICLE LAYOUT
========================= */

.main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin: 30px auto;
}

.post-content {
    background: #fff;
    padding: 36px 42px;
    border-radius: 10px;
    border: 1px solid var(--line);
    box-shadow:
        0 1px 2px rgba(28, 45, 74, 0.04),
        0 8px 24px rgba(28, 45, 74, 0.05);
}


/* =========================
   BREADCRUMBS
========================= */

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 0 15px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
    font-size: 0.85rem;
}

.breadcrumbs a {
    color: var(--navy);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .home-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--navy);
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.75rem;
}

.breadcrumbs .current {
    color: var(--ink);
    font-weight: 600;
}


/* =========================
   ARTICLE
========================= */

.post-title {
    font-family: "Source Serif 4", serif;
    font-size: 2.6rem;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.15;
    margin-bottom: 12px;
}

.post-meta {
    font-size: 0.88rem;
    color: var(--ink-soft);
    margin-bottom: 28px;
}

.post-body p {
    margin-bottom: 18px;
    font-size: 1.05rem;
}

.post-body h2 {
    font-family: "Source Serif 4", serif;
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--navy);
    margin: 34px 0 15px;
    line-height: 1.3;
}

.post-body h3 {
    font-family: "Source Serif 4", serif;
    font-size: 1.3rem;
    color: var(--navy);
    margin: 24px 0 12px;
}

.post-body h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7a5f22;
    margin: 20px 0 10px;
}

.post-body ul,
.post-body ol {
    margin: 10px 0 20px 25px;
}

.post-body li {
    margin-bottom: 8px;
}

.post-body a {
  color: red;
  text-decoration: underline;
  text-decoration-color: var(--navy);
  text-underline-offset: 2px;
}

.post-body a:hover {
    text-decoration-color: var(--gold);
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.post-body blockquote {
    margin: 25px 0;
    padding: 20px 25px;
    border-left: 4px solid var(--gold);
    background: var(--paper);
}

.post-body hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 30px 0;
}

.post-body strong {
    font-weight: 700;
}

.post-body em {
    font-style: italic;
}


/* =========================
   SIDEBAR
========================= */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-widget {
    background: #fff;
    padding: 22px 25px;
    border-radius: 10px;
    border: 1px solid var(--line);
    box-shadow: 0 1px 2px rgba(28, 45, 74, 0.04);
}

.sidebar-widget h3 {
    font-family: "Source Serif 4", serif;
    font-size: 1.1rem;
    color: var(--navy);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold);
    margin-bottom: 15px;
}

.recent-post {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

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

.recent-post a {
    display: block;
    color: var(--navy);
    text-decoration: none;
    font-weight: 500;
}

.recent-post a:hover {
    text-decoration: underline;
}

.recent-post .date {
    display: block;
    margin-top: 3px;
    font-size: 0.8rem;
    color: #9a9689;
}

.category-list {
    list-style: none;
}

.category-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}

.category-item:last-child {
    border-bottom: none;
}

.category-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--navy);
    text-decoration: none;
}

.category-item a:hover {
    text-decoration: underline;
}

.category-item .count {
    background: var(--navy);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
}


/* =========================
   RELATED POSTS
========================= */

.related-posts {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.related-posts h3 {
    font-family: "Source Serif 4", serif;
    font-size: 1.35rem;
    color: var(--navy);
    margin-bottom: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.related-post-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    transition:
        box-shadow 0.25s ease,
        transform 0.25s ease,
        border-color 0.25s ease;
}

.related-post-card:hover {
    box-shadow: 0 10px 28px rgba(28, 45, 74, 0.09);
    transform: translateY(-3px);
    border-color: #d8cfa8;
}

.related-tag {
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8a6a1f;
    background: var(--gold-soft);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.related-post-card h4 {
    font-family: "Source Serif 4", serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.3;
    margin-bottom: 8px;
}

.related-post-card p {
    font-size: 0.9rem;
    color: var(--ink-soft);
    margin-bottom: 16px;
}

.related-read {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy);
}


/* =========================
   CATEGORY PAGE CONTENT
========================= */

.category-page-content {
    position: relative;
    display: block;
    width: 100%;
    overflow: visible;
}

.category-page {
    position: relative;
    display: block;
    width: 100%;
    overflow: visible;
}

.category-header {
    position: relative;
    display: block;
    width: 100%;
    background: #fff;
    z-index: 1;
}

.category-post-list {
    position: relative;
    display: grid;
    width: 100%;
    gap: 20px;
    margin-top: 30px;
    clear: both;
    z-index: 2;
}

.category-post-list .blog-post-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #fff;
    padding: 24px 24px 20px;
    border-radius: 12px;
    border: 1px solid var(--line);
    overflow: visible;
}


/* =========================
   BLOG INDEX
========================= */

.blog-header {
    max-width: 800px;
    padding: 45px 0 30px;
}

.blog-header h1 {
    font-family: "Source Serif 4", serif;
    font-size: 2.8rem;
    color: var(--navy);
    line-height: 1.2;
    margin-bottom: 15px;
}

.blog-header p {
    color: var(--ink-soft);
    font-size: 1.05rem;
}

.blog-post-list {
    display: grid;
    gap: 20px;
    padding-bottom: 50px;
}


/*
   Blog cards deliberately use the
   same design language as Related Posts.
*/

.blog-post-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    padding: 24px 24px 20px;
    border-radius: 12px;
    border: 1px solid var(--line);
    transition:
        box-shadow 0.25s ease,
        transform 0.25s ease,
        border-color 0.25s ease;
}

.blog-post-card:hover {
    box-shadow: 0 10px 28px rgba(28, 45, 74, 0.09);
    transform: translateY(-3px);
    border-color: #d8cfa8;
}

.blog-post-tag {
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8a6a1f;
    background: var(--gold-soft);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.blog-post-title {
    font-family: "Source Serif 4", serif;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 6px;
}

.blog-post-title a {
    color: var(--navy);
    text-decoration: none;
}

.blog-post-title a:hover {
    text-decoration: underline;
}

.blog-post-date {
    display: block;
    font-size: 0.8rem;
    color: #9a9689;
    margin-bottom: 12px;
}

.blog-post-description {
    font-size: 0.92rem;
    color: var(--ink-soft);
    margin-bottom: 18px;
}

.blog-post-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy);
    text-decoration: none;
    transition:
        gap 0.2s ease,
        color 0.2s ease;
}

.blog-post-read-more:hover {
    gap: 9px;
    color: #8a6a1f;
}

.no-posts {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 25px;
}


/* =========================
   FOOTER
========================= */

footer {
    background: var(--navy-deep);
    color: #fff;
    padding: 34px 0;
    margin-top: 30px;
    text-align: center;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {

    .main-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .post-content {
        padding: 25px;
    }

    .post-title {
        font-size: 2.1rem;
    }

}


@media (max-width: 768px) {

    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .post-content {
        padding: 20px 22px;
    }

    .post-title {
        font-size: 1.8rem;
    }

    .blog-header h1 {
        font-size: 2.2rem;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-widget {
        padding: 18px 20px;
    }

}


@media (max-width: 400px) {

    .container {
        padding: 0 12px;
    }

    .post-content {
        padding: 16px;
    }

    .post-title {
        font-size: 1.55rem;
    }

    .blog-header h1 {
        font-size: 1.9rem;
    }

    .logo a {
        font-size: 1.15rem;
    }

}