/* Variables */
:root {
    --primary: #2a2a2a;
    --accent: #00ff95;
    --text: #ffffff;
    --hover: #ff3366;
    --lighter-text: #ccc;
    --border: #333;
    --dark-black: #222;
}

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

html {
    scroll-behavior: smooth;
}

/* Global Styles */
body {
    background-color: var(--primary);
    color: #e0e0e0; /* Slightly lighter text color */
    font-family: 'Arvo', serif; /* Update to a modern serif font */
    line-height: 1.6;
    font-size: 1rem;
}

/* Base elements */
p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text);
}

h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--lighter-text);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--lighter-text);
}

h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--lighter-text);
}

h4 {
    font-size: 1.7rem;
    margin-bottom: 1rem;
    color: var(--lighter-text);
}

h5 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--lighter-text);
}

h6 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--lighter-text);
}

hr {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--lighter-text), transparent);
    margin: 3rem 0;
}

ul {
    list-style-type: disc;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

ul li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: var(--text);
}

pre {
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    overflow-x: auto;
}

code {
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

blockquote {
    border-left: 4px solid var(--accent);
    background-color: var(--dark-black);
    font-family: monospace;
    padding-left: 1rem;
    margin: 1.5rem 0;
}

/* For inline code outside of pre blocks */
:not(pre) > code {
    background-color: #333;
}

/* Main Styles */
.header {
    display: flex;
    justify-content: center; /* Center the navigation */
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--primary);
    position: relative; /* Change to relative to blend with content */
    box-shadow: none; /* Remove shadow to eliminate split */
}


/* Navigation Styles */
.nav {
    display: flex;
    justify-content: center;
}

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

.nav ul li {
    position: relative;
}

.nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    border-bottom: none;
}

.nav a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    background: var(--accent);
    left: 50%;
    bottom: 0;
    transition: all 0.3s ease;
}

.nav a:hover::after {
    left: 25%;
    width: 50%;
}

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

/* General Styles */

.main-content {
    padding-top: 0; /* Remove extra padding since header is not fixed */
    min-height: 100vh;
}

.text-section {
    padding: 0 2rem;
    line-height: 1.6;
}

.centered-container {
    max-width: 800px;
    margin: 0 auto;
}

.logo {
    margin: 0 auto;
    max-width: 600px;
}

.lighter-text {
    color: var(--lighter-text);
}

.separator {
    max-width: 800px;
    margin: 3rem auto;
    border: 0;
    border-bottom: 2px solid #444;
}

/* Components */

.type-title {
    font-size: 4rem;
    color: var(--accent);
    margin: 0;
    display: inline;
    position: relative;
    font-family: "Courier New", monospace;
    border-right: 0.15em solid var(--accent);
    white-space: nowrap;
    overflow: hidden;
    animation:
        typing 2s steps(12, end),
        blink-caret 0.75s step-end infinite;
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent);
    z-index: 1001;
    transition: width 0.1s ease;
}

/* Subtle admin link in footer */
.footer-admin-link {
    text-align: center;
    padding: 1rem;
    opacity: 0.5;
}

.subtle-link {
    color: inherit;
    text-decoration: none;
}

.subtle-link:hover {
    opacity: 0.8;
}

/* Posts List Styles */
.latest-articles {
    font-size: 1.5rem;
    color: var(--accent);
    margin: 3rem 0;
    text-transform: uppercase;
}

.post-item {
    margin-bottom: 2rem;
}

.post-date {
    font-size: 0.9rem;
    color: var(--lighter-text);
    margin-bottom: 0.5rem;
}

.post-title {
    font-size: 1.8rem;
    margin: 0.5rem 0;
}

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

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

.post-excerpt {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 1rem 0;
    color: var(--lighter-text);
}

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

.post-tag {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

.post-tag:hover {
    opacity: 0.8;
}

.tag-title {
    margin-bottom: 2rem;
    color: var(--text);
    font-size: 2rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 4rem;
}

.pagination-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.pagination-info {
    color: var(--lighter-text);
}

/* Mobile-specific styles */
@media (max-width: 600px) {
    .type-title {
        font-size: 2.5rem;
    }

    .logo {
        margin: 0 1.5rem;
    }

    .separator {
        margin: 0 auto;
        width: 80%;
    }

    /* Improve navigation menu for mobile */
    .nav ul {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        padding: 0;
    }

    .header {
        padding: 1rem 0 0;
    }

    .nav a {
        font-size: 1rem;
        padding: 0.5rem 0.75rem;
    }

    .tech-name {
        width: 6rem;
    }
}

/* Keyframes */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--accent);
    }
}

/* Login Form Styles */
.login-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #333;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#login-form p {
    margin-bottom: 0;
}

#login-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--lighter-text);
}

#login-form input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: var(--dark-black);
    color: var(--text);
    font-size: 1rem;
}

#login-form input:focus {
    outline: none;
    border-color: var(--accent);
}

#login-form button {
    background-color: var(--accent);
    color: var(--primary);
    border: none;
    padding: 1rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 1rem;
}

#login-form button:hover {
    opacity: 0.9;
}

/* Error message for forms (the red one) - rename to be more specific */
.form-error-message {
    background-color: #ff3333;
    color: white;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}


.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--lighter-text);
    font-size: 0.9rem;
}

.post-meta-separator {
    color: var(--lighter-text);
    opacity: 0.5;
}

/* Error Pages */
.error-page {
    min-height: calc(100vh - 500px); /* Reduced from -200px to bring content up */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    margin: 0 auto;
}

.error-container {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.error-code {
    font-size: 10rem; /* Made bigger */
    font-weight: bold;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 1rem;
    font-family: "Courier New", monospace;
    text-shadow: 4px 4px 0px rgba(0, 255, 149, 0.2);
}

.error-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.error-message {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #888; /* More subtle gray instead of --lighter-text */
    font-weight: 300; /* Make it lighter */
}

.error-home-link {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--accent);
    color: var(--primary);
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid var(--accent);
    margin-top: 2rem;
}

.error-home-link:hover {
    background-color: transparent;
    color: var(--accent);
    transform: translateY(-2px);
}

@media (max-width: 600px) {
    .error-code {
        font-size: 6rem;
    }
    
    .error-title {
        font-size: 2rem;
    }

    .error-home-link {
        padding: 0.8rem 1.5rem;
    }
}

/* Default link styles for public site */
a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

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

/* Article/content link styles */
.content a {
    border-bottom: 1px dashed var(--accent);
    padding-bottom: 1px;
}

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

/* Footer */
.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.footer-admin-link,
.footer-powered-by {
    padding: 0.5rem 0;
}

.footer-powered-by {
    color: var(--text-muted);
}

.footer-powered-by a,
.footer-admin-link a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-powered-by a:hover,
.footer-admin-link a:hover {
    text-decoration: underline;
}
