/* ============================================
   graphers.net — Art Deco Austere / Earth Tones
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --parchment-cream: #F2EBE0;
    --charred-earth: #2C2118;
    --dark-earth: #3B2F2F;
    --warm-sand: #D4A574;
    --dark-umber: #4A3728;
    --oxidized-bronze: #A67C52;
    --burnished-gold: #C9943E;
    --raw-sienna: #6B4E3D;
    --khaki-earth: #8B7355;

    --font-display: 'Bebas Neue', sans-serif;
    --font-secondary: 'Oswald', sans-serif;
    --font-body: 'Source Serif 4', serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --baseline: 8px;
    --content-max: 960px;
    --nav-width: 40px;
    --col-unit: calc((var(--content-max) - 3 * 24px) / 8);
}

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

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

body {
    background-color: var(--parchment-cream);
    color: var(--dark-earth);
    font-family: var(--font-body);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* --- Right Navigation Strip --- */
#nav-strip {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--nav-width);
    height: 100vh;
    background-color: var(--charred-earth);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.nav-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.4s ease;
}

.nav-marker.active {
    opacity: 1;
}

.nav-marker:hover {
    opacity: 0.85;
}

.nav-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--khaki-earth);
    text-transform: uppercase;
    writing-mode: horizontal-tb;
    line-height: 1;
}

.nav-chevron {
    font-size: 8px;
    color: var(--oxidized-bronze);
    margin-top: 4px;
    line-height: 1;
}

/* --- Parallax Layers --- */
.parallax-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

#blob-layer {
    z-index: 1;
}

#sunburst-layer {
    z-index: 2;
}

/* --- Organic Blob Shapes --- */
.blob {
    position: absolute;
    opacity: 0.18;
}

.blob-1 {
    width: 400px;
    height: 400px;
    top: 5%;
    left: 55%;
    fill: var(--warm-sand);
}

.blob-2 {
    width: 320px;
    height: 320px;
    top: 40%;
    left: 10%;
    fill: var(--oxidized-bronze);
}

.blob-3 {
    width: 280px;
    height: 280px;
    top: 70%;
    left: 65%;
    fill: var(--khaki-earth);
}

/* Contour blob (outlined, topographic) */
.blob-contour-1 {
    position: absolute;
    width: 350px;
    height: 350px;
    top: 25%;
    left: 5%;
    opacity: 0.25;
}

.blob-contour-1 path {
    fill: none;
    stroke: var(--raw-sienna);
    stroke-width: 1.5;
}

/* Hatched blob */
.blob-hatched {
    position: absolute;
    width: 260px;
    height: 260px;
    top: 55%;
    left: 72%;
    opacity: 0.2;
}

/* --- Sunburst Decorative Elements --- */
.sunburst {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle at center, var(--burnished-gold), var(--oxidized-bronze), transparent 70%);
    opacity: 0.08;
    border-radius: 50%;
}

.sunburst::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    background: repeating-conic-gradient(
        var(--burnished-gold) 0deg,
        transparent 7.5deg,
        transparent 15deg
    );
    opacity: 0.5;
    border-radius: 50%;
    mask-image: radial-gradient(circle, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle, black 30%, transparent 70%);
}

.sunburst-1 {
    top: 2%;
    right: 15%;
    width: 240px;
    height: 240px;
    clip-path: inset(50% 0 0 0);
}

.sunburst-2 {
    top: 48%;
    left: 3%;
    width: 180px;
    height: 180px;
    clip-path: inset(0 0 0 50%);
}

.sunburst-3 {
    bottom: 15%;
    right: 20%;
    width: 160px;
    height: 160px;
    clip-path: inset(50% 0 0 50%);
}

/* --- Left Margin Decorative Wedge --- */
#left-margin-wedge {
    position: fixed;
    top: 0;
    left: 0;
    width: 80px;
    height: 100vh;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}

