@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Inter:wght@300;400;500&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.8;
    color: #0a0a0a;
    background: #ffffff;
    font-weight: 300;
    letter-spacing: -0.01em;
}

header {
    background: #0a1929;
    color: #fff;
    padding: 5rem 2rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0a1929 0%, #1a2f4a 50%, #0a1929 100%);
    background-size: 200% 200%;
    animation: headerShift 15s ease-in-out infinite;
    z-index: 0;
}

header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.03) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 8s linear infinite;
    z-index: 1;
}

@keyframes headerShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    position: relative;
    z-index: 1;
    line-height: 1.1;
    text-shadow: 0 0 30px rgba(255,255,255,0.1);
}

header h1 a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

header h1 a:hover {
    opacity: 0.8;
}

.tagline {
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.8;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 20px rgba(255,255,255,0.1);
}

main {
    max-width: 720px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.post-preview {
    padding: 3rem 0;
    border-bottom: 1px solid #e5e5e5;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.post-preview::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, #0a1929, #1a2f4a);
    transition: height 0.3s ease;
}

.post-preview:hover::before {
    height: 60%;
}

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

.post-preview:hover {
    transform: translateX(12px);
    padding-left: 1rem;
}

.post-preview h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.post-preview h2 a {
    color: #0a0a0a;
    text-decoration: none;
    transition: all 0.3s ease;
    background: linear-gradient(to right, #0a0a0a 0%, #0a0a0a 100%);
    background-size: 0 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
}

.post-preview h2 a:hover {
    color: #000;
    background-size: 100% 2px;
}

.post-date {
    color: #999;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f5f5f5;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.post-preview:hover .post-date {
    background: #0a1929;
    color: #fff;
}

.post-excerpt {
    color: #4a4a4a;
    font-size: 1.05rem;
    line-height: 1.7;
    font-weight: 300;
}

article {
    max-width: 680px;
    margin: 0 auto;
    padding: 0;
}

article h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.2rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #0a0a0a;
}

article .post-date {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e5e5;
}

article h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    margin: 3rem 0 1.5rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: #0a0a0a;
}

article h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    line-height: 1.4;
    color: #1a1a1a;
}

article p {
    margin-bottom: 1.8rem;
    line-height: 1.9;
    font-size: 1.1rem;
    color: #2a2a2a;
    font-weight: 300;
}

article ul, article ol {
    margin-bottom: 2rem;
    padding-left: 2rem;
}

article li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
    font-size: 1.05rem;
    color: #2a2a2a;
}

article code {
    background: #f5f5f5;
    padding: 0.3rem 0.5rem;
    border-radius: 3px;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    border: 1px solid #e5e5e5;
}

article pre {
    background: #0a0a0a;
    color: #f5f5f5;
    padding: 1.5rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 2rem;
    line-height: 1.6;
}

article pre code {
    background: transparent;
    border: none;
    color: #f5f5f5;
}

article blockquote {
    border-left: 3px solid #0a0a0a;
    padding-left: 1.5rem;
    margin: 2.5rem 0;
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.8;
    color: #4a4a4a;
    position: relative;
    transition: all 0.3s ease;
}

article blockquote:hover {
    padding-left: 2rem;
    border-left-width: 5px;
}

.back-link {
    display: inline-block;
    margin-top: 4rem;
    padding: 0.75rem 1.5rem;
    background: #0a1929;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.back-link::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 0.5s ease;
}

.back-link:hover::before {
    left: 100%;
}

.back-link:hover {
    background: #1a2f4a;
    transform: translateX(-4px) scale(1.02);
}

footer {
    text-align: center;
    padding: 3rem 2rem;
    color: #999;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 6rem;
    border-top: 1px solid #e5e5e5;
}

@media (max-width: 768px) {
    header {
        padding: 3rem 1.5rem 2.5rem;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 0.9rem;
    }
    
    main {
        padding: 2rem 1.5rem;
    }
    
    .post-preview {
        padding: 2rem 0;
    }
    
    .post-preview h2 {
        font-size: 1.8rem;
    }
    
    article h1 {
        font-size: 2.2rem;
    }
    
    article h2 {
        font-size: 1.6rem;
    }
    
    article p {
        font-size: 1.05rem;
    }
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid #e5e5e5;
    gap: 1rem;
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    background: #0a1929;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.pagination-btn:hover {
    background: #1a2f4a;
    transform: scale(1.02);
}

.pagination-info {
    color: #999;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .pagination {
        flex-direction: column;
        gap: 1rem;
    }
    
    .pagination-btn {
        width: 100%;
        text-align: center;
    }
}

.back-link-top {
    display: inline-block;
    margin-bottom: 1rem;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.back-link-top:hover {
    color: #0a1929;
}

.back-arrow {
    position: absolute;
    top: 2rem;
    left: 2rem;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.back-arrow:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(-4px);
}



.search-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
}

