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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #000;
    color: #fff;
    line-height: 1.6;
}

aside {
    position: fixed;
    width: 280px;
    height: 100vh;
    padding: 2rem 1.5rem;
    border-right: 1px solid #333;
}

aside h1 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-align: left;
    padding: 0;
}

nav ul {
    list-style: none;
    padding: 0;
}

nav li {
    margin-bottom: 0.25rem;
}

nav a {
    color: #888;
    text-decoration: none;
    display: block;
}

nav a:hover,
nav a.active {
    color: #fff;
}

main {
    margin-left: 280px;
    padding: 2rem 1.5rem;
    max-width: 1000px;
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    line-height: 1.3;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

p {
    margin-bottom: 1rem;
    color: #888;
}

p strong {
    color: #fff;
}

a {
    color: inherit;
}

a:hover {
    color: #fff !important;
}

ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.2rem;
    color: #888;
}

li {
    margin-bottom: 0.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

th, td {
    text-align: left;
    padding: 0.5rem 0.5rem 0.5rem 0;
    border-bottom: 1px solid #333;
}

th:first-child, td:first-child {
    padding-right: 1rem;
}

th {
    color: #fff;
    font-weight: 500;
}

td {
    color: #888;
}

td a {
    color: #888;
}

td a:hover {
    color: #fff;
}

td a[href^="http"]::after {
    content: " ↗";
    font-size: 0.75rem;
    color: #666;
}

.post-list {
    list-style: none;
    padding: 0;
}

.post-list li {
    margin-bottom: 0.25rem;
}

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

.post-list a:hover,
.post-list a.active {
    color: #fff;
    font-weight: 500;
}

.split-view {
    display: flex;
    gap: 0;
    padding: 0;
    max-width: none;
}

.list-pane {
    width: 280px;
    padding: 2rem 1.5rem;
    border-right: 1px solid #333;
    overflow-y: auto;
    height: 100vh;
}

.list-pane h1 {
    text-align: left;
    padding: 0;
    margin-bottom: 1.5rem;
}

.list-pane ul {
    padding: 0;
}

.reading-pane {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    height: 100vh;
}

.investment-section {
    margin-bottom: 2rem;
}

.investment-list {
    list-style: none;
    padding: 0;
}

.investment-status {
    color: #666;
    font-size: 0.9rem;
}

.external-link::after {
    content: " ↗";
    font-size: 0.75rem;
    color: #666;
}

/* Empty state */
.empty-state {
    color: #666;
    font-style: italic;
    padding: 2rem 0;
}

/* Loading state */
.loading-state {
    color: #888;
    padding: 2rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #333;
    border-top-color: #888;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error state */
.error-state {
    color: #d44;
    background: rgba(221, 68, 68, 0.1);
    border: 1px solid rgba(221, 68, 68, 0.3);
    border-radius: 4px;
    padding: 1rem;
    margin: 1rem 0;
}

.error-state h3 {
    color: #d44;
    margin-top: 0;
    font-size: 1rem;
}

/* Smooth content transitions */
.reading-pane > div {
    animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Respect user's motion preferences for accessibility */
@media (prefers-reduced-motion: reduce) {
    .reading-pane > div {
        animation: none !important;
    }
}

/* Hamburger menu button - hidden on desktop */
.hamburger {
    display: none;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
        background: none;
        border: none;
        color: #fff;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0;
        position: absolute;
        top: 1.5rem;
        right: 1rem;
    }

    aside {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #333;
        padding: 1.5rem 1rem;
    }

    aside h1 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    /* Hide nav by default on mobile */
    nav {
        display: none;
    }

    /* Show nav when active */
    nav.active {
        display: block;
    }

    nav li {
        margin-bottom: 0.5rem;
    }

    nav a {
        padding: 0.75rem 0;
        font-size: 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .post-list li {
        margin-bottom: 0.5rem;
    }

    .post-list a {
        padding: 0.75rem 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    main {
        margin-left: 0;
        padding: 1.5rem 1rem;
    }

    .split-view {
        flex-direction: column;
    }

    .list-pane {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #333;
        padding: 1.5rem 1rem;
        max-height: 50vh;
        overflow-y: auto;
    }

    .reading-pane {
        width: 100%;
        height: auto;
        padding: 1.5rem 1rem;
        overflow-y: visible;
    }

    h1, h2, h3 {
        font-size: 1.1rem;
    }

    p, li {
        font-size: 1rem;
        line-height: 1.7;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.4rem 0.3rem 0.4rem 0;
    }

    /* Make tables horizontally scrollable on mobile */
    .reading-pane table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