.chevron-chain {
    position: absolute;
    top: 0;
    left: 20px;
    width: 16px;
    height: 100%;
    background-image: repeating-linear-gradient(
        180deg,
        transparent 0px,
        transparent 2px,
        var(--raw-sienna) 2px,
        var(--raw-sienna) 3px,
        transparent 3px,
        transparent 8px,
        var(--raw-sienna) 8px,
        var(--raw-sienna) 9px,
        transparent 9px,
        transparent 16px
    );
    opacity: 0.4;
    mask-image: linear-gradient(180deg,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(180deg,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
}

/* Chevron V-shapes via SVG background */
.chevron-chain::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 16px;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpolyline points='0,0 8,8 16,0' fill='none' stroke='%236B4E3D' stroke-width='1' opacity='0.4'/%3E%3C/svg%3E");
    background-repeat: repeat-y;
    background-size: 16px 16px;
}

.ziggurat-border {
    position: absolute;
    bottom: 40px;
    left: 10px;
    width: 40px;
    height: 12px;
    background:
        linear-gradient(var(--oxidized-bronze), var(--oxidized-bronze)) no-repeat center top / 40px 2px,
        linear-gradient(var(--oxidized-bronze), var(--oxidized-bronze)) no-repeat center 4px / 32px 2px,
        linear-gradient(var(--oxidized-bronze), var(--oxidized-bronze)) no-repeat center 8px / 24px 2px;
    opacity: 0.6;
}

/* Decorative rivets */
.rivet {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--oxidized-bronze);
    left: 26px;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.rivet.visible {
    opacity: 1;
    transform: scale(1);
}

.rivet-1 { top: 15%; }
.rivet-2 { top: 30%; }
.rivet-3 { top: 50%; }
.rivet-4 { top: 68%; }
.rivet-5 { top: 84%; }

/* --- Main Content Area --- */
#content {
    position: relative;
    z-index: 10;
    max-width: var(--content-max);
    margin-left: 80px;
    margin-right: calc(var(--nav-width) + 24px);
    padding-top: 80px;
    padding-bottom: 80px;
}

/* --- Terrace Sections (Stepped F-Pattern) --- */
.terrace {
    position: relative;
    padding: 80px 0;
    opacity: 0;
    transform: translateX(-16px);
    transition: opacity 0.8s ease-out, transform 0.4s ease-in-out;
}

.terrace.visible {
    opacity: 1;
    transform: translateX(0);
}

.terrace-0 .section-inner {
    margin-left: 0;
}

.terrace-1 .section-inner {
    margin-left: calc(var(--content-max) / 8);
}

.terrace-2 .section-inner {
    margin-left: calc(var(--content-max) / 8 * 2);
}

.section-inner {
    position: relative;
    padding: 40px;
}

/* Graph paper underlay */
.graph-paper-underlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--raw-sienna) 1px, transparent 1px),
        linear-gradient(90deg, var(--raw-sienna) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.08;
    pointer-events: none;
    transition: opacity 0.6s ease;
    z-index: -1;
}

.section-inner:hover .graph-paper-underlay {
    opacity: 0.18;
}

/* --- Typography --- */
.display-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 96px;
    letter-spacing: 0.12em;
    color: var(--dark-umber);
    line-height: 1;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.subtitle {
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--khaki-earth);
}

h2 {
    font-family: var(--font-secondary);
    font-weight: 500;
    font-size: 40px;
    letter-spacing: 0.06em;
    color: var(--raw-sienna);
    margin-bottom: 24px;
    line-height: 1.2;
}

h3 {
    font-family: var(--font-secondary);
    font-weight: 300;
    font-size: 28px;
    letter-spacing: 0.06em;
    color: var(--raw-sienna);
    margin-top: 32px;
    margin-bottom: 16px;
    line-height: 1.3;
}

.section-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--khaki-earth);
    margin-bottom: 16px;
}

p {
    margin-bottom: 24px;
    max-width: 640px;
}

/* --- Triple-Rule Divider --- */
.triple-rule {
    position: relative;
    height: 13px;
    margin: 0 0 0 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.triple-rule::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--oxidized-bronze);
}