.search-toggle {
    background: #0a1929;
    border: none;
    color: #fff;
    width: 60px;
    height: 60px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-toggle svg {
    width: 24px;
    height: 24px;
}

.search-toggle:hover {
    background: #1a2f4a;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.search-box {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    font-size: 1.2rem;
    border: none;
    border-bottom: 2px solid #0a1929;
    font-family: 'Inter', sans-serif;
    background: #fff;
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.search-box.active {
    transform: translateY(0);
}

.search-box:focus {
    outline: none;
}

.search-box::placeholder {
    color: #999;
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
    backdrop-filter: blur(5px);
}

.search-overlay.active {
    display: block;
}

.search-results-info {
    margin: 2rem 0 1rem;
    color: #666;
    font-size: 0.9rem;
    text-align: center;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #999;
}

.no-results h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #666;
}

@media (max-width: 768px) {
    .search-container {
        top: 1rem;
        right: 1rem;
    }
    
    .search-toggle {
        font-size: 1rem;
        padding: 0.5rem 0.7rem;
    }
    
    .search-box {
        padding: 1.25rem 1.5rem;
        font-size: 1rem;
    }

    .back-arrow {
        top: 1rem;
        left: 1rem;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Reading Time */
.reading-time {
    display: inline-block;
    margin-left: 1rem;
    color: #999;
    font-size: 0.85rem;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: #0a1929;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    width: 60px;
    height: 60px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 100;
}

.dark-mode-toggle:hover {
    background: #1a2f4a;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Dark Mode Styles */
body.dark-mode {
    background: #0f0f0f;
    color: #e0e0e0;
}

body.dark-mode header {
    background: #1a1a1a;
}

body.dark-mode header::before {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
}

body.dark-mode .post-preview {
    border-bottom-color: #2a2a2a;
}

body.dark-mode .post-preview h2 a {
    color: #e0e0e0;
}

body.dark-mode .post-preview h2 a:hover {
    color: #fff;
}

body.dark-mode .post-excerpt {
    color: #b0b0b0;
}

body.dark-mode .post-date {
    background: #1a1a1a;
    color: #888;
}

body.dark-mode .post-preview:hover .post-date {
    background: #2a2a2a;
    color: #fff;
}

body.dark-mode article h1,
body.dark-mode article h2,
body.dark-mode article h3 {
    color: #e0e0e0;
}

body.dark-mode article p,
body.dark-mode article li {
    color: #b0b0b0;
}

body.dark-mode article code {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

body.dark-mode article blockquote {
    color: #888;
    border-left-color: #2a2a2a;
}

body.dark-mode footer {
    border-top-color: #2a2a2a;
    color: #666;
}

body.dark-mode .back-link-top {
    color: #888;
}

body.dark-mode .back-link-top:hover {
    color: #fff;
}

body.dark-mode .search-box {
    background: #1a1a1a;
    color: #e0e0e0;
    border-bottom-color: #2a2a2a;
}

body.dark-mode .search-box::placeholder {
    color: #666;
}

body.dark-mode .pagination-btn {
    background: #1a1a1a;
}

body.dark-mode .pagination-btn:hover {
    background: #2a2a2a;
}

/* Social Share */
.social-share {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

body.dark-mode .social-share {
    border-color: #2a2a2a;
}

.social-share h3 {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    color: #666;
}

body.dark-mode .social-share h3 {
    color: #888;
}

.social-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.2rem;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.social-btn.twitter {
    background: #1DA1F2;
    color: #fff;
}

.social-btn.linkedin {
    background: #0077B5;
    color: #fff;
}

.social-btn.facebook {
    background: #1877F2;
    color: #fff;
}

body.dark-mode .social-btn {
    background: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .social-btn:hover {
    background: #2a2a2a;
}

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

body.dark-mode .related-posts {
    border-color: #2a2a2a;
}

.related-posts h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #0a0a0a;
}

body.dark-mode .related-posts h3 {
    color: #e0e0e0;
}

.related-posts-grid {
    display: grid;
    gap: 1.5rem;
}

.related-post-item {
    padding: 1.5rem;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    transition: all 0.3s ease;
}

body.dark-mode .related-post-item {
    border-color: #2a2a2a;
    background: #1a1a1a;
}

.related-post-item:hover {
    border-color: #0a1929;
    transform: translateX(4px);
}

body.dark-mode .related-post-item:hover {
    border-color: #2a2a2a;
}

.related-post-item h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.related-post-item h4 a {
    color: #0a0a0a;
    text-decoration: none;
}

body.dark-mode .related-post-item h4 a {
    color: #e0e0e0;
}

.related-post-item h4 a:hover {
    color: #0a1929;
}

body.dark-mode .related-post-item h4 a:hover {
    color: #fff;
}

.related-post-item .post-date {
    margin-bottom: 0.5rem;
}

.related-post-item p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}

body.dark-mode .related-post-item p {
    color: #888;
}

/* Newsletter */
.newsletter {
    margin: 4rem 0;
    padding: 3rem;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: center;
}

body.dark-mode .newsletter {
    background: #1a1a1a;
}

.newsletter h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #0a0a0a;
}

body.dark-mode .newsletter h3 {
    color: #e0e0e0;
}

.newsletter p {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

body.dark-mode .newsletter p {
    color: #888;
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 2px solid #e5e5e5;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

body.dark-mode .newsletter-input {
    background: #0f0f0f;
    border-color: #2a2a2a;
    color: #e0e0e0;
}

.newsletter-input:focus {
    outline: none;
    border-color: #0a1929;
}

body.dark-mode .newsletter-input:focus {
    border-color: #2a2a2a;
}

.newsletter-btn {
    padding: 0.875rem 2rem;
    background: #0a1929;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-btn:hover {
    background: #1a2f4a;
    transform: translateY(-2px);
}

body.dark-mode .newsletter-btn {
    background: #2a2a2a;
}

body.dark-mode .newsletter-btn:hover {
    background: #3a3a3a;
}

@media (max-width: 768px) {
    .newsletter {
        padding: 2rem 1.5rem;
    }
    
    .newsletter h3 {
        font-size: 1.5rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .social-buttons {
        justify-content: center;
    }
    
    .dark-mode-toggle {
        bottom: 6rem;
    }
}

.newsletter-success {
    padding: 1.5rem;
    background: #e8f5e9;
    border-radius: 4px;
    text-align: center;
}

body.dark-mode .newsletter-success {
    background: #1a2f1a;
}

.newsletter-success p {
    color: #2e7d32;
    font-size: 1.05rem;
    margin: 0;
}

body.dark-mode .newsletter-success p {
    color: #66bb6a;
}
