/* ============================================================
   SHLO — main.css
   ============================================================
   Colour variables are all in :root — change them once here
   and they update everywhere on the site.
   ============================================================ */

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Design tokens ────────────────────────────────────────── */
:root {
    /* ─────────────────────────────────────────────────────
       YOUR COLOURS — edit these to change the whole site
       ───────────────────────────────────────────────────── */
    --col-bg:       #0f0f0f;   /* page background             */
    --col-bg-alt:   #131313;   /* slightly lighter sections   */
    --col-text:     #26b6eb;   /* body text, borders, nav     */
    --col-acc1:     #CA4ED4;   /* magenta — name, CTAs        */
    --col-acc2:     #F0890E;   /* orange  — links, secondary  */
    --col-acc3:     #4FE08A;   /* green   — status / accents  */
    --col-dim:      #1e5a70;   /* dimmed text, rules          */
    --col-border:   #1a3a4a;   /* box-drawing characters      */
    --col-invert:   #ffffff;   /* high-contrast vs the page bg (white on dark) */

    /* Easing + speeds for the smooth transitions across the site */
    --ease:   cubic-bezier(.22, 1, .36, 1);
    --speed:  .28s;

    /* ─────────────────────────────────────────────────────
       TYPOGRAPHY
       ───────────────────────────────────────────────────── */
    /* --font     → ASCII art, box-drawing frames, the STUDIO_HL block font.
       --font-body → readable text (paragraphs, nav, headings, buttons…).
       IBM Plex Mono is kept in the body stack so any glyph Courier Prime
       lacks (box-drawing, █) falls back cleanly instead of breaking. */
    --font:      'IBM Plex Mono', 'Courier New', monospace;
    --font-body: 'Courier Prime', 'IBM Plex Mono', 'Courier New', monospace;
    --fs-base:  clamp(11px, 1.3vw, 14px);
    --fs-sm:    0.85em;
    --fs-lg:    1.2em;
    --lh:       1.6;

    /* ─────────────────────────────────────────────────────
       SPACING & LAYOUT
       ───────────────────────────────────────────────────── */
    --sp-xs:   0.5rem;
    --sp-sm:   1rem;
    --sp-md:   2rem;
    --sp-lg:   4rem;
    --sp-xl:   6rem;
    --max-w:   1200px;
    --header-h: 5rem;
}

/* ── Light mode token overrides ───────────────────────────── */
/* Applied when JS sets data-theme="light" on <html>. All
   var() references elsewhere update automatically; only the
   hardcoded rgba() values in header + hero need extra rules. */
:root[data-theme="light"] {
    --col-bg:     #f0f4f6;
    --col-bg-alt: #e6ecee;
    --col-text:   #0a4a6e;
    --col-acc1:   #9020a8;
    --col-acc2:   #b85800;
    --col-acc3:   #1a7a40;
    --col-dim:    #4a7890;
    --col-border: #90b8cc;
    --col-invert: #15171c;   /* near-black on the light page */
}

:root[data-theme="light"] .shlo-header {
    background: rgba(240, 244, 246, 0.82);
}
:root[data-theme="light"] .shlo-header.is-scrolled {
    background: rgba(240, 244, 246, 0.96);
    box-shadow: 0 1px 0 var(--col-border), 0 10px 30px -18px rgba(0,0,0,.15);
}
:root[data-theme="light"] .shlo-mobile-menu {
    background: rgba(240, 244, 246, 0.97);
}
:root[data-theme="light"] .shlo-mobile-menu__list a {
    color: var(--col-text);
}

/* ── Smooth day/night cross-fade ──────────────────────────────
   .theme-anim is added to <html> by the toggle for the length of
   the fade, then removed — so it never interferes with the site's
   normal hover transitions. */
html.theme-anim,
html.theme-anim *,
html.theme-anim *::before,
html.theme-anim *::after {
    transition: background-color 0.5s ease,
                color            0.5s ease,
                border-color     0.5s ease,
                box-shadow       0.5s ease,
                opacity          0.5s ease !important;
}
/* …but never the live ASCII art — its per-cell colours are image
   data the scramble mutates constantly, so they must stay instant. */
html.theme-anim .shlo-hero__portrait-out,
html.theme-anim .shlo-hero__portrait-out span,
html.theme-anim .shlo-project__img-out,
html.theme-anim .shlo-project__img-out span,
html.theme-anim .shlo-blog__img-out,
html.theme-anim .shlo-blog__img-out span,
html.theme-anim .shlo-pgallery__img-out,
html.theme-anim .shlo-pgallery__img-out span {
    transition: none !important;
}

