/* =====================================================================
   mechanic.monster -- grease-stained workshop journal -> crystal core
   Palette: complementary (rust #C44B2B / patina #6B8F71) + Quartz Frost
   Typography: Recursive (variable) + Caveat (handwriting)
   ===================================================================== */

:root {
    /* Core palette per DESIGN.md */
    --c-dark:        #1A1A1A;   /* carbon black -- engine block / soot */
    --c-bone:        #E8DCC8;   /* bone white -- aged paper / shop rag */
    --c-rust:        #C44B2B;   /* rust oxide red -- corroded iron */
    --c-patina:      #6B8F71;   /* patina green -- oxidized copper */
    --c-amber:       #A0522D;   /* burnt amber -- worn leather */
    --c-steel:       #4A5568;   /* slate steel -- brushed metal */
    --c-gold:        #D4A03C;   /* forge gold -- brass / weld flash */
    --c-bg:          #111216;   /* garage dark -- unlit corner */
    --c-frost:       #C8D6E5;   /* quartz frost -- crystal edge */
    --c-aluminum:    #B8AFA3;   /* weathered aluminum -- body text */
    --c-shadow-blue: #2A2D3A;   /* split-tone shadow */

    /* Variable font axes -- driven by JS via these custom properties */
    --casl: 1;
    --wght: 400;
    --slnt: 0;
    --mono: 0;

    /* Scroll progress 0..1 -- updated by JS */
    --scroll: 0;

    /* Easing */
    --ease-snap: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--c-bg);
    color: var(--c-aluminum);
    font-family: "Recursive", "Inter", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    overflow-x: hidden;
    font-variation-settings: "MONO" 0, "CASL" var(--casl), "wght" var(--wght), "slnt" var(--slnt), "CRSV" 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    background:
        radial-gradient(1200px 600px at 50% 0%, rgba(212, 160, 60, 0.04), transparent 70%),
        radial-gradient(900px 700px at 80% 60%, rgba(196, 75, 43, 0.03), transparent 70%),
        var(--c-bg);
    min-height: 100vh;
}

/* ============================================================
   Noise overlay -- tri-X grain on top of everything
   ============================================================ */
.noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9000;
    opacity: 0.18;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.42 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ============================================================
   Ruler -- left-edge scroll progress (measuring tape)
   ============================================================ */
.ruler {
    position: fixed;
    top: 0;
    left: 0;
    width: 38px;
    height: 100vh;
    z-index: 800;
    background: linear-gradient(to right, rgba(232, 220, 200, 0.06), transparent);
    border-right: 1px solid rgba(232, 220, 200, 0.18);
    pointer-events: none;
}

.ruler-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: calc(var(--scroll, 0) * 100%);
    background: linear-gradient(to bottom, var(--c-rust), var(--c-gold));
    transition: height 80ms linear;
}

.ruler-hash {
    position: absolute;
    left: 0;
    width: 38px;
    height: 1px;
    background: var(--c-bone);
    opacity: 0.55;
}
.ruler-hash::after {
    content: attr(data-hash);
    position: absolute;
    left: 8px;
    top: -8px;
    font-family: "Recursive", monospace;
    font-variation-settings: "MONO" 1, "CASL" 0, "wght" 500;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--c-bone);
    opacity: 0.6;
}

.ruler-hash:nth-child(2) { top: 0%; }
.ruler-hash:nth-child(3) { top: 25%; }
.ruler-hash:nth-child(4) { top: 50%; }
.ruler-hash:nth-child(5) { top: 75%; }
.ruler-hash:nth-child(6) { top: 100%; }

/* ============================================================
   Workshop / Bay shell
   ============================================================ */
