/* Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600&display=swap');

:root {
    --primary-color: #33ff33; /* Brighter, more readable green */
    --secondary-color: #00aa00; /* Softer green for secondary elements */
    --accent-color: #66ff66; /* Lighter green for accents */
    --text-color: #e0e0e0; /* Light gray for better readability */
    --bg-color: #0a0f0a; /* Very dark greenish-black */
    --code-bg: #111811; /* Slightly lighter background for code */
    --border-color: #1a3d1a; /* Darker green for borders */
    --max-width: 800px;
    --line-height: 1.8; /* Increased line height for better readability */
    --paragraph-spacing: 1.5rem; /* Consistent paragraph spacing */
}

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

body {
    font-family: 'Source Code Pro', monospace;
    line-height: var(--line-height);
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image: 
        linear-gradient(rgba(40, 80, 40, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(40, 80, 40, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 1.05rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-color);
    position: relative;
    display: block;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: var(--paragraph-spacing);
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease;
    font-weight: 500;
    padding: 0.1em 0.2em;
    border-radius: 2px;
}

a:hover {
    color: #ffffff;
    background-color: rgba(51, 255, 51, 0.1);
}

a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Layout */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
header {
    background-color: rgba(10, 20, 10, 0.95);
    color: var(--primary-color);
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 100;
    backdrop-filter: blur(5px);
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

header h1 {
    color: var(--primary-color);
    margin-bottom: 0;
    text-shadow: 0 0 10px var(--primary-color);
}

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

nav li {
    margin-right: 1.5rem;
}

nav a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    position: relative;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    border-radius: 3px;
    margin: 0 0.2rem;
}

nav a:hover,
nav a.active {
    color: #000;
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    text-decoration: none;
    transform: translateY(-1px);
}

nav a::after {
    display: none;
}

/* Main Content */
main {
    padding: 3rem 0;
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* Code Blocks */
pre {
    background-color: var(--code-bg);
    padding: 1.2rem 1.5rem;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
    font-family: 'Source Code Pro', monospace;
    font-size: 0.95em;
    color: #e0e0e0;
    overflow-x: auto;
    position: relative;
    line-height: 1.7;
    border-radius: 3px;
    margin: 1.5rem 0;
    tab-size: 4;
    white-space: pre;
    word-wrap: normal;
}

pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
    white-space: pre;
    word-break: normal;
}

:not(pre) > code {
    padding: 0.2em 0.4em;
    font-size: 0.9em;
    background-color: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: var(--accent-color);
}

/* Intro */
.intro {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    border: 1px solid var(--border-color);
    background-color: rgba(0, 20, 0, 0.1);
    position: relative;
    overflow: hidden;
    border-left: 5px solid var(--primary-color);
}

/* Post Previews */
.post-preview {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    background-color: rgba(0, 20, 0, 0.1);
    overflow: hidden;
}

.post-preview {
    border-left: 3px solid var(--primary-color);
}

.post-preview:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.post-preview:hover::before {
    width: 5px;
}

.post-preview:last-child {
    border-bottom: 1px solid var(--border-color);
}

.post-meta {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    font-family: 'Source Code Pro', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Footer */
footer {
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--primary-color);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

footer {
    border-top: 1px solid var(--border-color);
}

/* Blog Page */
.blog-header {
    text-align: center;
    margin-bottom: 3rem;
}

/* About Page */
.about-content {
    max-width: 700px;
    margin: 0 auto;
}

.about-content img {
    max-width: 200px;
    border-radius: 50%;
    margin: 0 auto 2rem;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    
    .container {
        padding: 0 1rem;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav li {
        margin: 0.5rem 0;
    }
}
