/* Blog CSS - Matching cabeen.io visual style */

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

:root {
    --bg: #111111;
    --bg-secondary: #111111;
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;
    --accent: #22d3ee;
    --accent-dim: #0891b2;
    --border: #27272a;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 300;
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
header {
    padding: 3rem 0 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.header-left {
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.site-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.site-title:hover {
    opacity: 0.8;
}

.site-tagline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.site-tagline::before {
    content: "// ";
    opacity: 0.5;
}

/* Navigation */
nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

nav a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

nav a::before {
    content: ">";
    color: var(--accent);
    opacity: 0.5;
    margin-right: 0.3rem;
    transition: opacity 0.3s ease;
}

nav a:hover {
    color: var(--accent);
    transform: translateX(3px);
}

nav a:hover::before {
    opacity: 1;
}

/* Main content */
main {
    padding: 1rem 0;
}

/* Post list (index page) */
.post-list {
    list-style: none;
}

.post-item {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    transition: background-color 0.3s ease;
}

.post-item:hover {
    background-color: rgba(34, 211, 238, 0.03);
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.post-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 100px;
}

.post-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-link:hover {
    color: var(--accent);
}

.post-link::after {
    content: " \2192";
    color: var(--accent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-link:hover::after {
    opacity: 1;
}

/* Individual post page */
.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.post-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.post-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Post content */
.post-content {
    font-size: 1rem;
    line-height: 1.8;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
    line-height: 1.3;
}

.post-content h1 { font-size: 1.5rem; }
.post-content h2 { font-size: 1.25rem; }
.post-content h3 { font-size: 1.1rem; }
.post-content h4 { font-size: 1rem; }

.post-content p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.post-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.3s ease;
}

.post-content a:hover {
    opacity: 0.8;
}

.post-content ul,
.post-content ol {
    margin: 1.25rem 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

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

.post-content blockquote {
    border-left: 2px solid var(--accent);
    margin: 1.5rem 0;
    padding: 0.5rem 0 0.5rem 1.5rem;
    color: var(--text-secondary);
    font-style: italic;
}

.post-content code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    background-color: var(--border);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    color: var(--accent);
}

.post-content pre {
    background-color: #0a0a0a;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content pre code {
    background: none;
    padding: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--border);
    margin: 1.5rem 0;
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

/* Back link */
.back-link {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    transition: color 0.3s ease;
}

.back-link::before {
    content: "\2190 ";
    color: var(--accent);
    transition: transform 0.3s ease;
}

.back-link:hover {
    color: var(--accent);
}

/* Footer */
footer {
    margin-top: 4rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

footer p {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

footer a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

footer a:hover {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 1.5rem;
    }

    header {
        padding: 2rem 0 1.5rem;
    }

    .site-title {
        font-size: 1.25rem;
    }

    .post-item {
        flex-direction: column;
        gap: 0.25rem;
    }

    .post-date {
        min-width: auto;
    }

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

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

main {
    animation: fadeIn 0.5s ease-out;
}