.workshop {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.bay {
    position: relative;
    width: 100%;
    padding: 0 6vw 0 80px;
}

.bay-marker {
    font-family: "Recursive", monospace;
    font-variation-settings: "MONO" 1, "CASL" 0, "wght" 600;
    font-size: 12px;
    letter-spacing: 0.28em;
    color: var(--c-patina);
    margin: 0 0 18px 0;
    text-transform: uppercase;
}
.bay-marker-amber { color: var(--c-gold); }
.bay-marker-frost { color: var(--c-frost); }

.bay-heading {
    font-family: "Recursive", "Inter", sans-serif;
    font-variation-settings: "MONO" 0, "CASL" 1, "wght" 900, "slnt" 0;
    font-size: clamp(40px, 7vw, 88px);
    line-height: 0.95;
    letter-spacing: -0.02em;
    color: var(--c-bone);
    margin: 0 0 18px 0;
}
.bay-heading-shift { color: var(--c-rust); }
.bay-heading-crystal { color: var(--c-frost); }

.bay-lede {
    font-size: 17px;
    color: var(--c-aluminum);
    max-width: 540px;
    margin: 0;
    line-height: 1.55;
}

.bay-header {
    padding: 60px 0 30px 0;
    position: relative;
    z-index: 2;
}
.bay-header-tilt { transform: rotate(-1.2deg); }
.bay-header-center { text-align: center; padding-top: 40px; }
.bay-header-center .bay-lede { margin-left: auto; margin-right: auto; }

/* ============================================================
   BAY 1 -- THE ENTRANCE
   ============================================================ */
.bay-1 {
    min-height: 100vh;
    background:
        radial-gradient(420px 300px at 50% 18%, rgba(212, 160, 60, 0.22), transparent 70%),
        radial-gradient(900px 600px at 50% 18%, rgba(212, 160, 60, 0.08), transparent 80%),
        linear-gradient(to bottom, #0c0d11, var(--c-bg));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 120px;
    padding-bottom: 60px;
}

/* hanging work light */
.work-light {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 240px;
    transform-origin: 50% 0%;
    animation: lightSway 8s ease-in-out infinite;
}

.work-light-cord {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 160px;
    transform: translateX(-50%);
    background: linear-gradient(to bottom, var(--c-aluminum), var(--c-steel));
}

.work-light-shade {
    position: absolute;
    top: 154px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 30px;
    background: linear-gradient(to bottom, var(--c-steel), var(--c-dark));
    border-radius: 50% 50% 8% 8% / 80% 80% 8% 8%;
    box-shadow: inset 0 -6px 8px rgba(0, 0, 0, 0.6);
}

.work-light-bulb {
    position: absolute;
    top: 178px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 22px;
    background: radial-gradient(circle at 40% 40%, #fff5d6 0%, var(--c-gold) 50%, #6b4d1a 100%);
    border-radius: 50%;
    box-shadow:
        0 0 30px var(--c-gold),
        0 0 80px rgba(212, 160, 60, 0.4);
}

.work-light-glow {
    position: absolute;
    top: 175px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 700px;
    background: radial-gradient(ellipse at 50% 0%, rgba(212, 160, 60, 0.28) 0%, transparent 60%);
    pointer-events: none;
    mix-blend-mode: screen;
}

@keyframes lightSway {
    0%, 100% { transform: translateX(-50%) rotate(-2deg); }
    50%      { transform: translateX(-50%) rotate(2deg); }
}

/* grit underneath */
.bay-1-grit {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 12% 80%, rgba(232, 220, 200, 0.06), transparent 60%),
        radial-gradient(1px 1px at 70% 88%, rgba(232, 220, 200, 0.05), transparent 60%),
        radial-gradient(3px 3px at 30% 95%, rgba(160, 82, 45, 0.1), transparent 60%);
    pointer-events: none;
}

.bay-1-content {
    position: relative;
    z-index: 3;
    text-align: center;
    margin-top: 120px;
    max-width: 1100px;
}

.title-spray {
    font-family: "Recursive", sans-serif;
    font-variation-settings: "MONO" 0, "CASL" 1, "wght" 900, "slnt" 0;
    font-size: clamp(48px, 11vw, 128px);
    letter-spacing: -0.03em;
    color: var(--c-bone);
    line-height: 0.95;
    margin: 0 0 20px 0;
    text-shadow: 0 2px 0 rgba(196, 75, 43, 0.18), 0 0 40px rgba(212, 160, 60, 0.12);
    user-select: none;
}

.t-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px) rotate(0deg);
    transition: opacity 280ms var(--ease-snap), transform 360ms var(--ease-snap);
    will-change: transform, opacity;
}

.t-letter.shown {
    opacity: 1;
    transform: translateY(0) rotate(var(--lr, 0deg));
}

.t-letter:nth-child(odd)  { --lr: -1deg; }
.t-letter:nth-child(even) { --lr: 1.2deg; }
.t-letter.t-dot { color: var(--c-rust); }

.subtitle-scrawl {
    font-family: "Caveat", "Comic Sans MS", cursive;
    font-size: 28px;
    color: var(--c-rust);
    margin: 0 auto;
    transform: rotate(-2deg);
    line-height: 1.2;
}