/* ── Base ─────────────────────────────────────────────────── */
html {
    font-size: var(--fs-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--col-bg);
    color: var(--col-text);
    line-height: var(--lh);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Keep everything made of box-drawing / block / ASCII-art characters on
   IBM Plex Mono. These mix glyphs (█▓▒ ═ │ ╒) whose widths must stay
   uniform, so they can't inherit Courier Prime from the body. */
.shlo-rule,
.shlo-corner,
.shlo-side,
.shlo-header__rule,
.shlo-header__corner,
.shlo-header__side,
.shlo-mobile-menu__rule,
.shlo-mobile-menu__corner,
.shlo-footer__rule,
.shlo-footer__corner,
.shlo-footer__side,
.shlo-hero__name,
.shlo-hero__bar,
.shlo-hero__rule,
.shlo-hero__portrait-out,
.shlo-project__img-out,
.shlo-blog__img-out,
.shlo-hero__role::after {
    font-family: var(--font);
}

/* ── Utility classes ──────────────────────────────────────── */
.shlo-acc1  { color: var(--col-acc1);   }
.shlo-acc2  { color: var(--col-acc2);   }
.shlo-acc3  { color: var(--col-acc3);   }
.shlo-text  { color: var(--col-text);   }
.shlo-dim   { color: var(--col-dim);    }

/* Hidden by the tag filter (and any other show/hide). */
.shlo-hidden { display: none !important; }

.shlo-sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ── Layout container ─────────────────────────────────────── */
.shlo-container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--sp-sm);
}

/* ── Shared box-drawing pieces ────────────────────────────── */
/* These classes are reused across header, footer,
   project cards, blog cards, current projects etc.          */

.shlo-corner { color: var(--col-acc1); flex-shrink: 0; }

.shlo-rule {
    flex: 1 1 0%;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    color: var(--col-border);
    display: block;
    line-height: 1;
}
.shlo-rule::before {
    content: '══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════';
}

.shlo-side { color: var(--col-border); flex-shrink: 0; }

/* ── Buttons ──────────────────────────────────────────────── */
.shlo-btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s, letter-spacing 0.15s;
}
.shlo-btn:hover        { opacity: 0.7; letter-spacing: 0.1em; }
.shlo-btn:focus-visible {
    outline: 2px solid var(--col-acc1);
    outline-offset: 3px;
}
.shlo-btn--acc1 { color: var(--col-acc1); }
.shlo-btn--acc2 { color: var(--col-acc2); }
.shlo-btn--text { color: var(--col-text); }

/* Social links carry their brand colour as an inline style (set in
   shlo_render_socials). inline-block keeps the Instagram gradient's
   background-clip:text bounded to the text. */
.shlo-social { display: inline-block; }

/* ── Links ────────────────────────────────────────────────── */
.shlo-link {
    color: var(--col-acc2);
    text-decoration: none;
    transition: opacity 0.15s;
}
.shlo-link:hover { opacity: 0.7; }

/* ── Section headings ─────────────────────────────────────── */
.shlo-section__heading {
    margin-bottom: var(--sp-md);
    overflow: hidden;
}

.shlo-heading-art {
    font-size: clamp(9px, 1.35vw, 17px);
    line-height: 1;
    white-space: pre;
    overflow: hidden;          /* shrunk to fit in JS — never scrolls */
    letter-spacing: 0;
}

/* ════════════════════════════════════════════════════════════
   HEADER
════════════════════════════════════════════════════════════ */
.shlo-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--col-bg);
    width: 100%;
}

/* Top border row: ╒══════════════════════════════════╕ */
.shlo-header__top,
.shlo-header__bottom {
    display: flex;
    align-items: center;
    width: 100%;
    overflow: hidden;
    flex-wrap: nowrap;
    min-width: 0;
}

.shlo-header__corner {
    color: var(--col-acc1);
    flex-shrink: 0;
    line-height: 1;
}

.shlo-header__rule {
    flex: 1 1 0%;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    color: var(--col-border);
    display: block;
    line-height: 1;
}
.shlo-header__rule::before {
    content: '══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════';
}

.shlo-header__side {
    color: var(--col-border);
    flex-shrink: 0;
}

/* Middle row: │  SHL⊙  [ HOME ] [ PORTFOLIO ] ...  │ */
.shlo-header__row {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: 0.85em var(--sp-xs);
    width: 100%;
}

/* Logo */
.shlo-header__logo {
    text-decoration: none;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
/* ASCII block-font logo — "SHL" + camera lens, filled in by
   renderAsciiLogo(). Kept on IBM Plex Mono so the block glyphs align. */
.shlo-logo {
    display: inline-block;
    font-family: var(--font);
    white-space: pre;
    line-height: 1;
    font-weight: 400;
    color: var(--col-text);
}
/* Header bar — sized so the art fits the row height. */
.shlo-header__logo .shlo-logo { font-size: clamp(4px, 0.7vw, 9px); }

/* Nav — centred between logo and toggle */
.shlo-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.shlo-nav__list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
}

