/* ===== MJ's Blog - Custom Theme ===== */

body {
    font-family: 'DM Sans', sans-serif;
    background: #ffffff;
    color: #1a1a1a;
}

/* ===== Home Page ===== */
.home-header {
    padding: 60px 0 50px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1000px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.home-header-left {
    max-width: 420px;
}

.greeting {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    color: #888;
    display: block;
    margin-bottom: 8px;
}

.home-logo {
    font-family: 'Instrument Serif', serif;
    font-size: 4rem;
    font-weight: 400;
    color: #1a1a1a;
    text-decoration: none;
    display: block;
    line-height: 1.1;
}

.header-links {
    display: flex;
    gap: 20px;
    padding-top: 10px;
}

.header-links a {
    font-size: 0.9rem;
    color: #888;
    text-decoration: none;
    transition: color 0.15s;
}

.header-links a:hover {
    color: #1a1a1a;
}

/* ===== Bento Grid ===== */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(100px, auto);
    gap: 16px;
    padding-bottom: 80px;
    max-width: 1000px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.card {
    border-radius: 0;
    border: 1px solid #1a1a1a;
    cursor: pointer;
    transition: transform 0.05s ease, box-shadow 0.1s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.card-content {
    position: relative;
}

.card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.8rem;
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: 0.05em;
}

.card-count {
    font-size: 0.9rem;
    opacity: 0.6;
    margin-top: 12px;
    font-weight: 500;
}

/* Card Styles */
.card-paper {
    grid-column: span 7;
    grid-row: span 2;
    background: #fde8e8;
    color: #d64545;
}
.card-paper .card-title { font-size: 3.2rem; }

.card-deep {
    grid-column: span 5;
    grid-row: span 2;
    background: #e8f4fc;
    color: #2d7fc1;
}
.card-deep .card-title { font-size: 2.8rem; }

.card-research {
    grid-column: span 4;
    grid-row: span 2;
    background: #fdf6e3;
    color: #b8860b;
}
.card-research .card-title { font-size: 2rem; }

.card-math {
    grid-column: span 4;
    grid-row: span 2;
    background: #f8f8f8;
    color: #505050;
}
.card-math .card-title { font-size: 2rem; }

.card-projects {
    grid-column: span 4;
    grid-row: span 2;
    background: #e8f5f2;
    color: #2a9d8f;
}
.card-projects .card-title { font-size: 2.2rem; }

.card-til {
    grid-column: span 6;
    grid-row: span 1;
    background: #f5f0fa;
    color: #7c4dff;
    padding: 16px 28px;
    min-height: auto;
}
.card-til .card-title { font-size: 1.8rem; }

.card-thoughts {
    grid-column: span 6;
    grid-row: span 1;
    background: #fff5eb;
    color: #e07b39;
    padding: 16px 28px;
    min-height: auto;
}
.card-thoughts .card-title { font-size: 1.8rem; }

/* ===== Responsive ===== */
@media (max-width: 800px) {
    .home-header {
        flex-direction: column;
        gap: 20px;
        padding: 40px 20px 30px;
    }
    .home-header-left { max-width: 100%; }
    .bento-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 12px;
    }
    .card-paper { grid-column: span 6; }
    .card-deep { grid-column: span 6; }
    .card-research { grid-column: span 3; }
    .card-math { grid-column: span 3; }
    .card-projects { grid-column: span 6; }
    .card-til { grid-column: span 3; }
    .card-thoughts { grid-column: span 3; }

    .card-title { font-size: 2rem !important; }
    .card-paper .card-title { font-size: 2.4rem !important; }

    .post-list-title { font-size: 2.2rem; }
    .post-item-title { font-size: 1.3rem; }
}

