/* Color Palette */
:root {
    --dark-blue: #1A202C; /* Dark background */
    --accent-blue: #3B82F6; /* Primary accent blue (for headings, some links) */
    --light-blue: #BFDBFE; /* Lighter accent blue for text, other links */
    --text-color: #E2E8F0; /* General text color */
    --border-color: #2D3748; /* Border for cards/elements */
    --card-bg: #2D3748; /* Card background */
    --hover-bg: #4A5568; /* Hover state for cards/elements */

    /* Button specific colors, derived from accents */
    --button-bg: var(--accent-blue);
    --button-text: var(--text-color);
    --button-border: var(--accent-blue);
    --button-hover-bg: var(--light-blue);
    --button-hover-text: var(--dark-blue);
}

/* Basic Reset & Body Styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* A comforting, modern font */
    background-color: var(--dark-blue);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scroll on smaller screens */
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* General Link Styling */
a {
    color: var(--light-blue); /* Default link color */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:visited {
    color: #9AB0D0; /* A slightly darker, muted blue for visited links */
}

a:hover {
    color: var(--accent-blue); /* Accent blue on hover */
}

/* Header Styles - Specific for banner now */
.site-header {
    background-color: var(--dark-blue); /* Base background */
    padding: 0; /* No padding if banner image fills it */
    border-bottom: 3px solid var(--accent-blue); /* Prominent accent border */
}

/* Specific styling for the banner header */
.site-header.banner-header {
    max-height: 445px; /* Adjust this value as needed (e.g., 150px, 180px, 250px) */
    overflow: hidden; /* Crops the image if it exceeds max-height */
    display: flex; /* Use flexbox to center content */
    align-items: center; /* Vertically center content */
    justify-content: center; /* Horizontally center content */
}

.site-header.banner-header .container {
    padding: 0; /* Remove container padding within the banner to allow image to fill */
    width: 100%; /* Ensure container takes full width of header */
}

.site-header.banner-header img {
    width: 100%;
    height: auto; /* Maintain aspect ratio */
    display: block;
    object-fit: cover; /* Ensures the image covers the container while maintaining aspect ratio */
}

/* Original heading for Welcome to My Personal Hub (if you ever uncommented it) */
.site-header h1 {
    font-family: 'Montserrat', sans-serif; /* More impactful font for headings */
    font-size: 3em;
    color: var(--accent-blue);
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.4); /* Subtle glow */
}

.site-header p {
    font-size: 1.2em;
    color: var(--light-blue);
}


/* Main Content Styles */
.site-content {
    flex-grow: 1; /* Allows main content to take up available space */
    padding-top: 40px;
    padding-bottom: 40px;
}

.intro-section {
    text-align: center;
    margin-bottom: 60px;
    /* Cards in this section are usually wrapped in container and have their own background/shadow */
}

.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%; /* Circular image */
    object-fit: cover;
    border: 4px solid var(--accent-blue);
    margin-bottom: 25px;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.6); /* Matching glow */
}

.intro-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2em;
    color: var(--accent-blue);
    margin-bottom: 20px;
}

.intro-section p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1em;
    color: var(--text-color);
}

/* Navigation Cards (for main index page) */
.navigation-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    background-color: var(--hover-bg);
}

.card h3 {
    margin-top: 0;
    font-size: 1.6em;
    margin-bottom: 15px;
}

.card h3 a {
    color: var(--light-blue); /* Lighter blue for link text */
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    transition: color 0.3s ease;
}

.card h3 a:hover {
    color: var(--accent-blue); /* Accent blue on hover */
}

.card p {
    font-size: 1em;
    color: var(--text-color);
}

/* Footer Styles */
.site-footer {
    background-color: var(--card-bg);
    color: var(--light-blue);
    text-align: center;
    padding: 10px 0;
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9em;
}

