/* =====================================================
   simidiots.net — Field Study of Artificial Unintelligence
   Sepia academic-paper aesthetic
   ===================================================== */

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

:root {
    --paper:        #FEFCF6;
    --paper-warm:   #FFF8E8;
    --ink:          #2A2420;
    --ink-2:        #3A3430;
    --rule:         #C8B8A0;
    --label-gray:   #8A7A6A;
    --label-gray-2: #6A5A4A;
    --field-note:   #7A6A5A;
    --spec-blue:    #4A7A9A;
    --spec-coral:   #C86A5A;
    --spec-green:   #5A8A6A;
    --amber:        #D4A040;

    --serif-display: 'Libre Baskerville', 'Baskerville', 'Georgia', serif;
    --serif-body:    'Source Serif 4', 'Source Serif Pro', 'Georgia', serif;
    --sans:          'Source Sans 3', 'Source Sans Pro', 'Inter', system-ui, sans-serif;
    --hand:          'Caveat', 'Bradley Hand', cursive;
}

html, body {
    background: var(--paper);
    color: var(--ink-2);
    font-family: var(--serif-body);
    font-size: 16px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

body {
    /* faint paper grain via two layered radial gradients */
    background-image:
        radial-gradient(ellipse at 12% 8%,  rgba(200,184,160,0.10), transparent 55%),
        radial-gradient(ellipse at 88% 92%, rgba(200,184,160,0.08), transparent 60%);
    background-attachment: fixed;
    overflow-x: hidden;
}

.paper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 72px 96px 200px; /* extra left padding to host the margin strip */
    position: relative;
}

/* =====================================================
   TITLE BLOCK
   ===================================================== */
.title-block {
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 64px 16px 40px;
}

.journal-meta {
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--label-gray);
    margin-bottom: 28px;
}

.paper-title {
    font-family: var(--serif-display);
    font-weight: 700;
    color: var(--ink);
    font-size: 44px;
    line-height: 1.2;
    max-width: 22ch;
    margin: 0 auto 28px;
    letter-spacing: -0.005em;
}

.paper-authors {
    font-family: var(--sans);
    font-size: 14px;
    font-style: italic;
    color: var(--ink-2);
    margin-bottom: 6px;
}

.paper-authors sup,
.paper-affiliations sup {
    font-style: normal;
    font-weight: 600;
}

.paper-affiliations {
    font-family: var(--sans);
    font-size: 11px;
    color: var(--label-gray);
    margin-bottom: 32px;
    max-width: 70ch;
}

.abstract {
    max-width: 65ch;
    margin: 0 auto 28px;
    text-align: left;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 20px 0 18px;
}

.abstract-label {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: var(--label-gray-2);
    text-align: center;
    margin-bottom: 10px;
}

.abstract-body {
    font-family: var(--serif-body);
    font-size: 15px;
    line-height: 1.7;
    font-style: italic;
    color: var(--ink-2);
    margin-bottom: 12px;
    text-indent: 1.5em;
}

.abstract-keywords {
    font-family: var(--sans);
    font-size: 12px;
    color: var(--label-gray-2);
    text-align: center;
    line-height: 1.5;
}

.kw-label {
    font-weight: 600;
    color: var(--ink-2);
    margin-right: 6px;
}

.doi {
    font-family: var(--sans);
    font-size: 12px;
    color: var(--label-gray);
    margin-top: 4px;
}

.rule {
    border: 0;
    border-top: 1px solid var(--label-gray);
    margin: 36px auto 0;
    width: 60%;
    opacity: 0.55;
}

/* =====================================================
   ARTICLE GRID
   ===================================================== */
.article {
    position: relative;
    padding-top: 24px;
}

.section {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 56px;
    padding: 64px 0 48px;
    border-top: 1px solid rgba(200,184,160,0.45);
    align-items: start;
}

.section:first-of-type { border-top: 0; }

.text-column {
    padding-right: 8px;
}

.text-column-full {
    grid-column: 1 / -1;
    max-width: 70ch;
    margin: 0 auto;
    padding: 0;
}