/* ── Tag filter bar (replaces page nav) ───────────────────── */
.shlo-tagbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--sp-sm);
}
.shlo-tagbar__label {
    font-family: var(--font);
    font-size: 0.85em;
    letter-spacing: 0.06em;
    color: var(--col-dim);
    white-space: nowrap;
    align-self: center;
    opacity: 0.85;
}
.shlo-tag {
    font-family: var(--font);
    font-size: 1em;
    letter-spacing: 0.04em;
    color: var(--col-dim);
    background: transparent;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    padding: 0.15em 0.2em;
    transition: color 0.15s;
}
.shlo-tag__box { color: var(--col-dim); }
.shlo-tag:hover { color: var(--col-text); }
.shlo-tag[aria-pressed="true"]          { color: var(--col-text); }
.shlo-tag[aria-pressed="true"] .shlo-tag__box { color: var(--col-acc1); }
.shlo-tag[data-tag="all"][aria-pressed="true"] { color: var(--col-acc3); }
.shlo-tag[data-tag="all"][aria-pressed="true"] .shlo-tag__box { color: var(--col-acc3); }
.shlo-tag:focus-visible {
    outline: 2px solid var(--col-acc1);
    outline-offset: 2px;
}

/* Mobile menu version — stacked, larger */
.shlo-tagbar--mobile {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-xs);
}
.shlo-tagbar--mobile .shlo-tag { font-size: 1.1em; }
.shlo-tagbar--mobile .shlo-tagbar__label {
    align-self: flex-start;
    margin-bottom: var(--sp-xs);
}

/* ── Day / night ASCII toggle ─────────────────────────────── */
.shlo-theme-toggle {
    font-family: var(--font);
    font-size: 1.25em;
    background: transparent;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.15em 0;
    line-height: 1;
    letter-spacing: 0.02em;
    transition: opacity 0.15s;
}
.shlo-theme-toggle:hover        { opacity: 0.75; }
.shlo-theme-toggle:focus-visible {
    outline: 2px solid var(--col-acc1);
    outline-offset: 3px;
}
.shlo-toggle__sun    { color: #f5c030; }
.shlo-toggle__moon   { color: #4090e0; }
.shlo-toggle__switch { color: var(--col-dim); }
.shlo-toggle__handle { color: #e03030; }

.shlo-nav__link {
    color: var(--col-dim);
    text-decoration: none;
    font-size: 1em;
    letter-spacing: 0.06em;
    transition: color 0.15s;
    white-space: nowrap;
}
.shlo-nav__link:hover       { color: var(--col-text); }
.shlo-nav__link--active     { color: var(--col-acc1); font-weight: 700; }

/* Hamburger — hidden on desktop */
.shlo-header__hamburger {
    display: none;
    font-family: var(--font-body);
    font-size: 1em;
    color: var(--col-text);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.2em 0.3em;
    white-space: nowrap;
}
.shlo-header__hamburger:focus-visible {
    outline: 2px solid var(--col-acc1);
    outline-offset: 3px;
}

/* ── Mobile menu overlay ──────────────────────────────────── */
.shlo-mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.97);
    z-index: 200;
    align-items: center;
    justify-content: center;
}
.shlo-mobile-menu[aria-hidden="false"] {
    display: flex;
}

.shlo-mobile-menu__box {
    width: min(400px, 90vw);
}

.shlo-mobile-menu__top,
.shlo-mobile-menu__bottom {
    display: flex;
    align-items: center;
}

.shlo-mobile-menu__rule {
    flex: 1;
    overflow: hidden;
    color: var(--col-border);
}
.shlo-mobile-menu__rule::before {
    content: '══════════════════════════════════════════════════════════════════════════';
}

.shlo-mobile-menu__corner { color: var(--col-acc1); }

.shlo-mobile-menu__inner {
    border-left: 1px solid var(--col-border);
    border-right: 1px solid var(--col-border);
    padding: var(--sp-md) var(--sp-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-md);
}

.shlo-mobile-menu__logo .shlo-logo {
    font-size: 11px;
}

.shlo-mobile-menu__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-sm);
}
.shlo-mobile-menu__list a {
    color: var(--col-text);
    font-size: 1.1em;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: color 0.15s;
}
.shlo-mobile-menu__list a:hover { color: var(--col-acc1); }

.shlo-mobile-menu__close {
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    color: var(--col-dim);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.15s;
}
.shlo-mobile-menu__close:hover { color: var(--col-acc2); }

/* ════════════════════════════════════════════════════════════
   HERO
════════════════════════════════════════════════════════════ */
.shlo-hero {
    position: relative;
    width: 100%;
    /* Full viewport, pulled up under the translucent header so the
       portrait bleeds edge-to-edge behind it. 100svh = correct height
       on mobile browsers where the toolbar changes the viewport. */
    min-height: 100vh;
    min-height: 100svh;
    margin-top: calc(-1 * var(--header-h));
    display: flex;
    align-items: center;   /* title block sits around the vertical middle */
    overflow: hidden;
}

/* ASCII portrait background layer — fills the whole hero */
.shlo-hero__bg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Source image — hidden, used only by JS canvas */
.shlo-hero__portrait-src {
    display: none;
}

/* ASCII art output — scaled to COVER the full viewport.
   Sized by viewport width so it grows to fill wide screens; the hero's
   overflow:hidden crops any excess (same idea as background-size:cover). */
