/* =====================================================================
   a6c.boo  --  afterhours / afterglow
   Earth-toned vaporwave, organic-flow, baskerville-refined
   Palette:
     #3a2a1e umber ink        #c4826e terracotta pulse
     #d4a574 sun-warmed ochre  #8b6f47 bronze hairline
     #f0e6d3 raw parchment     #e8dcc5 bone cream
     #5a4a3a deep fig          #9a7a5c aged bronze
   ===================================================================== */

:root {
    --umber-ink:        #3a2a1e;
    --terracotta:       #c4826e;
    --ochre:            #d4a574;
    --bronze:           #8b6f47;
    --parchment:        #f0e6d3;
    --bone:             #e8dcc5;
    --deep-fig:         #5a4a3a;
    --aged-bronze:      #9a7a5c;

    --serif-display:    "Libre Baskerville", "Cormorant Garamond", Georgia, serif;
    --serif-italic:     "Cormorant Garamond", "Libre Baskerville", Georgia, serif;
    --sans-body:        "Inter", system-ui, -apple-system, "Helvetica Neue", sans-serif;
    --mono-accent:      "JetBrains Mono", "SFMono-Regular", Menlo, monospace;

    --ease-soft:        cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-water:       cubic-bezier(0.42, 0, 0.18, 1);
}

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

html, body {
    background: var(--parchment);
    color: var(--umber-ink);
    font-family: var(--sans-body);
    font-size: 17px;
    line-height: 1.72;
    letter-spacing: 0.005em;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    position: relative;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 20% 12%, rgba(212, 165, 116, 0.18), transparent 55%),
        radial-gradient(ellipse at 82% 88%, rgba(196, 130, 110, 0.14), transparent 60%),
        var(--parchment);
}

/* =====================================================================
   BOKEH ATMOSPHERIC LAYER
   16 blurred radial gradients drifting independently
   ===================================================================== */