.entrance-stencil {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}
.stencil-line {
    font-family: "Recursive", monospace;
    font-variation-settings: "MONO" 1, "CASL" 0, "wght" 500;
    font-size: 12px;
    letter-spacing: 0.32em;
    color: var(--c-aluminum);
    text-transform: uppercase;
    opacity: 0.85;
}
.stencil-line em {
    font-style: normal;
    color: var(--c-gold);
}

/* annotation SVGs in bay 1 */
.annot {
    position: absolute;
    pointer-events: none;
    z-index: 4;
}
.annot-arrow-1 {
    width: 220px;
    top: 80px;
    left: 6%;
    transform: rotate(-6deg);
}
.annot-circle-1 {
    width: 260px;
    bottom: 120px;
    right: 5%;
    transform: rotate(4deg);
}
.annot-path {
    fill: none;
    stroke: var(--c-rust);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1100ms ease-out;
}
.annot-path.long { stroke-dasharray: 4000; stroke-dashoffset: 4000; }
.in-view .annot-path { stroke-dashoffset: 0; }

.caveat-note {
    position: absolute;
    font-family: "Caveat", cursive;
    font-size: 22px;
    color: var(--c-bone);
    margin: 0;
}
.caveat-1 { top: 70px; left: 12%; transform: rotate(-8deg); color: var(--c-rust); }
.caveat-2 { bottom: 110px; right: 9%; transform: rotate(5deg); }

/* scroll cue */
.scroll-cue {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--c-bone);
    opacity: 0.7;
    text-align: center;
    font-family: "Recursive", monospace;
    font-variation-settings: "MONO" 1, "wght" 500;
    font-size: 11px;
    letter-spacing: 0.3em;
}
.scroll-cue svg {
    display: block;
    width: 22px;
    margin: 6px auto 0;
    animation: cueBounce 2.4s ease-in-out infinite;
}
.scroll-cue .annot-path {
    stroke: var(--c-bone);
    stroke-dasharray: 200;
    stroke-dashoffset: 0;
}
@keyframes cueBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(8px); }
}

/* ============================================================
   BAY 2 -- THE WALL (portfolio grid)
   ============================================================ */
.bay-2 {
    min-height: 150vh;
    background: linear-gradient(to bottom, var(--c-bg), #0e0f13 60%, #0c0d11);
    padding-top: 60px;
    padding-bottom: 100px;
    overflow: hidden;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(150px, auto);
    gap: 32px 24px;
    margin-top: 20px;
    position: relative;
}

/* irregular column widths via column placement and intentional overlaps */
.card {
    position: relative;
    transform: rotate(var(--rot, 0deg));
    transition:
        transform 600ms var(--ease-snap),
        filter 700ms var(--ease-snap),
        opacity 700ms var(--ease-snap);
    filter: blur(8px);
    opacity: 0.55;
    will-change: transform, filter, opacity;
}
.card.in-view {
    filter: blur(0px);
    opacity: 1;
}
.card.past-view {
    filter: blur(3px);
    opacity: 0.85;
}

.card-photo, .card-text, .card-diagram {
    background: var(--c-bone);
    box-shadow:
        3px 4px 0 rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(26, 26, 26, 0.12),
        inset 0 0 40px rgba(160, 82, 45, 0.06);
    padding: 14px;
    border-radius: 2px;
}

/* torn-paper irregular clip-path on photo cards */
.card-photo .card-photo-frame {
    position: relative;
    background: var(--c-shadow-blue);
    overflow: hidden;
    clip-path: polygon(
        0% 2%, 4% 0%, 22% 1%, 48% 0%, 76% 2%, 96% 0%, 100% 4%,
        99% 30%, 100% 60%, 99% 88%, 100% 96%, 96% 100%,
        70% 99%, 40% 100%, 14% 99%, 2% 100%, 0% 92%, 1% 60%, 0% 30%
    );
}

.card-photo-img {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--c-shadow-blue);
    overflow: hidden;
}

/* vintage tri-x photo treatment */
.photo-svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: grayscale(0.85) contrast(1.18) brightness(0.92);
}

.card-photo-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(232, 220, 200, 0.08) 0%,
            transparent 30%,
            rgba(42, 45, 58, 0.18) 100%);
    mix-blend-mode: overlay;
    pointer-events: none;
}