.shlo-hero__portrait-out {
    /* ~320 cols of monospace; ~0.52vw makes the row span the viewport
       width (320 cols × ~0.6em char width ≈ 192 × font-size = 100vw).
       Excess height is cropped by the hero's overflow:hidden = cover. */
    font-size: clamp(3px, 0.52vw, 20px);
    line-height: 1.05;
    white-space: pre;          /* keeps each row on its own line */
    letter-spacing: 0;
    opacity: 0.9;
    user-select: none;
    text-align: center;
    /* Isolate the grid's internal layout so cell churn during the scramble
       transition doesn't reflow the rest of the page. */
    contain: layout style;
    /* NOTE: do NOT set display:flex here — it collapses the newlines
       between the <span> cells and flattens the art to a single line.
       Centering is handled by the flex parent .shlo-hero__bg. */
}

/* Each hero cell is a fixed 1-character box. Because the box size never
   changes, swapping its character during the scramble repaints only that
   cell instead of re-laying-out the whole row — the key perf win. */
.shlo-hero__portrait-out span {
    display: inline-block;
    width: 1ch;
    vertical-align: top;
}

/* Dark gradient overlay — makes text readable over the portrait */
.shlo-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(15, 15, 15, 0.92) 0%,
        rgba(15, 15, 15, 0.55) 50%,
        rgba(15, 15, 15, 0.25) 100%
    );
}
/* Light-mode overlay sits on top and fades in — gradients can't be
   transitioned directly, so we cross-fade this layer's opacity instead. */
.shlo-hero__overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    background: linear-gradient(
        to top,
        rgba(240, 244, 246, 0.92) 0%,
        rgba(240, 244, 246, 0.45) 50%,
        rgba(240, 244, 246, 0.10) 100%
    );
}
:root[data-theme="light"] .shlo-hero__overlay::after { opacity: 1; }

/* Hero content — sits above the overlay */
.shlo-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: var(--sp-lg) var(--sp-md) var(--sp-lg);
    transform: translateY(6vh);   /* sit a little below centre */
}

/* D2 block font name */
.shlo-hero__name {
    font-size: clamp(8px, 1.25vw, 16px);
    line-height: 1.2;
    white-space: pre;
    overflow: hidden;          /* no scrollbar on the name */
    margin-bottom: var(--sp-xs);
}

/* Framing lines built from ASCII characters. Their length is set in JS
   (renderHeroRules) to sit a touch wider than the text they bracket.
   '=' reads as a heavy double rule for the top/bottom bars. */
.shlo-hero__bar {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    line-height: 1;
    color: var(--col-text);
    font-weight: 700;
}
.shlo-hero__bar--top    { margin-bottom: var(--sp-sm); }
.shlo-hero__bar--bottom { margin-top: var(--sp-sm); }

/* Lighter '-' divider between the title and the byline. */
.shlo-hero__rule {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    line-height: 1;
    color: var(--col-text);
    margin: var(--sp-xs) 0;
}

/* Name + cycling role line */
.shlo-hero__byline {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.3em;
    font-size: var(--fs-lg);
    margin-top: var(--sp-xs);
}

.shlo-hero__name-text {
    color: var(--col-text);
    font-weight: 700;
}

.shlo-hero__sep {
    color: var(--col-dim);
}

.shlo-hero__role {
    color: var(--col-acc2);
    font-weight: 700;
    min-width: 2ch;
}

/* Blinking block cursor on the typed role */
.shlo-hero__role::after {
    content: '█';
    color: var(--col-acc1);
    animation: shlo-blink 1s step-end infinite;
}
@keyframes shlo-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ════════════════════════════════════════════════════════════
   SECTIONS
════════════════════════════════════════════════════════════ */
.shlo-section {
    padding: var(--sp-xl) 0;
}
.shlo-section--alt {
    background: var(--col-bg-alt);
}

/* ════════════════════════════════════════════════════════════
   ABOUT
════════════════════════════════════════════════════════════ */
.shlo-about {
    display: flex;
    gap: var(--sp-lg);
    align-items: flex-start;
}

/* Left column: ASCII portrait */
.shlo-about__img-wrap {
    flex-shrink: 0;
}

.shlo-about__img-src { display: none; }

.shlo-about__img-out {
    font-size: clamp(5px, 0.6vw, 8px);
    line-height: 1.05;
    white-space: pre;
    letter-spacing: 0;
    overflow-x: hidden;
    user-select: none;
}

/* Right column: box + bio + socials */
.shlo-about__content {
    flex: 1;
    min-width: 0;
}

.shlo-about__top,
.shlo-about__bottom {
    display: flex;
    align-items: center;
}

.shlo-about__row {
    display: flex;
    align-items: stretch;
}

.shlo-about__inner {
    flex: 1;
    padding: var(--sp-md);
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
}

.shlo-about__bio {
    font-size: var(--fs-base);
    line-height: 1.9;
    color: var(--col-dim);
}

.shlo-about__socials {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-sm);
}

/* scroll-margin so the sticky header clears the section */
#about { scroll-margin-top: 5.5rem; }

