    :root {
        --bg: #ffffff;
        --ink: #2a2a2a;
        --faint: #8a8a8a;
        --rule: #dcdcdc;
        --accent: #4a1f6b;
        --grid: rgba(0, 0, 0, 0.04);
        --vignette: rgba(0, 0, 0, 0.06);
        --cursor-default: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'><text x='1' y='14' font-family='monospace' font-size='16' fill='%232a2a2a'>+</text></svg>") 9 9, default;
        --cursor-link: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'><path d='M3 3 L14 9 L3 15 Z' fill='%234a1f6b'/></svg>") 4 4, pointer;
        --cursor-move: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'><path fill='%232a2a2a' d='M11 0 L7.5 3.5 L9.5 3.5 L9.5 9.5 L3.5 9.5 L3.5 7.5 L0 11 L3.5 14.5 L3.5 12.5 L9.5 12.5 L9.5 18.5 L7.5 18.5 L11 22 L14.5 18.5 L12.5 18.5 L12.5 12.5 L18.5 12.5 L18.5 14.5 L22 11 L18.5 7.5 L18.5 9.5 L12.5 9.5 L12.5 3.5 L14.5 3.5 Z'/></svg>") 11 11, move;
    }

    :root[data-theme="dark"] {
        --bg: #0a0a0a;
        --ink: #cfcfcf;
        --faint: #6a6a6a;
        --rule: #2a2a2a;
        --accent: #c8a8e8;
        --grid: rgba(255, 255, 255, 0.035);
        --vignette: rgba(0, 0, 0, 0.55);
        --cursor-default: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'><text x='1' y='14' font-family='monospace' font-size='16' fill='%23cfcfcf'>+</text></svg>") 9 9, default;
        --cursor-link: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'><path d='M3 3 L14 9 L3 15 Z' fill='%23c8a8e8'/></svg>") 4 4, pointer;
        --cursor-move: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'><path fill='%23cfcfcf' d='M11 0 L7.5 3.5 L9.5 3.5 L9.5 9.5 L3.5 9.5 L3.5 7.5 L0 11 L3.5 14.5 L3.5 12.5 L9.5 12.5 L9.5 18.5 L7.5 18.5 L11 22 L14.5 18.5 L12.5 18.5 L12.5 12.5 L18.5 12.5 L18.5 14.5 L22 11 L18.5 7.5 L18.5 9.5 L12.5 9.5 L12.5 3.5 L14.5 3.5 Z'/></svg>") 11 11, move;
    }

    * {
        box-sizing: border-box;
    }

    html,
    body {
        margin: 0;
        padding: 0;
        background: var(--bg);
        color: var(--ink);
        font-family: "IBM Plex Mono", "JetBrains Mono", "Menlo", "Courier New", monospace;
        font-size: 14px;
        line-height: 1.65;
        text-transform: lowercase;
        cursor: var(--cursor-default);
        transition: background-color 0.25s ease, color 0.25s ease;
    }

    /* faint grid */
    body::before {
        content: "";
        position: fixed;
        inset: 0;
        background-image:
            linear-gradient(to right, var(--grid) 1px, transparent 1px),
            linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
        background-size: 22px 22px;
        pointer-events: none;
        z-index: 0;
    }

    /* subtle vignette */
    body::after {
        content: "";
        position: fixed;
        inset: 0;
        background: radial-gradient(ellipse at center, transparent 55%, var(--vignette) 100%);
        pointer-events: none;
        z-index: 0;
    }

    .wrap {
        max-width: 620px;
        margin: 0 auto;
        padding: 80px 32px 200px;
        position: relative;
        z-index: 1;
    }

    /* logo */
    header {
        text-align: center;
        margin-bottom: 72px;
    }

    header .logo-box {
        display: inline-block;
        will-change: transform;
    }

    header img {
        max-width: 420px;
        width: 100%;
        height: auto;
        display: block;
        user-select: none;
        transition: filter 0.25s ease;
    }

    /* in dark mode, the dark-inked logo would disappear on black —
     crush to black then partially invert to a soft light gray (~#d1d1d1) */
    :root[data-theme="dark"] header img {
        filter: brightness(0) invert(0.82);
    }

    header .tag {
        margin-top: 18px;
        font-size: 13px;
        color: var(--faint);
        letter-spacing: 0.04em;
        transform: rotate(-0.4deg);
    }

    /* sections — js applies a sway transform per scroll position */
    section {
        margin: 64px 0;
        will-change: transform;
    }

    section h2 {
        font-size: 13px;
        font-weight: normal;
        color: var(--faint);
        margin: 0 0 18px 0;
        letter-spacing: 0.14em;
    }

    section h2::before {
        content: "~~ ";
    }

    section h2::after {
        content: " ~~";
    }

    section p {
        margin: 0 0 14px 0;
    }

    /* links */
    a {
        color: var(--accent);
        text-decoration: none;
        border-bottom: 1px dotted var(--accent);
        cursor: var(--cursor-link);
    }

    a:hover {
        background: var(--ink);
        color: var(--bg);
        border-bottom-color: var(--ink);
    }

    /* lists */
    ul.bare {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    ul.bare li {
        padding: 4px 0;
    }

    ul.bare li::before {
        content: "» ";
        color: var(--faint);
    }

    /* scribble embedded on the homepage */
    .scribble-embed {
        border-left: 1px dashed var(--rule);
        padding-left: 18px;
        margin: 4px 0 22px 0;
    }

    section .scribble-date {
        font-size: 12px;
        color: var(--faint);
        letter-spacing: 0.05em;
        margin: 0 0 4px 0;
    }

    .scribble-title {
        font-size: 15px;
        font-weight: normal;
        margin: 0 0 14px 0;
    }

    .scribble-title a {
        color: var(--ink);
        border-bottom: 1px dotted var(--rule);
    }

    .scribble-title a:hover {
        background: var(--ink);
        color: var(--bg);
        border-bottom-color: var(--ink);
    }

    .scribble-img {
        display: block;
        max-width: 96px;
        width: 100%;
        height: auto;
        margin: 6px auto 14px auto;
    }

    /* dark-mode: invert the dark-inked icon to a soft light gray, like the logo */
    :root[data-theme="dark"] .scribble-img {
        filter: brightness(0) invert(0.82);
    }

    section .more-link {
        font-size: 13px;
        margin-top: 14px;
    }

    .more-link a {
        color: var(--faint);
        border-bottom-color: var(--rule);
    }

    /* scribbles index — accordion list */
    .scribbles-blurb {
        color: var(--faint);
        font-size: 12px;
        margin-top: 4px;
    }

    .scribble-list {
        margin-top: 32px;
    }

    .scribble-item {
        margin: 0 0 18px 0;
    }

    /* hide native disclosure triangle, we draw our own */
    .scribble-item summary {
        list-style: none;
        cursor: var(--cursor-link);
        padding: 6px 0;
        font-size: 14px;
        color: var(--ink);
        user-select: none;
    }
    .scribble-item summary::-webkit-details-marker { display: none; }
    .scribble-item summary::marker { content: ""; }

    .scribble-item summary:hover .s-title {
        background: var(--ink);
        color: var(--bg);
    }

    .scribble-item .chev {
        display: inline-block;
        width: 14px;
        color: var(--accent);
        transition: transform 0.2s ease;
    }

    .scribble-item[open] > summary .chev {
        transform: rotate(90deg);
    }

    .scribble-item .s-date {
        color: var(--faint);
        margin-right: 6px;
    }

    .scribble-item .s-sep {
        color: var(--rule);
        margin-right: 6px;
    }

    .scribble-item .s-title {
        color: var(--ink);
        border-bottom: 1px dotted var(--rule);
        padding: 0 2px;
        transition: background 0.15s ease, color 0.15s ease;
    }

    /* ASCII-cornered frame around expanded post body — also draggable */
    .ascii-frame {
        position: relative;
        border: 1px dashed var(--rule);
        padding: 22px 22px 14px 22px;
        margin: 14px 0 4px 24px;
        background: var(--bg);
        cursor: var(--cursor-move);
        user-select: none;            /* drag conflicts with text selection */
        touch-action: none;           /* let pointer events drive on touch */
        transform: translate(var(--dx, 0px), var(--dy, 0px)) rotate(var(--rot, 0deg));
        transition: box-shadow 0.2s ease;
    }

    /* lifted-paper feedback while being dragged */
    .ascii-frame.dragging {
        box-shadow: 4px 6px 0 var(--rule);
        z-index: 5;
    }

    /* links inside the frame keep the link cursor and stay selectable */
    .ascii-frame a {
        cursor: var(--cursor-link);
        user-select: text;
    }

    .ascii-frame .corner {
        position: absolute;
        color: var(--faint);
        background: var(--bg);
        line-height: 1;
        padding: 0 3px;
        font-size: 14px;
        user-select: none;
    }
    .ascii-frame .corner.tl { top: -8px; left: -6px; }
    .ascii-frame .corner.tr { top: -8px; right: -6px; }
    .ascii-frame .corner.bl { bottom: -8px; left: -6px; }
    .ascii-frame .corner.br { bottom: -8px; right: -6px; }

    .ascii-frame p { margin: 0 0 12px 0; }
    .ascii-frame p:last-child { margin-bottom: 0; }

    /* alternating static tilt direction per post — JS adds dx/dy on top */
    .scribble-item:nth-of-type(odd)  .ascii-frame { --rot: -0.5deg; transform-origin: 0%   0%; }
    .scribble-item:nth-of-type(even) .ascii-frame { --rot:  0.4deg; transform-origin: 100% 0%; }

    /* soft fade-in on open (only opacity, so it composes with the drag transform) */
    .scribble-item[open] .ascii-frame {
        animation: ascii-in 0.45s ease both;
    }

    @keyframes ascii-in {
        from { opacity: 0; }
        to   { opacity: 1; }
    }

    /* respect prefers-reduced-motion */
    @media (prefers-reduced-motion: reduce) {
        .scribble-item[open] .ascii-frame { animation: none; }
        .scribble-item .chev { transition: none; }
        .scribble-item:nth-of-type(odd)  .ascii-frame,
        .scribble-item:nth-of-type(even) .ascii-frame { --rot: 0deg; }
    }

    /* blinking caret */
    .blink::after {
        content: "_";
        animation: blink 1.1s steps(1) infinite;
        margin-left: 2px;
    }

    @keyframes blink {
        50% {
            opacity: 0;
        }
    }

    /* footer */
    footer {
        margin-top: 140px;
        padding-top: 18px;
        border-top: 1px dashed var(--rule);
        color: var(--faint);
        font-size: 12px;
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 12px;
    }

    /* margin rain */
    .rain {
        position: fixed;
        top: -40px;
        bottom: -40px;
        width: 56px;
        color: var(--rule);
        font-size: 12px;
        line-height: 1.5;
        pointer-events: none;
        z-index: 0;
        opacity: 0.55;
        overflow: hidden;
        white-space: pre;
        user-select: none;
        will-change: transform;
    }

    .rain.left {
        left: 0;
        padding-left: 14px;
    }

    .rain.right {
        right: 0;
        padding-right: 14px;
        text-align: right;
    }

    /* cursor trail */
    .trail {
        position: fixed;
        pointer-events: none;
        color: var(--ink);
        font-size: 13px;
        z-index: 9999;
        opacity: 0.55;
        transition: opacity 0.7s ease, transform 0.7s ease;
        user-select: none;
    }

    /* skewed marquee-ish status strip near top, very subtle */
    .strip {
        position: fixed;
        top: 14px;
        left: 0;
        right: 0;
        text-align: center;
        color: var(--faint);
        font-size: 11px;
        letter-spacing: 0.18em;
        z-index: 2;
        pointer-events: none;
    }

    /* theme toggle, top right */
    .theme-toggle {
        position: fixed;
        top: 12px;
        right: 14px;
        z-index: 5;
        font-family: inherit;
        font-size: 12px;
        color: var(--faint);
        background: transparent;
        border: none;
        padding: 6px 8px;
        text-transform: lowercase;
        letter-spacing: 0.1em;
        cursor: var(--cursor-link);
        user-select: none;
    }

    .theme-toggle b {
        color: var(--ink);
        font-weight: normal;
        border-bottom: 1px dotted var(--ink);
    }

    .theme-toggle .sep {
        color: var(--rule);
        margin: 0 4px;
    }

    @media (max-width: 720px) {

        .rain,
        .strip {
            display: none;
        }

        .wrap {
            padding: 36px 20px 100px;
        }

        header img {
            max-width: 300px;
        }
    }