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

body {
    font-family: 'Georgia', serif;
    background: #fafafa;
    color: #3a3a3a;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 650px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    text-align: center;
    margin-bottom: 80px;
}

h1 {
    font-size: 1.8rem;
    font-weight: normal;
    letter-spacing: 0.15em;
    color: #2a2a2a;
    margin-bottom: 10px;
}

h1 a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

h1 a:hover {
    opacity: 0.7;
}

.tagline {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
    letter-spacing: 0.05em;
}

.email-entry {
    margin-bottom: 100px;
    padding-bottom: 60px;
    border-bottom: 1px solid #e5e5e5;
}

.email-entry:last-of-type {
    border-bottom: none;
}

.email-meta {
    margin-bottom: 30px;
    font-size: 0.85rem;
    color: #999;
    letter-spacing: 0.02em;
}

.email-date {
    font-style: italic;
}

.email-subject {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 25px;
    font-weight: normal;
    font-style: italic;
}

.email-body {
    font-size: 1rem;
    line-height: 1.8;
    color: #4a4a4a;
}

.email-body p {
    margin-bottom: 20px;
}

.email-body p:first-child {
    text-indent: 0;
}

/* Subtle hover effect for entries */
.email-entry {
    transition: opacity 0.3s ease;
}

.email-entry:hover {
    opacity: 0.85;
}

/* Side Navigation dots - now scrollable for many entries */
.nav-dots-side {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 10px 5px;
    scrollbar-width: none; /* Firefox */
}

.nav-dots-side::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

/* Show subtle scrollbar on hover */
.nav-dots-side:hover {
    scrollbar-width: thin;
}

.nav-dots-side:hover::-webkit-scrollbar {
    display: block;
    width: 4px;
}

.nav-dots-side:hover::-webkit-scrollbar-track {
    background: transparent;
}

.nav-dots-side:hover::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.dot.active {
    background: #888;
    transform: scale(1.3);
}

.dot:hover {
    background: #aaa;
    transform: scale(1.2);
}

/* Bottom Pagination */
.pagination {
    margin-top: 100px;
    padding-top: 40px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.page-nav {
    display: flex;
    gap: 12px;
    align-items: center;
}

.page-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.page-dot.active {
    background: #888;
    transform: scale(1.3);
    pointer-events: none;
}

.page-dot:hover {
    background: #aaa;
    transform: scale(1.2);
}

.page-ellipsis {
    color: #ccc;
    font-size: 0.8rem;
    padding: 0 4px;
    user-select: none;
}

/* Arrow navigation */
.nav-arrow {
    font-size: 0.85rem;
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 5px;
}

.nav-arrow:hover {
    color: #666;
}

.nav-arrow.disabled {
    color: #ddd;
    pointer-events: none;
}

/* Page indicator text */
.page-indicator {
    font-size: 0.75rem;
    color: #999;
    letter-spacing: 0.05em;
    margin: 0 20px;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 60px;
    font-size: 0.85rem;
    color: #aaa;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .email-meta {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .nav-dots-side {
        display: none;
    }

    .pagination {
        gap: 15px;
    }

    .page-indicator {
        margin: 0 10px;
    }

    .page-nav {
        gap: 8px;
    }
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.email-entry {
    animation: fadeIn 0.8s ease-out;
    animation-fill-mode: both;
}

/* Stagger animation for multiple entries */
.email-entry:nth-child(1) { animation-delay: 0.1s; }
.email-entry:nth-child(2) { animation-delay: 0.2s; }
.email-entry:nth-child(3) { animation-delay: 0.3s; }
.email-entry:nth-child(4) { animation-delay: 0.4s; }
.email-entry:nth-child(5) { animation-delay: 0.5s; }
.email-entry:nth-child(6) { animation-delay: 0.6s; }
.email-entry:nth-child(7) { animation-delay: 0.7s; }
.email-entry:nth-child(8) { animation-delay: 0.8s; }
.email-entry:nth-child(9) { animation-delay: 0.9s; }
.email-entry:nth-child(10) { animation-delay: 1.0s; }

/* Scroll progress indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #888 var(--scroll), transparent var(--scroll));
    z-index: 100;
}