/* ═══════════════════════════════════════════════════════════════════
   THEMES — shared layer for club / pills / wall (loaded after page CSS)
   Each theme file sets the --th-* variables; this file maps them onto
   the site's existing tokens and components so every page follows.
   ═══════════════════════════════════════════════════════════════════ */
body.theme-on {
    --color-bg: var(--th-bg);
    --font-sans: var(--th-body);
    --font-designer: var(--th-display);
    --font-serif: var(--th-display);
    background: var(--th-bg) !important;
    background-image: none !important;
    color: var(--th-ink);
    font-family: var(--th-body);
}
body.theme-on .aurora-bg,
body.theme-on .bottom-gradient,
body.theme-on .ambient-light { display: none !important; }
body.theme-on ::selection { background: var(--th-accent); color: var(--th-accent-ink); }

/* ── Kill the "AI" ornaments everywhere ─────────────────────────── */
body.theme-on .yellow-underline,
body.theme-on .hero-pen-sparkle,
body.theme-on .hm-spark,
body.theme-on .shimmer-glow,
body.theme-on .shimmer-cut,
body.theme-on .shimmer-slide { display: none !important; }

/* Script words in headings become the theme display face */
body.theme-on .wk-script,
body.theme-on [class$="-h1-script"],
body.theme-on .font-designer {
    font-family: var(--th-display) !important;
    font-style: var(--th-script-style, normal);
    font-weight: var(--th-script-weight, 800);
    font-size: 1em !important;
    letter-spacing: var(--th-head-track, -0.02em);
    color: var(--th-script-color, inherit);
    text-transform: var(--th-script-case, none);
}

/* Big headings across pages */
body.theme-on h1,
body.theme-on h2 {
    font-family: var(--th-display);
    font-weight: var(--th-head-weight, 800);
    font-stretch: var(--th-head-stretch, 100%);
    letter-spacing: var(--th-head-track, -0.02em);
    text-transform: var(--th-head-case, none);
}
body.theme-on .wk-eyebrow { color: var(--th-mute); letter-spacing: .14em; }

/* ── Buttons ──────────────────────────────────────────────────── */
body.theme-on .shimmer-button {
    background: var(--th-btn-bg) !important;
    color: var(--th-btn-ink) !important;
    border: var(--th-btn-border, 0) !important;
    box-shadow: none !important;
    border-radius: var(--th-btn-radius, 999px) !important;
}
body.theme-on .shimmer-button * { color: inherit !important; }

/* ── Navbar ───────────────────────────────────────────────────── */
body.theme-on .nav-pill-group {
    background: var(--th-nav-bg) !important;
    border: var(--th-nav-border, 1px solid transparent) !important;
    box-shadow: var(--th-nav-shadow, none) !important;
    outline: 0 !important;
    backdrop-filter: blur(14px);
}
body.theme-on .nav-logo { border-right-color: var(--th-line); }
body.theme-on .nav-logo-text {
    font-family: var(--th-display) !important;
    font-weight: 800; font-style: normal; letter-spacing: -.02em;
    color: var(--th-nav-ink) !important; opacity: 1;
}
body.theme-on .nav-link { color: var(--th-nav-mute) !important; }
body.theme-on .nav-link:hover { color: var(--th-nav-ink) !important; }
body.theme-on .nav-link--active { color: var(--th-nav-active-ink) !important; }
body.theme-on .nav-link--active svg { color: inherit !important; filter: none !important; }
body.theme-on .nav-pill-indicator { background: var(--th-nav-active-bg) !important; box-shadow: none !important; border: 0 !important; }
body.theme-on .nav-hamburger { color: var(--th-nav-ink); }

/* ── Footer ───────────────────────────────────────────────────── */
body.theme-on .site-footer { background: var(--th-foot-bg); border-top: 1px solid var(--th-line); color: var(--th-foot-ink); }
body.theme-on .site-footer-name { font-family: var(--th-display) !important; font-weight: 800; font-style: normal; color: var(--th-foot-ink); }
body.theme-on .site-footer-role,
body.theme-on .site-footer-links a,
body.theme-on .site-footer-meta,
body.theme-on .site-footer-meta a { color: var(--th-foot-mute); }
body.theme-on .site-footer-links a:hover,
body.theme-on .site-footer-meta a:hover { color: var(--th-foot-ink); }