.triple-rule::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--oxidized-bronze);
}

/* Middle line of triple rule */
.triple-rule {
    background: linear-gradient(
        to bottom,
        transparent 0px,
        transparent 0px,
        var(--oxidized-bronze) 0px,
        var(--oxidized-bronze) 1px,
        transparent 1px,
        transparent 5px,
        var(--oxidized-bronze) 5px,
        var(--oxidized-bronze) 7px,
        transparent 7px,
        transparent 11px,
        var(--oxidized-bronze) 11px,
        var(--oxidized-bronze) 12px,
        transparent 12px
    );
}

.triple-rule::before,
.triple-rule::after {
    display: none;
}

/* --- Archive Entries --- */
.archive-entries {
    margin-top: 32px;
}

.archive-entry {
    display: flex;
    align-items: baseline;
    gap: 24px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(107, 78, 61, 0.2);
}

.archive-entry:last-child {
    border-bottom: none;
}

.entry-date {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--khaki-earth);
    white-space: nowrap;
    min-width: 96px;
}

.entry-title {
    font-family: var(--font-body);
    font-size: 17px;
    color: var(--dark-earth);
    flex: 1;
}

.entry-ref {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--oxidized-bronze);
    white-space: nowrap;
}

/* --- Contact Notation --- */
.contact-notation {
    margin-top: 32px;
    padding: 24px;
    border-left: 2px solid var(--oxidized-bronze);
}

.notation-line {
    display: block;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.08em;
    color: var(--khaki-earth);
    line-height: 2.4;
}

/* --- Footer --- */
#site-footer {
    position: relative;
    z-index: 10;
    background-color: var(--charred-earth);
    padding: 40px 0;
    text-align: center;
}

.ziggurat-footer {
    width: 100%;
    height: 12px;
    margin-bottom: 24px;
    background:
        linear-gradient(var(--oxidized-bronze), var(--oxidized-bronze)) no-repeat center top / 100% 2px,
        linear-gradient(var(--oxidized-bronze), var(--oxidized-bronze)) no-repeat center 4px / 80% 2px,
        linear-gradient(var(--oxidized-bronze), var(--oxidized-bronze)) no-repeat center 8px / 60% 2px;
    opacity: 0.5;
}

.footer-mark {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--khaki-earth);
}

/* --- Dark Section Variant --- */
.terrace.dark-section {
    background-color: var(--charred-earth);
    color: var(--warm-sand);
}

.terrace.dark-section h2 {
    color: var(--warm-sand);
}

.terrace.dark-section .display-title {
    color: var(--warm-sand);
}

/* --- Blob Morph Animation --- */
@keyframes blobMorph1 {
    0%, 100% {
        d: path("M45.2,-58.3C57.3,-49.8,65.1,-34.6,69.2,-18.4C73.3,-2.2,73.7,15,66.5,28.3C59.3,41.6,44.5,51,29.2,57.8C13.9,64.6,-1.9,68.8,-18.4,66.6C-34.9,64.4,-52.1,55.8,-61.5,42.1C-70.9,28.4,-72.5,9.6,-68.8,-7.1C-65.1,-23.8,-56.1,-38.4,-43.6,-46.8C-31.1,-55.2,-15.6,-57.4,0.8,-58.4C17.2,-59.4,33.1,-66.8,45.2,-58.3Z");
    }
    50% {
        d: path("M43.8,-56.1C55.6,-48.4,63.5,-33.8,67.6,-18.1C71.7,-2.4,71.9,14.4,65.2,27.9C58.5,41.4,44.9,51.6,30.1,58.2C15.3,64.8,-0.7,67.8,-17.2,65.4C-33.7,63,-50.7,55.2,-60.1,42C-69.5,28.8,-71.3,10.2,-67.9,-6.4C-64.5,-23,-55.9,-37.6,-44,-46.2C-32.1,-54.8,-17,-57.4,0.2,-57.6C17.4,-57.8,32,-63.8,43.8,-56.1Z");
    }
}