/* ════════════════════════════════════════════════════════════
   PROJECT CARDS
════════════════════════════════════════════════════════════ */
/* Full-bleed, horizontally-scrolling portfolio carousel.
   The strip breaks out of the centred container to span the viewport;
   the JS (initPortfolioCarousel) auto-scrolls it and adds grab/spin. */
.shlo-projects {
    width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
    overflow-x: auto;          /* native scroll if JS is off / reduced-motion */
    overflow-y: hidden;
}
.shlo-projects__track {
    display: flex;
    gap: var(--sp-lg);         /* clear spacing between project cards */
    width: max-content;
    padding: var(--sp-xs) var(--sp-md);
    cursor: grab;
    user-select: none;
    touch-action: pan-y;       /* keep vertical page scroll on touch */
    will-change: transform;
}
.shlo-projects__track.is-grabbing { cursor: grabbing; }
.shlo-project {
    flex: 0 0 auto;
    width: min(82vw, 360px);
    min-width: 0;              /* don't let the wide ASCII blow the card wider */
}

.shlo-project__top,
.shlo-project__bottom {
    display: flex;
    align-items: center;
}

.shlo-project__body {
    display: flex;
    align-items: stretch;
    min-width: 0;
}

.shlo-project__inner {
    flex: 1;
    min-width: 0;              /* allow the ASCII to clip rather than stretch the card */
    padding: var(--sp-sm);
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
    border-top: none;
    border-bottom: none;
}

.shlo-project__title {
    font-size: 1em;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--col-text);
}
.shlo-project__title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}
.shlo-project__title-link:hover { color: var(--col-acc1); }

.shlo-project__divider {
    overflow: hidden;
    white-space: nowrap;
}
.shlo-project__divider::before {
    content: '────────────────────────────────────────────────────────────────────────────────────────────';
}

/* Media wrapper — lets the real photo cross-fade over the ASCII. */
/* ASCII art is now drawn to a single <canvas> per image (lazy-painted).
   It scales to its container; aspect-ratio (set inline) holds its box
   even after the bitmap is freed while off-screen. */
.shlo-ascii {
    display: block;
    width: 100%;
    height: auto;
}

.shlo-project__media {
    position: relative;
    min-width: 0;
}

/* Source image — hidden, used only as the canvas source… */
.shlo-project__img-src {
    display: none;
}
/* …unless the project allows the photo reveal, where it becomes a
   fade-in layer sitting exactly over the ASCII output. */
.shlo-project--revealable .shlo-project__img-src {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
.shlo-project--revealable.is-revealed .shlo-project__img-src { opacity: 1; }
.shlo-project--revealable.is-revealed .shlo-project__img-out { opacity: 0; }

/* Small box under the image that toggles the reveal. */
.shlo-project__reveal {
    align-self: flex-start;
    margin-top: var(--sp-xs);
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--col-dim);
    background: transparent;
    border: 1px solid var(--col-border);
    padding: 0.2em 0.6em;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.shlo-project__reveal:hover { color: var(--col-text); border-color: var(--col-dim); }
.shlo-project--revealable.is-revealed .shlo-project__reveal {
    color: var(--col-acc1);
    border-color: var(--col-acc1);
}

/* ASCII image output — sized so ~100 cols span the card width.
   (100 cols × ~0.6em char ≈ 60em = card; the clamp caps it on desktop
   where the card is fixed at 360px, and tracks the card on narrower
   screens where it is 82vw.) */
.shlo-project__img-out {
    font-size: clamp(2.5px, 1.15vw, 5px);
    line-height: 1.05;
    white-space: pre;
    overflow: hidden;
    max-width: 100%;
    letter-spacing: 0;
    text-align: center;
    min-height: 5em;
    transition: opacity 0.5s ease;
}

.shlo-project__desc  { font-size: var(--fs-sm); line-height: 1.7; }
.shlo-project__stack { font-size: var(--fs-sm); }

.shlo-project__actions {
    display: flex;
    gap: var(--sp-sm);
    margin-top: var(--sp-xs);
    flex-wrap: wrap;
}

/* ════════════════════════════════════════════════════════════
   SINGLE PROJECT PAGE
════════════════════════════════════════════════════════════ */
.shlo-single__back { display: inline-block; margin-bottom: var(--sp-md); }

.shlo-single__top,
.shlo-single__bottom {
    display: flex;
    align-items: center;
}
.shlo-single__body {
    display: flex;
    align-items: stretch;
    min-width: 0;
}
.shlo-single__inner {
    flex: 1;
    min-width: 0;
    padding: var(--sp-md);
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
}

.shlo-single__title {
    font-size: var(--fs-lg);
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--col-text);
}
.shlo-single__stack { font-size: var(--fs-sm); }

.shlo-single__content { line-height: 1.8; }
.shlo-single__content p { margin-bottom: var(--sp-sm); }

