body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

header {
    background: #333;
    color: #fff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem; /* Keep padding here for full width nav */
    position: relative; /* For absolute positioning of mobile menu */
}

nav .logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu { /* Use the new class from index.html */
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0;
}

nav ul li {
    margin-left: 20px;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

section {
    padding: 4rem 0; /* Remove horizontal padding here */
    border-bottom: 1px solid #ddd;
}

section:last-of-type {
    border-bottom: none;
}

#hero {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 6rem 0; /* Remove horizontal padding here */
}

#hero h1 {
    font-size: 2.8rem; /* Slightly reduced font size */
    margin-bottom: 1rem;
}

.cta-button {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    background: #007BFF;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 1rem;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background: #0056b3;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

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

.project-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#contact p {
    text-align: center; /* Ensure the paragraph is centered */
    margin-bottom: 2rem;
}

#contact ul {
    display: flex; /* Use flexbox for layout */
    flex-wrap: wrap; /* Allow items to wrap */
    justify-content: center; /* Center items horizontally */
    gap: 1.5rem; /* Space between items */
    padding: 0;
    list-style: none;
}

#contact ul li {
    margin: 0; /* Reset margin from previous inline-block style */
}

#contact ul li a {
    display: flex; /* Make links flex containers */
    align-items: center; /* Align icon and text vertically */
    background: #007BFF;
    color: #fff;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#contact ul li a:hover {
    background: #0056b3;
    transform: translateY(-3px); /* Slight lift effect on hover */
}

#contact ul li a .fas,
#contact ul li a .fab {
    margin-right: 10px; /* Space between icon and text */
    font-size: 1.2rem; /* Adjust icon size */
}

footer {
    text-align: center;
    padding: 2rem;
    background: #333;
    color: #fff;
}

#homelab ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 2rem;
}

#homelab li {
    background: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    font-weight: bold;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff; /* Ensure the link color is white */
}

.home-icon {
    font-size: 1.5rem; /* Match logo font size */
    margin-right: 10px; /* Space between icon and text */
    color: #fff; /* Ensure icon color is white */
}

#hobbies ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    text-align: left;
}

#hobbies li {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#hobbies li strong {
    color: #007BFF;
}

.profile-picture {
    width: 180px; /* Adjust size as needed */
    height: 180px; /* Adjust size as needed */
    border-radius: 50%; /* Makes the image circular */
    object-fit: cover; /* Ensures the image covers the area without distortion */
    margin-bottom: 1.5rem; /* Space below the image */
    border: 5px solid #fff; /* White border around the image */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2); /* Subtle shadow */
    transition: transform 0.3s ease-in-out; /* Add transition for a smoother effect */
}

.profile-picture:hover {
    transform: scale(1.02); /* Slightly enlarge on hover for a nice effect */
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 2rem; /* Add horizontal padding here */
}

.cv-entry {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.cv-entry h4 {
    color: #007BFF;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.cv-entry ul {
    list-style: disc;
    padding-left: 20px;
    margin-top: 0.5rem;
}

/* Base styles for hamburger menu */
.menu-toggle {
    display: none; /* Hidden by default on larger screens */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001; /* Ensure it's above other content */
}

.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: #fff;
    border-radius: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-direction: row; /* Keep logo and toggle on one row */
        justify-content: space-between;
        align-items: center;
    }

    .nav-menu {
        display: none; /* Hide regular nav on mobile */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px; /* Below header */
        left: 0;
        background: #333;
        padding: 1rem 0;
        border-top: 1px solid #555;
        margin-top: 0; /* Reset margin */
    }

    .nav-menu.active {
        display: flex; /* Show when active */
    }

    .nav-menu li {
        margin: 0;
        text-align: center;
        padding: 0.5rem 0;
    }

    .nav-menu li a {
        display: block;
        padding: 0.5rem 0;
    }

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

    #hero h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }
}