.bokeh-field {
    position: fixed;
    inset: -10vh -10vw;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.bokeh {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.45;
    will-change: transform;
}

/* sixteen discs sized 80px-320px, palette colors at 30-55% opacity */
.bokeh.b1  { left: 4%;  top: 8%;  width: 220px; height: 220px;
             background: radial-gradient(circle, rgba(212, 165, 116, 0.55), transparent 70%);
             filter: blur(70px);
             animation: drift-a 32s var(--ease-soft) infinite alternate; }
.bokeh.b2  { left: 22%; top: 18%; width: 180px; height: 180px;
             background: radial-gradient(circle, rgba(196, 130, 110, 0.45), transparent 70%);
             filter: blur(50px);
             animation: drift-b 38s var(--ease-soft) infinite alternate; }
.bokeh.b3  { left: 60%; top: 6%;  width: 320px; height: 320px;
             background: radial-gradient(circle, rgba(154, 122, 92, 0.40), transparent 70%);
             filter: blur(85px);
             animation: drift-c 28s var(--ease-soft) infinite alternate; }
.bokeh.b4  { left: 80%; top: 22%; width: 140px; height: 140px;
             background: radial-gradient(circle, rgba(212, 165, 116, 0.50), transparent 70%);
             filter: blur(45px);
             animation: drift-d 36s var(--ease-soft) infinite alternate; }
.bokeh.b5  { left: 8%;  top: 36%; width: 260px; height: 260px;
             background: radial-gradient(circle, rgba(139, 111, 71, 0.35), transparent 70%);
             filter: blur(75px);
             animation: drift-e 40s var(--ease-soft) infinite alternate; }
.bokeh.b6  { left: 40%; top: 32%; width: 200px; height: 200px;
             background: radial-gradient(circle, rgba(196, 130, 110, 0.40), transparent 70%);
             filter: blur(60px);
             animation: drift-f 30s var(--ease-soft) infinite alternate; }
.bokeh.b7  { left: 70%; top: 42%; width: 160px; height: 160px;
             background: radial-gradient(circle, rgba(212, 165, 116, 0.45), transparent 70%);
             filter: blur(50px);
             animation: drift-g 34s var(--ease-soft) infinite alternate; }
.bokeh.b8  { left: 88%; top: 50%; width: 240px; height: 240px;
             background: radial-gradient(circle, rgba(154, 122, 92, 0.38), transparent 70%);
             filter: blur(80px);
             animation: drift-h 42s var(--ease-soft) infinite alternate; }
.bokeh.b9  { left: 14%; top: 56%; width: 200px; height: 200px;
             background: radial-gradient(circle, rgba(212, 165, 116, 0.42), transparent 70%);
             filter: blur(65px);
             animation: drift-a 36s var(--ease-soft) infinite alternate-reverse; }
.bokeh.b10 { left: 38%; top: 64%; width: 280px; height: 280px;
             background: radial-gradient(circle, rgba(196, 130, 110, 0.38), transparent 70%);
             filter: blur(85px);
             animation: drift-b 30s var(--ease-soft) infinite alternate-reverse; }
.bokeh.b11 { left: 62%; top: 72%; width: 180px; height: 180px;
             background: radial-gradient(circle, rgba(139, 111, 71, 0.36), transparent 70%);
             filter: blur(55px);
             animation: drift-c 38s var(--ease-soft) infinite alternate-reverse; }
.bokeh.b12 { left: 84%; top: 78%; width: 220px; height: 220px;
             background: radial-gradient(circle, rgba(212, 165, 116, 0.45), transparent 70%);
             filter: blur(70px);
             animation: drift-d 32s var(--ease-soft) infinite alternate-reverse; }
.bokeh.b13 { left: 6%;  top: 84%; width: 260px; height: 260px;
             background: radial-gradient(circle, rgba(196, 130, 110, 0.38), transparent 70%);
             filter: blur(80px);
             animation: drift-e 40s var(--ease-soft) infinite alternate-reverse; }
.bokeh.b14 { left: 48%; top: 88%; width: 200px; height: 200px;
             background: radial-gradient(circle, rgba(154, 122, 92, 0.36), transparent 70%);
             filter: blur(60px);
             animation: drift-f 28s var(--ease-soft) infinite alternate-reverse; }
.bokeh.b15 { left: 74%; top: 94%; width: 140px; height: 140px;
             background: radial-gradient(circle, rgba(212, 165, 116, 0.50), transparent 70%);
             filter: blur(45px);
             animation: drift-g 34s var(--ease-soft) infinite alternate-reverse; }
.bokeh.b16 { left: 30%; top: 4%;  width: 100px; height: 100px;
             background: radial-gradient(circle, rgba(196, 130, 110, 0.55), transparent 70%);
             filter: blur(40px);
             animation: drift-h 26s var(--ease-soft) infinite alternate-reverse; }

@keyframes drift-a { from { transform: translate3d(0, 0, 0); }
                     to   { transform: translate3d(40px, -28px, 0); } }
@keyframes drift-b { from { transform: translate3d(0, 0, 0); }
                     to   { transform: translate3d(-32px, 36px, 0); } }
@keyframes drift-c { from { transform: translate3d(0, 0, 0); }
                     to   { transform: translate3d(28px, 22px, 0); } }
@keyframes drift-d { from { transform: translate3d(0, 0, 0); }
                     to   { transform: translate3d(-44px, -18px, 0); } }
@keyframes drift-e { from { transform: translate3d(0, 0, 0); }
                     to   { transform: translate3d(34px, 40px, 0); } }
@keyframes drift-f { from { transform: translate3d(0, 0, 0); }
                     to   { transform: translate3d(-26px, -34px, 0); } }
@keyframes drift-g { from { transform: translate3d(0, 0, 0); }
                     to   { transform: translate3d(38px, -22px, 0); } }
@keyframes drift-h { from { transform: translate3d(0, 0, 0); }
                     to   { transform: translate3d(-30px, 28px, 0); } }

/* =====================================================================
   MEANDER AXIS (full-document SVG spine)
   ===================================================================== */
.meander-axis {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.meander-axis path.axis-base {
    fill: none;
    stroke: var(--bronze);
    stroke-width: 1;
    stroke-linecap: round;
    opacity: 0.18;
}

.meander-axis path.axis-progress {
    fill: none;
    stroke: var(--terracotta);
    stroke-width: 1.4;
    stroke-linecap: round;
    opacity: 0.55;
    /* dasharray + dashoffset set by JS */
}

/* axis breathing pulse (independent of scroll) */
.meander-axis {
    animation: axis-breath 11s ease-in-out infinite;
    transform-origin: 50% 50%;
}

@keyframes axis-breath {
    0%, 100% { transform: scaleX(1); }
    50%      { transform: scaleX(1.012); }
}

/* =====================================================================
   MEANDER FLOW  --  the river of content
   ===================================================================== */
.meander-flow {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 8vw 0 6vw;
}

/* =====================================================================
   NARRATIVE ANCHORS  (six sections)
   alternating left/right with ~18vw amplitude
   ===================================================================== */
.narrative-anchor {
    position: relative;
    max-width: 720px;
    padding: 7vh 7vw;
    margin: 6vh 0;
    color: var(--umber-ink);
}

.anchor--left {
    margin-left: 7vw;
    margin-right: auto;
    transform: translateX(-2vw);
}

.anchor--right {
    margin-left: auto;
    margin-right: 7vw;
    transform: translateX(2vw);
    text-align: right;
}

.anchor--right .reading-column,
.anchor--right .pullquote-vessel,
.anchor--right .process-cycle {
    margin-left: auto;
}

.anchor--right .ripple-anchor {
    right: -2vw;
    left: auto;
}

.anchor--right .seal-glyph {
    left: auto;
    right: 0;
}

@media (max-width: 720px) {
    .narrative-anchor {
        padding: 5vh 8vw;
        max-width: 100%;
        text-align: left;
    }
    .anchor--left, .anchor--right {
        margin-left: 0;
        margin-right: 0;
        transform: none;
        text-align: left;
    }
    .anchor--right .reading-column,
    .anchor--right .pullquote-vessel,
    .anchor--right .process-cycle { margin-left: 0; }
}

/* =====================================================================
   RIPPLE ANCHORS (concentric rings around each heading)
   ===================================================================== */
.ripple-anchor {
    position: absolute;
    top: 4vh;
    left: -4vw;
    width: 240px;
    height: 240px;
    pointer-events: none;
    z-index: 0;
}

.ripple-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid var(--terracotta);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1);
    animation: ripple-pulse 7s ease-out infinite;
}

