:root {
    --bg-primary: #121212;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #0a0a0a;
    --text-primary: #e6e1d3;
    --text-secondary: #a8a090;
    --text-muted: #6b6558;
    --accent: #d4a373;
    --accent-hover: #e8b88a;
    --accent-dim: #8b7355;
    --border: #2a2720;
    --border-hover: #3d3830;
    --code-bg: #0d0d0d;
    --selection: rgba(212, 163, 115, 0.3);
}

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

::selection {
    background: var(--selection);
    color: var(--text-primary);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; margin-bottom: 1.5rem; }
h2 { font-size: 1.75rem; margin: 2.5rem 0 1rem; color: var(--accent); }
h3 { font-size: 1.35rem; margin: 2rem 0 0.75rem; }
h4 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; color: var(--text-secondary); }

p {
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
    border-bottom-color: var(--accent);
}

/* Layout */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

header {
    border-bottom: 1px solid var(--border);
    padding: 2rem 0;
    margin-bottom: 3rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

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

nav {
    display: flex;
    gap: 1.5rem;
}

nav a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
}

nav a:hover {
    color: var(--accent);
}

/* Entry List */
.entry-list {
    margin-top: 2rem;
}

.entry-card {
    border-bottom: 1px solid var(--border);
    padding: 2rem 0;
    transition: all 0.2s ease;
}

.entry-card:hover {
    border-bottom-color: var(--accent-dim);
}

.entry-card:last-child {
    border-bottom: none;
}

.entry-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.entry-card h2 {
    font-size: 1.5rem;
    margin: 0 0 0.75rem;
    color: var(--text-primary);
}

.entry-card h2 a {
    color: inherit;
    border: none;
}

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

.entry-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.entry-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tag:hover {
    border-color: var(--accent-dim);
    color: var(--accent);
}

/* Single Entry */
article {
    max-width: 680px;
}

.article-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.article-title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.article-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.article-content h2 {
    margin-top: 3rem;
}

.article-content h3 {
    margin-top: 2.5rem;
    color: var(--text-secondary);
}

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

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

.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

.article-content code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    background: var(--code-bg);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    color: var(--accent);
}

.article-content pre {
    background: var(--code-bg);
    padding: 1.25rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
}

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

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--accent);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* Footer */
footer {
    margin-top: 5rem;
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Search */
.search-box {
    margin: 2rem 0;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.back-link:hover {
    color: var(--accent);
}

/* Responsive */
@media (max-width: 640px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.4rem; }
    .article-title { font-size: 1.75rem; }
    .header-content { flex-direction: column; align-items: flex-start; }
    nav { gap: 1rem; }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-dim);
}