:root {
    --bg: #000;
    --fg: #fff;
    --headline-size: clamp(18px, 3vw, 36px);
    --dot-size: 0.45em;
    --dot-gap: 0.25em;
    --anim-duration: 1s;
    --padding: 1.5rem;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: 'Courier New', Courier, monospace;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: var(--padding);
    min-height: 100vh;
}

/* Header */
.header {
    margin-bottom: 2rem;
}

.headline {
    font-size: var(--headline-size);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5ch;
}

/* Dots animation */
.dots {
    display: inline-flex;
    gap: var(--dot-gap);
    margin-left: 0.4ch;
}

.dot {
    width: var(--dot-size);
    height: var(--dot-size);
    border-radius: 50%;
    background: var(--fg);
    opacity: 0.14;
    transform-origin: center;
    animation: blink var(--anim-duration) infinite ease-in-out;
}

.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: calc(var(--anim-duration) * 0.15); }
.dot:nth-child(3) { animation-delay: calc(var(--anim-duration) * 0.3); }

@keyframes blink {
    0% { opacity: 0.14; transform: scale(0.85); }
    30% { opacity: 1; transform: scale(1); }
    60% { opacity: 0.14; transform: scale(0.9); }
    100% { opacity: 0.14; transform: scale(0.85); }
}

@media (prefers-reduced-motion: reduce) {
    .dot { animation: none; opacity: 1; }
}

/* Entries container */
.entries-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

/* Parent entry stacks row + subentries vertically */
.parent-entry {
    display: flex;
    flex-direction: column; /* parent stacks row + subentries */
    gap: 0.25rem;
}

/* Row containing main entry title/dots/date */
.entry-row {
    display: flex;
    align-items: center;
    gap: 0.5ch;
}

/* Individual entry layout (applies to subentries as well) */
.entry {
    display: flex;
    align-items: center;
    font-size: 1rem;
    max-width: 600px;
    transition: all 0.2s ease-in-out;
}

/* Hover italics */
.entry:hover .entry-title,
.entry:hover .entry-date {
    font-style: italic;
}

/* Entry text */
.entry-title {
    white-space: nowrap;
}

/* Dotted lines */
.entry-dots {
    flex: 0 0 20vw;
    border-bottom: 1px dotted var(--fg);
    margin: 0 0.75rem;
    opacity: 0.5;
    transition: all 0.2s ease-in-out;
}

.entry-date {
    white-space: nowrap;
    font-size: 0.85em;
    opacity: 0.8;
    transition: all 0.2s ease-in-out;
}

/* Subentries container */
.sub-entries {
    display: none; /* hidden until parent clicked */
    flex-direction: column;
    gap: 0.25rem;
    margin-left: 1.5rem; /* indent subentries */
}

/* Subentry individual layout */
.sub-entry {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    cursor: pointer;
}

/* Hover effect for subentry */
.sub-entry:hover .entry-title,
.sub-entry:hover .entry-date {
    font-style: italic;
    opacity: 1;
}

/* Make images block-level and add vertical spacing */
#md-display img,
.markdown img {
    display: block;
    margin: 1rem 0;
    max-width: 100%;      /* keeps images responsive */
    height: auto;
}