/* Project name as block-ASCII art */
.shlo-project-page__head { margin-bottom: var(--sp-md); }
.shlo-project-page__title {
    font-size: clamp(10px, 2.2vw, 26px);
    color: var(--col-text);
    margin-bottom: var(--sp-sm);
}

/* Moving image carousel along the top (full-bleed). */
.shlo-pgallery {
    width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
    overflow-x: auto;          /* native scroll if JS is off / reduced-motion */
    overflow-y: hidden;
    margin-bottom: var(--sp-lg);
}
.shlo-pgallery__track {
    display: flex;
    gap: var(--sp-md);
    width: max-content;
    padding: var(--sp-xs) var(--sp-md);
    cursor: grab;
    user-select: none;
    touch-action: pan-y;
    will-change: transform;
}
.shlo-pgallery__track.is-grabbing { cursor: grabbing; }

.shlo-pgallery__item {
    flex: 0 0 auto;
    width: min(86vw, 420px);
    min-width: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
}
.shlo-pgallery__media { position: relative; min-width: 0; }

/* The real photo, layered over the ASCII, fading in on reveal. */
.shlo-pgallery__img-src {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
.shlo-pgallery__item.is-revealed .shlo-pgallery__img-src { opacity: 1; }
.shlo-pgallery__item.is-revealed .shlo-pgallery__img-out { opacity: 0; }

.shlo-pgallery__img-out {
    font-family: var(--font);
    font-size: clamp(3px, 1.1vw, 6px);
    line-height: 1.05;
    white-space: pre;
    overflow: hidden;
    max-width: 100%;
    text-align: center;
    min-height: 6em;
    transition: opacity 0.5s ease;
}

.shlo-pgallery__reveal {
    align-self: flex-start;
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--col-dim);
    background: transparent;
    border: 1px solid var(--col-border);
    padding: 0.2em 0.6em;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.shlo-pgallery__reveal:hover { color: var(--col-text); border-color: var(--col-dim); }
.shlo-pgallery__item.is-revealed .shlo-pgallery__reveal {
    color: var(--col-acc1);
    border-color: var(--col-acc1);
}

/* ════════════════════════════════════════════════════════════
   SINGLE PROJECT PAGE
════════════════════════════════════════════════════════════ */

/* Page wrapper */
.shlo-project-page { padding: var(--sp-lg) 0 var(--sp-xl); }

/* Back links */
.shlo-sp__back-top { display: inline-block; margin-bottom: var(--sp-md); }
.shlo-sp__back      { margin-top: var(--sp-xl); padding-top: var(--sp-md); border-top: 1px solid var(--col-border); }

/* Heading area */
.shlo-sp__head { margin-bottom: var(--sp-md); }

.shlo-sp__title-art {
    font-size: clamp(5px, 0.85vw, 13px);
    margin-bottom: var(--sp-sm);
}

.shlo-sp__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-sm);
}

.shlo-sp__stack { font-size: var(--fs-sm); }
.shlo-sp__actions { display: flex; gap: var(--sp-sm); flex-wrap: wrap; }

/* ── Prose content ─────────────────────────────────────── */
.shlo-sp__content {
    max-width: 72ch;
    margin: var(--sp-lg) 0;
    color: var(--col-dim);
    line-height: 1.85;
    font-size: var(--fs-base);
}
.shlo-sp__content p   { margin-bottom: 1.4em; }
.shlo-sp__content h2,
.shlo-sp__content h3  { color: var(--col-text); margin: 1.5em 0 0.5em; letter-spacing: 0.06em; }
.shlo-sp__content a   { color: var(--col-acc2); text-decoration: none; }
.shlo-sp__content a:hover { opacity: 0.75; }

/* ── Inline image break ────────────────────────────────── */
.shlo-sp__inline-img { margin: var(--sp-lg) 0; }

.shlo-sp__il-top,
.shlo-sp__il-bottom { display: flex; align-items: center; }

.shlo-sp__il-row    { display: flex; align-items: stretch; }

.shlo-sp__il-media  { flex: 1; overflow: hidden; }

/* Hidden src + canvas output */
.shlo-sp__inline-img-src { display: none; }
.shlo-sp__inline-img-out {
    width: 100%;
    display: block;
    overflow-x: auto;
}
.shlo-sp__inline-img-out canvas { width: 100%; height: auto; }

/* ════════════════════════════════════════════════════════════
   CURRENT PROJECTS
════════════════════════════════════════════════════════════ */
.shlo-current {
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
}

.shlo-current__top,
.shlo-current__bottom {
    display: flex;
    align-items: center;
}

.shlo-current__row {
    display: flex;
    align-items: stretch;
}

.shlo-current__inner {
    flex: 1;
    padding: var(--sp-sm) var(--sp-md);
    display: flex;
    flex-direction: column;
    gap: 0.3em;
}

.shlo-current__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--sp-sm);
}

.shlo-current__title {
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--col-text);
}

.shlo-current__status {
    font-size: var(--fs-sm);
    font-weight: 700;
    letter-spacing: 0.06em;
}

.shlo-current__desc {
    font-size: var(--fs-sm);
    line-height: 1.7;
}