.section-heading {
    font-family: var(--serif-display);
    font-weight: 700;
    font-size: 28px;
    color: var(--ink);
    margin-bottom: 24px;
    letter-spacing: -0.005em;
    line-height: 1.25;
}

.section-number {
    color: var(--label-gray-2);
    font-weight: 400;
    font-feature-settings: "lnum";
    margin-right: 0.4em;
}

.subsection-heading {
    font-family: var(--serif-display);
    font-weight: 700;
    font-size: 17px;
    color: var(--ink);
    margin-top: 24px;
    margin-bottom: 10px;
}

.text-column p {
    font-family: var(--serif-body);
    font-size: 16px;
    line-height: 1.78;
    color: var(--ink-2);
    margin-bottom: 14px;
    text-indent: 1.6em;
    hyphens: auto;
}

.text-column p.lead-paragraph {
    text-indent: 0;
}

.text-column p.lead-paragraph::first-letter {
    font-family: var(--serif-display);
    font-weight: 700;
    font-size: 3.1em;
    float: left;
    line-height: 0.92;
    padding: 6px 8px 0 0;
    color: var(--ink);
}

.cite {
    font-family: var(--sans);
    font-size: 0.7em;
    color: var(--spec-blue);
    margin-left: 1px;
}

.omitted-note {
    font-family: var(--serif-body);
    font-style: italic;
    color: var(--label-gray-2);
    font-size: 16px;
    text-indent: 0;
}

/* =====================================================
   FIGURES
   ===================================================== */
.figure-column {
    position: sticky;
    top: 32px;
    align-self: start;
}

.section-results .figure-column {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.fig {
    background: var(--paper);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 600ms ease, transform 600ms ease;
}

.fig.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.fig-number {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: var(--label-gray-2);
    margin-bottom: 8px;
}

.fig-frame {
    border: 1px solid var(--rule);
    padding: 16px;
    background: var(--paper);
    position: relative;
}

.fig figcaption {
    font-family: var(--sans);
    font-size: 13px;
    font-style: italic;
    line-height: 1.55;
    color: var(--label-gray-2);
    margin-top: 10px;
    padding: 0 4px;
}

.fig figcaption strong {
    font-weight: 600;
    font-style: normal;
    color: var(--ink-2);
}

/* =====================================================
   FIG 1: NETWORK GRAPH
   ===================================================== */
.network-graph {
    width: 100%;
    height: auto;
    display: block;
}

.network-graph .edges path,
.network-graph .edges line {
    stroke-dasharray: var(--len, 200);
    stroke-dashoffset: var(--len, 200);
    transition: stroke-dashoffset 1800ms ease;
}

.fig.is-visible .network-graph .edges path,
.fig.is-visible .network-graph .edges line {
    stroke-dashoffset: 0;
}

.network-graph .nodes circle {
    opacity: 0;
    transition: opacity 600ms ease;
    transition-delay: 1400ms;
}
.fig.is-visible .network-graph .nodes circle { opacity: 1; }

.network-graph .labels text {
    opacity: 0;
    transition: opacity 600ms ease;
    transition-delay: 1700ms;
}
.fig.is-visible .network-graph .labels text { opacity: 1; }

.legend {
    position: absolute;
    right: 16px;
    bottom: 16px;
    background: rgba(254,252,246,0.92);
    border: 1px solid var(--rule);
    padding: 8px 10px;
    max-width: 56%;
    font-family: var(--sans);
}

.legend-title {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--label-gray-2);
    margin-bottom: 4px;
}

