:root {
    --bg: #f4f4f4;
    --paper: #333333;
    --paper-strong: #2a2a2a;
    --paper-deep: #1e1e1e;
    --ink: #cccccc;
    --muted: #999999;
    --line: rgba(153, 153, 153, 0.34);
    --brand: #f9d938;
    --brand-dark: #ffd700;
    --accent: #007bff;
    --shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
    --radius: 15px;
    --shell: min(1180px, calc(100vw - 32px));
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(38, 38, 38, 0.12), transparent 30%),
        linear-gradient(180deg, rgba(38, 38, 38, 0.08), transparent 320px),
        var(--bg);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.25s ease, background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

a:hover {
    color: var(--brand);
}

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

.shell-inner {
    width: var(--shell);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(8px);
    background: rgba(38, 38, 38, 0.88);
    border-bottom: 1px solid rgba(0, 0, 0, 0.22);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
}

.nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 0;
}

.brand-mark {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-title {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #ffffff;
}

.brand-tagline,
.eyebrow,
.post-meta,
.footer-links,
.page-heading p,
.hero-text,
.empty-state {
    color: var(--muted);
}

.primary-nav {
    display: flex;
    gap: 18px;
    font-weight: 600;
}

.primary-nav a {
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 4px;
}

.primary-nav a:hover {
    background: rgba(38, 38, 38, 1);
    color: var(--brand);
}

.site-main {
    padding: 32px 0 48px;
}

.hero-panel,
.panel,
.post-card,
.comment-card {
    background: var(--paper);
    border: 0;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.hero-panel {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 24px;
    padding: 32px;
    align-items: center;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(30, 30, 30, 0.96), rgba(51, 51, 51, 0.9)),
        radial-gradient(circle at 80% 20%, rgba(249, 217, 56, 0.18), transparent 28%),
        var(--paper);
}

.hero-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-top: 2px solid rgba(249, 217, 56, 0.42);
    pointer-events: none;
}

.hero-copy,
.hero-side {
    position: relative;
    z-index: 1;
}

.hero-copy h1,
.page-heading h1,
.post-head h1 {
    margin: 0 0 12px;
    font-size: clamp(2.2rem, 5vw, 4.1rem);
    line-height: 1.05;
    color: #cccccc;
}

.hero-text {
    max-width: 42rem;
    font-size: 1.05rem;
}

.hero-actions,
.admin-actions,
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 999px;
    font-weight: 700;
}

.button-primary {
    background: var(--brand);
    color: var(--paper-deep);
    box-shadow: 0 8px 18px rgba(249, 217, 56, 0.22);
}

.button-primary:hover {
    background: var(--brand-dark);
    color: #ffffff;
    transform: translateY(-2px);
}

.button-secondary {
    border: 1px solid var(--line);
    background: var(--paper-strong);
    color: #cccccc;
}

.button-secondary:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.hero-side {
    display: flex;
    justify-content: center;
}

.hero-avatar {
    width: min(320px, 100%);
    aspect-ratio: 1;
    border: 4px solid var(--brand);
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
}

.hero-avatar-fallback {
    display: grid;
    place-items: center;
    width: min(280px, 100%);
    aspect-ratio: 1;
    background: var(--paper-deep);
    color: var(--brand);
    font-size: 4rem;
    font-weight: 900;
    border: 4px solid var(--brand);
    border-radius: 50%;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 0.9fr);
    gap: 24px;
    margin-top: 24px;
}

.main-column,
.side-column {
    display: grid;
    gap: 24px;
}

.panel {
    padding: 24px;
}

.panel h2,
.section-heading h2 {
    color: #cccccc;
    border-bottom: 2px solid var(--muted);
    padding-bottom: 10px;
}

.section-heading a {
    color: var(--muted);
}

.card-list {
    display: grid;
    gap: 18px;
}

.post-card {
    overflow: hidden;
    background: var(--paper-deep);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.34);
}

.post-card-cover img {
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
}

.post-card-body {
    padding: 20px;
    background: var(--paper-strong);
}

.post-card h3,
.section-heading h2,
.panel h2 {
    margin: 0 0 8px;
}

.post-card p,
.comment-card p,
.page-heading p {
    margin: 0;
    line-height: 1.7;
}

.post-meta,
.footer-links,
.field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-tree {
    list-style: none;
    margin: 0;
    padding-left: 16px;
    display: grid;
    gap: 10px;
}

.category-tree a {
    color: var(--muted);
}

.category-tree a:hover {
    color: var(--brand);
}

.post-article .prose {
    line-height: 1.85;
}

.post-article .prose pre,
.post-article .prose code {
    font-family: "Cascadia Code", Consolas, monospace;
}

.post-article .prose pre {
    padding: 16px;
    overflow: auto;
    background: #2d2d2d;
    color: #f8f8f2;
    border-radius: 5px;
}

.post-article .prose a {
    color: var(--brand);
}

.post-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.post-category-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--paper-deep);
    color: var(--muted);
}

.post-category-links a:hover {
    color: var(--brand);
}

.comment-section {
    margin-top: 32px;
}

.comment-form,
.search-form {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 8px;
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 12px 14px;
    font: inherit;
    background: #1e1e1e;
    color: #cccccc;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(249, 217, 56, 0.16);
}

textarea {
    resize: vertical;
}

.status-badge {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.9rem;
}

.is-success {
    background: rgba(249, 217, 56, 0.16);
    color: var(--brand);
}

.is-warning {
    background: rgba(0, 123, 255, 0.16);
    color: #7db7ff;
}

.comment-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.comment-card {
    padding: 18px;
}

.comment-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.pagination a {
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--paper-deep);
    color: var(--muted);
}

.pagination .is-active {
    background: var(--brand);
    color: var(--paper-deep);
}

.site-footer {
    padding: 0 0 32px;
    background: rgba(38, 38, 38, 1);
    color: #ffffff;
    margin-top: 24px;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 0;
    border-top: 0;
}

.footer-grid h3 {
    color: #ffffff;
}

.footer-grid a:hover {
    color: var(--brand);
}

@media (max-width: 900px) {
    .hero-panel,
    .content-grid {
        grid-template-columns: 1fr;
    }

    .nav-row,
    .footer-grid {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .site-main {
        padding-top: 20px;
    }

    .hero-panel,
    .panel {
        padding: 18px;
    }

    .primary-nav {
        flex-wrap: wrap;
    }
}
