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

:root {
    --bg:        #0e0d0c;
    --bg-card:   #161412;
    --bg-card2:  #1e1b18;
    --text:      #e4dfd6;
    --text-muted:#8a8078;
    --accent:    #c9963a;
    --accent-dim:#a07828;
    --border:    #2a2520;
    --radius:    6px;
    --ff-head:   'Playfair Display', Georgia, serif;
    --ff-body:   'Inter', system-ui, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--ff-body);
    font-weight: 400;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

a { color: inherit; text-decoration: none; }

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container--narrow { max-width: 780px; }

/* ── Header ── */
.site-header {
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(14,13,12,0.95);
    backdrop-filter: blur(8px);
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 2rem;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.logo-mark {
    background: var(--accent);
    color: #000;
    font-family: var(--ff-head);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.25rem 0.45rem;
    border-radius: 3px;
    letter-spacing: 0.02em;
}

.logo-text {
    font-family: var(--ff-head);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.logo-text span { color: var(--accent); }

.main-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    overflow-x: auto;
}

.main-nav a {
    font-size: 0.875rem;
    color: var(--text-muted);
    white-space: nowrap;
    transition: color 0.15s;
}

.main-nav a:hover { color: var(--text); }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
    margin-left: auto;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.25rem;
    background: var(--accent);
    color: #000;
    font-family: var(--ff-body);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
}

.btn:hover { background: #d4a440; }

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover { border-color: var(--text-muted); background: var(--bg-card2); }

/* ── Tags ── */
.tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--accent-dim);
    border-radius: 3px;
    transition: background 0.15s;
}

.tag:hover { background: rgba(201,150,58,0.1); }

/* ── Hero ── */
.hero {
    padding: 4rem 0 3rem;
    border-bottom: 1px solid var(--border);
}

.hero-inner { max-width: 720px; }

.hero-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.hero-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.hero-title {
    font-family: var(--ff-head);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.hero-title a:hover { color: var(--accent); }

.hero-excerpt {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.5rem;
    max-width: 600px;
}

.hero-footer {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero-footer time {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ── Articles Grid ── */
.articles-section { padding: 3rem 0 4rem; }

.section-title {
    font-family: var(--ff-head);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.articles-grid--3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ── Card ── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.15s, transform 0.15s;
    display: flex;
    flex-direction: column;
}

.card:hover {
    border-color: var(--accent-dim);
    transform: translateY(-2px);
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.75rem;
}

.card-title {
    font-family: var(--ff-head);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
}

.card-title a:hover { color: var(--accent); }

.card-excerpt {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.views { opacity: 0.7; }

/* ── Pagination ── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ── Category Hero ── */
.category-hero {
    padding: 3rem 0 2.5rem;
    border-bottom: 1px solid var(--border);
}

.category-hero h1 {
    font-family: var(--ff-head);
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    margin-bottom: 0.5rem;
}

.category-hero p {
    color: var(--text-muted);
    max-width: 600px;
}

.article-count {
    font-size: 0.85rem !important;
    margin-top: 0.75rem;
    color: var(--accent) !important;
}

/* ── Article Page ── */
.article-page { padding: 3rem 0 4rem; }

.article-header { margin-bottom: 2.5rem; }

.article-header .tag { margin-bottom: 1rem; }

.article-title {
    font-family: var(--ff-head);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0.75rem 0;
}

.article-excerpt {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #cdc8be;
}

.article-content h2 {
    font-family: var(--ff-head);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text);
    margin: 2.5rem 0 1rem;
}

.article-content h3 {
    font-family: var(--ff-head);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin: 2rem 0 0.75rem;
}

.article-content p { margin-bottom: 1.4rem; }

.article-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    background: var(--bg-card);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-muted);
    font-style: italic;
}

.article-content ul, .article-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.4rem;
}

.article-content li { margin-bottom: 0.4rem; }

.article-content img {
    border-radius: var(--radius);
    margin: 1.5rem 0;
    max-width: 100%;
}

.article-content code {
    background: var(--bg-card2);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    color: var(--accent);
}

.article-content pre {
    background: var(--bg-card2);
    padding: 1.25rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin-bottom: 1.4rem;
    border: 1px solid var(--border);
}

.article-content pre code { background: none; padding: 0; color: var(--text); }

/* ── Related ── */
.related-section {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
}

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: 5rem 1rem;
}

.empty-state h2 {
    font-family: var(--ff-head);
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ── Footer ── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 3rem 0 2rem;
    margin-top: auto;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 0.75rem;
}

.footer-links h4 {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.footer-links ul { list-style: none; }

.footer-links li { margin-bottom: 0.4rem; }

.footer-links a {
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: color 0.15s;
}

.footer-links a:hover { color: var(--text); }

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .main-nav { display: none; }
    .main-nav.open { display: flex; flex-direction: column; position: fixed; top: 64px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 1rem 1.5rem; z-index: 99; gap: 1rem; }
    .nav-toggle { display: block; }
    .footer-inner { grid-template-columns: 1fr; }
    .hero { padding: 2.5rem 0 2rem; }
    .articles-grid { grid-template-columns: 1fr; }
}
