/* Main stylesheet */

:root {
    --background-color: #0d0d0d;
    --text-color: #00ff41; /* Hacker Green */
    --primary-color: #00ff41; /* Hacker Green */
    --secondary-color: #ffffff; /* White for hover */
    --surface-color: #1a1a1a;
    --header-height: 60px;
}

body {
    font-family: 'Fira Code', 'Victor Mono', 'Courier New', monospace;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.3);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

header {
    background-color: var(--surface-color);
    padding: 0 2rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--primary-color);
}

nav a {
    margin-left: 20px;
    font-weight: bold;
    font-size: 1.1rem;
}

main {
    padding: 2rem;
    min-height: calc(100vh - var(--header-height) * 2); /* header and footer */
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

main.fade-out {
    opacity: 0;
}

footer {
    text-align: center;
    padding: 1rem;
    background-color: var(--surface-color);
    border-top: 1px solid var(--primary-color);
    height: var(--header-height);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
}

/* Blog styles */
#blogs-list {
    list-style: none;
    padding: 0;
}

#blogs-list .blog-item {
    background-color: var(--surface-color);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 0; /* More blocky */
    border: 1px solid var(--primary-color);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

#blogs-list .blog-item:hover {
    transform: translateY(-5px);
    background-color: rgba(0, 255, 65, 0.1);
}

#blogs-list .blog-item h2 {
    margin-top: 0;
}

#blogs-list .blog-item p {
    margin-bottom: 0;
    color: var(--text-color);
}

.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0;
    border: 1px solid var(--primary-color);
}

.blog-post-content pre {
    background-color: #000;
    border: 1px solid var(--primary-color);
    padding: 1rem;
    border-radius: 0;
    overflow-x: auto;
}

.blog-post-content code {
    font-family: 'Fira Code', 'Victor Mono', 'Courier New', monospace;
}

/* Homepage Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    min-height: 50vh;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    text-shadow: 0 0 15px rgba(0, 255, 65, 0.7);
}

.hero-text p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.cta-button {
    background-color: var(--primary-color);
    color: #000;
    padding: 1rem 2rem;
    border-radius: 0;
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: 1px solid var(--primary-color);
}

.cta-button:hover {
    background-color: var(--background-color);
    transform: translateY(-3px);
    color: var(--primary-color);
}

/* Home Sections */
.home-section {
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.home-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

#latest-posts-container {
    display: block; /* Override grid */
}

/* Subdued Latest Posts on Homepage */
#latest-posts-container .blog-item {
    background-color: transparent;
    border: none;
    padding: 1rem 0;
    margin-bottom: 0;
    border-bottom: 1px solid #2a2a2a; /* A subtle separator */
    transition: border-color 0.3s ease;
}

#latest-posts-container .blog-item:last-child {
    border-bottom: none;
}

#latest-posts-container .blog-item:hover {
    border-bottom-color: var(--primary-color);
    transform: none; /* remove hover transform */
    background-color: transparent;
}

#latest-posts-container .blog-item a {
    text-decoration: none;
    display: block; /* so the whole area is clickable */
}

#latest-posts-container .blog-item h2 {
    font-size: 1.2rem; /* Smaller title */
    margin: 0 0 0.25rem 0;
}

#latest-posts-container .blog-item p {
   font-size: 0.9rem;
   color: #888; /* Dim color for description */
   margin: 0;
}

#latest-posts-container .blog-item small {
   display: none; /* Hide date on homepage for cleaner look */
}


.view-all-link {
    display: block;
    text-align: center;
    margin-top: 2rem;
    font-weight: bold;
    font-size: 1.1rem;
}


/* Animations */
@keyframes fade-in-down {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-down {
    animation: fade-in-down 0.8s ease-out forwards;
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out forwards;
}

/* About page layout */
.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
}

.about-text {
    flex: 2;
    min-width: 300px;
}

.about-photo {
    flex: 1;
    text-align: center;
    min-width: 250px;
}

.about-photo img {
    max-width: 100%;
    border-radius: 0;
    border: 1px solid var(--primary-color);
}

.photo-caption {
    font-style: italic;
    font-size: 0.9rem;
    color: #009a27; /* Dimmer green */
    margin-top: 0.5rem;
}