.card-photo-img::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 12% 22%, rgba(255, 255, 255, 0.3), transparent 60%),
        radial-gradient(1px 1px at 84% 70%, rgba(255, 255, 255, 0.2), transparent 60%),
        radial-gradient(2px 2px at 30% 80%, rgba(0, 0, 0, 0.3), transparent 60%);
    mix-blend-mode: overlay;
    pointer-events: none;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 10px;
    padding: 0 4px;
}
.card-tag {
    font-family: "Recursive", monospace;
    font-variation-settings: "MONO" 1, "CASL" 0, "wght" 600;
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--c-rust);
    text-transform: uppercase;
}
.card-spec {
    font-family: "Recursive", monospace;
    font-variation-settings: "MONO" 1, "CASL" 0, "wght" 500;
    font-size: 12px;
    color: var(--c-patina);
    letter-spacing: 0.06em;
}

/* annotation overlays on cards */
.card-annot {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.card-annot .annot-text,
.dim-text,
.dim-text-red {
    font-family: "Caveat", cursive;
    font-size: 14px;
    fill: var(--c-rust);
}
.dim-text { fill: var(--c-dark); }
.dim-text-red { fill: var(--c-rust); }

.card-annot-underline {
    height: 30px;
    inset: auto auto 4px 4px;
    width: calc(100% - 8px);
}
.card-annot-circle {
    height: 60px;
    inset: 8px auto auto 4px;
    width: calc(100% - 8px);
}
.card-annot-hero { width: 100%; height: 100%; }

/* Card text variants */
.card-text {
    padding: 26px 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        repeating-linear-gradient(0deg, rgba(160, 82, 45, 0.04) 0 1px, transparent 1px 18px),
        var(--c-bone);
}
.card-pull {
    font-family: "Recursive", sans-serif;
    font-variation-settings: "MONO" 0, "CASL" 0.6, "wght" 700;
    font-size: 22px;
    color: var(--c-dark);
    margin: 0 0 10px 0;
    line-height: 1.25;
}
.card-pull-small {
    font-family: "Recursive", monospace;
    font-variation-settings: "MONO" 1, "CASL" 0, "wght" 500;
    font-size: 11px;
    color: var(--c-amber);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin: 0;
}
.card-attrib {
    font-family: "Caveat", cursive;
    font-size: 18px;
    color: var(--c-rust);
    margin: 4px 0 0 0;
}
.card-attrib em { color: var(--c-amber); font-style: normal; font-weight: 700; }
.card-callout {
    font-family: "Recursive", sans-serif;
    font-variation-settings: "MONO" 0, "CASL" 0.4, "wght" 900;
    font-size: 38px;
    color: var(--c-rust);
    margin: 4px 0 14px 0;
    line-height: 1;
}
.card-callout small {
    font-size: 16px;
    color: var(--c-amber);
    margin-left: 4px;
}
.card-callout.green { color: var(--c-patina); }

/* hero slab full-width diagram */
.hero-slab {
    grid-column: span 12 !important;
    margin: 8px 0;
}
.hero-slab .card-photo-frame {
    aspect-ratio: 600 / 280;
    background: var(--c-bone);
    clip-path: polygon(
        0% 2%, 6% 0%, 28% 2%, 60% 0%, 88% 2%, 100% 0%, 100% 8%,
        99% 50%, 100% 92%, 96% 100%, 70% 98%, 40% 100%, 12% 99%,
        0% 100%, 1% 50%
    );
    padding: 0;
    overflow: hidden;
}
.diagram-frame { background: var(--c-bone); }
.diagram-svg { width: 100%; height: 100%; display: block; }

/* portfolio grid placement (irregular 12-col) */
.c-1 { grid-column: 1 / span 4; }
.c-2 { grid-column: 5 / span 4; margin-top: -8px; }
.c-3 { grid-column: 9 / span 4; }
.c-4 { /* hero spans full width */ margin-top: -10px; }
.c-5 { grid-column: 1 / span 3; }
.c-6 { grid-column: 4 / span 5; margin-top: -8px; }
.c-7 { grid-column: 9 / span 4; margin-top: 12px; }
.c-8 { grid-column: 2 / span 4; margin-top: -8px; }
.c-9 { grid-column: 7 / span 6; }

/* crystal accents in the gutters */
.crystal-accent {
    position: absolute;
    width: 60px;
    height: 80px;
    pointer-events: none;
    z-index: 5;
}
.crystal-accent svg { width: 100%; height: 100%; }
.crystal-accent .annot-path {
    stroke: var(--c-frost);
    stroke-width: 1.4;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 1400ms ease-out;
}
.in-view .crystal-accent .annot-path,
.crystal-accent.in-view .annot-path { stroke-dashoffset: 0; }
.crystal-accent.ca-1 { top: 6%; left: 32%; transform: rotate(-12deg) scale(0.7); }
.crystal-accent.ca-2 { top: 38%; right: 4%; transform: rotate(8deg); }
.crystal-accent.ca-3 { bottom: 8%; left: 12%; transform: rotate(-4deg) scale(0.85); }

/* ============================================================
   BAY 3 -- THE TRANSFORMATION (dissolve + crystals)
   ============================================================ */
.bay-3 {
    min-height: 100vh;
    background:
        radial-gradient(800px 600px at 30% 60%, rgba(200, 214, 229, 0.04), transparent 70%),
        radial-gradient(800px 600px at 75% 30%, rgba(212, 160, 60, 0.05), transparent 70%),
        linear-gradient(to bottom, #0c0d11, #0f1116 50%, #11141a);
    padding-top: 50px;
    padding-bottom: 80px;
    overflow: hidden;
}

.dissolve-grid {
    position: relative;
    width: 100%;
    min-height: 80vh;
    margin-top: 30px;
}

.card-tilt {
    position: absolute;
    width: 30%;
    max-width: 360px;
    background: var(--c-bone);
    padding: 12px;
    box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.45);
    transform: rotate(var(--rot)) translate(var(--x), var(--y));
    transition:
        transform 800ms var(--ease-snap),
        filter 800ms var(--ease-snap),
        opacity 800ms var(--ease-snap);
    filter: blur(10px);
    opacity: 0.55;
}
.card-tilt.in-view { filter: blur(0); opacity: 1; }
.card-tilt .card-photo-frame { aspect-ratio: 1 / 1; clip-path: polygon(
        0% 4%, 6% 0%, 30% 2%, 70% 0%, 96% 2%, 100% 8%, 99% 60%,
        100% 96%, 92% 100%, 60% 98%, 24% 100%, 4% 99%, 0% 92%, 1% 40%
    ); overflow: hidden; }

.card-tilt .photo-svg { filter: grayscale(0.7) contrast(1.15); }

/* facet overlays simulating crystal refraction over photos */
.facet-overlay polygon {
    mix-blend-mode: screen;
}

/* tilt placements -- scattered */
.t-1 { top: 4%;  left: 4%;  width: 28%; }
.t-2 { top: 14%; left: 38%; width: 26%; --rot: 8deg; }
.t-3 { top: 30%; left: 70%; width: 24%; --rot: -4deg; }
.t-4 { top: 52%; left: 18%; width: 28%; --rot: 11deg; }

/* big growing crystals from the bottom */
.big-crystal {
    position: absolute;
    bottom: -40px;
    width: 160px;
    height: 280px;
    pointer-events: none;
    z-index: 6;
}
.big-crystal .annot-path {
    fill: rgba(200, 214, 229, 0.04);
    stroke: var(--c-frost);
    stroke-width: 1.4;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 1800ms ease-out;
}
.big-crystal.in-view .annot-path { stroke-dashoffset: 0; }
.bc-1 { left: 3%; transform: rotate(-4deg); }
.bc-2 { left: 38%; transform: rotate(2deg) scale(1.1); }
.bc-3 { right: 6%; transform: rotate(-6deg) scale(0.9); }

/* ============================================================
   BAY 4 -- CRYSTAL CORE
   ============================================================ */
.bay-4 {
    min-height: 100vh;
    background:
        radial-gradient(700px 700px at 50% 60%, rgba(212, 160, 60, 0.12), transparent 70%),
        radial-gradient(900px 700px at 50% 60%, rgba(200, 214, 229, 0.08), transparent 80%),
        linear-gradient(to bottom, #11141a, #0c0d11 80%);
    padding: 50px 6vw 80px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.crystal-core {
    position: relative;
    width: min(720px, 90vw);
    margin: 30px auto;
    text-align: center;
}

.core-svg {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 40px rgba(200, 214, 229, 0.18));
}

.crystal-core-outline .annot-path {
    stroke-dasharray: 4000;
    stroke-dashoffset: 4000;
    transition: stroke-dashoffset 2200ms ease-out;
}
.bay-4.in-view .crystal-core-outline .annot-path { stroke-dashoffset: 0; }

.core-pulse circle {
    animation: corePulse 2.4s ease-in-out infinite;
    transform-origin: center;
    transform-box: fill-box;
}
.core-pulse circle:nth-child(2) { animation-delay: 0.2s; }
.core-pulse circle:nth-child(3) { animation-delay: 0.4s; }
.core-pulse circle:nth-child(4) { animation-delay: 0.6s; }
.core-pulse circle:nth-child(5) { animation-delay: 0.8s; }
.core-pulse circle:nth-child(6) { animation-delay: 1.0s; }
.core-pulse circle:nth-child(7) { animation-delay: 1.2s; }
.core-pulse circle:nth-child(8) { animation-delay: 1.4s; }
.core-pulse circle:nth-child(9) { animation-delay: 1.6s; }
.core-pulse circle:nth-child(10) { animation-delay: 1.8s; }

@keyframes corePulse {
    0%, 100% { opacity: 0.5; r: 3; }
    50%      { opacity: 1;   r: 6; }
}

.core-caption {
    margin: 24px 0 0 0;
    font-family: "Recursive", sans-serif;
    font-variation-settings: "MONO" 0, "CASL" 0, "wght" 500;
    color: var(--c-frost);
    line-height: 1.4;
}
.core-caption-line {
    display: block;
    font-size: clamp(16px, 2.2vw, 22px);
    letter-spacing: 0.04em;
    opacity: 0.9;
}
.core-caption-line:first-child { color: var(--c-aluminum); font-style: italic; }
.core-caption-line:last-child { color: var(--c-frost); margin-top: 4px; }

/* Sign-off */
.signoff {
    margin-top: 60px;
    text-align: center;
    padding: 22px;
    border-top: 1px dashed rgba(232, 220, 200, 0.18);
    width: min(720px, 90vw);
}
.signoff-mark {
    font-family: "Recursive", monospace;
    font-variation-settings: "MONO" 1, "CASL" 0, "wght" 500;
    font-size: 11px;
    letter-spacing: 0.28em;
    color: var(--c-aluminum);
    opacity: 0.7;
    margin: 0 0 8px 0;
}
.signoff-scrawl {
    font-family: "Caveat", cursive;
    font-size: 22px;
    color: var(--c-rust);
    margin: 0;
    transform: rotate(-1.5deg);
    display: inline-block;
}

/* ============================================================
   Hover variable-font response on headings
   ============================================================ */
.bay-heading, .title-spray, .card-pull {
    transition: font-variation-settings 220ms ease;
}
.bay-heading:hover {
    font-variation-settings: "MONO" 0, "CASL" 1, "wght" 1000, "slnt" -15;
}
.title-spray:hover .t-letter.shown {
    transform: translateY(-2px) rotate(var(--lr, 0deg));
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    .bay { padding: 0 5vw 0 60px; }
    .ruler { width: 28px; }
    .portfolio-grid { gap: 24px 16px; }
    .c-1, .c-2, .c-3, .c-5, .c-6, .c-7, .c-8, .c-9 {
        grid-column: span 12;
    }
    .c-1, .c-3, .c-5, .c-7 { grid-column: 1 / span 6; }
    .c-2, .c-6, .c-8       { grid-column: 7 / span 6; }
    .card-tilt { width: 60%; }
    .t-1 { top: 2%;  left: 4%;  }
    .t-2 { top: 22%; left: 36%; }
    .t-3 { top: 44%; left: 8%;  }
    .t-4 { top: 64%; left: 30%; }
}
@media (max-width: 600px) {
    .bay { padding: 0 4vw 0 40px; }
    .ruler { width: 22px; }
    .ruler-hash::after { display: none; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .c-1, .c-2, .c-3, .c-5, .c-6, .c-7, .c-8, .c-9 { grid-column: 1; margin-top: 0; }
    .card-tilt { position: relative; width: 92%; margin: 14px auto; top: auto !important; left: auto !important; }
    .dissolve-grid { display: flex; flex-direction: column; align-items: center; min-height: auto; }
    .big-crystal { display: none; }
    .title-spray { font-size: 14vw; }
    .annot-arrow-1, .annot-circle-1 { display: none; }
    .caveat-1, .caveat-2 { display: none; }
}
