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

:root {
    --yellow: #FFD700;
    --black: #1a1a1a;
    --white: #ffffff;
    --gray: #f5f5f5;
    --shadow: rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--black);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--black) 0%, #2d2d2d 100%);
    color: var(--white);
    padding: 60px 20px;
    text-align: center;
    border-bottom: 4px solid var(--yellow);
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.tagline {
    font-size: 1.2rem;
    color: var(--yellow);
    font-weight: 300;
}

/* Main Content */
main {
    min-height: 60vh;
    padding: 40px 20px;
}

main h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--black);
    border-bottom: 3px solid var(--yellow);
    padding-bottom: 10px;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.post-card {
    background: var(--white);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border-left: 4px solid var(--yellow);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px var(--shadow);
}

.post-card h3 {
    font-size: 1.5rem;
    color: var(--black);
    margin-bottom: 10px;
}

.post-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: block;
}

.post-excerpt {
    color: #555;
    line-height: 1.5;
}

.read-more {
    display: inline-block;
    margin-top: 15px;
    color: var(--black);
    font-weight: 600;
    text-decoration: none;
    padding: 8px 16px;
    background: var(--yellow);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.read-more:hover {
    background: #FFC700;
}

/* Post Content View */
.post-content {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
}

.post-content h1 {
    font-size: 2.5rem;
    color: var(--black);
    margin-bottom: 20px;
    border-bottom: 3px solid var(--yellow);
    padding-bottom: 15px;
}

.post-content h2 {
    font-size: 2rem;
    color: var(--black);
    margin-top: 30px;
    margin-bottom: 15px;
}

.post-content h3 {
    font-size: 1.5rem;
    color: var(--black);
    margin-top: 25px;
    margin-bottom: 10px;
}

.post-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.post-content ul, .post-content ol {
    margin-left: 30px;
    margin-bottom: 20px;
}

.post-content li {
    margin-bottom: 10px;
}

.post-content code {
    background: var(--gray);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.post-content pre {
    background: var(--black);
    color: var(--yellow);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

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

.post-content blockquote {
    border-left: 4px solid var(--yellow);
    padding-left: 20px;
    margin: 20px 0;
    color: #555;
    font-style: italic;
}

.post-content a {
    color: var(--black);
    text-decoration: underline;
    font-weight: 600;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 2px 4px var(--shadow);
}

.post-content table th,
.post-content table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}

.post-content table th {
    background: var(--black);
    color: var(--white);
    font-weight: 600;
}

.post-content table tr:nth-child(even) {
    background: var(--gray);
}

.post-content table tr:hover {
    background: #fffacd;
}

/* Back Button */
.back-btn {
    background: var(--yellow);
    color: var(--black);
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 30px;
    transition: background 0.3s ease;
}

.back-btn:hover {
    background: #FFC700;
}

/* Utility Classes */
.hidden {
    display: none;
}

.loading {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    padding: 40px;
}

.error {
    background: #ffe6e6;
    color: #cc0000;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

/* Footer */
footer {
    background: var(--black);
    color: var(--white);
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    border-top: 4px solid var(--yellow);
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .post-content {
        padding: 20px;
    }

    .post-content h1 {
        font-size: 1.8rem;
    }
}
