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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: #2c3e50;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    font-size: 16px;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 226, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.site-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.95) 100%);
    border-radius: 20px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.1),
        0 1px 8px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 1.5s ease-in-out;
}

.site-header:hover::before {
    left: 100%;
}

.site-header h1 {
    color: #2c3e50;
    margin-bottom: 0.75rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.site-header .subtitle {
    color: #6c757d;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    margin-bottom: 1rem;
}

.site-header h1 a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header h1 a:hover {
    color: #e74c3c;
    transform: translateY(-2px);
}

.header-nav {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e8ecef;
}

.header-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.header-link:hover {
    color: #2c3e50;
}

.main-content {
    max-width: 800px;
    margin: 0 auto;
}

.post {
    background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.98) 100%);
    margin-bottom: 2rem;
    padding: 2.5rem;
    border-radius: 18px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
}

.post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e74c3c 0%, #3498db 100%);
}

.post-date {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.post-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content h1,
.post-content h2 {
    color: #2c3e50;
    margin: 2rem 0 1.5rem 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.post-content h1 {
    font-size: 2.2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.post-content strong {
    font-weight: 700;
    color: #2c3e50;
}

.post-content em {
    font-style: italic;
    color: #6c757d;
}

.post-location {
    font-size: 0.9rem;
    color: #6c757d;
}

.location-link {
    color: inherit;
    text-decoration: none;
}

.location-link:hover {
    color: inherit;
    text-decoration: none;
}

.post-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
    justify-items: center; /* center thumbnails in their cells */
}

.post-image-thumbnail {
    width: auto;           /* show at natural size */
    max-width: 100%;       /* scale down if too wide */
    height: auto;          /* preserve aspect ratio */
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.image-link {
    display: inline-block; /* shrink to image width for centering */
    text-decoration: none;
}

.image-link:hover .post-image-thumbnail {
    transform: scale(1.05);
}

.post-summary {
    background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.98) 100%);
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.06),
        0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

.post-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3498db 0%, #e74c3c 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.post-summary:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.12),
        0 8px 16px rgba(0, 0, 0, 0.08);
}

.post-summary:hover::before {
    transform: scaleX(1);
}

.read-more {
    color: #6c757d;
    text-decoration: none;
    font-weight: 500;
    margin-top: 1.5rem;
    display: inline-block;
    transition: color 0.2s ease;
}

.read-more:hover {
    color: #2c3e50;
}

.navigation {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e8ecef;
}

.navigation a {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 500;
}

.navigation a:hover {
    color: #3498db;
    text-decoration: underline;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.95) 100%);
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-wrap: wrap;
}

.pagination-page,
.pagination-prev,
.pagination-next {
    color: #e74c3c;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.pagination-page:hover,
.pagination-prev:hover,
.pagination-next:hover {
    background: #e74c3c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.3);
    border-color: #e74c3c;
}

.pagination-current {
    color: white;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
}

.pagination-ellipsis {
    color: #6c757d;
    padding: 0.75rem;
    font-weight: 500;
}

.site-footer {
    text-align: center;
    margin-top: 3rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.95) 100%);
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #6c757d;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3498db 0%, #e74c3c 100%);
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .post,
    .post-summary {
        padding: 1.5rem;
    }
    
    .post-images {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .site-header {
        padding: 1.5rem;
    }
    
    .pagination {
        gap: 0.5rem;
        padding: 1.5rem;
    }
    
    .pagination-page,
    .pagination-prev,
    .pagination-next,
    .pagination-current {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .post,
    .post-summary,
    .site-header {
        padding: 1rem;
    }
    
    .post-content h1 {
        font-size: 1.5rem;
    }
    
    .post-content h2 {
        font-size: 1.2rem;
    }
    
    .post-images {
        grid-template-columns: 1fr;
    }
}

/* Link Preview Styles */
.link-preview {
    margin: 1.5rem 0;
    border: 1px solid #e8ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.link-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.link-preview-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.link-preview-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #ffffff;
}

.link-preview-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.link-preview-text {
    flex: 1;
    min-width: 0;
}

.link-preview-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-preview-description {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.link-preview-url {
    color: #3498db;
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .link-preview-content {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .link-preview-image {
        align-self: flex-start;
    }
    
    .link-preview-title {
        white-space: normal;
    }
    
    .link-preview-url {
        white-space: normal;
        word-break: break-all;
    }
}

/* Link Styles */
a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

a:visited {
    color: #3498db;
}

/* Override specific link styles that should maintain their existing behavior */
.site-header h1 a {
    color: inherit;
}

.site-header h1 a:hover {
    color: #3498db;
}

.header-link {
    color: #3498db;
}

.header-link:hover {
    color: #2c3e50;
}

.read-more {
    color: #e74c3c;
}

.read-more:hover {
    color: #3498db;
}

.navigation a {
    color: #e74c3c;
}

.navigation a:hover {
    color: #3498db;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Scroll-based animations */
.post-summary:nth-child(even) {
    animation-delay: 0.1s;
}

.post-summary:nth-child(odd) {
    animation-delay: 0.2s;
}

/* Focus states for accessibility */
.read-more:focus,
.pagination-page:focus,
.pagination-prev:focus,
.pagination-next:focus {
    outline: 2px solid #e74c3c;
    outline-offset: 2px;
}