.legend-row {
    font-size: 10px;
    color: var(--ink-2);
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-foot {
    font-size: 9px;
    color: var(--label-gray);
    font-style: italic;
    margin-top: 4px;
    line-height: 1.3;
}

.swatch {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* =====================================================
   FIG 2: TAXONOMY TREE
   ===================================================== */
.taxonomy-tree {
    width: 100%;
    height: auto;
    display: block;
}

.taxonomy-tree .tax-edges path {
    stroke-dasharray: 320;
    stroke-dashoffset: 320;
    transition: stroke-dashoffset 1500ms ease;
}

.fig.is-visible .taxonomy-tree .tax-edges path {
    stroke-dashoffset: 0;
}

.taxonomy-tree .tax-nodes g {
    opacity: 0;
    transition: opacity 500ms ease;
}
.fig.is-visible .taxonomy-tree .tax-nodes g { opacity: 1; }

.fig.is-visible .taxonomy-tree .tax-nodes g:nth-child(1)  { transition-delay:  100ms; }
.fig.is-visible .taxonomy-tree .tax-nodes g:nth-child(2)  { transition-delay:  500ms; }
.fig.is-visible .taxonomy-tree .tax-nodes g:nth-child(3)  { transition-delay:  600ms; }
.fig.is-visible .taxonomy-tree .tax-nodes g:nth-child(4)  { transition-delay:  900ms; }
.fig.is-visible .taxonomy-tree .tax-nodes g:nth-child(5)  { transition-delay: 1000ms; }
.fig.is-visible .taxonomy-tree .tax-nodes g:nth-child(6)  { transition-delay: 1100ms; }
.fig.is-visible .taxonomy-tree .tax-nodes g:nth-child(7)  { transition-delay: 1200ms; }
.fig.is-visible .taxonomy-tree .tax-nodes g:nth-child(n+8){ transition-delay: 1500ms; }

/* =====================================================
   FIG 3: TIMELINE
   ===================================================== */
.timeline {
    position: relative;
    height: 220px;
    width: 100%;
    padding: 24px 12px 36px;
}

.timeline-axis {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 36px;
    height: 1px;
    background: var(--ink-2);
}

.timeline-event {
    position: absolute;
    transform: translateX(-50%);
    text-align: center;
    width: 0;
}

.timeline-event .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: block;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.timeline-event .evt-line {
    display: block;
    width: 1px;
    margin: 2px auto 0;
    border-left: 1px dashed var(--label-gray);
}

.timeline-event .evt-label {
    display: block;
    width: 140px;
    margin-left: -70px;
    margin-top: 4px;
    font-family: var(--sans);
    font-size: 10.5px;
    line-height: 1.3;
    color: var(--label-gray-2);
}

.timeline-axis-labels {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    justify-content: space-between;
    font-family: var(--sans);
    font-size: 11px;
    color: var(--label-gray);
}

/* =====================================================
   FIG 4: SCATTER PLOT
   ===================================================== */
.scatter-wrap {
    position: relative;
    padding: 18px 12px 40px 48px;
}

.axis-y-title {
    position: absolute;
    left: -2px;
    top: 50%;
    transform: rotate(-90deg) translateX(50%);
    transform-origin: left top;
    font-family: var(--sans);
    font-size: 11px;
    color: var(--label-gray-2);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.scatter {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    background: #FBF7EE;
    border: 1px solid var(--rule);
    overflow: hidden;
}

.grid-line {
    position: absolute;
    background: rgba(200,184,160,0.5);
}
.grid-line.g-h { left: 0; right: 0; height: 1px; }
.grid-line.g-v { top: 0; bottom: 0; width: 1px; }

.ideal-line {
    position: absolute;
    left: 0; bottom: 0;
    width: 141.42%;
    height: 1px;
    background: transparent;
    border-top: 1px dashed var(--label-gray);
    transform-origin: left bottom;
    transform: rotate(-45deg);
    pointer-events: none;
}

.quadrant-label {
    position: absolute;
    right: 6px;
    bottom: 6px;
    font-family: var(--sans);
    font-size: 10px;
    font-style: italic;
    color: rgba(200,106,90,0.6);
    letter-spacing: 0.05em;
}

.scatter .pt {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    transform: translate(-50%, 50%);
    opacity: 0;
    transition: opacity 220ms ease;
}
.scatter .pt.in { opacity: 0.85; }

.axis-y-marks {
    position: absolute;
    left: 16px;
    top: 18px;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: var(--sans);
    font-size: 10px;
    color: var(--label-gray);
    text-align: right;
    width: 24px;
}

.axis-x-marks {
    margin-top: 4px;
    margin-left: 0;
    display: flex;
    justify-content: space-between;
    font-family: var(--sans);
    font-size: 10px;
    color: var(--label-gray);
}

.axis-x-title {
    margin-top: 4px;
    text-align: center;
    font-family: var(--sans);
    font-size: 11px;
    color: var(--label-gray-2);
    letter-spacing: 0.04em;
}

.r-value {
    margin-top: 8px;
    text-align: center;
    font-family: var(--sans);
    font-size: 11px;
    font-style: italic;
    color: var(--label-gray-2);
}

/* =====================================================
   CALLOUT BOX
   ===================================================== */
.callout {
    border: 1px solid var(--amber);
    background: var(--paper-warm);
    padding: 14px 18px;
    margin: 18px 0 22px;
    border-left-width: 3px;
}

.callout-label {
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: var(--amber);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.callout p:not(.callout-label) {
    text-indent: 0;
    margin: 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--ink-2);
}

/* =====================================================
   MARGINAL FIELD NOTES
   ===================================================== */
.margin-strip {
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 144px;
    background: var(--paper-warm);
    border-right: 1px solid var(--rule);
    padding: 36px 12px 36px 12px;
}

.field-note {
    margin-bottom: 96px;
    position: relative;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 700ms ease, transform 700ms ease;
}

.field-note.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.field-note p {
    font-family: var(--hand);
    font-size: 16px;
    line-height: 1.35;
    color: var(--field-note);
    margin-top: 6px;
}

.field-note::after {
    /* connector line into the body */
    content: "";
    position: absolute;
    right: -13px;
    top: 18px;
    width: 12px;
    height: 1px;
    background: var(--rule);
}

.margin-sketch {
    width: 22px;
    height: 22px;
    display: block;
}

/* =====================================================
   SIGNOFF + FOOTER
   ===================================================== */
.signoff {
    margin-top: 56px;
    text-align: center;
    border-top: 1px solid var(--rule);
    padding-top: 28px;
}

.signoff-mark {
    font-family: var(--serif-display);
    font-weight: 400;
    font-size: 24px;
    color: var(--label-gray);
    letter-spacing: 0.05em;
    margin-bottom: 14px;
}

.footnote {
    font-family: var(--sans);
    font-size: 12px;
    font-style: italic;
    color: var(--label-gray);
    max-width: 60ch;
    margin: 0 auto;
}

.mono {
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-style: normal;
    color: var(--ink-2);
}

.paper-footer {
    margin-top: 64px;
}

.paper-footer .rule {
    margin-bottom: 28px;
}

.refs {
    max-width: 70ch;
    margin: 0 auto;
}

.ref-label {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: var(--label-gray-2);
    margin-bottom: 12px;
}

.ref-list {
    list-style: decimal;
    padding-left: 1.5em;
    margin-bottom: 24px;
}

.ref-list li {
    font-family: var(--sans);
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--ink-2);
    margin-bottom: 6px;
}

.copyright {
    font-family: var(--sans);
    font-size: 11px;
    color: var(--label-gray);
    text-align: center;
    margin-top: 12px;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
    .paper {
        padding: 40px 32px 64px 156px;
    }
    .margin-strip {
        left: 12px;
        width: 120px;
    }
    .paper-title { font-size: 36px; }
    .section { gap: 36px; }
}

@media (max-width: 720px) {
    .paper {
        padding: 32px 20px 56px;
    }
    .margin-strip {
        position: static;
        width: 100%;
        margin: 24px 0 32px;
        border-right: 0;
        border-top: 1px solid var(--rule);
        border-bottom: 1px solid var(--rule);
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        padding: 18px 14px;
    }
    .field-note {
        margin-bottom: 0;
        transform: translateX(0);
    }
    .field-note::after { display: none; }
    .section {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .figure-column {
        position: static;
    }
    .paper-title { font-size: 28px; }
    .section-heading { font-size: 24px; }
    .text-column p { font-size: 15.5px; }
}