@keyframes blobMorph2 {
    0%, 100% {
        d: path("M39.5,-51.1C50.9,-42.8,59.5,-30.6,64.1,-16.5C68.7,-2.4,69.3,13.6,62.8,26.3C56.3,39,42.7,48.4,28.4,54.7C14.1,61,-0.9,64.2,-16.8,62.1C-32.7,60,-49.5,52.6,-58.7,39.9C-67.9,27.2,-69.5,9.2,-65.7,-6.8C-61.9,-22.8,-52.7,-36.8,-40.8,-45C-28.9,-53.2,-14.5,-55.6,0.2,-55.9C14.9,-56.2,28.1,-59.4,39.5,-51.1Z");
    }
    50% {
        d: path("M41.2,-53.5C52.4,-44.2,60.1,-30.4,64.5,-15.3C68.9,-0.2,70,16.2,63.6,29.1C57.2,42,43.3,51.4,28.6,56.9C13.9,62.4,-1.6,64,-17.6,61.1C-33.6,58.2,-50.1,50.8,-59.2,38.3C-68.3,25.8,-70,8.2,-66.3,-7.4C-62.6,-23,-53.5,-36.6,-41.6,-45.6C-29.7,-54.6,-15,-59,0.6,-59.7C16.2,-60.4,30,-62.8,41.2,-53.5Z");
    }
}

@keyframes blobMorph3 {
    0%, 100% {
        d: path("M42.8,-55.4C54.6,-47.1,62.8,-33.2,66.3,-18.2C69.8,-3.2,68.6,12.9,62,26.5C55.4,40.1,43.4,51.2,29.6,57.4C15.8,63.6,0.2,64.9,-14.5,61.4C-29.2,57.9,-43,49.6,-53.1,37.6C-63.2,25.6,-69.6,9.9,-67.4,-4.2C-65.2,-18.3,-54.4,-30.8,-42.2,-39.1C-30,-47.4,-15,-51.5,0.6,-52.3C16.2,-53.1,31,-63.7,42.8,-55.4Z");
    }
    50% {
        d: path("M44.5,-57.8C56.2,-49.2,63.6,-34.2,67.1,-18.6C70.6,-3,70.2,13.2,63.8,27C57.4,40.8,45,52.2,30.8,58.6C16.6,65,-0.4,66.4,-16.2,63C-32,59.6,-46.6,51.4,-55.8,38.8C-65,26.2,-68.8,9.2,-66.2,-5.8C-63.6,-20.8,-54.6,-33.8,-43,-42.8C-31.4,-51.8,-17.2,-56.8,-1,-55.6C15.2,-54.4,32.8,-66.4,44.5,-57.8Z");
    }
}

.blob-1 .blob-morph {
    animation: blobMorph1 16s ease-in-out infinite;
}

.blob-2 .blob-morph {
    animation: blobMorph2 20s ease-in-out infinite;
}

.blob-3 .blob-morph {
    animation: blobMorph3 14s ease-in-out infinite;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    :root {
        --content-max: 100%;
    }

    html {
        font-size: 16px;
    }

    .display-title {
        font-size: 56px;
    }

    h2 {
        font-size: 28px;
    }

    h3 {
        font-size: 22px;
    }

    #content {
        margin-left: 16px;
        margin-right: calc(var(--nav-width) + 16px);
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .terrace {
        padding: 48px 0;
    }

    .terrace-1 .section-inner {
        margin-left: 24px;
    }

    .terrace-2 .section-inner {
        margin-left: 48px;
    }

    .section-inner {
        padding: 24px;
    }

    #left-margin-wedge {
        display: none;
    }

    .blob {
        opacity: 0.1;
    }

    .archive-entry {
        flex-direction: column;
        gap: 4px;
    }

    .entry-ref {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .display-title {
        font-size: 40px;
        letter-spacing: 0.08em;
    }

    h2 {
        font-size: 24px;
    }

    #nav-strip {
        width: 32px;
    }

    .nav-label {
        font-size: 8px;
    }
}
