/* About me: life outside work */

.me-intro {
    max-width: 760px;
    margin-bottom: 3rem;
    color: #d0d0d0;
    line-height: 1.75;
}

.me-intro p + p {
    margin-top: 1rem;
}

/* ---------- Segments: no frames, text alternates left / right ---------- */

.me-segment {
    position: relative;
    margin-bottom: 5rem;
}

.me-segment-body {
    position: relative;
    z-index: 1;
    max-width: 600px;
    color: #d0d0d0;
    line-height: 1.75;
}

.me-segment-body p + p {
    margin-top: 1rem;
}

.me-segment-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1.25rem;
    line-height: 1.3;
}

.me-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Space: text on the left, the star field fades out at its edges instead of ending on a frame */
.me-space {
    min-height: 460px;
    display: flex;
    align-items: center;
    padding: 3rem 0;
}

.me-space .me-canvas {
    -webkit-mask-image: radial-gradient(ellipse 70% 75% at 60% 50%, #000 45%, transparent 100%);
    mask-image: radial-gradient(ellipse 70% 75% at 60% 50%, #000 45%, transparent 100%);
}

.me-space .me-segment-body {
    text-shadow: 0 0 12px #000, 0 0 4px #000;
}

.me-hint {
    position: absolute;
    right: 0;
    bottom: 0.5rem;
    z-index: 1;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #4a4f54;
}

/* Stories: a small painting stage on the left, text on the right */
.me-stories {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: stretch;
}

.me-stage {
    position: relative;
    min-height: 300px;
    touch-action: pan-y;
    /* a faint warm glow so the canvas reads as a surface, not an empty gap */
    background: radial-gradient(ellipse 60% 55% at 50% 50%, rgba(241, 231, 208, 0.06), rgba(200, 60, 78, 0.025) 55%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 70%, transparent 100%);
    mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 70%, transparent 100%);
}

.me-stage-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: #4a4f54;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.me-stage.painting .me-stage-hint {
    opacity: 0;
}

.me-stories .me-segment-body {
    align-self: center;
}

/* Gravel: text on the left, photo on the right with a faint tyre track drawn over it */
.me-gravel-media .me-canvas {
    pointer-events: none;
}

.me-gravel {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 2.5rem;
    align-items: center;
}

.me-gravel-media {
    position: relative;
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
}

.me-gravel-media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* ---------- Custom cursors (fine pointers only, set by me.js) ---------- */

.me-cursors-on [data-cursor] {
    cursor: none;
}

.me-cursor {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 2000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    will-change: transform;
}

.me-cursor.visible {
    opacity: 1;
}

/* Brush (Clair Obscur): the tip is the hotspot, bottom-left of the box */
.me-cursor-brush svg {
    display: block;
    width: 32px;
    height: 32px;
    overflow: visible;
    filter: drop-shadow(0 0 1.5px #000) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
}

/* The black hole replaces the pointer in the space segment */
@media (hover: hover) and (pointer: fine) {
    .me-space {
        cursor: none;
    }
}

@media (max-width: 1000px) {
    .me-segment {
        margin-bottom: 3.5rem;
    }

    .me-space {
        min-height: 0;
        padding: 1.5rem 0;
    }

    .me-stories {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .me-stage {
        order: 2;
        min-height: 220px;
    }

    .me-gravel {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .me-hint {
        display: none;
    }
}
