@import url('https://fonts.googleapis.com/css2?family=jetbrains+mono:ital,wght@0,400;0,500;0,700;1,400&family=fira+code:wght@400;500;600&family=inter:wght@400;500;600&display=swap');

:root {
    --bg-color: #2a241f;
    --bg-secondary: #221d18;
    --text-color: #d4c5b9;
    --text-secondary: #9b8f82;
    --accent-color: #daa520;
    --code-bg: #342d26;
    --border-color: #4a3f33;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    --mono: 'jetbrains mono', 'fira code', 'sf mono', 'consolas', 'monaco', 'courier new', monospace;
    --display: 'jetbrains mono', 'fira code', monospace;
    --sans: 'inter', -apple-system, blinkmacsystemfont, sans-serif;
    --paper-shadow: inset 0 0 40px rgba(0, 0, 0, 0.2);
}


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

::selection {
    background-color: var(--accent-color);
    color: white;
}

body {
    font-family: var(--mono);
    font-size: 16px;
    line-height: 1.65;
    font-weight: 400;
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(ellipse at top left, rgba(139, 69, 19, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(160, 82, 45, 0.03) 0%, transparent 50%);
    transition: background-color 0.3s ease, color 0.3s ease;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(139, 69, 19, 0.03) 2px,
            rgba(139, 69, 19, 0.03) 4px
        );
    pointer-events: none;
    z-index: 1;
}

.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: saturate(180%) blur(20px);
    background: linear-gradient(to bottom, 
        rgba(42, 36, 31, 0.95) 0%, 
        rgba(42, 36, 31, 0.85) 100%);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


.nav-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 1.25rem 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--sans);
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.7;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    letter-spacing: -0.01em;
}

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

.hero {
    padding: 6rem 0 4rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text-color);
    font-family: var(--mono);
    text-shadow: 2px 2px 4px rgba(139, 69, 19, 0.1);
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0;
    font-family: var(--mono);
}

.posts {
    padding: 3rem 0;
}

.posts h2 {
    font-size: 1.125rem;
    margin-bottom: 3rem;
    font-family: var(--sans);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-card {
    padding: 2.5rem 2rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, 
        var(--bg-color) 0%, 
        var(--bg-secondary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: var(--shadow), var(--paper-shadow);
    transition: all 0.3s ease;
    position: relative;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, 
        rgba(139, 69, 19, 0.05) 0%, 
        transparent 50%);
    border-radius: 4px;
    pointer-events: none;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.15), var(--paper-shadow);
}

.post-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    font-family: var(--mono);
}

.post-card a {
    color: var(--text-color);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.post-card a:hover {
    opacity: 0.7;
}

.post-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-family: var(--sans);
    letter-spacing: -0.01em;
}

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

.post-content {
    max-width: 680px;
    margin: 0 auto;
    padding: 3rem 3rem;
    animation: fadeIn 0.6s ease;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(42, 36, 31, 0.3) 10%,
        rgba(42, 36, 31, 0.5) 90%,
        transparent 100%);
    border-radius: 8px;
    box-shadow: var(--paper-shadow);
    position: relative;
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-content h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
    font-family: var(--mono);
    color: var(--accent-color);
    text-shadow: 1px 1px 2px rgba(139, 69, 19, 0.1);
}

.post-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 3rem 0 1.5rem;
    letter-spacing: -0.01em;
    font-family: var(--mono);
    color: var(--text-color);
    position: relative;
    padding-bottom: 0.5rem;
}

.post-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--accent-color);
    opacity: 0.5;
}

.post-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
    letter-spacing: 0;
    font-family: var(--mono);
}

.post-content p {
    margin-bottom: 1.75rem;
    font-size: 1rem;
    letter-spacing: 0.01em;
}

.post-content pre {
    background: linear-gradient(135deg, 
        var(--code-bg) 0%, 
        rgba(52, 45, 38, 0.8) 100%);
    border-radius: 4px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 2rem -1rem;
    font-size: 0.9rem;
    line-height: 1.6;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}


.post-content code {
    background-color: var(--code-bg);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-family: var(--mono);
    font-size: 0.9em;
    font-weight: 500;
}

.post-content pre code {
    background: none;
    padding: 0;
}

.post-content blockquote {
    border-left: 3px solid var(--accent-color);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1.1rem;
    background: linear-gradient(to right, 
        rgba(139, 69, 19, 0.05) 0%, 
        transparent 100%);
    border-radius: 0 4px 4px 0;
    position: relative;
}

.post-content blockquote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 10px;
    font-size: 3rem;
    color: var(--accent-color);
    opacity: 0.3;
    font-family: var(--mono);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 2rem 0;
    box-shadow: 
        0 4px 24px rgba(139, 69, 19, 0.1),
        0 0 0 1px var(--border-color);
    filter: sepia(0.1) contrast(0.95);
    transition: filter 0.3s ease;
}

.post-content img:hover {
    filter: sepia(0) contrast(1);
}

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

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

.katex-display {
    margin: 2rem 0;
    overflow-x: auto;
    overflow-y: hidden;
    font-size: 1.1rem;
    padding: 1rem 0;
}

footer {
    margin-top: 6rem;
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--sans);
    font-size: 0.875rem;
    letter-spacing: -0.01em;
}

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

.post-content li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
}

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--border-color);
    z-index: 1000;
}

.reading-progress-bar {
    height: 100%;
    background-color: var(--accent-color);
    width: 0;
    transition: width 0.2s ease;
}

@media (max-width: 600px) {
    body {
        font-size: 17px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .nav-links {
        gap: 1.5rem;
    }
    
    .post-content h1 {
        font-size: 2.25rem;
    }
    
    .post-content p {
        font-size: 1rem;
    }
}

