/* ==========================================================================
   pmt.report — Academic Journal Styles
   ========================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 17px;
    scroll-behavior: smooth;
}

body {
    background-color: #FBF8F3;
    color: #3A3A3A;
    font-family: 'Libre Caslon Text', 'Georgia', serif;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Table of Contents (Left Sidebar) --- */
.toc {
    position: fixed;
    top: 50vh;
    left: 30px;
    transform: translateY(-50%);
    width: 200px;
    opacity: 0;
    transition: opacity 400ms ease;
    z-index: 100;
}

.toc.visible {
    opacity: 1;
}

.toc-heading {
    font-family: 'Source Sans 3', 'Helvetica Neue', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #7A7060;
    margin-bottom: 12px;
    padding-left: 12px;
}

.toc-list {
    list-style: none;
}

.toc-list li {
    margin-bottom: 6px;
}

.toc-link {
    display: block;
    font-family: 'Source Sans 3', 'Helvetica Neue', sans-serif;
    font-size: 12px;
    line-height: 1.4;
    color: #7A7060;
    text-decoration: none;
    padding: 3px 0 3px 12px;
    border-left: 2px solid transparent;
    transition: color 200ms ease, border-color 200ms ease;
}

.toc-link:hover {
    color: #3A3A3A;
}

.toc-link.active {
    color: #2C2C2C;
    border-left-color: #8B4513;
    font-weight: 600;
}

/* --- Hero Section --- */
.hero {
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}

.hero-inner {
    max-width: 620px;
}

.journal-title {
    font-family: 'Libre Caslon Text', 'Georgia', serif;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #2C2C2C;
    margin-bottom: 16px;
}

.hero-rule {
    width: 0;
    height: 1px;
    background-color: #2C2C2C;
    margin: 0 auto 16px;
    transition: width 300ms ease;
}

.hero-rule.drawn {
    width: 100%;
}

.journal-subtitle {
    font-family: 'Libre Caslon Text', 'Georgia', serif;
    font-size: 16px;
    font-style: italic;
    color: #7A7060;
    margin-bottom: 8px;
}

.journal-issue {
    font-family: 'Source Sans 3', 'Helvetica Neue', sans-serif;
    font-size: 13px;
    color: #7A7060;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* --- Main Reading Column --- */
.reading-column {
    width: 620px;
    margin-left: 280px;
    padding: 0 20px 80px;
    position: relative;
}

/* --- Article Sections --- */
.article-section {
    margin-bottom: 40px;
    position: relative;
}

.article-title {
    font-family: 'Libre Caslon Text', 'Georgia', serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #2C2C2C;
    line-height: 1.3;
    margin-bottom: 8px;
}

.article-meta {
    font-family: 'Source Sans 3', 'Helvetica Neue', sans-serif;
    font-size: 13px;
    color: #7A7060;
    margin-bottom: 24px;
    line-height: 1.5;
}

.section-heading {
    font-family: 'Libre Caslon Text', 'Georgia', serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #2C2C2C;
    margin-top: 32px;
    margin-bottom: 16px;
}

/* --- Drop Caps --- */
.has-dropcap::first-letter {
    font-family: 'Libre Caslon Text', 'Georgia', serif;
    font-size: 48px;
    font-weight: 700;
    color: #8B4513;
    float: left;
    line-height: 0.8;
    padding-right: 8px;
    padding-top: 6px;
}

/* Drop cap animation */
.article-opening {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 200ms ease, transform 200ms ease;
}

.article-opening.visible {
    opacity: 1;
    transform: scale(1.0);
}

/* --- Paragraphs --- */
p {
    margin-bottom: 16px;
}

em {
    font-style: italic;
}

/* --- Citation Markers --- */
.citation-marker {
    font-family: 'Source Sans 3', 'Helvetica Neue', sans-serif;
    font-size: 12px;
    color: #8B4513;
    cursor: pointer;
    text-decoration: none;
    transition: color 200ms ease;
    vertical-align: super;
    line-height: 0;
}

.citation-marker:hover {
    color: #2C2C2C;
}

/* --- Sidenotes (Right Margin) --- */
.sidenote {
    position: absolute;
    right: -280px;
    width: 240px;
    font-family: 'Source Sans 3', 'Helvetica Neue', sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #7A7060;
    padding-left: 16px;
    border-left: 1px solid #D4CFC6;
    opacity: 0;
    transition: opacity 300ms ease, background-color 200ms ease;
}

.sidenote.visible {
    opacity: 1;
}

.sidenote.highlighted {
    background-color: #FFFACD;
}

.sidenote-number {
    font-weight: 600;
    color: #8B4513;
}

/* --- Highlight Effect --- */
.highlight {
    background-color: #FFFACD;
    padding: 1px 3px;
}

/* --- Section Breaks --- */
.section-break {
    text-align: center;
    color: #D4CFC6;
    font-size: 18px;
    letter-spacing: 0.3em;
    margin: 32px 0;
    user-select: none;
}

/* --- Figures --- */
.figure {
    margin: 32px 0;
}

.figure-illustration {
    background-color: #FBF8F3;
    border: 1px solid #D4CFC6;
    padding: 20px;
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.figure-illustration:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.figure-svg {
    width: 100%;
    height: auto;
    display: block;
}

.figure-caption {
    font-family: 'Source Sans 3', 'Helvetica Neue', sans-serif;
    font-size: 13px;
    font-style: italic;
    color: #7A7060;
    line-height: 1.5;
    margin-top: 10px;
}

/* --- Footer --- */
.journal-footer {
    margin-top: 60px;
    padding-top: 24px;
    text-align: center;
}

.footer-rule {
    width: 200px;
    height: 1px;
    background-color: #D4CFC6;
    margin: 0 auto 24px;
}

.footer-text {
    font-family: 'Source Sans 3', 'Helvetica Neue', sans-serif;
    font-size: 12px;
    color: #7A7060;
    margin-bottom: 4px;
    line-height: 1.6;
}

/* --- Print Stylesheet --- */
@media print {
    .toc {
        display: none;
    }

    .reading-column {
        width: 100%;
        margin-left: 0;
    }

    .sidenote {
        position: relative;
        right: auto;
        width: 100%;
        margin: 12px 0;
        padding: 8px 12px;
        border-left: 2px solid #D4CFC6;
        opacity: 1;
        font-size: 11px;
    }

    .hero {
        height: auto;
        padding: 40px 0;
    }

    body {
        font-size: 12pt;
    }
}

/* --- Responsive --- */
@media (max-width: 1100px) {
    .toc {
        display: none;
    }

    .reading-column {
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        max-width: 680px;
        padding: 0 24px 80px;
    }

    .sidenote {
        position: relative;
        right: auto;
        width: 100%;
        margin: 16px 0;
        padding: 12px 16px;
        border-left: 2px solid #D4CFC6;
        background-color: rgba(251, 248, 243, 0.5);
        opacity: 1;
    }
}

@media (max-width: 680px) {
    html {
        font-size: 15px;
    }

    .journal-title {
        font-size: 26px;
    }

    .article-title {
        font-size: 20px;
    }

    .section-heading {
        font-size: 18px;
    }

    .hero {
        height: auto;
        min-height: 40vh;
        padding: 60px 20px;
    }

    .reading-column {
        padding: 0 16px 60px;
    }

    .has-dropcap::first-letter {
        font-size: 38px;
    }
}
