:root {
    --background: #010302;
    --surface: #111923;
    --surface-light: #182430;
    --text: #d8e0e4;
    --muted: #82909b;
    --line: #2b3b47;
    --accent: #d87b3d;
    --accent-blue: #4d94b5;
    --serif: Georgia, "Times New Roman", serif;
    --sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: radial-gradient(circle at 50% -20%, #1a2732 0, var(--background) 48rem);
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.7;
}

a { color: var(--accent-blue); text-decoration: none; }
a:hover { color: #f0a267; }

.site-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
    border-bottom: 1px solid var(--line);
    padding: 28px 0 22px;
}

.header-inner, .site-layout, .footer-inner {
    display: flex;
    gap: 34px;
}

.header-inner { align-items: flex-end; justify-content: space-between; }
.brand-block { min-width: 0; }

.site-brand {
    color: #f0f2f1;
    font: 700 clamp(1.8rem, 4vw, 2.8rem)/1.05 var(--serif);
    letter-spacing: -0.04em;
}

.site-description { color: var(--muted); margin: 10px 0 0; }

.site-nav { display: flex; flex-wrap: wrap; gap: 20px; justify-content: flex-end; }
.site-nav a { color: var(--text); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; }
.site-nav a:hover { color: var(--accent); }

.site-layout { align-items: flex-start; padding: 42px 0 64px; }
.site-main { min-width: 0; flex: 1 1 auto; }
.site-sidebar { border-left: 1px solid var(--line); flex: 0 0 260px; padding-left: 28px; }

.page-section, .article-page { min-width: 0; }
.section-heading { margin-bottom: 28px; position: relative; }
.section-kicker { color: var(--accent); font-size: 0.7rem; letter-spacing: 0.2em; margin: 0 0 9px; }
.section-heading h1 { color: #f4f5f3; font: 700 clamp(2rem, 5vw, 3.25rem)/1.1 var(--serif); margin: 0; }
.section-rule { background: var(--accent); display: block; height: 3px; margin-top: 20px; width: 56px; }

.article-list { display: grid; gap: 18px; }
.article-card { background: linear-gradient(135deg, rgba(24, 36, 48, 0.96), rgba(17, 25, 35, 0.96)); border-left: 3px solid var(--accent-blue); padding: 24px 26px 22px; }
.article-card:hover { border-left-color: var(--accent); }
.article-card-meta, .article-meta { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.06em; margin: 0; text-transform: uppercase; }
.meta-separator { color: var(--accent); margin: 0 9px; }
.article-card h2 { font: 700 clamp(1.45rem, 3vw, 2.15rem)/1.18 var(--serif); margin: 10px 0 9px; }
.article-card h2 a { color: #f1f3f1; }
.article-card-summary { color: #aebbc1; margin: 0 0 13px; }
.read-more { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; }
.read-more span { color: var(--accent); padding-left: 5px; }
.empty-state, .sidebar-empty { color: var(--muted); }

.pagination { align-items: center; border-top: 1px solid var(--line); display: flex; gap: 20px; justify-content: space-between; margin-top: 28px; padding-top: 18px; }
.pagination span { color: var(--muted); font-size: 0.8rem; }
.pagination a { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }

.site-sidebar h2 { color: #f0f2f1; font-size: 0.75rem; letter-spacing: 0.16em; margin: 0 0 14px; text-transform: uppercase; }
.sidebar-section { border-top: 2px solid var(--accent); margin-bottom: 32px; padding-top: 13px; }
.sidebar-list, .sidebar-terms { list-style: none; margin: 0; padding: 0; }
.sidebar-list li { border-bottom: 1px solid rgba(43, 59, 71, 0.7); padding: 7px 0; }
.sidebar-list a { color: var(--text); display: block; line-height: 1.35; }
.sidebar-list time { color: var(--muted); display: block; font-size: 0.7rem; }
.sidebar-terms li { align-items: center; border-bottom: 1px solid rgba(43, 59, 71, 0.7); display: flex; justify-content: space-between; padding: 6px 0; }
.sidebar-terms li span:last-child { color: var(--muted); font-size: 0.75rem; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-cloud a { background: var(--surface-light); border: 1px solid var(--line); font-size: 0.75rem; padding: 3px 7px; }
.tag-cloud sup { color: var(--muted); }

.term-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.term-card { align-items: center; background: var(--surface); border-top: 2px solid var(--accent-blue); color: var(--text); display: flex; justify-content: space-between; padding: 17px; }
.term-card strong { color: var(--accent); font-size: 0.8rem; }

.archive-list { display: grid; gap: 28px; }
.archive-year { background: linear-gradient(135deg, rgba(24, 36, 48, 0.96), rgba(17, 25, 35, 0.96)); border-left: 3px solid var(--accent-blue); padding: 20px 24px 12px; }
.archive-year-heading { align-items: baseline; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; }
.archive-year-heading h2 { color: #f0f2f1; font: 700 1.8rem/1.2 var(--serif); margin: 0 0 12px; }
.archive-year-heading span { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; }
.archive-year ul { list-style: none; margin: 0; padding: 0; }
.archive-year li { align-items: baseline; border-bottom: 1px solid rgba(43, 59, 71, 0.7); display: flex; gap: 18px; padding: 10px 0; }
.archive-year li:last-child { border-bottom: 0; }
.archive-year time { color: var(--muted); flex: 0 0 105px; font-size: 0.75rem; }
.archive-year a { color: var(--text); font-family: var(--serif); font-size: 1.05rem; }
.archive-year a:hover { color: var(--accent); }

.article-header { border-bottom: 1px solid var(--line); margin-bottom: 26px; padding-bottom: 24px; }
.article-header h1 { color: #f4f5f3; font: 700 clamp(2.2rem, 6vw, 4rem)/1.08 var(--serif); margin: 7px 0 17px; }
.article-toc { background: var(--surface); border-left: 3px solid var(--accent); margin: 0 0 28px; padding: 17px 22px; }
.toc-title { color: var(--text); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; margin: 0 0 8px; text-transform: uppercase; }
.article-toc nav, .article-toc ul { margin: 0; padding-left: 20px; }
.article-content { color: #c7d0d3; font-size: 1.02rem; }
.article-content h2, .article-content h3, .article-content h4 { color: #f0f2f1; font-family: var(--serif); line-height: 1.25; margin-top: 2em; }
.article-content a { text-decoration: underline; text-decoration-color: rgba(216, 123, 61, 0.55); text-underline-offset: 3px; }
.article-content blockquote { border-left: 3px solid var(--accent-blue); color: var(--muted); margin-left: 0; padding-left: 22px; }
.article-content code { background: #0b1117; color: #e6a473; padding: 2px 5px; }
.article-content pre { background: #0b1117; border: 1px solid var(--line); overflow-x: auto; padding: 18px; }
.article-content pre code { padding: 0; }
.article-content img { height: auto; max-width: 100%; }
.article-content table { display: block; max-width: 100%; overflow-x: auto; }
.article-content iframe, .article-content video { max-width: 100%; }
.article-content video { height: auto; }
.article-footer { border-top: 1px solid var(--line); margin-top: 38px; padding-top: 18px; }
.taxonomy-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.taxonomy-row > span { color: var(--muted); margin-right: 8px; }
.taxonomy-row a { background: var(--surface-light); padding: 2px 8px; }
.article-nav { border-top: 1px solid var(--line); display: flex; gap: 22px; justify-content: space-between; margin-top: 30px; padding-top: 20px; }
.article-nav a { display: flex; flex: 1; flex-direction: column; }
.article-nav-next { align-items: flex-end; text-align: right; }
.article-nav span { color: var(--muted); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; }
.article-nav strong { color: var(--text); font: 700 1.1rem/1.3 var(--serif); margin-top: 5px; }

.site-footer { border-top: 1px solid var(--line); padding: 22px 0 30px; }
.footer-inner { align-items: center; color: var(--muted); font-size: 0.75rem; justify-content: space-between; }
.footer-note { flex: 1; text-align: center; }

@media (max-width: 760px) {
    .site-shell { width: min(100% - 28px, 620px); }
    .header-inner, .site-layout, .footer-inner { display: block; }
    .site-nav { justify-content: flex-start; margin-top: 22px; }
    .site-layout { padding: 30px 0 46px; }
    .site-sidebar { border-left: 0; border-top: 1px solid var(--line); margin-top: 42px; padding: 34px 0 0; }
    .footer-note { margin: 10px 0; text-align: left; }
    .article-nav { display: block; }
    .article-nav a { margin-bottom: 18px; }
    .article-nav-next { align-items: flex-start; text-align: left; }
}