/* ════════════════════════════════════════════════════════════
   BLOG
════════════════════════════════════════════════════════════ */
.shlo-blog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--sp-md);
}

.shlo-blog__top,
.shlo-blog__bottom {
    display: flex;
    align-items: center;
}

.shlo-blog__row {
    display: flex;
    align-items: stretch;
    min-width: 0;
}

.shlo-blog__inner {
    flex: 1;
    min-width: 0;
    padding: var(--sp-sm);
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
}

.shlo-blog__date {
    font-size: var(--fs-sm);
}

.shlo-blog__title {
    font-size: 1em;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* Blog featured image → ASCII (hidden source + output grid) */
.shlo-blog__img-src { display: none; }
.shlo-blog__img-out {
    font-size: clamp(2.5px, 1.15vw, 5px);
    line-height: 1.05;
    white-space: pre;
    overflow: hidden;
    max-width: 100%;
    letter-spacing: 0;
    text-align: center;
    margin: var(--sp-xs) 0;
}

.shlo-blog__excerpt {
    font-size: var(--fs-sm);
    line-height: 1.7;
    flex: 1;
}

.shlo-blog__none {
    flex: 1;
    padding: var(--sp-sm) var(--sp-md);
    font-size: var(--fs-sm);
}

/* ════════════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════════════ */
.shlo-footer {
    margin-top: var(--sp-xl);
}

.shlo-footer__shade {
    overflow: hidden;
    white-space: nowrap;
    color: var(--col-border);
    font-size: 0.85em;
    line-height: 1.2;
    user-select: none;
}
.shlo-footer__shade::before {
    content: '░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░';
}

.shlo-footer__top,
.shlo-footer__bottom {
    display: flex;
    align-items: center;
    width: 100%;
}

.shlo-footer__rule {
    flex: 1;
    overflow: hidden;
    color: var(--col-border);
}
.shlo-footer__rule::before {
    content: '══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════';
}

.shlo-footer__corner { color: var(--col-acc1); }
.shlo-footer__side   { color: var(--col-border); flex-shrink: 0; }

.shlo-footer__row {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: 0.6em var(--sp-xs);
    width: 100%;
}

.shlo-footer__left {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    flex-wrap: wrap;
}

.shlo-footer__logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}
.shlo-footer__logo .shlo-logo { font-size: 6px; }

.shlo-footer__credit {
    font-size: var(--fs-sm);
    color: var(--col-dim);
}

.shlo-footer__links {
    display: flex;
    gap: var(--sp-sm);
    margin-left: auto;
    flex-wrap: wrap;
}

.shlo-footer__link {
    font-size: var(--fs-sm);
    text-decoration: none;
    transition: opacity 0.15s;
    white-space: nowrap;
}
.shlo-footer__link:hover        { opacity: 0.7; }
.shlo-footer__link--acc1        { color: var(--col-acc1); }
.shlo-footer__link--acc2        { color: var(--col-acc2); }
.shlo-footer__link--text        { color: var(--col-text); }

/* ════════════════════════════════════════════════════════════
   FALLBACK PAGE (index.php)
════════════════════════════════════════════════════════════ */
.shlo-main--fallback {
    padding: var(--sp-xl) 0;
}

.shlo-fallback__box {
    color: var(--col-acc1);
    margin-bottom: var(--sp-md);
    font-size: 0.9em;
}

.shlo-fallback__content {
    color: var(--col-text);
    line-height: var(--lh);
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 900px) {
    .shlo-hero__name {
        font-size: clamp(5px, 1.6vw, 10px);
    }
    .shlo-projects {
        grid-template-columns: 1fr 1fr;
    }
    .shlo-blog {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile */
@media (max-width: 600px) {
    :root {
        --fs-base: 11px;
    }

    /* Show hamburger, hide desktop nav */
    .shlo-header__hamburger { display: block; }
    .shlo-nav               { display: none;  }

    .shlo-hero {
        min-height: 100vh;
        min-height: 100svh;
        align-items: center;
    }

    .shlo-hero__name {
        font-size: clamp(6px, 3vw, 12px);
    }

    .shlo-hero__byline {
        font-size: 1em;
        flex-direction: column;
        gap: 0.1em;
    }

    .shlo-hero__content {
        padding: var(--sp-md) var(--sp-sm);
    }

    .shlo-about {
        flex-direction: column;
    }
    .shlo-about__img-out {
        font-size: clamp(4px, 1.1vw, 7px);
    }

    .shlo-projects { grid-template-columns: 1fr; }
    .shlo-blog     { grid-template-columns: 1fr; }

    .shlo-current__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .shlo-footer__row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--sp-xs);
        padding: var(--sp-sm) var(--sp-xs);
    }

    .shlo-footer__links {
        margin-left: 0;
    }
}

/* ── Focus styles ─────────────────────────────────────────── */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--col-acc1);
    outline-offset: 3px;
}

/* ── Scrollbar theming (webkit) ───────────────────────────── */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--col-bg); }
::-webkit-scrollbar-thumb { background: var(--col-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--col-dim); }