@media (max-width: 500px) {
    .home-header {
        padding: 30px 16px 20px;
        overflow: visible;
    }
    .home-header-left {
        width: 100%;
    }
    .home-logo { font-size: 2.5rem; }
    .greeting { font-size: 0.9rem; }
    .header-links {
        gap: 12px 20px;
        flex-wrap: wrap;
        width: 100%;
        padding-top: 5px;
    }
    .header-links a { font-size: 0.9rem; }

    .bento-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 0 16px 60px;
    }
    .card-paper, .card-deep, .card-research,
    .card-math, .card-projects, .card-til, .card-thoughts {
        grid-column: span 1;
        grid-row: span 1;
    }
    .card {
        min-height: 120px;
        padding: 20px;
    }
    .card-title { font-size: 1.6rem !important; }
    .card-paper .card-title { font-size: 1.8rem !important; }
    .card-count { font-size: 0.8rem; margin-top: 8px; }

    /* Post list mobile */
    .post-list-header {
        padding: 30px 16px 20px;
    }
    .post-list-title { font-size: 1.8rem; }
    .post-list-desc { font-size: 0.95rem; }
    .post-list { padding: 0 16px 40px; }
    .post-item { padding: 20px 0; }
    .post-item-title { font-size: 1.2rem; }
    .post-item-desc { font-size: 0.9rem; }

    /* Single post mobile */
    .post-single { padding: 0 16px 40px; }
    .post-content {
        font-size: 1rem;
        line-height: 1.7;
        margin-top: 30px;
    }
    .post-content h1 { font-size: 1.6rem; }
    .post-content h2 { font-size: 1.4rem; }
    .post-content h3 { font-size: 1.2rem; }
    .post-content pre {
        padding: 14px;
        font-size: 0.85rem;
        margin: 1em -16px;
        border-radius: 0;
    }
    .post-content ul, .post-content ol {
        margin-left: 1em;
    }

    /* Footer mobile */
    .home-footer {
        padding: 20px 16px 40px;
        font-size: 0.85rem;
    }
    .home-footer a { margin: 0 8px; }
}

/* ===== Footer ===== */
.home-footer {
    text-align: center;
    padding: 30px 0 50px;
    color: #888;
    font-size: 0.9rem;
}

.home-footer a {
    color: #666;
    text-decoration: none;
    margin: 0 12px;
}

.home-footer a:hover {
    color: #1a1a1a;
}

/* ===== Post List Page ===== */
.post-list-header {
    padding: 50px 0 40px;
    max-width: 1000px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.back-link {
    font-size: 0.95rem;
    color: #888;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
}

.back-link:hover {
    color: #1a1a1a;
}

.post-list-title {
    font-family: 'Instrument Serif', serif;
    font-size: 2.8rem;
    font-weight: 400;
}

.post-list-desc {
    color: #666;
    margin-top: 10px;
    font-size: 1.05rem;
}

/* Post Items */
.post-list {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.post-item {
    display: block;
    padding: 28px 0;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: inherit;
    transition: padding-left 0.15s ease;
}

.post-item:hover {
    padding-left: 12px;
}

.post-item:first-child {
    border-top: 1px solid #eee;
}

.post-item-title {
    font-family: 'Instrument Serif', serif;
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 6px;
    color: #1a1a1a;
}

.post-item-desc {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
}

.post-item-meta {
    font-size: 0.85rem;
    color: #aaa;
}

/* ===== Single Post ===== */
.post-single {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.post-meta {
    font-size: 0.9rem;
    color: #888;
    margin-top: 10px;
}

.post-meta a {
    color: #666;
    text-decoration: none;
}

.post-meta a:hover {
    color: #1a1a1a;
}

.post-content {
    margin-top: 40px;
    line-height: 1.8;
    font-size: 1.05rem;
}

.post-content h1, .post-content h2, .post-content h3 {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    margin-top: 2em;
    margin-bottom: 0.5em;
}

.post-content h1 { font-size: 2rem; }
.post-content h2 { font-size: 1.6rem; }
.post-content h3 { font-size: 1.3rem; }

.post-content p {
    margin-bottom: 1.5em;
}

.post-content a {
    color: #2d7fc1;
    text-decoration: underline;
}

.post-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.post-content pre {
    background: #1a1a1a;
    color: #f5f5f5;
    padding: 20px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5em 0;
}

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

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

.post-content blockquote {
    border-left: 3px solid #ddd;
    padding-left: 20px;
    margin: 1.5em 0;
    color: #666;
    font-style: italic;
}

.post-content ul, .post-content ol {
    margin: 1em 0 1.5em 1.5em;
}

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

.post-tags {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.post-tags .tag {
    display: inline-block;
    background: #f5f5f5;
    color: #666;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    margin-right: 8px;
    margin-bottom: 8px;
}

.post-tags .tag:hover {
    background: #eee;
    color: #1a1a1a;
}
