:root {
    --paper: #F5EDE0;
    --ink: #3A3428;
    --ink-light: #6B6050;
    --blush: #B8948C;
    --dark: #4A4038;
    --margin: #8A7F6A;
    --botanical: #6B7B5A;
    --amber: #C4943A;
}

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

body {
    background: var(--paper);
    color: var(--ink);
    font-family: 'Libre Baskerville', serif;
    font-size: 16px;
    line-height: 1.8;
    overflow-x: hidden;
}

/* Noise texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* Ruled lines */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 31px,
        rgba(160, 140, 110, 0.06) 31px,
        rgba(160, 140, 110, 0.06) 32px
    );
}

.journal {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 24px 120px;
}

/* Title Page */
.title-page {
    text-align: center;
    padding: 12vh 0 10vh;
    margin-bottom: 60px;
}

.title-rule {
    width: 180px;
    height: 1px;
    background: var(--blush);
    margin: 16px auto;
}

.journal-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    letter-spacing: 0.03em;
    color: var(--ink);
    margin: 8px 0;
}

.journal-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 18px;
    color: var(--ink-light);
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.journal-epigraph {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: 14px;
    color: var(--margin);
    line-height: 1.9;
    margin-top: 24px;
}

.title-ornament {
    margin-top: 24px;
}

/* Season markers */
.season {
    margin-bottom: 80px;
}

.season-marker {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px;
}

.season-label {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    letter-spacing: 0.03em;
    color: var(--ink);
    white-space: nowrap;
}

.season-line {
    flex: 1;
    height: 1px;
    background: var(--blush);
}

/* Entry grid: marginalia + main column */
.entry {
    margin-bottom: 64px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.entry.in-view {
    opacity: 1;
    transform: translateY(0);
}

.entry-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 40px;
    max-width: 860px;
    margin-left: 20px;
}

/* Marginalia */
.marginalia {
    position: relative;
}

.marg-note {
    padding-right: 12px;
}

.handwritten {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.6;
    color: var(--margin);
    transform: rotate(-0.5deg);
}

.marg-sketch {
    max-width: 100px;
    margin: 0 auto;
}

.botanical-svg {
    width: 100%;
    height: auto;
    opacity: 0.85;
}

/* Main text column */
.main-text {
    max-width: 620px;
}

.entry-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    letter-spacing: 0.03em;
    color: var(--ink);
    margin-bottom: 4px;
}

.entry-latin {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: 14px;
    color: var(--ink-light);
    margin-bottom: 16px;
}

.entry-body {
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.85;
    color: var(--dark);
    margin-bottom: 16px;
    letter-spacing: 0.01em;
}

/* Specimen sheets */
.specimen-sheet {
    border: 1px solid var(--blush);
    padding: 20px;
    margin: 28px 0;
    background: rgba(245, 237, 224, 0.5);
    opacity: 0;
    transition: opacity 1s ease;
}

.specimen-sheet.in-view {
    opacity: 1;
}

.specimen-label {
    font-family: 'Caveat', cursive;
    font-weight: 600;
    font-size: 14px;
    color: var(--margin);
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

.specimen-drawing {
    width: 100%;
    max-width: 240px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Colophon */
.colophon {
    text-align: center;
    margin-top: 80px;
    padding-top: 40px;
}

.colophon-rule {
    width: 120px;
    height: 1px;
    background: var(--blush);
    margin: 0 auto 24px;
}

.colophon-text {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: 14px;
    line-height: 1.8;
    color: var(--margin);
    max-width: 480px;
    margin: 0 auto;
}

.colophon-domain {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 0.05em;
    color: var(--ink);
    margin-top: 20px;
}

.colophon-ornament {
    margin-top: 16px;
}

/* Mobile */
@media (max-width: 768px) {
    .entry-grid {
        display: block;
        margin-left: 0;
    }

    .marginalia {
        margin-bottom: 24px;
        padding-left: 16px;
        border-left: 1px solid var(--blush);
    }

    .marg-sketch {
        max-width: 80px;
    }
}
