/* Alchemical Theme - Main Stylesheet */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #0d0d0d;
    --text-color: #e0e0e0;
    --accent-color: #1F51FF;
    --link-color: #5E8EFF;
    --link-hover: #8FB4FF;
    --card-bg: rgba(20, 20, 20, 0.8);
    --border-color: rgba(31, 81, 255, 0.2);
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, monospace;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
}

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

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

.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    text-decoration: none;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.site-title:hover {
    color: var(--link-hover);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

/* Homepage Header - Centered Navigation */
.home-nav {
    justify-content: center;
}

/* Main Content */
.main-content {
    min-height: 60vh;
    padding-bottom: 4rem;
}

/* Home Page */
.hero {
    text-align: center;
    padding: 4rem 0;
    margin-bottom: 4rem;
}

.hero h1 {
    font-size: 3rem;
    font-family: var(--font-mono);
    color: var(--accent-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* Recent Posts Section */
.recent-posts h2 {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
    font-family: var(--font-mono);
}

/* Post List */
.post-list {
    list-style: none;
}

.post-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(31, 81, 255, 0.1);
}

.post-meta {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
}

.post-item h2,
.post-item h3 {
    margin-bottom: 0.5rem;
}

.post-item h2 a,
.post-item h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-item h2 a:hover,
.post-item h3 a:hover {
    color: var(--accent-color);
}

.post-description {
    color: var(--text-color);
    opacity: 0.8;
    margin: 1rem 0;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background: rgba(31, 81, 255, 0.1);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    transition: background 0.3s ease;
}

.tag:hover {
    background: rgba(31, 81, 255, 0.2);
}

/* Single Post */
.post {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: 8px;
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.post-header h1 {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    color: var(--accent-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px solid var(--link-color);
}

.post-content a:hover {
    color: var(--link-hover);
    border-color: var(--link-hover);
}

.post-content code {
    background: rgba(31, 81, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: var(--font-mono);
    color: var(--accent-color);
}

.post-content pre {
    background: rgba(0, 0, 0, 0.5);
    padding: 1.5rem;
    border-radius: 6px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

.post-content pre code {
    background: none;
    padding: 0;
}

.post-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    opacity: 0.9;
}

.post-content ul,
.post-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

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

/* Post Navigation */
.post-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    gap: 1rem;
}

.post-nav a {
    color: var(--link-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.post-nav a:hover {
    background: rgba(31, 81, 255, 0.1);
    border-color: var(--accent-color);
}

/* List Page */
.list-header {
    margin-bottom: 3rem;
}

.list-header h1 {
    font-size: 2.5rem;
    color: var(--accent-color);
    font-family: var(--font-mono);
}

.list-description {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-top: 1rem;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-color);
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .post {
        padding: 2rem 1.5rem;
    }

    .post-header h1 {
        font-size: 2rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .post-nav {
        flex-direction: column;
    }
}
