:root {
    color-scheme: light dark;
    --bg: #ffffff;
    --fg: #1f2328;
    --dim: #59636e;
    --link: #0969da;
    --grid: rgba(31, 35, 40, 0.5);
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0d1117;
        --fg: #e6edf3;
        --dim: #848d97;
        --link: #2f81f7;
        --grid: rgba(230, 237, 243, 0.5);
    }
}

html {
    background: var(--bg);
}
body {
    background: color-mix(in srgb, var(--bg) 0%, transparent);
    color: var(--fg);
}
#bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}
/* forest.html is a full-screen canvas with no scrollable content. Lock the page
   (html AND body — touch-action doesn't inherit, and the finger lands on body
   since #bg is pointer-events:none) so a drag drives the focus instead of
   scrolling, pull-to-refreshing, or firing a touchcancel that aborts the swipe */
.forest-page,
.forest-page body {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
}
.forest-peek {
    display: block;
    height: 150px;
    margin: 0 0 1.8em;
    overflow: hidden;
    transition: filter 0.2s ease;
}
.forest-peek canvas {
    display: block;
    width: 100%;
    height: 100%;
    --step: 10px;
    -webkit-mask-image:
        linear-gradient(
            to right,
            rgba(0, 0, 0, 0) 0,
            rgba(0, 0, 0, 0.1) calc(var(--step) * 1),
            rgba(0, 0, 0, 0.4) calc(var(--step) * 2),
            rgba(0, 0, 0, 0.9) calc(var(--step) * 3),
            #000,
            rgba(0, 0, 0, 0.9) calc(100% - calc(var(--step) * 3)),
            rgba(0, 0, 0, 0.4) calc(100% - calc(var(--step) * 2)),
            rgba(0, 0, 0, 0.1) calc(100% - calc(var(--step) * 1)),
            rgba(0, 0, 0, 0)
        ),
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 0,
            rgba(0, 0, 0, 0.1) calc(var(--step) * 1),
            rgba(0, 0, 0, 0.4) calc(var(--step) * 2),
            rgba(0, 0, 0, 0.9) calc(var(--step) * 3),
            #000,
            rgba(0, 0, 0, 0.9) calc(100% - calc(var(--step) * 3)),
            rgba(0, 0, 0, 0.4) calc(100% - calc(var(--step) * 2)),
            rgba(0, 0, 0, 0.1) calc(100% - calc(var(--step) * 1)),
            rgba(0, 0, 0, 0)
        );
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(
            to right,
            rgba(0, 0, 0, 0) 0,
            rgba(0, 0, 0, 0.1) calc(var(--step) * 1),
            rgba(0, 0, 0, 0.4) calc(var(--step) * 2),
            rgba(0, 0, 0, 0.9) calc(var(--step) * 3),
            #000,
            rgba(0, 0, 0, 0.9) calc(100% - calc(var(--step) * 3)),
            rgba(0, 0, 0, 0.4) calc(100% - calc(var(--step) * 2)),
            rgba(0, 0, 0, 0.1) calc(100% - calc(var(--step) * 1)),
            rgba(0, 0, 0, 0)
        ),
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 0,
            rgba(0, 0, 0, 0.1) calc(var(--step) * 1),
            rgba(0, 0, 0, 0.4) calc(var(--step) * 2),
            rgba(0, 0, 0, 0.9) calc(var(--step) * 3),
            #000,
            rgba(0, 0, 0, 0.9) calc(100% - calc(var(--step) * 3)),
            rgba(0, 0, 0, 0.4) calc(100% - calc(var(--step) * 2)),
            rgba(0, 0, 0, 0.1) calc(100% - calc(var(--step) * 1)),
            rgba(0, 0, 0, 0)
        );
    mask-composite: intersect;
}
body {
    font:
        18px/1.6 -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        system-ui,
        sans-serif;
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 24px;
}
h1 {
    font-size: 1.8em;
    font-weight: 600;
    margin: 0 0 0.2em;
}
h2 {
    font-size: 1.2em;
    font-weight: 600;
    margin: 2em 0 0.6em;
}
p {
    margin: 0 0 1em;
}
a {
    color: var(--link);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
code {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 85%;
    color: var(--fg);
}
a code {
    color: inherit;
}
ul {
    padding-left: 1.6em;
    margin-bottom: 1em;
}
li {
    margin: 4px 0;
}
.meta {
    color: var(--dim);
    margin-bottom: 1.6em;
}
.links {
    margin-top: 2em;
    color: var(--dim);
    font-size: 15px;
}
.links a {
    margin-right: 1em;
}

/* cv.html */
h3 {
    font-size: 1em;
    font-weight: 600;
    margin: 1.4em 0 0.2em;
}
.date {
    color: var(--dim);
    font-size: 15px;
    margin-bottom: 6px;
}
.stack {
    color: var(--dim);
    font-size: 15px;
    margin-top: 6px;
}
.skill {
    margin-bottom: 6px;
    font-size: 16px;
}
.skill b {
    color: var(--dim);
    font-weight: 500;
}
.back {
    font-size: 15px;
    display: inline-block;
    margin-bottom: 1.5em;
}
details {
    margin: 0.2em 0 0;
}
details ul {
    margin-top: 0.4em;
    color: var(--fg);
}
summary {
    cursor: pointer;
    color: var(--dim);
    font-size: 15px;
    list-style: none;
    padding: 2px 0;
}
summary::-webkit-details-marker {
    display: none;
}
summary::before {
    content: "▸";
    display: inline-block;
    width: 1.1em;
}
details[open] > summary::before {
    content: "▾";
}
summary:hover {
    color: var(--fg);
}

/* forest.html — the watched walker's speech overlay (created in forest.3.js) */
.forest-speech {
    position: fixed;
    left: 0;
    top: 0;
    transform: translate(-50%, -100%);
    margin-top: -14px;
    max-width: min(60vw, 32em);
    text-align: center;
    color: var(--fg);
    font:
        italic 18px/1.45 -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        system-ui,
        sans-serif;
    text-shadow:
        0 0 6px var(--bg),
        0 1px 2px var(--bg);
    pointer-events: none;
    opacity: 0;
    z-index: 10;
}