/* ════════════════════════════════════════════════════════════
   POLISH — smooth transitions, reveals & hover motion
   (all motion is disabled under prefers-reduced-motion below)
════════════════════════════════════════════════════════════ */

::selection { background: var(--col-acc1); color: var(--col-bg); }

/* Anchor scrolling clears the sticky header */
#portfolio, #projects, #blog { scroll-margin-top: 5.5rem; }

/* ── Header: subtle lift once you scroll ──────────────────── */
.shlo-header {
    transition: background var(--speed) var(--ease),
                box-shadow var(--speed) var(--ease);
    background: rgba(15, 15, 15, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.shlo-header.is-scrolled {
    background: rgba(15, 15, 15, 0.94);
    box-shadow: 0 1px 0 var(--col-border), 0 10px 30px -18px #000;
}

/* ── Logo: gently pulsing lens ────────────────────────────── */
.shlo-header__logo, .shlo-footer__logo { transition: transform var(--speed) var(--ease); }
.shlo-header__logo:hover, .shlo-footer__logo:hover { transform: translateY(-1px); }
.shlo-logo {
    animation: shlo-pulse 2.8s ease-in-out infinite;
    transform-origin: center;
}
@keyframes shlo-pulse {
    0%, 100% { opacity: .85; text-shadow: 0 0 0 transparent; }
    50%      { opacity: 1;   text-shadow: 0 0 8px currentColor; }
}

/* ── Nav links: smooth colour + lift ──────────────────────── */
.shlo-nav__link {
    transition: color var(--speed) var(--ease),
                letter-spacing var(--speed) var(--ease),
                transform var(--speed) var(--ease);
    display: inline-block;
}
.shlo-nav__link:hover {
    color: var(--col-text);
    letter-spacing: 0.12em;
    transform: translateY(-1px);
}
.shlo-nav__bracket { transition: color var(--speed) var(--ease); color: var(--col-dim); }
.shlo-nav__link:hover .shlo-nav__bracket { color: var(--col-acc1); }

/* ── Buttons: glow + lift ─────────────────────────────────── */
.shlo-btn {
    position: relative;
    padding: 0.25em 0.1em;
    transition: color var(--speed) var(--ease),
                letter-spacing var(--speed) var(--ease),
                transform var(--speed) var(--ease),
                text-shadow var(--speed) var(--ease);
}
.shlo-btn:hover {
    transform: translateY(-2px);
    letter-spacing: 0.12em;
    opacity: 1;
}
.shlo-btn--acc1:hover { text-shadow: 0 0 12px var(--col-acc1); }
.shlo-btn--acc2:hover { text-shadow: 0 0 12px var(--col-acc2); }
.shlo-btn--text:hover { text-shadow: 0 0 12px var(--col-text); color: var(--col-acc3); }

/* ── Links: glow on hover ─────────────────────────────────── */
.shlo-link {
    transition: color var(--speed) var(--ease), text-shadow var(--speed) var(--ease);
}
.shlo-link:hover { opacity: 1; text-shadow: 0 0 10px var(--col-acc2); }

/* ── Hero: ANSI-shadow block name ─────────────────────────── */
.shlo-hero__name {
    /* tight line-height so the █ / ║ rows connect vertically */
    line-height: 1;
    text-shadow: 0 0 18px rgba(38, 182, 235, 0.25);
    transition: opacity .8s ease;
}
.shlo-hero__portrait-out {
    transition: opacity 1.2s ease;
    animation: shlo-fade-in 1.2s ease both;
}
@keyframes shlo-fade-in { from { opacity: 0; } to { opacity: .9; } }

/* ── Cards: lift + frame glow on hover ────────────────────── */
.shlo-project, .shlo-current__item, .shlo-blog__item {
    transition: transform var(--speed) var(--ease), filter var(--speed) var(--ease);
}
.shlo-project:hover, .shlo-current__item:hover, .shlo-blog__item:hover {
    transform: translateY(-4px);
    filter: drop-shadow(0 14px 24px rgba(0,0,0,.45));
}
.shlo-project .shlo-corner,
.shlo-current__item .shlo-corner,
.shlo-blog__item .shlo-corner { transition: color var(--speed) var(--ease),
                                            text-shadow var(--speed) var(--ease); }
.shlo-project:hover .shlo-corner,
.shlo-current__item:hover .shlo-corner,
.shlo-blog__item:hover .shlo-corner {
    color: var(--col-acc2);
    text-shadow: 0 0 8px var(--col-acc2);
}

/* Status pill: green option (front-page can use status_colour 'acc3') */
.shlo-current__status.shlo-acc3 { color: var(--col-acc3); }

/* ── Scroll reveal (JS adds .shlo-reveal then .is-visible) ─── */
.shlo-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
    will-change: opacity, transform;
}
.shlo-reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* ── Respect reduced-motion: kill all of the above motion ─── */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .shlo-reveal { opacity: 1; transform: none; }
}