.ripple-ring.r1 {
    width: 80px;  height: 80px;
    opacity: 0.9;
    animation-delay: 0s;
}
.ripple-ring.r2 {
    width: 160px; height: 160px;
    opacity: 0.5;
    animation-delay: 0.4s;
}
.ripple-ring.r3 {
    width: 240px; height: 240px;
    opacity: 0.2;
    animation-delay: 0.8s;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 1.18); /* slight elastic on outermost */
}

@keyframes ripple-pulse {
    0%   { transform: translate(-50%, -50%) scale(1);   opacity: var(--ring-opacity, 0.9); }
    70%  { opacity: 0.04; }
    100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
}

/* per-ring starting opacity by inheritance */
.ripple-ring.r1 { --ring-opacity: 0.9; }
.ripple-ring.r2 { --ring-opacity: 0.5; }
.ripple-ring.r3 { --ring-opacity: 0.2; }

/* =====================================================================
   SEAL MOTIF (hanko-style ornament, top-right of each section)
   ===================================================================== */
.seal-glyph {
    position: absolute;
    top: 2vh;
    right: 0;
    width: 48px;
    height: 48px;
    opacity: 0.78;
    transition: transform 1.8s var(--ease-soft), opacity 1.8s var(--ease-soft);
}

.anchor--left .seal-glyph { right: 0; left: auto; }

.narrative-anchor:hover .seal-glyph {
    transform: rotate(6deg) scale(1.04);
    opacity: 0.92;
}

/* =====================================================================
   TYPOGRAPHY  --  the four-voice hierarchy
   ===================================================================== */
.display-heading {
    font-family: var(--serif-display);
    font-weight: 400;
    font-size: clamp(2.4rem, 5.2vw, 4.8rem);
    line-height: 1.08;
    letter-spacing: -0.015em;
    color: var(--deep-fig);
    margin: 0.4em 0 0.55em;
    position: relative;
    z-index: 2;
}

