@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
    --paper: #f4f0e6;
    --ink: #1a1a1a;
    --ink-soft: #4a4a4a;
    --serif-head: "Playfair Display", "Times New Roman", Georgia, serif;
    --serif-body: "PT Serif", Georgia, "Times New Roman", serif;
}

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

html {
    overscroll-behavior: none;
    overflow-x: hidden;
    scrollbar-width: none;
}

body {
    width: 100%;
    height: 100%;
    background-color: var(--paper);
    color: var(--ink);
    font-family: var(--serif-body);
    /* faint newsprint tooth */
    background-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.018) 0 1px, transparent 1px 3px);
}

h1, h2, h3, h4, h5 {
    font-family: var(--serif-head);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.01em;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--ink);
}

a:hover {
    color: var(--ink-soft);
}

a:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
}

p {
    font-size: clamp(1rem, 1.25vw, 1.15rem);
    line-height: 1.55;
    text-align: justify;
    word-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* newspaper column rule */
hr {
    border: 0;
    border-top: 4px double var(--ink);
    margin-block: 1vh;
}

.text-section {
    margin-inline: 1vw;
}

.date {
    font-size: 1.4vh;
    font-family: var(--serif-body);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--ink-soft);
}

.post hr {
    margin-bottom: 2vh;
}

.post .headline {
    display: flex;
    align-items: baseline;
    gap: .5vw;
    margin-bottom: 1vh;
}

.post h2 {
    font-size: 3vh;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* ---------- shared components (all pages) ---------- */

/* big section headline at the top of a page */
.page-header {
    grid-column: 1 / -1;
    width: 100%;
    font-size: 6vh;
    text-transform: uppercase;
    border-bottom: 5px double var(--ink);
    padding-bottom: 0.5vh;
    margin-bottom: 2vh;
}

/* sub-headings inside article-style content */
#content-area > h2 {
    font-size: 2.8vh;
    margin-top: 3vh;
    margin-bottom: 0.6vh;
}

/* "back" / navigation links at the foot of an article */
.back {
    display: inline-block;
    margin-top: 3vh;
    margin-right: 2vw;
    font-family: var(--serif-head);
    font-size: 1.9vh;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.back:hover {
    text-decoration: underline;
}

/* keep floated frames inside their post block */
.post::after {
    content: "";
    display: block;
    clear: both;
}

/* breathing room for text inside post cards */
.post .text-section {
    margin-inline: 0;
    padding: 1.2vh 1vw 1.6vh;
}

/* dotted-rule link list */
.link-list li {
    border-bottom: 1px dotted #a89f8b;
    padding: 0.7vh 0.4vw;
    font-size: 2vh;
    transition: background-color 150ms ease, color 150ms ease;
}

.link-list li a {
    display: block;
}

.link-list li:hover {
    background-color: var(--ink);
    color: var(--paper);
}

.link-list li:hover a {
    color: var(--paper);
}

/* Shared newspaper masthead and footer */
#navbar {
    background-color: #f4f0e6;
    color: #1a1a1a;
    width: 100%;
    box-sizing: border-box;
    padding: 1.2vh 3vw 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 5px double #1a1a1a;
    z-index: 999;
    font-family: "Playfair Display", "Times New Roman", Georgia, serif;
}

#navbar h1 {
    color: #1a1a1a;
    font-size: 6.5vh;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1;
    user-select: none;
}

#masthead-top {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 1vw;
    font-size: 1.3vh;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border-bottom: 1px solid #1a1a1a;
    padding-bottom: 0.6vh;
    margin-bottom: 0.7vh;
}

#masthead-sub {
    font-size: 1.6vh;
    font-style: italic;
    letter-spacing: 0.08em;
    margin: 0.4vh 0 0.9vh;
}

#navlist {
    display: flex;
    gap: 2.4vw;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    border-top: 1px solid #1a1a1a;
    border-bottom: 3px double #1a1a1a;
    padding: 0.7vh 0;
}

#navlist li a {
    color: #1a1a1a;
    font-size: 1.9vh;
    font-family: "Playfair Display", serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    user-select: none;
}

#navlist li a:hover {
    color: #1a1a1a;
    text-decoration: underline;
}

footer {
    width: 100%;
    margin: auto;
    display: flex;
    flex-direction: column;
    padding-bottom: 3vh;
    margin-top: 3vh;
    position: relative;
}

.footer-rule { width: 95%; margin-inline: auto; }

#footer-navlists {
    display: flex;
    flex-direction: row;
    margin: auto;
    gap: 3vw;
}

#footer-navlists section { display: flex; flex-direction: column; }
#footer-navlists ul { background-color: unset; }

#footer-navlists h4 {
    margin-bottom: 2vh;
    text-transform: uppercase;
    font-family: "Playfair Display", "Times New Roman", Georgia, serif;
    font-weight: 900;
    letter-spacing: .15em;
    font-size: larger;
}

#footer-navlists ul li {
    margin: 0;
    padding: 0;
    margin-top: 1vh;
    background-color: unset;
}

#footer-navlists li a { color: rgb(77, 77, 77); }
#footer-navlists li a:hover { color: black; }

@media (max-width: 100vh) {
    #navbar { padding: 1vh 3vw 0; }
    #navbar h1 { font-size: 4.6vh; }
    #masthead-top { font-size: 1.1vh; letter-spacing: 0.12em; }
    #navlist { display: none; flex-direction: column; gap: 1.4vh; }
}

@media (max-width: 48rem) {
    p {
        line-height: 1.6;
        text-align: left;
    }

    #navbar h1 {
        font-size: clamp(2.4rem, 11vw, 3.4rem);
        white-space: nowrap;
    }
    #masthead-top span:nth-child(2) { display: none; }
    #masthead-sub { font-size: 0.78rem; }
    #footer-navlists { width: 88%; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
