:root {
    --primary-color: #9d2235; /* Temple University Red */
    --sidebar-bg: #24334e;
    --text-main: #333;
    --bg-light: #ffffff;
}

* { box-sizing: border-box; }

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

#container {
    display: flex; /* Flexbox allows for 100% height and width easily */
    min-height: 100vh;
    width: 100%;
}

/* Sidebar - pinned to the far left */
#sidebar {
    position: relative; /* This is the anchor for the contact box */
    min-height: 100vh;   /* Ensures the sidebar spans the full screen height */
    width: 300px; /* Fixed width for the "sided" look */
    background: var(--sidebar-bg);
    color: white;
    padding: 40px 30px;
    flex-shrink: 0; /* Prevents sidebar from squishing */
    display: flex;
    flex-direction: column;
}

#sidebar img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid #444;
}

#sidebar h1 {
    font-size: 1.5rem;
    margin: 0 0 30px 0;
    font-weight: 600;
}

/* Navigation Links */
#navlist {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
}

#navlist li {
    margin-bottom: 15px;
}

#navlist a {
    color: #999;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.2s;
}

#navlist a:hover, #navlist a.active {
    color: white;
}

.badge-new {
    background: var(--primary-color);
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 2px;
    margin-left: 5px;
    vertical-align: middle;
}

/* Content Area - stretches 100% */
#content {
    flex-grow: 1; /* Takes up all remaining space */
    padding: 60px 80px;
    background: var(--bg-light);
    overflow-y: auto;
}

h2 {
    font-size: 2.2rem;
    color: #111;
    margin-top: 0;
}

fieldset {
    border: none;
    padding: 0;
    margin-bottom: 25px;
}

legend {
    color: var(--primary-color);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 2px solid #eee;
    width: 100%;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.contact-box {
    position: fixed;  /* Fixes it relative to the sidebar */
    bottom: 20px;        /* 20px up from the very bottom */
    width: 260px;      /* Slightly less than sidebar width to fit nicely */
    left: 15px;         /* Keeps it centered/stretched within sidebar padding */

    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    font-size: 0.9rem;
}

.contact-box p {
    margin-bottom: 12px;
    line-height: 1.4;
    color: #333;
}

.contact-box i {
    width: 20px; /* Ensures icons align vertically */
    margin-right: 8px;
    color: #9d2235; /* Temple Red */
    text-align: center;
}

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

.contact-box a:hover {
    color: #9d2235;
}

.contact-box b {
    font-weight: 600;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    #container {
        flex-direction: column; /* Stacks sidebar on top of content */
    }

    #sidebar {
        width: 100%; /* Sidebar takes full width on mobile */
        padding: 20px;
        text-align: center;
    }

    #sidebar img {
        width: 150px; /* Smaller profile photo for mobile */
        margin: 0 auto 20px auto;
    }

    #content {
        padding: 30px 20px; /* Reduces padding so text doesn't look cramped */
    }

    h2 {
        font-size: 1.8rem; /* Smaller headers for small screens */
    }

    #navlist {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    #navlist li {
        margin-bottom: 0;
    }
    .contact-box {
        position: relative; /* Removes the "floating" behavior */
        bottom: 0;         /* Resets the bottom offset */
        left: 0;           /* Resets the left offset */
        width: 100%;       /* Allows it to fill the sidebar width */
        margin-top: 30px;  /* Adds space between the nav and the contact box */
        box-sizing: border-box; /* Ensures padding doesn't break the width */
    }
}