/* ── Work cards (works grid, case "more work", role pages) ────── */
body.theme-on .wk-card { border-radius: var(--th-card-radius) !important; }
body.theme-on .wk-chip { background: var(--th-chip-bg); color: var(--th-chip-ink); }
body.theme-on .wk-pill { border-radius: 999px; }
body.theme-on .wk-pill.is-active { background: var(--th-accent) !important; border-color: var(--th-accent) !important; color: var(--th-accent-ink) !important; }

/* ═══════════════════ Themed home pages: shared sections ═══════════ */
.th-sec { max-width: 1320px; margin: 0 auto; padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1.1rem, 4vw, 2.5rem) 0; }
.th-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.th-head h2 { font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: .95; margin: 0; }
.th-more, .th-link { font-weight: 700; font-size: .95rem; color: var(--th-ink); text-decoration: none; border-bottom: 2px solid var(--th-accent); padding-bottom: 2px; white-space: nowrap; }
.th-more:hover, .th-link:hover { opacity: .7; }
.th-btn { display: inline-flex; align-items: center; gap: .5rem; height: 3.4rem; padding: 0 1.8rem; border-radius: var(--th-btn-radius, 999px); background: var(--th-btn-bg); color: var(--th-btn-ink); border: var(--th-btn-border, 0); font-weight: 800; font-size: 1rem; text-decoration: none; transition: transform .2s; }
.th-btn:hover { transform: translateY(-2px); }

.th-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.75rem; }
.th-chips a { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1rem; border-radius: 999px; border: 1.5px solid var(--th-line-strong, var(--th-ink)); color: var(--th-ink); font-weight: 700; font-size: .88rem; text-decoration: none; transition: background .2s, color .2s; }
.th-chips a b { font-weight: 700; opacity: .5; font-size: .8em; }
.th-chips a:hover { background: var(--th-ink); color: var(--th-bg); }

