/* ===========================
   CSS Reset & Base Styles
   =========================== */

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

html {
    font-size: 18px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    color: #1a1a1a;
    background-color: #fafafa;
    padding: 0 20px;
}

/* ===========================
   Container & Layout
   =========================== */

.container {
    max-width: 680px;
    margin: 0 auto;
}

/* ===========================
   Typography
   =========================== */

h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
}

p {
    margin-bottom: 1.25rem;
}

a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #1e40af;
    text-decoration: underline;
}

/* ===========================
   Header
   =========================== */

header {
    padding: 3rem 0 2rem;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 3rem;
}

header h1 a {
    color: #1a1a1a;
    text-decoration: none;
}

header h1 a:hover {
    color: #2563eb;
}

.tagline {
    color: #666;
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

/* ===========================
   Main Content
   =========================== */

main {
    min-height: calc(100vh - 300px);
    padding-bottom: 3rem;
}

/* ===========================
   Posts List (Homepage)
   =========================== */

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.post-preview {
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.post-preview:last-child {
    border-bottom: none;
}

.post-preview h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.post-preview h2 a {
    color: #1a1a1a;
}

.post-preview h2 a:hover {
    color: #2563eb;
}

.post-date {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.post-excerpt {
    color: #444;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 500;
    color: #2563eb;
}

.read-more:hover {
    color: #1e40af;
}

.no-posts {
    text-align: center;
    padding: 3rem 0;
    color: #666;
}

/* ===========================
   Individual Post Page
   =========================== */

.post-full {
    max-width: 680px;
}

.post-header {
    margin-bottom: 2rem;
}

.post-header h1 {
    margin-bottom: 0.5rem;
}

.post-header .post-date {
    margin-bottom: 0;
}

.post-content {
    margin-bottom: 3rem;
}

.post-content h2 {
    margin-top: 2.5rem;
}

.post-content h3 {
    margin-top: 2rem;
}

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

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

.post-content blockquote {
    border-left: 4px solid #e5e5e5;
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #666;
    font-style: italic;
}

.post-content code {
    background-color: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: "Courier New", Courier, monospace;
}

.post-content pre {
    background-color: #f4f4f4;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 1.25rem;
}

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

.post-footer {
    padding-top: 2rem;
    border-top: 1px solid #e5e5e5;
}

.back-link {
    display: inline-block;
    color: #666;
    font-size: 0.95rem;
}

.back-link:hover {
    color: #2563eb;
}

/* ===========================
   Footer
   =========================== */

footer {
    border-top: 1px solid #e5e5e5;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

footer a {
    color: #666;
}

footer a:hover {
    color: #2563eb;
}

/* ===========================
   Error Page (404)
   =========================== */

.error-page {
    text-align: center;
    padding: 4rem 0;
}

.error-page h1 {
    font-size: 4rem;
    color: #e5e5e5;
    margin-bottom: 0.5rem;
}

.error-page h2 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.error-page p {
    color: #666;
    margin-bottom: 2rem;
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 768px) {
    html {
        font-size: 16px;
    }
    
    header {
        padding: 2rem 0 1.5rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.35rem;
    }
    
    .posts-list {
        gap: 2rem;
    }
    
    .post-preview {
        padding-bottom: 2rem;
    }
}