@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap');

:root {
    --background-color: #fff;
    --text-color: #000;
    --navbar-bg-color: #fff;
    --navbar-text-color: #000;
    --footer-bg-color: #f8f8f8;
    --footer-text-color: #555;
    --border-color: #eee;
    --link-hover-color: #007bff;

    --box-shadow-color: rgba(0,0,0,0.1);
}

body.dark-mode {
    --background-color: #1a1a1a;
    --text-color: #f0f0f0;
    --navbar-bg-color: #1a1a1a;
    --navbar-text-color: #f0f0f0;
    --footer-bg-color: #2a2a2a;
    --footer-text-color: #bbb;
    --border-color: #333;
    --link-hover-color: #64b5f6;

    --box-shadow-color: rgba(255,255,255,0.1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
html {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Roboto Mono', monospace;
    line-height: 1.6;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
}

.container {
    display: flex;
    flex-direction: column;
    max-width: 700px;
    padding: 2rem;
    margin: 0 auto;
}

h1 {
    font-size: 3em;
    margin: 0 0 0.5em 0;
    /* Removed letter-spacing: 0.1em; */
    font-weight: 700;
}

.tagline {
    font-size: 1.2em;
    margin-bottom: 1.5em;
    max-width: 600px;
    letter-spacing: 0.05em;
}

.description {
    font-size: 1em;
    max-width: 600px;
    margin-bottom: 1.5em;
    opacity: 0.8;
}

.services {
    display: flex;
    gap: 1.5em; /* Reverted gap */
    margin-bottom: 1.5em;
    flex-wrap: nowrap; /* Prevent wrapping */
    justify-content: center; /* Center items horizontally */
    align-items: stretch; /* Make items the same height */
}

#services-section h2 {
    text-transform: none;
    letter-spacing: normal;
    font-size: 2.5em; /* Increased from default */
    margin-bottom: 1em;
}
.services-item {
    display: flex; /* Make it a flex container */
    flex-direction: column; /* Stack children vertically */
    letter-spacing: 0.1em;
    font-size: 1em; /* Adjusted to be slightly larger */
    opacity: 0.7;
    transition: opacity 0.3s ease;
    max-width: 250px; /* Adjusted max-width for side-by-side fit */
    padding: 1em; /* Add some padding */
    text-align: left; /* Left-align content within service items */
}

.services-item h3 {
    letter-spacing: 0.05em; /* Slightly reduced letter spacing */
    font-size: 1.3em; /* Increased font size */
    margin-bottom: 0.7em;
    white-space: nowrap; /* Prevent wrapping */
    overflow: hidden; /* Hide overflow content */
    text-overflow: ellipsis; /* Show ellipsis for truncated text */
}

.services-item p {
    font-size: 1em; /* Increased font size */
    opacity: 0.8;
    flex-grow: 1; /* Make the paragraph fill available space */
}

.services-item:hover {
    opacity: 1;
}

.contact {
    letter-spacing: 0.1em;
    font-size: 0.9em;
}

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

a:hover {
    color: var(--link-hover-color);
}

.navbar {
    width: 100%;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--navbar-bg-color);
    color: var(--navbar-text-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem; /* Space between hamburger and theme toggle */
}

.navbar .logo {
    font-size: 1.8em;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.main-content {
    flex-grow: 1; /* Allows main content to take up available space */
    display: flex;
    flex-direction: column;
    padding-top: 50px; /* Offset for sticky navbar */
    padding-bottom: 50px;
}

.about-container { /* This applies to #services-section too */
    padding: 4rem 2rem;
    max-width: 800px;
}

.footer {
    width: 100%; /* To take up full width */
    padding: 1.5rem 2rem;
    text-align: center;
    background-color: var(--footer-bg-color);
    color: var(--footer-text-color);
    font-size: 0.85em;
    border-top: 1px solid var(--border-color);
    margin-top: auto; /* Pushes footer to the bottom */
    transition: background-color 0.3s ease, color 0.3s ease, border-top-color 0.3s ease;
}

.footer .contact {
    margin-bottom: 1rem;
}

#services-section .description {
    margin-bottom: 2rem;
}

/* New Theme Toggle Button Styles */
.theme-toggle {
    background-color: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.5em 1em;
    cursor: pointer;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9em;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    /* margin-left: auto;  Removed */
}

.theme-toggle:hover {
    background-color: var(--border-color);
}

/* Blog specific styles */
.blog-post, .blog-list-item {
    text-align: left;
    margin-bottom: 2em; /* Add some space between posts */
}

.blog-post h1, .blog-post h2, .blog-list-item h2 {
    text-align: left;
    margin-bottom: 0.5em;
}

.blog-post p, .blog-list-item p {
    margin-bottom: 1em;
    text-align: left;
}

.blog-list-item {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5em;
}

.blog-list-item:last-child {
    border-bottom: none;
}

.blog-list-item a {
    text-decoration: underline;
}

.blog-list-item a:hover {
    color: var(--link-hover-color);
}

.nav-links {
    display: flex;
    gap: 1em;
}

.nav-links a {
    padding: 0.5em 1em;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.nav-links a:hover {
    background-color: var(--border-color);
}

@media (max-width: 768px) {
    .services {
        flex-direction: column;
        align-items: center;
        gap: 1em;
    }
    .services-item {
        max-width: 100%;
        text-align: center;
    }
    .services-item h3 {
        white-space: normal;
    }

    /* Adjust placement for mobile */
    .theme-toggle {
        /* margin-left: auto;  Removed */
        margin-top: 0; /* No top margin on small screens */
        /* width: auto;  Removed */
    }
    .navbar {
        flex-wrap: wrap; /* Allow navbar items to wrap */
        justify-content: space-between; /* Space out items */
    }
    .navbar .logo {
        flex-grow: 1; /* Allow logo to take available space */
    }
}