@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;600;700&display=swap');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #fafafa;
    --text-color: #2d2d2d;
    --light-gray: #f0f0f0;
    --border-color: #d0d0d0;
    --hover-color: #4a4a4a;
    --accent-color: #0066cc;
    --font-family: 'IBM Plex Mono', 'Courier New', Courier, monospace;
    --mono-font: 'IBM Plex Mono', 'Courier New', Courier, monospace;
}

body {
    font-family: var(--font-family);
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--secondary-color);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.02em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout Structure */
.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Header - Minimal and subtle */
.top-header {
    border-bottom: 1px solid var(--border-color);
    background: var(--secondary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color 0.2s ease;
}

.site-name:hover {
    color: var(--hover-color);
}

.top-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.top-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.2s ease;
    padding: 0.25rem 0;
}

.top-nav a:hover {
    color: var(--primary-color);
}

.top-nav a.active {
    color: var(--primary-color);
    font-weight: 500;
}

.top-nav .disabled {
    color: #999999;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: not-allowed;
    padding: 0.25rem 0;
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
    width: 100%;
}

/* Page Header */
.page-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.page-description {
    font-size: 1.1rem;
    color: var(--hover-color);
    line-height: 1.6;
}

/* No Posts Message */
.no-posts {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--hover-color);
}

.no-posts h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-color);
}

/* Blog Posts */
.post-list {
    list-style: none;
}

.post-item {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

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

.post-meta {
    font-size: 0.9rem;
    color: var(--hover-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-title a {
    color: var(--primary-color);
    text-decoration: none;
}

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

.post-excerpt {
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Fix for images in post excerpts and post items to prevent overflow */
.post-excerpt img,
.post-item img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
    display: block;
}

.read-more {
    color: var(--accent-color);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.read-more:hover {
    color: var(--primary-color);
}

/* Single Post */
.post-header {
    text-align: left;
}

.post-content {
    line-height: 1.8;
}

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

.post-content pre {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: var(--mono-font);
    font-size: 0.9rem;
    margin: 2rem 0;
}

.post-content code {
    font-family: var(--mono-font);
    background: var(--light-gray);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

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

.post-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--hover-color);
}

/* Tags */
.post-tags {
    margin-top: 2rem;
}

.tag {
    display: inline-block;
    background: var(--light-gray);
    color: var(--hover-color);
    padding: 0.3rem 0.8rem;
    margin: 0.2rem 0.2rem 0.2rem 0;
    font-size: 0.8rem;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag:hover {
    background: var(--accent-color);
    color: var(--secondary-color);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.project-image {
    width: 100%;
    height: 200px;
    background: var(--light-gray);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hover-color);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.project-meta {
    font-size: 0.9rem;
    color: var(--hover-color);
    margin-bottom: 1rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.project-links a {
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.project-links a:hover {
    background: var(--accent-color);
    color: var(--secondary-color);
}

/* Music Section */
.music-list {
    margin-bottom: 3rem;
}

.music-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
}

.music-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.music-cover {
    width: 80px;
    height: 80px;
    background: var(--light-gray);
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hover-color);
    font-size: 1.5rem;
}

.music-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.music-info h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.music-meta {
    font-size: 0.9rem;
    color: var(--hover-color);
    margin-bottom: 0.5rem;
}

.music-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.music-links a {
    font-size: 0.9rem;
    color: var(--accent-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0;
}

.pagination-link {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

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

.pagination-info {
    color: var(--hover-color);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .top-nav ul {
        gap: 1rem;
    }

    .top-nav a {
        font-size: 0.85rem;
    }

    .main-content {
        padding: 2rem 1rem;
    }

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

    .music-item {
        flex-direction: column;
        text-align: center;
    }

    .pagination {
        flex-direction: column;
        gap: 1rem;
    }

    .post-excerpt img,
    .post-item img {
        margin: 0.5rem 0;
    }
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Grid System */
.grid {
    display: grid;
    gap: 2rem;
}

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

/* Post Navigation */
.post-navigation {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    margin-top: 3rem;
}

.post-navigation h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--hover-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.post-navigation a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.post-navigation a:hover {
    color: var(--accent-color);
}

/* Responsive adjustments for grid */
@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .post-navigation .text-right {
        text-align: left;
    }
}
