:root {
    --bg: #ffffff;
    --fg: #333;
    --muted: #666;
    --brand: #E82C2C;
    --card: #f8f8f8;
    --line: #ddd;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
    font: 16px/1.6 Arial, sans-serif;
}

a {
    color: #333;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

.site-header {
    border-bottom: 1px solid var(--line);
    background: #f8f8f8;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 50px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: .2px;
    color: #333;
    text-decoration: none;
}

.brand:hover {
    text-decoration: none;
}

.brand-logo {
    height: 40px;
    width: auto;
    display: block;
}

.brand-text {
    display: flex;
    align-items: center;
}

.brand .dot {
    color: var(--brand);
}

.nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

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

.nav-list a {
    font-weight: bold;
    color: #333;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: #333;
    display: block;
}

main {
    display: flex;
    margin: 30px 0;
    gap: 30px;
    align-items: flex-start;
}

article {
    flex: 1;
    min-width: 0;
}

aside {
    width: 320px;
    flex-shrink: 0;
}

.widget-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #111827;
    padding-bottom: 12px;
    border-bottom: 2px solid #f3f4f6;
}

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

.widget-item {
    margin: 0;
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.widget-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.widget-item:first-child {
    padding-top: 0;
}

.widget-link {
    color: #111827;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 500;
    transition: color 0.2s ease;
    display: block;
}

.widget-link:hover {
    color: #E82C2C;
    text-decoration: none;
}

.widget-meta {
    font-size: 13px;
    color: #6b7280;
    font-weight: 400;
    display: block;
    margin-top: 4px;
}

.hero {
    display: none;
}

.home-grid {
    display: flex;
    gap: 20px;
    padding: 20px 0;
}

.sidebar {
    width: 320px;
    flex-shrink: 0;
}

.sidebar .widget {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sidebar h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #111827;
    padding-bottom: 12px;
    border-bottom: 2px solid #f3f4f6;
}

.cat-list,
.post-mini {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cat-list li,
.post-mini li {
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.post-mini li:last-child,
.cat-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.post-mini li:first-child,
.cat-list li:first-child {
    padding-top: 0;
}

.posts {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 20px;
}

.card {
    display: block;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.card img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.card .pad {
    padding: 20px;
}

.card h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.card p {
    margin: 0 0 12px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

.meta {
    color: #9ca3af;
    font-size: 13px;
    font-weight: 400;
}

.post .post-head {
    margin: 0 0 20px 0;
}

.post .post-head h1 {
    margin: 0 0 12px;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
}

.post .post-head .meta {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #6b7280;
}

.post .post-head .meta a {
    color: #E82C2C;
    text-decoration: none;
}

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

.post .featured {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin: 0 0 20px 0;
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.post-body {
    line-height: 1.8;
    color: #374151;
}

.post-body p {
    margin: 16px 0;
    font-size: 16px;
}

.post-body h2 {
    margin-top: 32px;
    margin-bottom: 16px;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
}

.post-body h3 {
    margin-top: 24px;
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.post-body ul,
.post-body ol {
    margin: 16px 0;
    padding-left: 30px;
}

.post-body li {
    margin: 8px 0;
    line-height: 1.7;
}

.post-body a {
    color: #E82C2C;
    text-decoration: underline;
}

.post-body a:hover {
    color: #c72525;
}

.homepage-banner {
    margin: 30px 0;
    text-align: center;
}

.banner-image {
    width: 100%;
    height: auto;
    max-width: 1200px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
}

.intro-content {
    margin: 30px 0;
}

.intro-content h2 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 24px;
    color: #333;
}

.intro-content h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 20px;
    color: #333;
}

.intro-content p {
    margin: 14px 0;
    line-height: 1.8;
}

.intro-content ul,
.intro-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.intro-content li {
    margin: 8px 0;
    line-height: 1.7;
}

/* Button Group */
.button-group {
    display: flex;
    gap: 15px;
    margin: 30px 0;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(90deg, #120b8f 0%, #00baff 100%);
    color: #ffffff;
    border-color: transparent;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #0e0966 0%, #0099cc 100%);
    border-color: transparent;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 11, 143, 0.4);
}

.btn-secondary {
    background-color: #ffffff;
    color: #120b8f;
    border: 2px solid #120b8f;
}

.btn-secondary:hover {
    background: linear-gradient(90deg, rgba(18, 11, 143, 0.08) 0%, rgba(0, 186, 255, 0.08) 100%);
    border-color: #00baff;
    color: #120b8f;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 11, 143, 0.2);
}

/* Specific styling for post page buttons */
.post-button-group {
    margin-top: 20px;
    margin-bottom: 30px;
    justify-content: flex-start;
}

@media (max-width: 768px) {
    .button-group {
        flex-direction: column;
        gap: 12px;
        margin: 24px 0;
    }

    .btn {
        width: 100%;
        padding: 12px 24px;
    }

    .post-button-group {
        justify-content: center;
    }
}

.content-image {
    margin: 30px 0;
    text-align: center;
}

.intro-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
}

.content-image figcaption {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    font-style: italic;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .intro-img {
        border-radius: 4px;
    }

    .content-image figcaption {
        font-size: 13px;
        padding: 0 10px;
    }
}

.post-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 40px 0 30px 0;
    padding: 20px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.tags a {
    display: inline-block;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 6px 12px;
    border-radius: 6px;
    margin: 4px 6px 0 0;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tags a:hover {
    background: #E82C2C;
    color: #ffffff;
    border-color: #E82C2C;
    text-decoration: none;
}

.nextprev {
    font-size: 14px;
    color: #6b7280;
}

.nextprev a {
    color: #E82C2C;
    text-decoration: none;
}

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

.related .post-mini li a {
    color: #333;
}

.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: #f8f8f8;
    padding: 10px;
    text-align: center;
    font-size: 0.9em;
    color: #555;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    padding: 24px 0;
    text-align: left;
}

.site-footer h4 {
    margin: 0 0 12px;
}

.chip-list,
.link-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.chip-list li {
    display: inline-block;
    margin: 6px 6px 0 0;
}

.chip-list a {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--muted);
    font-size: 13px;
}

.link-list li {
    margin: 5px 0;
}

.footer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

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

@media (max-width: 960px) {
    .home-grid {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        margin-left: 0;
    }

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

@media (max-width: 960px) {
    .posts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .brand-logo {
        height: 32px;
    }

    .brand-text {
        font-size: 14px;
    }

    .homepage-banner {
        margin: 20px 0;
    }

    .banner-image {
        border-radius: 8px;
    }

    main {
        flex-direction: column;
        gap: 24px;
        margin: 20px 0;
    }

    aside {
        width: 100%;
        margin-left: 0;
        margin-top: 0;
    }

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

    .widget-card {
        margin-bottom: 20px;
    }
}

@media (max-width: 500px) {
    .nav-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        inset: 50px 0 auto 0;
        background: #f8f8f8;
        transform: translateY(-120%);
        transition: transform .25s ease;
        border-bottom: 1px solid var(--line);
        padding: 14px 0;
    }

    .nav[aria-expanded="true"] {
        transform: translateY(0);
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
    }
}