/* CSS for "Auditing the Machine" - A Scientific Field Journal */

:root {
    --bg-paper: #f4f1ea;
    --text-ink: #2b2b2b;
    --accent-red: #c94c4c;
    --accent-blue: #5b7c99;
    --accent-green: #7ca982;
    --yellow-note: #fff9c4;
    --font-typewriter: 'Courier Prime', monospace;
    --font-serif: 'Playfair Display', serif;
    --font-hand: 'Reenie Beanie', cursive;
    --font-sans: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-paper);
    color: var(--text-ink);
    font-family: var(--font-sans);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Texture Overlay */
.texture-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/cream-paper.png'); /* Subtle paper texture */
    opacity: 0.6;
    pointer-events: none;
    z-index: 999;
}

.journal-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
    position: relative;
}

/* Typography Utility Classes */
.typewriter { font-family: var(--font-typewriter); font-size: 0.95rem; }
.typewriter-large { font-family: var(--font-typewriter); font-size: 1.2rem; }
.handwritten { 
    font-family: var(--font-hand); 
    font-size: 1.8rem; 
    color: var(--accent-blue);
    transform: rotate(-2deg);
    display: inline-block;
}
.handwritten.large { font-size: 2.5rem; color: var(--accent-red); margin-top: 10px; }
.highlight-red { color: var(--accent-red); font-weight: bold; }

/* Sections */
.journal-entry {
    margin-bottom: 120px;
    position: relative;
}

/* Header Section */
.intro-section { padding-top: 40px; }

.date-stamp, .location-stamp {
    font-family: var(--font-typewriter);
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: absolute;
    top: 0;
}
.date-stamp { left: 0; }
.location-stamp { right: 0; }

h1.main-title {
    font-family: var(--font-serif);
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 10px;
    color: #1a1a1a;
    letter-spacing: -2px;
}

h2.sub-title {
    font-family: var(--font-typewriter);
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 50px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 20px;
    display: inline-block;
}

/* Paper Note/Intro Note */
.paper-note {
    background: #fff;
    padding: 30px;
    border: 1px solid #e0e0e0;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.05);
    position: relative;
    max-width: 600px;
    transform: rotate(1deg);
    margin: 0 auto;
}

.intro-note {
    background-image: repeating-linear-gradient(#fff 0px, #fff 24px, #eee 25px);
    line-height: 25px;
}
.intro-note p { margin: 0; }

.tape-strip {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 120px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.4);
    border-left: 1px solid rgba(0,0,0,0.1);
    border-right: 1px solid rgba(0,0,0,0.1);
    box-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    backdrop-filter: blur(2px);
}

/* Experiment Sections */
.section-marker {
    font-family: var(--font-typewriter);
    font-weight: bold;
    border: 2px solid var(--text-ink);
    padding: 5px 10px;
    display: inline-block;
    margin-bottom: 20px;
}

h3 {
    font-family: var(--font-serif);
    font-size: 3rem;
    margin-top: 0;
    margin-bottom: 40px;
}

/* Layouts */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.content-grid-reverse {
    display: grid;
    grid-template-columns: 1.5fr 1fr; /* Text larger for narrative */
    gap: 50px;
    align-items: center;
}

/* Pinned Data Card */
.pinned-image-container {
    position: relative;
}
.pin {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #d32f2f; /* Red pin head */
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.4);
    z-index: 10;
}
.pin::after { /* Pin metallic shine */
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
}

.data-card {
    background: white;
    padding: 30px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    transform: rotate(2deg);
    text-align: center;
}

.data-card h4 {
    font-family: var(--font-typewriter);
    text-transform: uppercase;
    border-bottom: 2px solid var(--text-ink);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-family: var(--font-typewriter);
    font-size: 0.9rem;
}
.bar-full {
    background: var(--accent-green);
    color: white;
    padding: 2px 8px;
    font-weight: bold;
}

/* Sticky Note */
.sticky-note {
    background-color: var(--yellow-note);
    padding: 25px;
    box-shadow: 5px 5px 10px rgba(0,0,0,0.1);
    transform: rotate(-3deg);
    font-family: var(--font-sans);
}
.sticky-note.yellow { border-bottom-right-radius: 40px 5px; } /* Fold effect */

/* Polaroid Style */
.polaroid-container {
    display: flex;
    justify-content: center;
    gap: 60px;
    align-items: center;
}
.polaroid {
    background: white;
    padding: 15px 15px 50px 15px; /* Large bottom padding */
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
    transform: rotate(-1deg);
    width: 300px;
}
.polaroid-image {
    background: #f0f0f0;
    height: 250px;
    border: 1px solid #ddd;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding-bottom: 20px;
}
.polaroid .caption {
    font-family: var(--font-hand);
    font-size: 1.5rem;
    text-align: center;
    margin-top: 15px;
    color: #444;
}

/* Mock Chart */
.mock-chart {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 0 10px;
}
.chart-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: 30%;
    height: 100%;
}
.col-k, .col-g {
    width: 100%;
    display: flex;
    align-items: flex-start; /* Text at top of bar? No, text inside. */
    justify-content: center;
    padding-top: 5px;
    font-weight: bold;
    color: white;
    font-family: var(--font-sans);
    font-size: 0.9rem;
}
.col-k { background-color: var(--accent-red); opacity: 0.7; }
.col-g { background-color: var(--accent-green); opacity: 0.7; }
.label {
    margin-top: 10px;
    font-size: 0.7rem;
    text-align: center;
    font-family: var(--font-typewriter);
}

/* Footer */
.conclusion {
    text-align: center;
    padding: 80px 40px;
    background: white;
    border-top: 5px solid #000;
    margin-bottom: 0;
}
.signature {
    margin-top: 40px;
    font-family: var(--font-hand);
    font-size: 2.5rem;
    color: #555;
}

/* Responsiveness */
@media (max-width: 768px) {
    .content-grid, .content-grid-reverse, .polaroid-container {
        grid-template-columns: 1fr;
        flex-direction: column;
        gap: 40px;
    }
    h1.main-title { font-size: 3.5rem; }
}
