* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Georgia, serif;
    line-height: 1.6;
    color: #d8d8d8;
    background-color: #383838;
}

/* ---- Sidebar layout ---- */

.layout {
    display: flex;
    align-items: flex-start;
    min-height: 100vh;
}

.sidebar {
    flex: 0 0 300px;
    width: 300px;
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
    background: linear-gradient(160deg, #2c2c2c 0%, #4a4a4a 100%);
    color: white;
    box-shadow: 2px 0 15px rgba(0,0,0,0.1);
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 50px 30px;
    height: 100%;
    overflow-y: auto;
}

.profile-photo {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: #ddd;
    display: block;
    border: 4px solid rgba(255,255,255,0.9);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.sidebar-text {
    margin-top: 28px;
}

.sidebar-text h1 {
    font-size: 1.8em;
    font-weight: 300;
    line-height: 1.25;
}

.sidebar-text p {
    font-size: 1em;
    opacity: 0.85;
    margin-top: 12px;
}

.sidebar nav {
    width: 100%;
    margin-top: 40px;
}

.sidebar nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar nav a {
    display: block;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1em;
    padding: 10px 16px;
    border-radius: 6px;
    transition: background-color 0.25s ease;
}

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

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

/* ---- Main content ---- */

main {
    flex: 1 1 auto;
    min-width: 0;
    padding: 50px 0;
}

.main-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 40px;
}

section,
.post {
    margin-bottom: 40px;
}

h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #ffffff;
    border-bottom: 2px solid rgba(255,255,255,0.15);
    padding-bottom: 10px;
}

h3 {
    font-size: 1.3em;
    color: #ededed;
    margin-bottom: 10px;
    margin-top: 20px;
}

p + p {
    margin-top: 1em;
}

a {
    color: #bcbcbc;
}

a:hover {
    color: #ffffff;
}

.post-header {
    background: transparent;
    color: inherit;
    padding: 0;
    text-align: left;
}

.post-header h2 {
    margin-bottom: 10px;
}

.post-date {
    color: #aaa;
    font-size: 0.95em;
    margin-bottom: 8px;
}

.post-description {
    color: #bdbdbd;
    font-size: 1.05em;
}

.post-content h3 {
    margin-top: 32px;
}

.post-content ul,
.post-content ol {
    margin: 1em 0 1em 1.5em;
}

.post-content li + li {
    margin-top: 0.35em;
}

.post-list {
    margin-top: 20px;
    list-style: none;
}

.post-list li {
    font-size: 1.2em;
}

.post-list li + li {
    margin-top: 12px;
}

.post-list li a {
    color: #f0f0f0;
    text-decoration: none;
}

.post-list li a:hover {
    text-decoration: underline;
}

.post-list-date {
    margin-left: 12px;
    color: #999;
    font-size: 0.75em;
}

/* ---- Responsive: stack sidebar on top for narrow screens ---- */

@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        flex-basis: auto;
        width: 100%;
        height: auto;
        position: static;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .sidebar-inner {
        padding: 30px 20px;
        height: auto;
    }

    .profile-photo {
        width: 140px;
        height: 140px;
    }

    .sidebar nav {
        margin-top: 24px;
    }

    .sidebar nav ul {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    main {
        padding: 30px 0;
        width: 100%;
    }

    .main-inner {
        padding: 0 16px;
    }
}
