@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    
    --border-light: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-md: 8px;
    --radius-lg: 12px;
    
    --transition-fast: 0.15s ease-out;
    --transition-smooth: 0.3s ease-out;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
header {
    margin-bottom: 4rem;
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-card);
}

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

.site-branding h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.site-branding h1 a {
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition-smooth);
}

.site-branding h1 a:hover {
    color: var(--primary);
}

.site-branding p {
    color: var(--text-muted);
    margin: 0.25rem 0 0 0;
    font-size: 1rem;
    font-weight: 500;
}

/* Navigation */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    padding: 0.5rem 0;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary);
    transition: var(--transition-smooth);
    border-radius: 2px;
}

nav a:hover {
    color: var(--text-main);
}

nav a:hover::after {
    width: 100%;
}

/* Main Content Area */
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
    min-height: 60vh;
}

/* Post List */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    gap: 2.5rem;
    align-items: center;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-hover);
}

/* Thumbnail wrapper for zoom effect */
.post-thumbnail-wrapper {
    width: 280px;
    height: 190px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.post-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-weight: 500;
}

.post-category {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-card h2 {
    margin: 0 0 0.75rem 0;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.post-card h2 a {
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition-fast);
}

.post-card h2 a:hover {
    color: var(--primary);
}

.post-card p {
    color: var(--text-muted);
    margin: 0 0 1.25rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 1.05rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.read-more::after {
    content: '→';
    margin-left: 0.25rem;
    transition: transform 0.2s;
}

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

.read-more:hover::after {
    transform: translateX(4px);
}

/* Single Post Specifics */
.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 3rem;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.back-link:hover {
    color: var(--text-main);
    transform: translateX(-4px);
}

.post-article {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 3rem 4rem;
    margin-bottom: 4rem;
    border: 1px solid var(--border-light);
}

.post-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.post-header .post-meta {
    justify-content: center;
    margin-bottom: 1.5rem;
}

.post-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 2rem;
    letter-spacing: -0.03em;
    color: var(--text-main);
}

.post-hero {
    width: calc(100% + 8rem);
    margin-left: -4rem;
    margin-right: -4rem;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    margin-bottom: 4rem;
}

.content {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 68ch;
    margin: 0 auto;
}

.content h2 {
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.content h3 {
    margin-top: 2.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.content p {
    margin-bottom: 1.75rem;
}

.content a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 2px solid rgba(79, 70, 229, 0.2);
    transition: var(--transition-fast);
}

.content a:hover {
    border-bottom-color: var(--primary);
}

.content blockquote {
    border-left: 4px solid var(--primary);
    margin: 2rem 0;
    padding: 1rem 0 1rem 1.5rem;
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-muted);
    background: rgba(79, 70, 229, 0.03);
    border-radius: 0 8px 8px 0;
}

/* Code Blocks */
pre {
    background: #0f172a;
    color: #f8fafc;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-family: 'JetBrains Mono', Consolas, Monaco, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 2rem 0;
}

code {
    font-family: 'JetBrains Mono', Consolas, Monaco, monospace;
    background: rgba(15, 23, 42, 0.05);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
    color: #db2777;
}

pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

/* Footer */
footer {
    margin-top: 6rem;
    border-top: 1px solid var(--border-light);
    padding: 3rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
    }

    header {
        padding: 2rem;
    }

    main {
        padding: 0 1.5rem;
    }

    .post-card {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.25rem;
    }

    .post-thumbnail-wrapper {
        width: 100%;
        height: 220px;
    }

    .post-article {
        padding: 2rem 1.5rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .post-hero {
        width: calc(100% + 3rem);
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        border-radius: 0;
    }

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

    .content h2 {
        font-size: 1.75rem;
    }
}

/* Inline SVG Icons */
.svg-icon {
    width: 1.25em;
    height: 1.25em;
    display: inline-block;
    vertical-align: text-bottom;
    fill: currentColor;
    margin-right: 0.35rem;
    opacity: 0.7;
}

/* Elevate main content slightly */
main,
header,
footer {
    position: relative;
    z-index: 10;
}

/* Word Cloud */
.wordcloud-container {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 2rem auto 3rem auto;
    text-align: center;
    box-shadow: var(--shadow-sm);
    max-width: 800px;
}

.wordcloud-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-muted);
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wordcloud-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    mix-blend-mode: multiply; /* Helps blend the image if the background isn't pure white */
}
