/* ==========================
   Container for project page
   ========================== */

@media (max-width: 768px) {
    .project-wrapper {
        flex-direction: column;
    }
    .project-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ccc;
        padding: 1rem 0.5rem;
    }
}

.project-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 2rem;        /* space between sidebar and main content */
    margin: 0;        /* remove vertical spacing */
    /* do NOT use position: relative; sticky requires normal flow */
}

/* ==========================
   Sidebar sticky on the left
   ========================== */
.project-sidebar {
    position: sticky;
    top: 1rem;        /* match header height */
    width: 220px;
    padding: 2rem;
    border-right: 1px solid #cfcfcf;
    flex-shrink: 0;
    align-self: flex-start;
    height: fit-content;
    background-color: #f1f1f1;
    z-index: 10;
}

.project-sidebar h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ccc;
    font-size: 1rem;
    font-weight: bold;
}

/* Sidebar list styling */
.project-sidebar > ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-sidebar li {
    margin-bottom: 0.5rem;
}

.project-sidebar a {
    text-decoration: none;
    color: #333;
    transition: color 0.2s;
}

.project-sidebar a:hover {
    color: #007acc; /* subtle hover effect */
}

.project-sidebar a.active {
    font-weight: bold;
}

.sidebar-section {
    font-weight: bold;              /* bold text */
    color: #555;
    cursor: default;                /* non-clickable */
    padding: 0.5rem 1rem;           /* top/bottom and align with links */
    margin: 0 0 0.5rem 0;           /* bottom margin like normal li spacing */
    border-bottom: 1px solid #ccc;  /* underline */
    display: block;                 /* makes width work */
    box-sizing: border-box;         /* include padding in width */
}

.sidebar-subnav {
    list-style: none;
    margin-top: 0.5rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid #ccc;
}

.sidebar-subnav a {
    color: #555;
}

.sidebar-subnav a.active {
    color: #007acc;
    font-weight: 600;
}


/* ==========================
   Main content wrapper
   ========================== */
.content-wrapper {
    flex: 1;             /* takes remaining space next to sidebar */
    max-width: 800px;    /* optional: keeps content readable */
    padding-left: 1rem;  /* small inner padding */
    padding-right: 1rem;
    margin: 0;           /* do not center with auto */
}

/* Headings and text styling */
.content-wrapper h1,
.content-wrapper h2,
.content-wrapper h3,
.content-wrapper h4,
.content-wrapper h5,
.content-wrapper h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.content-wrapper p {
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* ==========================
   Page header sticky
   ========================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #fff;
}

/* Adjust content spacing to avoid overlapping header */
.page-content {
    padding-top: 1rem;  /* same as header height */
    margin: 0;           /* remove extra margin */
}

/* ==========================
   Misc
   ========================== */
html {
    overflow-y: scroll;
}
