/* ================================
   JD Noone's Leather Bound Notebook
   Complete stylesheet
   ================================ */

/* ---- 1. Global reset & base ---- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    background: #1b1a18;
    color: #2b2520;
    font-family: "Georgia", "Times New Roman", serif;
}

/* ---- 2. Notebook container ---- */

.notebook-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
}

.notebook {
    position: relative;
    max-width: 900px;
    width: 100%;
    background: #fdfbf7;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.12),
        0 18px 40px rgba(0, 0, 0, 0.45);
    border-radius: 6px;
    padding: 2.5rem 3rem;
    overflow: hidden;
    animation: pageTurn 0.6s ease-out;
    transform-origin: left center;
}

/* subtle paper grain */
.notebook::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("paper-grain.png");
    opacity: 0.08;
    pointer-events: none;
}

/* inner shadow */
.notebook::after {
    content: "";
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.12);
    pointer-events: none;
}

/* ---- 3. Spine ---- */

.notebook-spine {
    position: absolute;
    left: 2.2rem;
    top: 1.5rem;
    bottom: 1.5rem;
    width: 2px;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.18),
        rgba(0, 0, 0, 0.05)
    );
    opacity: 0.7;
}

/* ---- 4. Layout ---- */

.notebook-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.6fr);
    column-gap: 2.5rem;
}

.notebook-main {
    padding-left: 1.5rem;
}

.notebook-margin {
    font-size: 0.85rem;
    color: #6b5c4c;
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
    border-left: 1px dashed rgba(0, 0, 0, 0.08);
    padding-left: 1.5rem;
}

/* ---- 5. Title & subtitle ---- */

.notebook-title {
    text-align: center;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.95rem;
    color: #5a4b3c;
    margin-bottom: 0.75rem;
}

.notebook-title span {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: radial-gradient(circle at top left, #fffdf8, #f3e9dd);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 2px 4px rgba(0, 0, 0, 0.12);
}

.notebook-subtitle {
    text-align: center;
    font-size: 0.85rem;
    color: #7a6a59;
    margin-bottom: 2.5rem;
    font-style: italic;
}

.notebook-margin .margin-note-body img {
    max-width: 220px;
    height: auto;
    display: block;
    margin-bottom: 0.5rem;
}

/* ---- 6. Post header ---- */

.post-header {
    margin-bottom: 1.75rem;
}

.post-title {
    font-family: "Cormorant Garamond", "EB Garamond", "Georgia", serif;
    font-size: 1.7rem;
    letter-spacing: 0.03em;
    color: #2a211a;
    margin: 0 0 0.35rem;
}

.post-date {
    font-size: 0.85rem;
    color: #7a6a59;
}

/* ---- 7. Body text ---- */

.post-body {
    font-family: "Cormorant Garamond", "EB Garamond", "Georgia", serif;
    font-size: 1rem;
    line-height: 1.5;
    letter-spacing: -0.01em;
    color: #2b2520;
}

.post-body p {
    margin: 0 0 0.9rem;
}

.post-body p:first-of-type::first-letter {
    float: left;
    font-size: 2.6rem;
    line-height: 1;
    padding-right: 0.25rem;
    padding-top: 0.1rem;
    font-family: "Cormorant Garamond", "EB Garamond", serif;
    color: #4a3a2a;
}

/* ---- 8. Marginalia ---- */

.margin-note {
    margin-bottom: 1rem;
    padding-left: 0.25rem;
    position: relative;
}

.margin-note::before {
    content: "✶";
    position: absolute;
    left: -1.1rem;
    top: 0.05rem;
    font-size: 0.7rem;
    color: #b39a7c;
}

.margin-note-title {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
    color: #5f4f3f;
}

.margin-note-body {
    font-style: italic;
    line-height: 1.4;
}

/* ---- 9. Footnotes ---- */

.post-footnotes {
    margin-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 0.75rem;
    font-size: 0.85rem;
    color: #6b5c4c;
}

.post-footnotes ol {
    margin: 0;
    padding-left: 1.2rem;
}

.post-footnotes li {
    margin-bottom: 0.4rem;
}

/* ---- 10. Post navigation ---- */
.post-nav {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 1.05rem; /* was 0.9rem — this is the biggest win */
    border-top: 1px solid rgba(0,0,0,0.08); /* subtle visual anchor */
    padding-top: 1rem; /* gives the nav its own “zone” */
}

.post-nav a {
    color: #1f1712; /* slightly darker, still notebook-warm */
    font-weight: 500;
    text-decoration: none;
    position: relative;
}

.post-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.1rem;
    width: 100%;
    height: 1px;
    background: rgba(90, 75, 60, 0.35);
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.18s ease-out;
}

.post-nav a:hover::after {
    transform: scaleX(1);
}

/* ---- 11. Close Notebook bookmark (left, near spine) ---- */

.notebook-ribbon {
    position: absolute;
    left: -1.2rem;              /* sits just to the right of the spine */
    top: -3rem;               /* above the notebook title */
    display: inline-block;
    padding: 0.35rem 0.75rem 0.55rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: #fdfbf7;
    text-decoration: none;

    /* bookmark fabric look */
    background: linear-gradient(to bottom, #b14b3c, #8f372a);
    border-radius: 4px 4px 0 0; /* rounded top, straight bottom */
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);

    transform-origin: top left;
}

/* little triangular notch at the bottom */
.notebook-ribbon::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -0.45rem;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 0.45rem solid transparent;
    border-right: 0.45rem solid transparent;
    border-top: 0.45rem solid #8f372a;
}

.notebook-ribbon:hover {
    transform: translateY(1px);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* ---- 12. Responsive tweaks ---- */

@media (max-width: 768px) {
    .notebook {
        padding: 2rem 1.75rem;
    }

    .notebook-inner {
        grid-template-columns: minmax(0, 1fr);
        column-gap: 0;
    }

    .notebook-main {
        padding-left: 0;
    }

    .notebook-margin {
        margin-top: 2rem;
        border-left: none;
        padding-left: 0;
    }

    .notebook-ribbon {
        right: 1.75rem;
    }
}

/* ---- Table of Contents ---- */

.toc {
    margin-bottom: 2.5rem;
}

.toc-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #5a4b3c;
    margin-bottom: 1rem;
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-list li {
    margin-bottom: 0.9rem;
}

.toc-list a {
    display: inline-block;
    font-family: "Cormorant Garamond", "EB Garamond", "Georgia", serif;
    font-size: 1rem;
    color: #2a211a;
    text-decoration: none;
    position: relative;
    padding-bottom: 0.1rem;
}

/* subtle underline that animates in */
.toc-list a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.05rem;
    width: 100%;
    height: 1px;
    background: rgba(42, 33, 26, 0.35);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.18s ease-out;
}

.toc-list a:hover::after {
    transform: scaleX(1);
}

/* date styling */
.toc-date {
    font-size: 0.85rem;
    color: #7a6a59;
    margin-right: 0.4rem;
    font-style: italic;
}

.hexcode {
    font-family: "Fira Code", "JetBrains Mono", monospace;
    font-feature-settings: "liga" 0, "calt" 0;
}

/* ---- Post meta (updated + return lines) ---- */

.post-meta {
    margin-top: 2.2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.08);
    font-size: 0.9rem;
    color: #6b5c4c;
    font-style: italic;
    line-height: 1.5;
}

.post-meta a {
    color: #5a4b3c;
    text-decoration: none;
    border-bottom: 1px solid rgba(90, 75, 60, 0.25);
}

.post-meta a:hover {
    border-bottom-color: rgba(90, 75, 60, 0.45);
}