.display-heading em {
    font-family: var(--serif-italic);
    font-style: italic;
    font-weight: 400;
    color: var(--terracotta);
}

#introduction .display-heading {
    font-weight: 400;
}

.epigraph {
    font-family: var(--serif-italic);
    font-style: italic;
    font-weight: 300;
    font-size: 1.5rem;
    line-height: 1.45;
    color: var(--aged-bronze);
    margin: 0 0 2.2em;
    max-width: 38ch;
}

.anchor--right .epigraph {
    margin-left: auto;
}

.metadata {
    font-family: var(--mono-accent);
    font-size: 14px;
    font-weight: 400;
    color: var(--bronze);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 1.4em;
    opacity: 0.85;
}

/* =====================================================================
   READING COLUMNS  --  organic-flow body text
   ===================================================================== */
.reading-column {
    max-width: 60ch;
    font-size: 17px;
    line-height: 1.72;
    color: var(--umber-ink);
    margin-top: 1.2em;
}

.reading-column--narrow { max-width: 44ch; }

.reading-column p + p {
    margin-top: 1.2em;
    text-indent: 1.6em;
}

.reading-column p::first-letter {
    /* subtle baseline visual texture */
    color: var(--deep-fig);
}

/* =====================================================================
   PULLQUOTE VESSEL  (vesica piscis container)
   ===================================================================== */
