/* 2001 - A Minimalist Writing Space */

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

:root {
    --black: #0a0a0a;
    --white: #fafafa;
    --gray: #6b6b6b;
    --light-gray: #e8e8e8;
    --accent: #2962ff;
    --monolith: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica', sans-serif;
    background: var(--white);
    color: var(--black);
    line-height: 1.6;
    overflow-x: hidden;
}

/* The Monolith */
.monolith {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 3px;
    height: 80px;
    background: var(--monolith);
    z-index: 1000;
    opacity: 0.7;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.monolith:hover {
    height: 180px;
    opacity: 1;
    box-shadow: 0 0 30px rgba(41, 98, 255, 0.3);
}

/* Header */
.site-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 40px 60px;
    border-bottom: 1px solid var(--light-gray);
}

.site-header.minimal {
    padding: 40px 40px 30px;
}

.header-content {
    margin-bottom: 60px;
}

.site-header.minimal .header-content {
    margin-bottom: 0;
}

.site-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 200;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--black) 0%, var(--gray) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-subtitle {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--gray);
    font-weight: 300;
    letter-spacing: 0.05em;
}

/* Navigation */
.site-nav {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--gray);
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    position: relative;
    transition: color 0.3s ease;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover,
.nav-link.active {
    color: var(--black);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.back-link {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

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

/* Main Content */
.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 40px 120px;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 40px;
}

.post-card {
    background: var(--white);
    border: 1px solid transparent;
    padding: 32px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid var(--light-gray);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.post-card:hover::before {
    opacity: 1;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.post-meta time {
    font-size: 0.85rem;
    color: var(--gray);
    font-weight: 300;
    letter-spacing: 0.05em;
    font-variant-numeric: tabular-nums;
}

.post-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    color: var(--gray);
    padding: 2px 10px;
    border: 1px solid var(--light-gray);
    border-radius: 2px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 400;
}

.post-title {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.post-title a {
    color: var(--black);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.post-excerpt {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
    font-weight: 300;
}

.read-more {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

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

/* Filter Animation */
.post-card.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

/* Post Content */
.post-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 80px 40px 80px;
}

.post-header {
    margin-bottom: 60px;
}

.post-meta-full {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.post-meta-full time {
    font-size: 0.9rem;
    color: var(--gray);
    font-weight: 300;
    letter-spacing: 0.05em;
    font-variant-numeric: tabular-nums;
}

.reading-time {
    font-size: 0.9rem;
    color: var(--gray);
    font-weight: 300;
    letter-spacing: 0.05em;
}

.post-title-full {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 20px;
}

.post-subtitle {
    font-size: 1.2rem;
    color: var(--gray);
    font-weight: 300;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* Post Body Typography */
.post-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--black);
}

.post-body h2 {
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    margin-top: 60px;
    margin-bottom: 20px;
    line-height: 1.3;
}

.post-body h3 {
    font-size: 1.3rem;
    font-weight: 400;
    margin-top: 40px;
    margin-bottom: 16px;
    line-height: 1.4;
}

.post-body p {
    margin-bottom: 24px;
}

.post-body ul,
.post-body ol {
    margin: 24px 0;
    padding-left: 24px;
}

.post-body li {
    margin-bottom: 12px;
    padding-left: 8px;
}

.post-body ul li::marker {
    color: var(--accent);
}

.post-body ol li::marker {
    color: var(--accent);
    font-weight: 500;
}

.post-body blockquote {
    margin: 40px 0;
    padding: 24px 32px;
    border-left: 3px solid var(--accent);
    background: rgba(41, 98, 255, 0.03);
    font-style: italic;
}

.post-body blockquote p {
    margin-bottom: 0;
    color: var(--gray);
}

.post-body hr {
    border: none;
    height: 1px;
    background: var(--light-gray);
    margin: 60px 0;
}

.post-body code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

.post-body pre {
    background: var(--black);
    color: var(--white);
    padding: 24px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 32px 0;
}

.post-body pre code {
    background: none;
    padding: 0;
    color: var(--white);
}

.post-body a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.post-body a:hover {
    border-bottom-color: var(--accent);
}

/* Post Footer */
.post-footer {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid var(--light-gray);
}

/* Footer */
.site-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 40px 60px;
    border-top: 1px solid var(--light-gray);
    text-align: center;
}

.site-footer p {
    color: var(--gray);
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.03em;
}

.site-footer a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
    .site-header {
        padding: 80px 24px 40px;
    }

    .header-content {
        margin-bottom: 40px;
    }

    .content {
        padding: 60px 24px 80px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .post-card {
        padding: 24px;
    }

    .monolith {
        width: 2px;
        height: 60px;
        top: 16px;
        right: 16px;
    }

    .site-nav {
        gap: 20px;
    }

    .post-content {
        padding: 60px 24px 60px;
    }

    .site-header.minimal {
        padding: 32px 24px 24px;
    }
}

/* Smooth transitions */
.post-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

::selection {
    background: var(--accent);
    color: var(--white);
}

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}
