/* ==========================================
   PAGE LAYOUTS - Posts, Publications, etc.
   ========================================== */

/* Page Header */
.page-header {
    text-align: center;
    padding: 3rem 0 2rem;
    border-bottom: 2px solid #8B9D5D;
    margin-bottom: 3rem;
}

.page-title {
    font-family: Georgia, serif;
    font-size: 2.5rem;
    font-weight: bold;
    color: #E8D5C4;
    margin-bottom: 0.75rem;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #A39A8F;
    line-height: 1.6;
}

/* ==========================================
   Posts POSTS
   ========================================== */

.posts-archive {
    padding: 2rem 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background-color: #242420;
    border: 0.5px solid #4a4a48;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(184, 134, 11, 0.15);
}

.post-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #2d2d2a 0%, #3a3a36 100%);
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-category {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: #B8860B;
    color: #1a1a18;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.post-date {
    color: #8B9D5D;
    font-weight: 500;
}

.post-reading-time {
    color: #A39A8F;
}

.post-card-title {
    font-family: Georgia, serif;
    font-size: 1.3rem;
    font-weight: bold;
    color: #E8D5C4;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-card-title a {
    color: inherit;
}

.post-card-title a:hover {
    color: #B8860B;
}

.post-card-summary {
    color: #A39A8F;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 2.8rem;
}

.post-card-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    background-color: rgba(139, 157, 93, 0.2);
    color: #8B9D5D;
    padding: 0.3rem 0.7rem;
    border-radius: 3px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: rgba(139, 157, 93, 0.4);
}

.read-more {
    color: #B8860B;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid #B8860B;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: inline-block;
}

.read-more:hover {
    padding-left: 4px;
    color: #d4af37;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0;
    border-top: 1px solid #4a4a48;
    margin-top: 3rem;
}

.pagination-link {
    color: #B8860B;
    font-weight: 500;
    text-decoration: none;
    border: 1.5px solid #B8860B;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination-link:hover {
    background-color: #B8860B;
    color: #1a1a18;
}

.pagination-info {
    color: #A39A8F;
    font-size: 0.9rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #A39A8F;
}

/* ==========================================
   SINGLE POST PAGE
   ========================================== */

.post-single {
    padding: 2rem 0;
}

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

.post-title {
    font-family: Georgia, serif;
    font-size: 2.5rem;
    font-weight: bold;
    color: #E8D5C4;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #4a4a48;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #A39A8F;
    font-size: 0.9rem;
}

.meta-item i {
    color: #8B9D5D;
}

.post-image {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #C0B8B0;
    margin-bottom: 3rem;
}

/* Post content typography */
.post-content h2 {
    font-family: Georgia, serif;
    font-size: 1.8rem;
    color: #E8D5C4;
    margin: 2rem 0 1rem;
    padding-top: 1rem;
}

.post-content h3 {
    font-family: Georgia, serif;
    font-size: 1.4rem;
    color: #E8D5C4;
    margin: 1.5rem 0 0.75rem;
}

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

.post-content ul,
.post-content ol {
    margin: 1.5rem 0 1.5rem 2rem;
}

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

