:root {
    --paper: #f5f0d8;       /* uneven yellowed paper for article frame */
    --body-bg: #e7dfc0;     /* aged page background */
    --ink: #111;
    --rule: rgba(0,0,0,0.2);
    --caption: #444;
    --link: #333;
}

/* Body and fonts */
body {
    background-color: var(--body-bg);
    background-image: 
        url('https://www.transparenttextures.com/patterns/paper-fibers.png'),
        url('https://www.transparenttextures.com/patterns/stained-paper.png'); /* subtle stains */
    background-repeat: repeat, repeat;
    font-family: "Garamond", "Times New Roman", serif;
    margin: 0;
    line-height: 1.8;
    font-size: 1.14rem;
    -webkit-font-smoothing: antialiased;
    color: var(--ink);
    position: relative;
}

/* Animated background container */
.animated-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0; /* behind content */
    overflow: hidden;
}

/* drifting fibers (subtle white particles) */
.fiber {
    position: absolute;
    width: 2px; height: 2px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    animation: drift linear infinite;
}

@keyframes drift {
    0% { transform: translate(0,0) rotate(0deg); opacity: 0.08; }
    50% { opacity: 0.12; }
    100% { transform: translate(20px, 50px) rotate(360deg); opacity: 0.08; }
}

/* subtle shimmer along frame edges */
.frame-shimmer {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.02),
        rgba(255,255,255,0.02) 1px,
        transparent 1px,
        transparent 10px
    );
    animation: shimmer 15s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 0 0; }
    100% { background-position: 500px 500px; }
}

/* Paper container (article frame) */
.paper {
    max-width: 1000px; 
    margin: 30px auto; 
    padding: 45px;
    background-color: var(--paper);
    background-image: 
        url('https://www.transparenttextures.com/patterns/paper-fibers.png'),
        url('https://www.transparenttextures.com/patterns/stained-paper.png');
    background-repeat: repeat, repeat;
    background-blend-mode: multiply;
    box-shadow: 0 0 30px rgba(0,0,0,0.15), inset 0 0 15px rgba(0,0,0,0.05);
    border: 1px solid var(--rule);
    position: relative;
    z-index: 1;
    border-radius: 3px;
}

/* Masthead */
.masthead-inner {
    text-align: center;
    border-bottom: 3px solid var(--rule);
    margin-bottom: 30px;
    padding-bottom: 12px;
}

/* Newspaper name */
.paper-name {
    font-family: "Goudy Old Style", sans-serif;
    font-size: 4.5rem;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--ink);
    text-shadow: 2px 2px 1px rgba(0,0,0,0.1);
    margin-bottom: 0.3em;
}

.paper-name a {
    border-bottom: none;       /* remove the default dotted underline */
    text-decoration: none;     /* remove any text decoration */
    color: inherit;
    transition: all 0.2s ease;
}

.paper-name a:hover {
    text-decoration: underline;  /* only show underline on hover */
}

/* Label under masthead */
.label {
    color: #8a1000;
    letter-spacing: 0.2em;
    font-weight: bold;
    margin-top: 6px;
    font-family: "Garamond", serif;
    font-size: 1.14rem;
}

/* Headline */
.headline {
    font-family: "Caslon", "Garamond", serif;
    font-size: 3rem;
    line-height: 1.1;
    margin: 14px 0 6px 0;
    text-transform: uppercase;
}

/* Meta info */
.meta {
    color: #555;
    font-size: 1.14rem;
    font-style: italic;
    font-family: "Garamond", serif;
}

/* Content Layout */
.content {
    column-count: 2;
    column-gap: 50px;
    font-size: 1.14rem;
}

@media (max-width: 900px) {
    .content {
        column-count: 1;
    }
}

/* Paragraph styling */
.article-body p {
    text-align: justify;
    margin: 1.2em 0;
    text-indent: 2em; /* tab at beginning of paragraphs */
}

/* Exclude first paragraph from tab */
.article-body p:first-of-type {
    text-indent: 0;
}

/* First paragraph dropcap */
.dropcap::first-letter {
    float: left;
    font-size: 4rem;
    line-height: 0.7;
    padding-right: 10px;
    font-weight: 700;
    font-family: "Caslon", serif;
}

/* Images */
.lede-figure,
.inline-figure {
    column-span: all;
    text-align: center;
    margin: 25px 0;
}

.lede-figure img,
.inline-figure img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--rule);
    box-shadow: 0 0 12px rgba(0,0,0,0.12);
}

/* Captions */
figcaption {
    font-size: 1.14rem; /* same as body */
    color: var(--caption);
    font-style: italic;
    margin-top: 6px;
    font-family: "Garamond", serif;
}

/* Blockquote */
blockquote {
    column-span: all;
    border-left: 4px solid var(--rule);
    margin: 25px;
    padding-left: 18px;
    font-style: italic;
    color: #333;
    font-size: 1.3rem;
}

/* Links */
a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px dotted var(--link);
    transition: all 0.2s ease;
}

a:hover {
    border-bottom: 1px solid var(--link);
    color: #000;
}

/* Horizontal rules */
hr {
    column-span: all;
    border: none;
    border-top: 1px solid var(--rule);
    margin: 35px 0;
}
