/* ==========================================================================
   1. The "Nuke It" Reset (Wipes all browser defaults)
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-size: 100%;
    font-weight: normal;
    vertical-align: baseline;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    line-height: 1;
}

ol, ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================================================
   2. Editorial Typography & Layout
   ========================================================================== */
html {
    /* Using a classic Georgia/Garond serif stack for that literary feel */
    font-family: "Georgia", "Times New Roman", "New York", serif;
    background-color: #fcfbfa; /* Slightly warm paper-like tint */
    color: #111111;            /* Soft ink black, less harsh than pure #000 */
}

body {
    padding: 40px 20px;
}

.container {
    max-width: 680px; /* Narrower width mirrors traditional book columns for optimal readability */
    margin: 0 auto;
}

/* ==========================================================================
   3. Newspaper / Book Elements
   ========================================================================== */
header {
    text-align: center;
    border-bottom: 3px double #111; /* Traditional double border rule */
    padding-bottom: 20px;
    margin-bottom: 40px;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 15px;
}

/* Nav links look like traditional top bar sections */
nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    text-transform: uppercase;
    font-family: system-ui, sans-serif; /* Small sans-serif accent for meta text */
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
}

nav a:hover {
    text-decoration: underline;
}

/* Body Content Styling */
h2 {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 40px 0 15px 0;
}

p {
    font-size: 1.15rem;
    line-height: 1.65;
    margin-bottom: 20px;
    
    /* 1. The Core TeX Fix: Justify + Automatic Hyphenation */
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;              /* Tells the browser to split syllables with hyphens */
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    
    /* 2. Micro-typography (Tighter letter fitting) */
    text-rendering: optimizeLegibility; /* Forces higher-quality kerning */
    font-variant-numeric: oldstyle-nums; /* Uses traditional book-style numbers */
    
    /* 3. Preventing awkward single words on a line (orphans) */
    widows: 2;
    orphans: 2;

    text-wrap: pretty;
    
    /* Helps prevent the "river" by ensuring lines aren't too short */
    word-break: break-word; 
    overflow-wrap: break-word;
}


/* Classic Book Feature: First paragraph has no indent, subsequent ones do */
p + p {
    text-indent: 1.5rem;
    margin-top: -20px; /* Removes double spacing between indented paragraphs */
}

/* Editorial Blockquote */
blockquote {
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.5;
    padding: 10px 0 10px 30px;
    margin: 30px 0;
    border-left: 2px solid #111;
}

/* Footer Accent */
footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    text-align: center;
    font-size: 0.9rem;
    color: #555;
    font-style: italic;
}