.pullquote-vessel {
    position: relative;
    width: clamp(280px, 42vw, 480px);
    aspect-ratio: 16 / 10;
    margin: 3em 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anchor--right .pullquote-vessel { margin-left: auto; }

.vessel-shape {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.pullquote-vessel blockquote {
    font-family: var(--serif-italic);
    font-style: italic;
    font-weight: 300;
    font-size: 1.35rem;
    line-height: 1.5;
    color: var(--deep-fig);
    text-align: center;
    padding: 0 14%;
    position: relative;
    z-index: 1;
    quotes: none;
}

/* shape-outside on a hidden float so adjacent reading-column wraps the vessel */
.pullquote-vessel::before {
    content: "";
    float: left;
    width: 0;
    height: 0;
    shape-outside: polygon(50% 0%, 92% 28%, 100% 50%, 92% 72%, 50% 100%, 8% 72%, 0% 50%, 8% 28%);
}

/* =====================================================================
   PORTFOLIO FLOW
   ===================================================================== */
.portfolio-flow {
    margin-top: 2em;
    display: flex;
    flex-direction: column;
    gap: 4em;
}

.portfolio-piece {
    position: relative;
    padding: 1.2em 0 1.2em 0;
    border-top: 1px solid rgba(139, 111, 71, 0.25);
}

.portfolio-piece:first-child { border-top: none; }

.piece-index {
    font-family: var(--mono-accent);
    font-size: 14px;
    color: var(--terracotta);
    letter-spacing: 0.18em;
    display: inline-block;
    margin-bottom: 0.6em;
}

.piece-title {
    font-family: var(--serif-display);
    font-weight: 700;
    font-size: clamp(1.6rem, 2.4vw, 2.2rem);
    line-height: 1.18;
    letter-spacing: -0.012em;
    color: var(--deep-fig);
    margin-bottom: 0.4em;
}

.piece-meta {
    font-family: var(--serif-italic);
    font-style: italic;
    font-weight: 300;
    color: var(--aged-bronze);
    font-size: 1rem;
    margin-bottom: 0.8em;
}

.piece-body {
    color: var(--umber-ink);
    max-width: 56ch;
    margin-left: 0;
}

.anchor--right .piece-body { margin-left: auto; }

/* =====================================================================
   PROCESS CYCLE  --  numbered list with roman numerals
   ===================================================================== */
.process-cycle {
    list-style: none;
    margin: 2.4em 0 0;
    padding: 0;
    max-width: 52ch;
    border-left: 1px solid rgba(139, 111, 71, 0.35);
    padding-left: 1.6em;
}

.anchor--right .process-cycle {
    border-left: none;
    border-right: 1px solid rgba(139, 111, 71, 0.35);
    padding-left: 0;
    padding-right: 1.6em;
    margin-left: auto;
    text-align: right;
}

.process-cycle li {
    font-family: var(--serif-italic);
    font-style: italic;
    font-weight: 300;
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--deep-fig);
    padding: 0.5em 0;
}

.cycle-num {
    font-family: var(--mono-accent);
    font-style: normal;
    font-size: 13px;
    color: var(--terracotta);
    letter-spacing: 0.15em;
    margin-right: 0.8em;
    display: inline-block;
    min-width: 2em;
}

/* =====================================================================
   ARCHIVE INDEX
   ===================================================================== */
.archive-index {
    list-style: none;
    margin: 2em 0 0;
    padding: 0;
}

.archive-index li {
    display: grid;
    grid-template-columns: 7em 1fr 6em;
    gap: 1.4em;
    align-items: baseline;
    padding: 1em 0;
    border-bottom: 1px solid rgba(139, 111, 71, 0.18);
    transition: background 1.2s var(--ease-soft);
}

.archive-index li:hover {
    background: linear-gradient(90deg, rgba(232, 220, 197, 0.4), transparent 80%);
}

.archive-id {
    font-family: var(--mono-accent);
    font-size: 13px;
    color: var(--terracotta);
    letter-spacing: 0.15em;
}

.archive-title {
    font-family: var(--serif-display);
    font-weight: 400;
    font-size: 1.15rem;
    color: var(--deep-fig);
    line-height: 1.3;
}

.archive-date {
    font-family: var(--mono-accent);
    font-size: 12px;
    color: var(--bronze);
    letter-spacing: 0.12em;
    text-align: right;
}

/* =====================================================================
   CLOSING LINK + COLOPHON
   ===================================================================== */
.closing-link {
    margin-top: 4em;
    font-family: var(--serif-italic);
    font-style: italic;
    font-weight: 300;
    font-size: 1.25rem;
}

.closing-link a {
    color: var(--aged-bronze);
    text-decoration: none;
    border-bottom: 1px solid rgba(154, 122, 92, 0.55);
    padding-bottom: 0.1em;
    transition: color 1.4s var(--ease-soft), border-color 1.4s var(--ease-soft);
}

.closing-link a:hover {
    color: var(--terracotta);
    border-color: var(--terracotta);
}

.colophon {
    margin-top: 4em;
    font-family: var(--mono-accent);
    font-size: 12px;
    color: var(--bronze);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    opacity: 0.65;
}

/* =====================================================================
   CURVE DIVIDERS  --  six unique bezier curves
   ===================================================================== */
.curve-divider {
    width: 100%;
    height: 80px;
    margin: 4vh 0;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.curve-divider svg {
    width: 100%;
    height: 100%;
    display: block;
}

.curve-divider .curve-path {
    /* stroke-dasharray + dashoffset set by JS via getTotalLength() */
    transition: stroke-dashoffset 1.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.curve-divider--final {
    margin-bottom: 2vh;
    opacity: 0.55;
}

/* =====================================================================
   ENTRY ANIMATION  (sections fade up softly when scrolled into view)
   ===================================================================== */
.narrative-anchor {
    opacity: 0;
    transform: translateY(28px) translateX(var(--anchor-shift, 0));
    transition: opacity 1.8s var(--ease-soft), transform 1.8s var(--ease-soft);
}

.anchor--left  { --anchor-shift: -2vw; }
.anchor--right { --anchor-shift:  2vw; }

.narrative-anchor.is-visible {
    opacity: 1;
    transform: translateY(0) translateX(var(--anchor-shift, 0));
}

/* dividers also paint in */
.curve-divider .curve-path {
    /* default state -- JS will set the precise dash values */
    stroke-dasharray: 2400 2400;
    stroke-dashoffset: 2400;
}

.curve-divider.is-painted .curve-path {
    stroke-dashoffset: 0 !important;
}

/* =====================================================================
   TYPOGRAPHIC FLOURISHES
   ===================================================================== */
::selection {
    background: var(--terracotta);
    color: var(--parchment);
}

a {
    color: var(--aged-bronze);
}
