body {
    /* Robust System Font Stack - Balanced & Professional */
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-size: 16px;
    line-height: 1.6;
    /* Better readability */
    background-color: #c9d2d9;
    background-image: linear-gradient(to bottom, #c9d2d9, #506080);
    color: #111111;
    /* Darkened from #36271e for better "pop" */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header h1 {
    margin: 0;
    color: #ffffff;
    letter-spacing: -0.02em;
    /* Subtle tightening */
    font-size: 1.75rem;
    /* Slightly larger heading */
    line-height: 1.2;

    /* thin dark-teal outline + slight depth + gentle cyan glow */
    text-shadow:
        0 1px 0 #2f5e6b,
        0 -1px 0 #2f5e6b,
        1px 0 0 #2f5e6b,
        -1px 0 0 #2f5e6b,
        1px 1px 0 #2f5e6b,
        -1px 1px 0 #2f5e6b,
        1px -1px 0 #2f5e6b,
        -1px -1px 0 #2f5e6b,
        0 2px 1px rgba(0, 0, 0, 0.25),
        0 0 8px rgba(90, 177, 198, 0.25);
}

header a {
    text-decoration: none;
}

header {
    background-color: #4694a8;
    color: #fff;
    padding: 16px 20px;
    /* More breathing room */
    text-align: center;
    border-top: 2px solid #9fb8ba;
    border-left: 2px solid #9fb8ba;
    border-right: 2px solid #2f5e6b;
    border-bottom: 2px solid #2f5e6b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    /* Added header shadow */
    z-index: 10;
    position: relative;
}

main {
    max-width: 960px;
    margin: 40px auto;
    /* More vertical space */
    background-color: #aa9790;
    border-top: 1px solid #a89680;
    border-left: 1px solid #a89680;
    border-right: 1px solid #f8f4e8;
    border-bottom: 1px solid #f8f4e8;
    box-shadow:
        inset 1px 1px 0px 0px #f8f4e8,
        inset -1px -1px 0px 0px #a89680,
        0 20px 50px rgba(0, 0, 0, 0.3);
    /* Deeper, prettier shadow */
    flex-grow: 1;
    display: flex;
    position: relative;
    animation: fadeIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    /* Smoother animation */
}

/* ... Sidebar styling ... */
.sidebar {
    width: 240px;
    border-right: 2px solid #a89680;
    display: flex;
    flex-shrink: 0;
    /* Lime/Greenish Gradient restored */
    background: linear-gradient(to bottom, #dbeee2, #ffffff);
}

.sidebar nav {
    flex: 1 1 auto;
}

.sidebar nav ul {
    list-style: none;
    padding: 15px 20px 20px 20px;
    margin: 0;
}

.sidebar nav li {
    padding: 4px 0;
}

.sidebar nav a {
    color: #404040;
    text-decoration: none;
    display: block;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.1s;
}

.sidebar nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.sidebar nav a.active {
    background-color: #000080;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.content {
    padding: 40px;
    flex-grow: 1;
    border-bottom: solid 2px #88756d;
    background-color: #aa9790;
    /* Ensure bg match */
}

h2 {
    background-color: #efa46f;
    color: #ffffff;
    padding: 8px 12px;
    margin: -40px -40px 30px -40px;
    /* Match content padding */
    border-bottom: 3px solid #b79370;
    font-size: 1.4rem;
    letter-spacing: 0.01em;
    text-shadow:
        0 -1px 0 rgba(255, 255, 255, 0.4),
        0 1px 0 rgba(0, 0, 0, 0.35),
        0 0 10px rgba(90, 177, 198, 0.18);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

footer {
    background-color: #bc878f;
    color: #e0e0e0;
    padding: 12px;
    text-align: center;
    margin-top: 40px;
    border-top: 2px solid #cfc2c7;
    border-left: 2px solid #cfc2c7;
    border-right: 2px solid #685461;
    border-bottom: 2px solid #685461;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
}

nav {
    /* Clean up old nav rules if any conflict */
}

@media (max-width: 960px) {
    body {
        padding: 10px;
        /* Add padding to body so main window doesn't touch edges */
    }

    header,
    main,
    footer {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        /* Keep key borders for physicality */
    }

    main {
        flex-direction: column;
        margin-top: 20px;
        margin-bottom: 20px;
        /* Keep the shadow and borders! */
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid #a89680;
        background: transparent;
    }

    .sidebar nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: flex-start;
        /* Align left or center? User said "prettify". Left is usually safer. */
        padding: 15px;
    }

    .sidebar nav li {
        padding: 0;
    }

    .sidebar nav a {
        background-color: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(0, 0, 0, 0.1);
    }

    .content {
        padding: 20px;
        /* Reduce padding on mobile */
    }

    h2 {
        margin: -20px -20px 20px -20px;
        border-radius: 0;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}