.post-content code {
    background-color: #242420;
    color: #B8860B;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.post-content pre {
    background-color: #242420;
    border: 1px solid #4a4a48;
    color: #C0B8B0;
    padding: 1.5rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

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

.post-content blockquote {
    border-left: 4px solid #8B9D5D;
    padding-left: 1.5rem;
    margin: 2rem 0;
    color: #A39A8F;
    font-style: italic;
}

.post-content a {
    color: #B8860B;
    border-bottom: 1px solid #B8860B;
}

.post-content a:hover {
    color: #d4af37;
}

/* Post Footer & Tags */
.post-footer {
    padding-top: 2rem;
    border-top: 1px solid #4a4a48;
}

.post-tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Post Navigation */
.post-nav {
    padding: 3rem 0;
    background-color: #242420;
    border-top: 1px solid #4a4a48;
    border-bottom: 1px solid #4a4a48;
    margin: 3rem 0;
}

.nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.nav-prev,
.nav-next {
    display: block;
    padding: 1.5rem;
    border: 1px solid #4a4a48;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-prev:hover,
.nav-next:hover {
    border-color: #8B9D5D;
    background-color: rgba(139, 157, 93, 0.1);
}

.nav-label {
    display: block;
    color: #A39A8F;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.nav-title {
    display: block;
    color: #E8D5C4;
    font-family: Georgia, serif;
    font-size: 1.1rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .nav-links {
        grid-template-columns: 1fr;
    }
}

/* Related Posts */
.related-posts {
    padding: 3rem 0;
    border-top: 1px solid #4a4a48;
}

.related-posts h2 {
    font-family: Georgia, serif;
    font-size: 1.8rem;
    color: #E8D5C4;
    margin-bottom: 2rem;
}

/* ==========================================
   PUBLICATIONS
   ========================================== */

.publications-archive {
    padding: 2rem 0;
}

.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.publication-card {
    background-color: #242420;
    border: 0.5px solid #4a4a48;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.publication-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(184, 134, 11, 0.15);
}

.pub-image {
    margin-bottom: 1rem;
    border-radius: 6px;
    overflow: hidden;
}

.pub-image img {
    width: 100%;
    height: auto;
    display: block;
}

.pub-title {
    font-family: Georgia, serif;
    font-size: 1.2rem;
    font-weight: bold;
    color: #E8D5C4;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.pub-title a {
    color: inherit;
}

.pub-title a:hover {
    color: #B8860B;
}

.pub-author {
    color: #A39A8F;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.pub-date {
    color: #8B9D5D;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.pub-summary {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 3rem;
}

.pub-doi {
    color: #A39A8F;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.pub-doi a {
    color: #B8860B;
}

/* Single Publication */
.publication-single {
    padding: 2rem 0;
}

.pub-header {
    margin-bottom: 3rem;
}

.pub-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #242420;
    border-radius: 6px;
    border: 1px solid #4a4a48;
}

.pub-meta .meta-item {
    color: #A39A8F;
    font-size: 0.9rem;
}

.pub-meta strong {
    color: #E8D5C4;
}

.pub-meta a {
    color: #B8860B;
}

.pub-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #C0B8B0;
    margin-bottom: 3rem;
}

.pub-footer {
    padding-top: 2rem;
    border-top: 1px solid #4a4a48;
}

.pub-tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.pub-tags strong {
    color: #E8D5C4;
}

/* Back Link */
.back-link {
    padding: 2rem 0;
    border-top: 1px solid #4a4a48;
}

.back-link a {
    color: #B8860B;
    text-decoration: none;
    border-bottom: 1px solid #B8860B;
    transition: all 0.3s ease;
}

.back-link a:hover {
    padding-left: 4px;
}

/* ==========================================
   GENERIC PAGE LAYOUT
   ========================================== */

.page-single {
    padding: 2rem 0;
}

.page-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #C0B8B0;
}

.page-content h2 {
    font-family: Georgia, serif;
    font-size: 1.8rem;
    color: #E8D5C4;
    margin: 2rem 0 1rem;
    padding-top: 1rem;
}

.page-content h3 {
    font-family: Georgia, serif;
    font-size: 1.4rem;
    color: #E8D5C4;
    margin: 1.5rem 0 0.75rem;
}

.page-content p {
    margin-bottom: 1.5rem;
}

.page-content a {
    color: #B8860B;
    border-bottom: 1px solid #B8860B;
}

.page-content a:hover {
    color: #d4af37;
}

.page-content ul,
.page-content ol {
    margin: 1.5rem 0 1.5rem 2rem;
}

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

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .posts-grid,
    .publications-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .post-title {
        font-size: 2rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

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

    .pub-meta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 2rem 0 1.5rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .post-card-title {
        font-size: 1.1rem;
    }

    .post-title {
        font-size: 1.75rem;
    }

    .post-content {
        font-size: 0.95rem;
    }

    .post-content h2 {
        font-size: 1.4rem;
    }
}