/* --- General Button Styling (consolidated and improved) --- */
.button {
    display: inline-block;
    background-color: var(--button-bg);
    color: var(--button-text);
    padding: 10px 20px;
    border: 1px solid var(--button-border);
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin: 10px 0; /* Adjusted: 10px top/bottom, 0 left/right. You can adjust horizontal margin as needed. */
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    white-space: nowrap; /* Prevent text wrapping inside button on smaller widths */
}

.button:hover {
    background-color: var(--button-hover-bg);
    color: var(--button-hover-text);
    border-color: var(--button-hover-bg);
}

.button:visited {
    color: var(--button-text);
}

/* --- Blog and Projects Listing Sections (Homepage and Index Pages) --- */
.latest-blog-posts-section,
.latest-projects-section,
.content-section.blog-list, /* Added for blog_index.html */
.content-section.projects-list { /* Added for projects_index.html */
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    margin-top: 60px;
    padding: 40px 20px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.blog-list { /* This is the new rule for the blog list on its index page */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px; /* Adjust if needed */
}

.blog-summary, .project-summary {
    background-color: var(--dark-blue); /* Slightly darker than card-bg for contrast */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
    display: flex; /* Makes content inside align as flex items */
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start; /* Aligns items (like buttons) to the left */
}

.blog-summary:hover, .project-summary:hover {
    transform: translateY(-5px);
    background-color: var(--hover-bg);
}

.blog-summary h3 a, .project-summary h3 a {
    color: var(--accent-blue); /* Changed from light-blue to accent-blue for stronger headings */
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4em;
    margin-bottom: 10px; /* Add some space below heading */
}

.blog-summary h3 a:hover, .project-summary h3 a:hover {
    text-decoration: underline;
}

.blog-meta, .project-meta {
    font-size: 0.9em;
    color: var(--light-blue);
    margin-bottom: 15px;
}

.blog-summary p, .project-summary p {
    font-size: 1em;
    color: var(--text-color);
    margin-bottom: 15px;
    flex-grow: 1; /* Allows content to push button down */
}

/* --- Individual Post/Project Pages (blog_post.html, project_single.html) --- */
.blog-post, .project-detail {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
    max-width: 800px; /* Constrain width for readability */
    margin-left: auto;
    margin-right: auto;
}

.blog-post h2, .project-detail h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5em;
    color: var(--accent-blue);
    margin-bottom: 25px;
    text-align: center;
}

.blog-post .blog-meta { /* Specific blog meta for individual pages */
    color: var(--light-blue);
    font-size: 0.9em;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    text-align: left; /* Default alignment */
}

.blog-post .blog-content, .project-detail .project-content {
    line-height: 1.8;
    text-align: justify;
    margin-top: 30px; /* Space after meta info */
    color: var(--text-color); /* Ensure text color is applied */
    font-size: 1.1em; /* Make content a bit larger for readability */
}

.blog-post .blog-content pre, .project-detail .project-content pre {
    background-color: #000;
    color: #0F0; /* Green text for code, typical */
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Roboto Mono', monospace; /* Good font for code */
    font-size: 0.9em;
    margin: 20px 0; /* Space above/below code blocks */
}

.blog-nav, .project-nav { /* General class for navigation at bottom of detail pages */
    text-align: center; /* Centers inline-block buttons within this container */
    margin-top: 40px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .site-header h1 {
        font-size: 2.5em;
    }

    .intro-section h2 {
        font-size: 1.8em;
    }

    .navigation-section,
    .blog-grid,
    .projects-grid {
        grid-template-columns: 1fr; /* Stack cards on small screens */
    }

    /* Adjust banner height for smaller screens if needed */
    .site-header.banner-header {
        max-height: 150px; /* Slightly shorter on mobile */
    }

    .blog-post, .project-detail {
        padding: 20px; /* Less padding on smaller screens */
        margin-left: 10px; /* Small horizontal margin */
        margin-right: 10px;
    }
}

/* Additional specific media queries if needed */
@media (max-width: 480px) {
    .button {
        padding: 8px 15px; /* Smaller buttons on very small screens */
        font-size: 0.9em;
    }
}
