body {
    display: flex; /* Flexbox layout */
    flex-direction: column; /* Stack header, content-wrapper, footer vertically */
    min-height: 100vh; /* Takes at least full screen height */

    background-color: #f5f5f5;

    color: #333;

    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Header styles */
header {
    text-align: center;
    position: sticky; /* Keep header at top when scrolling */
    top: 0;
    width: 100%;
    z-index: 100; /* Ensure it stays above other elements */

    /* Background Color */
    background-color: #333;

    /* Background Box */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);

    /* Edge Thickness */
    padding: 1rem;

    /* Text Color */
    color: white;
}

/* Navigation styles */
nav {
    display: flex;
    justify-content: center;
    background-color: #444;
    padding: 0.5rem;
}
nav a {
    color: white;
    margin: 0 1rem;
    text-decoration: none;
    transition: color 0.3s;
    display: block; /* Make links full-width */
    padding: 0.5rem;
}
nav a:hover {
    color: #f4f4f4;
}

.content-wrapper {
    display: grid; /* Flex container for sidebar and main-content */
    grid-template-columns: 200px 1fr; /* Sidebar width and main content */
    gap: 1rem; /* Space between columns */
    flex: 1; /* Take remaining space between header and footer */
    position: relative; /* Establish positioning context for sticky sidebar */
    min-height: 0; /* Allow flex children to overflow */
}

/* Sidebar styles */
.sidebar {
    width: 200px;
    background-color: #e0e0e0;
    padding: 1rem;
    border-right: 1px solid #ddd;
    min-height: calc(50vh - 60px); /* Subtract header height if needed */
    position: sticky;
    top: 60px; /* Stick to top of viewport */
    overflow-y: auto; /* Enable scrolling if sidebar content is tall */
}
.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

/* Main content styles || Center of page */
.main-content {
    flex: 1; /* Takes remaining space after header/footer */
    max-width: 600px; /* Narrow like MySpace profiles */
    margin-left: auto; /* Align with sidebar */
    margin-right: auto; /* Center horizontally */
    margin-top: 0; /* Creates 2rem gap at top AND bottom */
    overflow-y: auto; /* Enable scrolling if content exceeds height */

    /* Background Color */
    background-color: white;

    /* Background Box */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);

    /* Edge Thickness */
    padding: 1rem;

    /* Text Color */
    color: black;
}

.misc {
    margin-top: 2rem;
    padding: 1rem;
    background-color: rgba(
        255,
        255,
        255,
        0.1
    ); /* Semi-transparent white for misc
section */
}

/* Button styles */
button {
    background-color: #333;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}
button:hover {
    background-color: #555;
}

/* Hero section styles */
.hero {
    background-color: #f4f4f4;
    padding: 2rem;
    text-align: center;
}

/* Footer styles */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem;
}

/* Media query for smaller screens */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column; /* Stack sidebar and main content vertically */
    }

    .sidebar {
        width: 100%;
        overflow-y: visible; /* Or auto if needed */
    }

    .main-content {
        max-width: 100%;
        margin-left: 0; /* Remove left alignment on small screens */
    }
}
