:root {
    --primary-color: #333;
    --secondary-color: #4a90e2;
    --background-color: #f0f0f0;
    --text-color: #333;
    --button-text-color: white;
}

html.dark-theme {
    --primary-color: #222;
    --secondary-color: #4a90e2;
    --background-color: #1b1b1b;
    --text-color: #f0f0f0;
    --button-text-color: #1b1b1b;
}

body[data-theme="dark"] {
    --primary-color: #222;
    --secondary-color: #4a90e2;
    --background-color: #1b1b1b;
    --text-color: #f0f0f0;
    --button-text-color: #1b1b1b;
}

/* Modify your existing body styles */
body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

header {
    background-color: var(--primary-color);
    padding: 1rem;
    color: var(--text-color); 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
}

nav li {
    margin-left: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav a:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

/* Theme switcher styling */
.theme-toggle-wrapper {
    display: flex;
    align-items: center;
    margin-left: auto; 
}

.theme-toggle {
    background-color: transparent;
    color: white;
    border: 2px solid var(--secondary-color);
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

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

.hero {
    height: 40vh;
    background: url('tech-background.jpg') no-repeat center center/cover;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 20px;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.cta-button {
    background-color: var(--secondary-color);
    color: var(--button-text-color);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: var(--primary-color);
}

.about, .contact {
    padding: 40px 20px;
    text-align: center;
    margin-top: 20px;
}

.short-paragraph {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

footer {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: center;
    margin-top: auto;
}

footer a {
    color: white;
    margin-left: 10px;
    transition: color 0.3s;
}
/*  */
/* footer a:hover { */
    /* color: var(--secondary-color); */
/* } */

footer img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

.blog-posts {
    padding: 20px;
    background-color: var(--background-color);
}

.blog-posts .container {
    max-width: 700px;
    margin: 0 auto;
    text-align: left; 
}

.blog-posts h2 {
    font-size: 2rem; /* Smaller and cleaner */
    margin-bottom: 30px;
    color: var(--text-color);
}

.post {
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--background-color); 
    border: 1px solid var(--primary-color); 
    border-radius: 5px; 
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

body[data-theme="dark"] .post {
    border-color: var(--secondary-color); 
}

.post h3 {
    font-size: 1.5rem; 
    margin-bottom: 10px;

}

.post p {
    font-size: 1rem; 
    margin-bottom: 10px;
    color: var(--text-color);
}

.read-more {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem; 
}

.read-more:hover {
    text-decoration: underline;
}


@media screen and (max-width: 768px) {
    nav ul {
        display: none; /* Hide the regular nav links on mobile */
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        padding: 20px;
    }

    nav ul.active {
        display: flex; 
    }

    nav li {
        margin: 10px 0;
    }

    .hamburger {
        display: flex; /* Show hamburger on mobile */
    }

    header {
        position: relative; 
    }

    .theme-toggle-wrapper {
        margin-left: 0; 
        margin-right: 20px; 
    }
}
/* Hamburger menu styles */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin-left: 20px; /* Add spacing from the theme button */
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color); /* Use the text color variable for theme compatibility */
    margin: 2px 0;
    transition: 0.3s;
}

/* Adjust the nav layout */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.theme-toggle-wrapper {
    margin-left: auto; /* Push to the right */
}

pre code {
    background-color: rgb(50, 50, 50); /* Dark background color */
    color: #fff; /* Light text color */
    padding: 10px; /* Add padding */
    border-radius: 5px; /* Optional: Round the corners */
    display: block; /* Ensure it spans full width */
    white-space: pre-wrap; /* Wrap text if needed */
}

/* Media query for mobile view */
@media screen and (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        padding: 20px;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
    }

    .hamburger {
        display: flex;
    }

    /* Adjust layout for mobile */
    nav {
        flex-wrap: wrap;
    }

    .logo {
        order: 1;
    }

    .theme-toggle-wrapper {
        order: 2;
        margin-right: auto;
    }

    .hamburger {
        order: 3;
    }
}

/* Theme-specific styles */
.hamburger span {
    background-color: white;
}

.centered-content {
    text-align: center;
    margin: 0 auto; 
    max-width: 800px; 
}

ul {
    list-style-position: inside; 
}

/* Icon styles */
/* .sun-icon {
    color: #FFD700;
}

.moon-icon {
    color: #4A4A4A; 
} */

.theme-toggle {
    cursor: pointer;
}

.email-icon {
    background-image: url('email-icon.svg');
    width: 24px;
    height: 24px;
    display: inline-block;
  }

  .content img {
    width: 600px;
  }