/* Shared styles for the writing pages (page1.html … pageN.html). */

body {
    background-color: #ffffff;
    color: #000000;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* width:100% matters — as a centered column flex item, the container would
   otherwise size to its content up to max-width and overflow narrow screens */
.container {
    width: 100%;
    max-width: 650px;
    box-sizing: border-box;
    text-align: left;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: left;
    padding: 40px 20px;
}

/* padding gives it a usable tap target on mobile; the negative margin
   cancels that out so it still sits flush in the corner */
.home-arrow {
    position: fixed;
    top: 20px;
    left: 22px;
    z-index: 101;
    color: #000000;
    text-decoration: none;
    font-size: calc(1.25em + 2px);
    line-height: 1;
    opacity: 0.7;
    padding: 8px 12px;
    margin: -8px -12px;
    transition: opacity 0.2s;
}

.home-arrow:hover {
    opacity: 1;
}

.writing-title {
    font-size: calc(1.5em + 2px);
    line-height: 1.3;
    font-weight: bold;
    margin: 0 0 28px 0;
}

/* pre-wrap keeps the author's line breaks and blank lines exactly as written,
   so page content must sit flush-left in the source or it picks up an indent. */
.content {
    font-size: calc(11pt + 2px);
    line-height: 1.5;
    white-space: pre-wrap;
    text-align: left;
    /* the "====" separators are single unbreakable tokens wider than a phone */
    overflow-wrap: break-word;
}

.dots-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    padding: 30px 0;
    margin-top: auto;
}

.dot {
    width: 15px;
    height: 15px;
    background-color: #000000;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    text-decoration: none;
    display: block;
}

.dot:hover {
    transform: scale(1.3);
    background-color: #000000;
}

.dot.active {
    background-color: #000000;
}

@media (max-width: 768px) {
    .container {
        padding: 72px 0 20px 0;
    }

    .writing-title {
        font-size: calc(1.25em + 2px);
    }

    .dots-container {
        gap: 14px;
    }
}

.author-byline {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 12px 0 24px;
    color: #555;
}

.author-byline a {
    color: inherit;
    text-underline-offset: 3px;
}