/* Showcase tile */
.th-tile { position: relative; display: block; overflow: hidden; border-radius: var(--th-card-radius); background: var(--th-surface); text-decoration: none; isolation: isolate; }
.th-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.th-tile:hover img { transform: scale(1.04); }
.th-tile-cap { position: absolute; left: .7rem; bottom: .7rem; right: .7rem; display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; pointer-events: none; }
.th-tile-cap b { background: var(--th-cap-bg, #fff); color: var(--th-cap-ink, #111); font-size: .8rem; font-weight: 800; padding: .35rem .7rem; border-radius: 999px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-tile-cap small { background: var(--th-cap-bg, #fff); color: var(--th-cap-ink, #111); opacity: .9; font-size: .66rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; transform: translateY(6px); opacity: 0; transition: .25s; }
.th-tile:hover .th-tile-cap small { transform: none; opacity: 1; }

/* Systems */
.th-sys-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.th-sys-card { display: flex; flex-direction: column; gap: .5rem; padding: .9rem .9rem 1.3rem; border-radius: var(--th-card-radius); background: var(--th-surface); color: var(--th-ink); text-decoration: none; border: var(--th-card-border, 0); transition: transform .25s; }
.th-sys-card:hover { transform: translateY(-4px); }
.th-browser { display: block; border-radius: calc(var(--th-card-radius) * .6); overflow: hidden; background: #fff; border: 1px solid rgba(0,0,0,.08); margin-bottom: .5rem; }
.th-browser-bar { display: flex; gap: .3rem; padding: .5rem .6rem; background: #f3f2ef; }
.th-browser-bar i { width: .5rem; height: .5rem; border-radius: 50%; background: #d4d0ca; }
.th-browser img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.th-code { display: flex; align-items: flex-end; aspect-ratio: 16 / 10.9; border-radius: calc(var(--th-card-radius) * .6); padding: 1rem; margin-bottom: .5rem; background: var(--th-code-bg, #111318); color: var(--th-code-ink, #fcdd00); font: 700 1.4rem/1 ui-monospace, 'Cascadia Code', Consolas, monospace; }
.th-sys-tag { font: 700 .72rem ui-monospace, Consolas, monospace; color: var(--th-mute); padding: 0 .3rem; }
.th-sys-title { font-weight: 800; font-size: 1.15rem; line-height: 1.2; padding: 0 .3rem; }
.th-sys-text { color: var(--th-mute); font-size: .9rem; line-height: 1.5; padding: 0 .3rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Websites & apps */
.th-web-sites { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.9rem, 2vw, 1.4rem); }
.th-web-site { display: flex; flex-direction: column; gap: .25rem; color: var(--th-ink); text-decoration: none; }
.th-web-site .th-browser { margin-bottom: .55rem; transition: transform .3s; }
.th-web-site:hover .th-browser { transform: translateY(-4px); }
.th-web-site b { font-weight: 800; font-size: 1rem; }
.th-web-site small { color: var(--th-mute); font-size: .82rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.th-web-apps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(.9rem, 2vw, 1.6rem); margin-top: clamp(2rem, 4vw, 3rem); }
.th-web-app { display: flex; flex-direction: column; align-items: center; gap: .7rem; color: var(--th-ink); text-decoration: none; }
.th-phone { display: block; width: 100%; max-width: 12rem; aspect-ratio: 390 / 844; border-radius: 1.9rem; border: .45rem solid #111318; overflow: hidden; background: #111; box-shadow: 0 18px 40px -18px rgba(0,0,0,.45); transition: transform .3s; }
.th-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.th-web-app:hover .th-phone { transform: translateY(-6px) rotate(-1.5deg); }
.th-web-app b { font-weight: 800; font-size: .95rem; text-align: center; }

/* Experience */
.th-xp-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--th-ink); }
.th-xp-row { display: grid; grid-template-columns: 10rem minmax(0, 14rem) minmax(0, 13rem) minmax(0, 1fr); gap: .5rem 1.5rem; padding: 1.3rem 0; border-bottom: 1px solid var(--th-line); align-items: baseline; }
.th-xp-when { font-size: .85rem; color: var(--th-mute); font-variant-numeric: tabular-nums; }
.th-xp-when b { font-size: .68rem; font-weight: 800; text-transform: uppercase; background: var(--th-accent); color: var(--th-accent-ink); padding: .12rem .45rem; border-radius: 999px; margin-left: .3rem; }
.th-xp-co { font-family: var(--th-display); font-weight: 800; font-size: 1.3rem; line-height: 1.1; }
.th-xp-role { font-weight: 600; font-size: .9rem; color: var(--th-ink); }
.th-xp-line { color: var(--th-mute); font-size: .92rem; line-height: 1.55; }

/* Clients */
.th-cl-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0 2rem; border-top: 2px solid var(--th-ink); }
.th-cl-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--th-line); font-size: .95rem; }
.th-cl-list li span { color: var(--th-mute); text-align: right; font-size: .85rem; }

/* Closing CTA */
.th-cta { max-width: 1320px; margin: clamp(4rem, 9vw, 7rem) auto clamp(3rem, 6vw, 5rem); padding: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 5vw, 4rem); border-radius: var(--th-cta-radius, 2.5rem); background: var(--th-cta-bg); color: var(--th-cta-ink); display: grid; gap: 1.75rem; justify-items: start; }
.th-cta h2 { font-size: clamp(2.2rem, 6vw, 5rem); line-height: .95; margin: 0; max-width: 18ch; color: inherit; }
.th-cta h2 span { color: var(--th-cta-accent, var(--th-accent)); }
.th-cta-row { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.th-cta .th-btn--cta { background: var(--th-cta-btn-bg, var(--th-accent)); color: var(--th-cta-btn-ink, var(--th-accent-ink)); border: 0; }
.th-cta .th-link { color: inherit; }
.th-open { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; opacity: .8; margin: 0; }
.th-open i { width: .55rem; height: .55rem; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.25); }

@media (max-width: 900px) {
    .th-xp-row { grid-template-columns: 1fr; gap: .25rem; }
    .th-web-sites { grid-template-columns: 1fr 1fr; }
    .th-web-apps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .th-web-apps { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    body.theme-on *, body.theme-on *::before, body.theme-on *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Inline-styled bits on some pages (reviews heading highlighter) */
body.theme-on path[stroke="#FCDD00"][stroke-width="12"] { display: none; }
