/* ============================================================
   Aleksa Ivanovic — portfolio
   1. Tokens & themes      5. Bento grid & cards
   2. Base & a11y          6. Panels (sheets)
   3. Cursor               7. Ask / Preferences
   4. Nav & filters        8. Radio, lightbox, footer, 404
   ============================================================ */

/* ── 1. TOKENS ───────────────────────────────────────────── */
:root {
    --bg:        #F1F0ED;
    --bg-2:      #E8E6E1;
    --card:      #FFFFFF;
    --card-2:    #FAFAF8;
    --ink:       #121214;
    --ink-2:     #6A6A72;
    --ink-3:     #9B9BA2;
    --line:      #E5E3DE;
    --accent:    #C42F18;
    --accent-sf: #FBEDEA;
    --ok:        #1F8A52;
    --shadow:    0 1px 2px rgba(18,18,20,.05), 0 10px 28px rgba(18,18,20,.07);
    --shadow-lg: 0 2px 6px rgba(18,18,20,.06), 0 30px 70px rgba(18,18,20,.16);

    /* Apple system fonts: nothing to download, and the rounded cut on Apple devices */
    --sans:  -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, sans-serif;
    --round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", system-ui, Roboto, sans-serif;
    --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    --r:     22px;   /* card radius */
    --r-sm:  14px;
    --r-pill:999px;
    --gap:   14px;
    --pad:   clamp(14px, 3vw, 28px);
    --max:   1240px;
    --nav-h: 60px;
    --ease:  cubic-bezier(.22,.9,.26,1);
    --dur:   .42s;
}

html[data-theme="dark"] {
    --bg:        #0B0B0D;
    --bg-2:      #131316;
    --card:      #17171A;
    --card-2:    #1D1D21;
    --ink:       #F3F2EF;
    --ink-2:     #9D9DA6;
    --ink-3:     #6E6E77;
    --line:      #2A2A2F;
    --accent:    #FF6A4D;
    --accent-sf: #2A1612;
    --ok:        #3FD08A;
    --shadow:    0 1px 2px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.4);
    --shadow-lg: 0 2px 8px rgba(0,0,0,.5), 0 36px 80px rgba(0,0,0,.6);
}

/* High-contrast preference */
html[data-contrast="high"] {
    --ink-2: var(--ink);
    --ink-3: var(--ink);
    --line:  var(--ink);
}
html[data-contrast="high"] .card { border-width: 2px; }

/* Text size preference */
html[data-size="large"]  { font-size: 112.5%; }
html[data-size="larger"] { font-size: 125%; }

/* Motion preference */
html[data-motion="reduced"] *,
html[data-motion="reduced"] *::before,
html[data-motion="reduced"] *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
}

/* ── 2. BASE ─────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--nav-h) + 56px);
    background: var(--bg);
}
html[data-scroll="smooth"] { scroll-behavior: smooth; }
html.is-locked { overflow: hidden; }

body {
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color .3s var(--ease), color .3s var(--ease);
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
html[data-underline="on"] .sheet-body a:not(.btn):not(.chip) { text-decoration: underline; text-underline-offset: 3px; }
button, input, textarea { font: inherit; color: inherit; background: none; border: 0; }
::selection { background: var(--accent); color: #fff; }

h1, h2, h3, h4, .num, .round { font-family: var(--round); letter-spacing: -.022em; }
h1, h2, h3 { font-weight: 700; line-height: 1.08; }

.mono { font-family: var(--mono); font-size: .72rem; letter-spacing: .02em; text-transform: uppercase; }
.muted { color: var(--ink-2); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip {
    position: fixed; top: 10px; left: 10px; z-index: 300;
    padding: 10px 16px; background: var(--ink); color: var(--bg);
    border-radius: var(--r-pill); font-weight: 600;
    transform: translateY(-200%);
}
.skip:focus { transform: none; }

.sr {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* Shared button */
.btn {
    display: inline-flex; align-items: center; gap: .5em;
    padding: .62em 1.15em; border-radius: var(--r-pill);
    background: var(--ink); color: var(--bg);
    font-family: var(--round); font-weight: 600; font-size: .92rem;
    cursor: pointer; white-space: nowrap;
    transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); opacity: .9; }
.btn:active { transform: translateY(0) scale(.98); }
.btn-line { background: none; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-line:hover { box-shadow: inset 0 0 0 1.5px var(--ink); opacity: 1; }
.btn .ic { width: 1.05em; height: 1.05em; flex: none; }

/* ── 3. CURSOR ───────────────────────────────────────────── */
.cursor {
    position: fixed; top: 0; left: 0; z-index: 400;
    pointer-events: none; opacity: 0;
    transform: translate3d(-100px, -100px, 0);
    transition: opacity .25s var(--ease);
    mix-blend-mode: normal;
}
.cursor-ring {
    position: absolute; top: 50%; left: 50%;
    width: 26px; height: 26px; margin: -13px 0 0 -13px;
    border: 1.5px solid var(--ink); border-radius: 50%;
    transition: width .25s var(--ease), height .25s var(--ease),
                margin .25s var(--ease), background-color .25s var(--ease),
                border-color .25s var(--ease);
}
.cursor-dot {
    position: absolute; top: 50%; left: 50%;
    width: 4px; height: 4px; margin: -2px 0 0 -2px;
    background: var(--ink); border-radius: 50%;
    transition: opacity .2s var(--ease);
}
.cursor-label {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(.8);
    font-family: var(--round); font-weight: 600; font-size: 12px;
    letter-spacing: -.01em; white-space: nowrap; color: var(--bg);
    opacity: 0; transition: opacity .2s var(--ease), transform .25s var(--ease);
}
.cursor.is-on { opacity: 1; }
.cursor.is-cue .cursor-ring {
    width: var(--cw, 86px); height: 34px; margin: -17px 0 0 calc(var(--cw, 86px) / -2);
    border-radius: var(--r-pill); background: var(--ink); border-color: var(--ink);
}
.cursor.is-cue .cursor-dot   { opacity: 0; }
.cursor.is-cue .cursor-label { opacity: 1; transform: translate(-50%, -50%) scale(1); }
html[data-cursor="custom"] body.has-cursor,
html[data-cursor="custom"] body.has-cursor * { cursor: none !important; }

/* ── 4. NAV ──────────────────────────────────────────────── */
.nav {
    position: sticky; top: 0; z-index: 90;
    display: flex; align-items: center;
    padding: 9px 0;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.nav-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 12px;
    width: 100%;
}
.nav-name {
    display: flex; align-items: center; gap: 9px;
    grid-column: 1; justify-self: start; min-width: 0;
    font-family: var(--round); font-weight: 700; font-size: .95rem;
    letter-spacing: -.02em;
}
.nav-role {
    font-weight: 350;
    letter-spacing: -.005em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-actions { display: flex; align-items: center; gap: 8px; grid-column: 3; justify-self: end; }
.nav-name .logo { width: 15px; height: auto; }
.nav-btn {
    display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
    height: 34px; padding: 0 13px; border-radius: var(--r-pill);
    background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
    font-family: var(--round); font-weight: 600; font-size: .82rem;
    cursor: pointer;
    transition: box-shadow .2s var(--ease), transform .2s var(--ease), background-color .2s var(--ease);
}
.nav-btn:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--ink-3); }
.nav-btn .ic { width: 15px; height: 15px; flex: none; }
.nav-btn.is-ask { background: var(--ink); color: var(--bg); box-shadow: none; }
.nav-btn.is-ask .spark { animation: spark 3s var(--ease) infinite; }
@keyframes spark { 0%, 70%, 100% { opacity: 1; transform: scale(1); } 80% { opacity: .55; transform: scale(.82); } }
.nav-btn.icon-only { padding: 0; width: 34px; justify-content: center; }
@media (max-width: 560px) {
    .nav-btn.is-ask .lbl { display: none; }
    .nav-btn.is-ask, .nav-btn.icon-only { padding: 0; width: 34px; justify-content: center; }
}

/* Filter chips, centred inside the bar */
.filters-row {
    display: flex; gap: 6px;
    grid-column: 2; justify-self: center;
    overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    padding: 4px; border-radius: var(--r-pill);
    background: var(--card); box-shadow: var(--shadow);
    width: max-content; max-width: 100%;
}
.filters-row::-webkit-scrollbar { display: none; }
.chip {
    flex: none; padding: 7px 15px; border-radius: var(--r-pill);
    font-family: var(--round); font-weight: 600; font-size: .85rem; color: var(--ink-2);
    cursor: pointer; white-space: nowrap;
    transition: color .2s var(--ease), background-color .2s var(--ease);
}
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* ── 5. BENTO GRID ───────────────────────────────────────── */
.bento {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 168px;
    grid-auto-flow: dense;
    gap: var(--gap);
    padding-bottom: 56px;
}
.c-2 { grid-column: span 2; }
.c-3 { grid-column: span 3; }
.c-4 { grid-column: span 4; }
.r-2 { grid-row: span 2; }
.r-3 { grid-row: span 3; }

@media (max-width: 1040px) {
    .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 160px; }
    .c-3, .c-4 { grid-column: span 2; }
}
@media (max-width: 600px) {
    .bento { grid-template-columns: 1fr; grid-auto-rows: minmax(150px, auto); }
    .c-2, .c-3, .c-4 { grid-column: span 1; }
    .r-2, .r-3 { grid-row: span 1; }
}

/* Card shell */
.card {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: flex-end;
    gap: 6px; padding: 18px;
    text-align: left; width: 100%;
    background: var(--card); color: var(--ink);
    border-radius: var(--r); box-shadow: var(--shadow);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), opacity .3s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card:active { transform: translateY(-1px) scale(.994); }
.card.is-static { cursor: default; }
.card.is-static:hover { transform: none; box-shadow: var(--shadow); }

/* Appear animation */
.card { opacity: 0; transform: translateY(14px) scale(.985); }
.card.in { opacity: 1; transform: none; }
.card.in:hover { transform: translateY(-3px); }
.bento.filtering .card { transition: opacity .25s var(--ease), transform .3s var(--ease); }

.card-eyebrow {
    display: flex; align-items: center; gap: 7px;
    font-family: var(--sans); font-size: .78rem;
    text-transform: none; letter-spacing: 0; color: var(--ink-3);
}
.card-title { font-size: 1.12rem; font-weight: 700; line-height: 1.16; }
.card-sub { font-size: .86rem; color: var(--ink-2); line-height: 1.38; }
.card .num { font-weight: 700; font-size: clamp(2.4rem, 6vw, 3.4rem); line-height: .92; letter-spacing: -.04em; }

/* Corner action badge */
.card-act {
    position: absolute; top: 13px; right: 13px; z-index: 3;
    width: 30px; height: 30px; border-radius: 50%;
    display: grid; place-items: center;
    background: color-mix(in srgb, var(--card) 72%, transparent);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 0 0 1px var(--line);
    color: var(--ink-2);
    transition: transform .3s var(--ease), color .3s var(--ease), background-color .3s var(--ease);
}
.card-act .ic { width: 13px; height: 13px; }
.card:hover .card-act { transform: scale(1.08); color: var(--ink); }

/* Card media */
.card-media { position: absolute; inset: 0; z-index: 0; }
.card-media img, .card-media video { width: 100%; height: 100%; object-fit: cover; }
.card-media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.62) 32%, rgba(0,0,0,.22) 62%, rgba(0,0,0,.06) 100%);
}
.card.on-media { color: #fff; }
.card.on-media .card-sub { color: rgba(255,255,255,.82); }
.card.on-media .card-eyebrow { color: rgba(255,255,255,.72); }
.card.on-media .card-act { background: rgba(255,255,255,.18); box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); color: #fff; }
.card-media img { transition: transform .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.04); }

/* Intro card */

.intro-hi { display: block; font-family: var(--round); font-weight: 700; font-size: 1.2rem; letter-spacing: -.02em; }
.intro-text { font-size: clamp(1rem, 1.6vw, 1.18rem); line-height: 1.4; }
.intro-text b { font-weight: 700; }

.dot-live {
    width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent);
    animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); }
    70%  { box-shadow: 0 0 0 7px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

/* Logo-tile cards (email, linkedin …) */
.card-tile { align-items: center; justify-content: center; text-align: center; gap: 10px; }
.tile-mark { width: 40px; height: 40px; display: grid; place-items: center; }
.tile-mark svg { width: 100%; height: 100%; }

.tile-note { font-family: var(--mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.card-tile.copied .tile-note { color: var(--ok); }

/* Stat / ring cards */
.ring-wrap { position: relative; display: grid; place-items: center; margin: auto; }
.ring { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring-track { fill: none; stroke: var(--line); stroke-width: 7; }
.ring-fill {
    fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round;
    stroke-dasharray: 100; stroke-dashoffset: 100;
    transition: stroke-dashoffset 1.1s var(--ease);
}
.ring-mid { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; }
.ring-mid b { font-family: var(--round); font-size: 1.5rem; font-weight: 700; letter-spacing: -.03em; }
.ring-mid span { font-family: var(--mono); font-size: .6rem; text-transform: uppercase; color: var(--ink-3); }

/* Live cards (Strava / Whoop / radio) */
.card-live { justify-content: space-between; }
.live-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.live-brand { display: flex; align-items: center; gap: 7px; font-family: var(--round); font-weight: 600; font-size: .84rem; }
.live-brand .ic { width: 16px; height: 16px; }
.live-big { font-family: var(--round); font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.1rem); letter-spacing: -.035em; line-height: 1; }
.live-rows { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.live-rows span { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; color: var(--ink-2); }
.spark-bars { display: flex; align-items: flex-end; gap: 3px; height: 30px; }
.spark-bars i {
    flex: 1; background: var(--line); border-radius: 2px;
    transform-origin: bottom; transition: height .6s var(--ease), background-color .3s var(--ease);
}
.spark-bars i.hot { background: var(--accent); }

/* Route card */
.route { display: flex; align-items: flex-start; width: 100%; }
.route-stop { position: relative; flex: 1 1 0; min-width: 0; text-align: left; padding-top: 19px; }
.route-stop::before {
    content: ""; position: absolute; left: 4px; right: 0; top: 3.5px;
    height: 1px; background: var(--line);
}
.route-stop:last-child::before { display: none; }
.route-stop i {
    position: absolute; top: 0; left: 0;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line);
}
.route-stop:last-child i { background: var(--accent); box-shadow: none; }
.route-stop b {
    display: block; font-family: var(--round); font-size: .8rem; font-weight: 600; letter-spacing: -.015em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 8px;
}
.route-stop span { display: block; font-size: .68rem; color: var(--ink-3); }

/* Video card */
.play-btn {
    position: absolute; inset: 0; margin: auto; z-index: 2;
    width: 58px; height: 58px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255,255,255,.2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.4);
    color: #fff;
    transition: transform .3s var(--ease), background-color .3s var(--ease);
}
.card:hover .play-btn { transform: scale(1.1); background: rgba(255,255,255,.3); }
.play-btn .ic { width: 20px; height: 20px; margin-left: 3px; }

/* ── 6. PANELS (SHEETS) ──────────────────────────────────── */
.scrim {
    position: fixed; inset: 0; z-index: 150;
    background: rgba(10,10,12,.42);
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    opacity: 0; transition: opacity .35s var(--ease);
}
.scrim.on { opacity: 1; }

.sheet {
    position: fixed; z-index: 200;
    inset: max(20px, 3.5vh) max(20px, 3vw);
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--bg); color: var(--ink);
    border-radius: 26px; box-shadow: var(--shadow-lg);
    transform-origin: 0 0;
    will-change: transform, opacity;
}
@media (max-width: 760px) { .sheet { inset: 0; border-radius: 0; } }

.sheet-bar {
    display: flex; align-items: center; gap: 12px;
    padding: 0 16px; height: 54px; flex: none;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--line);
}
.sheet-where {
    display: flex; align-items: baseline; min-width: 0;
    font-family: var(--round); letter-spacing: -.02em;
}
.sheet-where b { font-weight: 700; font-size: .98rem; flex: none; }
.sheet-chapter {
    font-weight: 500; font-size: .9rem; color: var(--ink-3);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    opacity: 0; transform: translateY(4px);
    transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.sheet-chapter.on { opacity: 1; transform: none; }
.sheet-chapter.swap { opacity: 0; transform: translateY(-5px); }
.sheet-chapter.on::before { content: "·"; margin: 0 8px; color: var(--ink-3); opacity: .5; }
.sheet-close {
    margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
    height: 32px; padding: 0 12px; border-radius: var(--r-pill);
    background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
    font-family: var(--round); font-weight: 600; font-size: .8rem; cursor: pointer;
    transition: box-shadow .2s var(--ease);
}
.sheet-close:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.sheet-close .ic { width: 12px; height: 12px; }

.sheet-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet-inner { max-width: 1060px; margin: 0 auto; padding: clamp(24px, 4vw, 52px) clamp(18px, 4vw, 44px) 72px; }

/* Long-form content inside sheets */
.sheet-body { max-width: 72ch; margin: 0 auto; }
.sheet-kicker { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin-bottom: 14px; }
.sheet-h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); letter-spacing: -.035em; margin-bottom: 16px; }
.sheet-lede { font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.45; color: var(--ink-2); margin-bottom: 30px; }
.chapter { scroll-margin-top: 20px; padding: 30px 0; border-top: 1px solid var(--line); }
.chapter:first-of-type { border-top: 0; padding-top: 0; }
.chapter h3 { font-size: clamp(1.35rem, 3vw, 1.8rem); letter-spacing: -.03em; margin-bottom: 14px; }
.chapter h4 { font-size: 1.02rem; margin: 22px 0 8px; }
.chapter p { margin-bottom: 13px; color: var(--ink-2); line-height: 1.6; }
.chapter p.lead { color: var(--ink); font-size: 1.1rem; font-weight: 500; }
.chapter p strong, .chapter li strong { color: var(--ink); font-weight: 700; }
.chapter ul { list-style: none; display: flex; flex-direction: column; gap: 9px; margin: 4px 0 16px; }
.chapter ul li { position: relative; padding-left: 16px; color: var(--ink-2); }
.chapter ul li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.chapter figure { margin: 18px 0; }
.chapter figure img, .chapter figure video { width: 100%; border-radius: var(--r-sm); background: var(--bg-2); }
.chapter figcaption { font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-top: 8px; }
.media-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 18px 0; }
.media-2 figure { margin: 0; }

.deflist { display: grid; gap: 1px; background: var(--line); border-radius: var(--r-sm); overflow: hidden; margin: 18px 0; }
.deflist > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; padding: 11px 14px; background: var(--bg); }
.deflist dt { font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding-top: 2px; }
.deflist dd { font-size: .92rem; }
@media (max-width: 520px) { .deflist > div { grid-template-columns: 1fr; gap: 3px; } }

.pull { font-family: var(--round); font-weight: 700; font-size: clamp(1.4rem, 3.4vw, 2.1rem); letter-spacing: -.03em; line-height: 1.2; margin: 26px 0; color: var(--ink); }

.tlink { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); border-bottom: 1.5px solid var(--line); padding-bottom: 1px; transition: border-color .2s var(--ease); }
.tlink:hover { border-color: var(--accent); }
.tlink .ic { width: 13px; height: 13px; }

/* Timeline (experience) */
.tl { list-style: none; display: flex; flex-direction: column; }
.tl li { position: relative; padding: 0 0 26px 26px; border-left: 1.5px solid var(--line); }
.tl li:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl li::before { content: ""; position: absolute; left: -5.5px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.tl li.now::before { background: var(--accent); box-shadow: none; }
.tl .when { display: block; font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.tl .what { display: block; font-family: var(--round); font-weight: 700; font-size: 1.08rem; letter-spacing: -.02em; margin: 2px 0 1px; }
.tl .where { display: block; font-size: .88rem; color: var(--ink-2); margin-bottom: 7px; }
.tl p { font-size: .92rem; }

/* Index rows (client sites) */
.ix-list { display: flex; flex-direction: column; }
.ix {
    display: grid; grid-template-columns: 34px minmax(0, 1.1fr) minmax(0, 1.9fr) auto;
    gap: 16px; align-items: baseline; padding: 15px 10px; margin: 0 -10px;
    border-top: 1px solid var(--line); border-radius: var(--r-sm);
    transition: background-color .2s var(--ease);
}
.ix:hover { background: var(--card); }
.ix:last-child { border-bottom: 1px solid var(--line); }
.ix-no { font-family: var(--mono); font-size: .68rem; color: var(--ink-3); }
.ix-name { font-family: var(--round); font-weight: 700; font-size: 1rem; letter-spacing: -.02em; }
.ix-desc { font-size: .86rem; color: var(--ink-2); }
.ix-go { color: var(--ink-3); transition: transform .25s var(--ease), color .25s var(--ease); }
.ix:hover .ix-go { color: var(--accent); transform: translateX(3px); }
.ix-go .ic { width: 15px; height: 15px; }
@media (max-width: 700px) {
    .ix { grid-template-columns: 30px minmax(0, 1fr) auto; }
    .ix-desc { grid-column: 2 / 4; font-size: .82rem; }
}

/* Gallery */
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.gal-item { border-radius: var(--r-sm); overflow: hidden; background: var(--card); box-shadow: var(--shadow); cursor: pointer; text-align: left; transition: transform .3s var(--ease); }
.gal-item:hover { transform: translateY(-3px); }
.gal-item.wide { grid-column: span 2; }
@media (max-width: 560px) { .gal-item.wide { grid-column: span 1; } }
.gal-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gal-cap { padding: 10px 12px 12px; }
.gal-cap strong { display: block; font-family: var(--round); font-size: .88rem; }
.gal-cap span { font-family: var(--mono); font-size: .62rem; text-transform: uppercase; color: var(--ink-3); }

/* Player inside the Studio sheet */
.player { position: relative; aspect-ratio: 16 / 9; background: #0B0B0D; border-radius: var(--r-sm); overflow: hidden; margin-bottom: 18px; }
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-poster { position: absolute; inset: 0; width: 100%; cursor: pointer; }
.player-poster img { width: 100%; height: 100%; object-fit: cover; }
.ep-list { list-style: none; display: flex; flex-direction: column; }
.ep {
    width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px;
    align-items: center; padding: 14px 10px; margin: 0 -10px; text-align: left;
    border-top: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer;
    transition: background-color .2s var(--ease);
}
.ep:hover { background: var(--card); }
.ep[disabled] { cursor: default; opacity: .55; }
.ep[disabled]:hover { background: none; }
.ep-no { font-family: var(--mono); font-size: .68rem; color: var(--ink-3); }
.ep-title { font-family: var(--round); font-weight: 600; font-size: .98rem; }
.ep-meta { font-family: var(--mono); font-size: .66rem; color: var(--ink-3); }
.ep.on .ep-title { color: var(--accent); }

/* Whole-card hit area (keeps markup valid: no buttons inside buttons) */
.card-hit { position: absolute; inset: 0; z-index: 4; border-radius: inherit; cursor: pointer; }
.card-hit:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.card .above { position: relative; z-index: 5; }

/* ── 7. ASK PANEL (ALEKSLM) ──────────────────────────────── */
.ask {
    position: fixed; z-index: 210; top: 0; right: 0; bottom: 0;
    width: min(420px, 100vw);
    display: flex; flex-direction: column;
    background: var(--bg); border-left: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%); transition: transform .4s var(--ease);
}
.ask.on { transform: none; }
@media (max-width: 560px) {
    .ask { top: auto; width: 100%; height: 86vh; border-left: 0; border-radius: 22px 22px 0 0; transform: translateY(100%); }
    .ask.on { transform: none; }
}
.ask-bar { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex: none; }
.ask-bar b { font-family: var(--round); font-weight: 700; font-size: .95rem; letter-spacing: -.01em; }
.ask-bar .mono { color: var(--ink-3); font-size: .62rem; }
.ask-x { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.ask-x .ic { width: 12px; height: 12px; }
.ask-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 92%; font-size: .92rem; line-height: 1.5; }
.msg.me {
    align-self: flex-end; background: var(--ink); color: var(--bg);
    padding: 9px 14px; border-radius: 18px 18px 5px 18px;
}
.msg.ai { align-self: flex-start; }
.msg.ai .bubble { background: var(--card); box-shadow: var(--shadow); padding: 12px 15px; border-radius: 18px 18px 18px 5px; }
.msg.ai p + p { margin-top: 9px; }
.msg.ai strong { font-weight: 700; }
.msg-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.msg-act {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 11px; border-radius: var(--r-pill);
    background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
    font-family: var(--round); font-weight: 600; font-size: .78rem; cursor: pointer;
    transition: box-shadow .2s var(--ease);
}
.msg-act:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.msg-act .ic { width: 11px; height: 11px; }
.typing { display: inline-flex; gap: 4px; padding: 14px 15px; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: blink 1.3s var(--ease) infinite; }
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.ask-sugg { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.ask-form { display: flex; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex: none; }
.ask-input {
    flex: 1; height: 40px; padding: 0 15px; border-radius: var(--r-pill);
    background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: .92rem;
}
.ask-input::placeholder { color: var(--ink-3); }
.ask-send { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; cursor: pointer; }
.ask-send .ic { width: 15px; height: 15px; }
.ask-note { padding: 0 16px 10px; font-family: var(--mono); font-size: .58rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }

/* ── PREFERENCES ─────────────────────────────────────────── */
.prefs {
    position: fixed; z-index: 220; top: calc(var(--nav-h) + 6px); right: max(12px, 3vw);
    width: min(330px, calc(100vw - 24px));
    background: var(--bg); border-radius: 20px; box-shadow: var(--shadow-lg);
    border: 1px solid var(--line); overflow: hidden;
    transform-origin: top right;
    transform: scale(.94) translateY(-6px); opacity: 0; pointer-events: none;
    transition: transform .3s var(--ease), opacity .25s var(--ease);
}
.prefs.on { transform: none; opacity: 1; pointer-events: auto; }
@media (max-width: 480px) {
    .prefs { top: auto; bottom: 0; right: 0; left: 0; width: 100%; border-radius: 22px 22px 0 0; transform-origin: bottom center; transform: translateY(100%); }
    .prefs.on { transform: none; }
}
.prefs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; }
.prefs-head b { font-family: var(--round); font-weight: 700; font-size: .95rem; }
.prefs-body { padding: 0 16px 14px; display: flex; flex-direction: column; gap: 14px; max-height: 70vh; overflow-y: auto; }
.pref-row { display: flex; flex-direction: column; gap: 7px; }
.pref-label { font-family: var(--mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.seg { display: flex; gap: 3px; padding: 3px; background: var(--bg-2); border-radius: var(--r-pill); }
.seg button {
    flex: 1; padding: 7px 6px; border-radius: var(--r-pill);
    font-family: var(--round); font-weight: 600; font-size: .78rem; color: var(--ink-2);
    cursor: pointer; transition: background-color .22s var(--ease), color .22s var(--ease);
}
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.prefs-foot { padding: 11px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.prefs-foot .mono { color: var(--ink-3); font-size: .58rem; }
.prefs-reset { margin-left: auto; font-family: var(--round); font-weight: 600; font-size: .78rem; color: var(--ink-2); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ── 8. RADIO ────────────────────────────────────────────── */
.radio {
    position: fixed; z-index: 100; left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    display: flex; align-items: center; gap: 11px;
    padding: 8px 8px 8px 13px; border-radius: var(--r-pill);
    background: color-mix(in srgb, var(--card) 86%, transparent);
    backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px);
    box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line);
}
@media (max-width: 620px) { .radio { width: 90%; left: 5%; transform: none; } .radio-meta { flex: 1; min-width: 0; } }
.radio-art { width: 32px; height: 32px; flex: none; border-radius: 9px; background: linear-gradient(140deg, var(--accent), #6B2BD9); display: grid; place-items: center; }
.radio-art i { width: 9px; height: 9px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 2px rgba(0,0,0,.25); }
.radio-meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.radio-meta strong { font-family: var(--round); font-weight: 700; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radio-sub { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: .6rem; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eq { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 9px; flex: none; }
.eq i { width: 2px; height: 3px; background: var(--ink-3); border-radius: 1px; }
.radio.playing .eq i { background: var(--accent); animation: eq .9s var(--ease) infinite; }
.radio.playing .eq i:nth-child(2) { animation-delay: .2s; }
.radio.playing .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 9px; } }
.radio-btn { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; cursor: pointer; transition: transform .2s var(--ease); }
.radio-btn:hover { transform: scale(1.06); }
.radio-btn .ic { width: 13px; height: 13px; }
.radio-btn .i-pause, .radio.playing .i-play { display: none; }
.radio.playing .i-pause { display: block; }

/* ── LIGHTBOX ────────────────────────────────────────────── */
.lightbox { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; gap: 14px; padding: 4vh 4vw; background: rgba(8,8,10,.92); opacity: 0; transition: opacity .3s var(--ease); }
.lightbox.on { opacity: 1; }
.lightbox img { max-width: 100%; max-height: 82vh; object-fit: contain; border-radius: 8px; }
.lightbox p { display: flex; gap: 16px; color: rgba(255,255,255,.72); font-family: var(--mono); font-size: .66rem; text-transform: uppercase; }

/* ── FOOTER ──────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); padding: 30px 0 100px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; }
.foot .mono { color: var(--ink-3); }
.foot-links { display: flex; gap: 16px; margin-left: auto; }
.foot-links a { font-family: var(--round); font-weight: 600; font-size: .85rem; color: var(--ink-2); }
.foot-links a:hover { color: var(--ink); }

/* ── 404 ─────────────────────────────────────────────────── */
.e404 { padding-top: clamp(40px, 11vh, 110px); padding-bottom: 80px; }
.e404-in { max-width: 760px; }
.e404-code {
    font-family: var(--mono); font-size: .68rem; text-transform: uppercase;
    letter-spacing: .14em; color: var(--accent); margin-bottom: 18px;
}
.e404 h1 {
    font-size: clamp(1.9rem, 6.5vw, 3.2rem);
    letter-spacing: -.035em; line-height: 1.04; margin-bottom: 18px;
    text-wrap: balance;
}
.e404-asked { font-size: clamp(.95rem, 2.2vw, 1.05rem); color: var(--ink-2); margin-bottom: 40px; }
.e404-path {
    display: inline-block; font-family: var(--mono); font-size: .86em;
    padding: 3px 9px; border-radius: 7px;
    background: var(--bg-2); color: var(--ink);
    word-break: break-all; max-width: 100%; vertical-align: baseline;
}

.e404-label {
    font-family: var(--mono); font-size: .64rem; text-transform: uppercase;
    letter-spacing: .12em; color: var(--ink-3);
    padding-bottom: 10px; border-bottom: 1px solid var(--line);
}

.hits { margin-bottom: 44px; }
.hit {
    display: grid; grid-template-columns: minmax(0, 1fr) 16px;
    align-items: baseline; gap: 3px 16px;
    padding: 15px 12px; margin: 0 -12px;
    border-bottom: 1px solid var(--line); border-radius: var(--r-sm);
    transition: background-color .2s var(--ease);
}
.hit:hover { background: var(--card); }
.hit b {
    grid-column: 1; grid-row: 1;
    font-family: var(--round); font-weight: 700;
    font-size: clamp(1.02rem, 2.6vw, 1.18rem); letter-spacing: -.025em;
}
.hit span { grid-column: 1; grid-row: 2; font-size: .88rem; color: var(--ink-2); }
.hit .ic {
    grid-column: 2; grid-row: 1 / 3; align-self: center;
    width: 16px; height: 16px; color: var(--ink-3);
    transition: transform .25s var(--ease), color .25s var(--ease);
}
.hit:hover .ic { color: var(--accent); transform: translateX(3px); }
@media (min-width: 680px) {
    .hit { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) 16px; align-items: center; }
    .hit b   { grid-column: 1; grid-row: 1; }
    .hit span { grid-column: 2; grid-row: 1; }
    .hit .ic { grid-column: 3; grid-row: 1; }
}

.rest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.rest a {
    padding: 7px 14px; border-radius: var(--r-pill);
    background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
    font-family: var(--round); font-weight: 600; font-size: .85rem;
    transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.rest a:hover { box-shadow: inset 0 0 0 1px var(--ink-3); transform: translateY(-1px); }

.e404-foot { margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--line); }

/* ── FIXES & SMALL DETAILS ───────────────────────────────── */
/* The hit area must stay on top of everything inside a media card */
.card.on-media > .card-eyebrow,
.card.on-media > .card-title,
.card.on-media > .card-sub,
.card.on-media > .num { position: relative; z-index: 2; }
.card-act, .play-btn, .card-media { pointer-events: none; }

/* The equaliser also runs on the radio bento card */
.card.playing .eq i { background: var(--accent); animation: eq .9s var(--ease) infinite; }
.card.playing .eq i:nth-child(2) { animation-delay: .2s; }
.card.playing .eq i:nth-child(3) { animation-delay: .4s; }

/* Visitors who switch the guided cursor off shouldn't see the ring at all */
html[data-cursor="system"] .cursor { display: none; }

/* Panels sit above the radio capsule */
.sheet, .ask, .prefs, .lightbox { isolation: isolate; }

/* ── ALEKSLM: typing caret and the "send me the CV" form ─── */
.bubble.is-typing > p::after {
    content: ""; display: inline-block; vertical-align: -1px;
    width: 2px; height: 1em; margin-left: 2px;
    background: var(--accent);
    animation: caret .75s steps(1) infinite;
}
@keyframes caret { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

.cv-form { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.cv-input {
    flex: 1 1 150px; min-width: 0; height: 36px; padding: 0 13px;
    border-radius: var(--r-pill); background: var(--bg);
    box-shadow: inset 0 0 0 1px var(--line); font-size: .88rem;
}
.cv-input::placeholder { color: var(--ink-3); }
.cv-input:disabled { opacity: .6; }
.cv-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cv-send {
    flex: none; height: 36px; padding: 0 16px; border-radius: var(--r-pill);
    background: var(--ink); color: var(--bg);
    font-family: var(--round); font-weight: 600; font-size: .84rem; cursor: pointer;
    transition: opacity .2s var(--ease);
}
.cv-send:disabled { opacity: .5; cursor: default; }
.cv-status { flex: 1 0 100%; font-size: .78rem; color: var(--ink-2); line-height: 1.4; }
.cv-status:empty { display: none; }
.cv-status.ok { color: var(--ok); }
.cv-status.err { color: var(--accent); }
.cv-status a { text-decoration: underline; text-underline-offset: 2px; }

/* The EP01 poster has a name strip baked into the bottom — crop it out on the card */
.card.on-media .card-media img.crop-top { object-position: 50% 24%; }

/* ── CARD REFINEMENTS ────────────────────────────────────── */
.intro-hi { font-size: clamp(1.25rem, 2.6vw, 1.6rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.intro-text { color: var(--ink-2); }
.intro-text b { color: var(--ink); }

/* Email / LinkedIn: the mark alone, the detail appears on hover */
.card-tile { gap: 0; }
.tile-mark {
    width: 62px; height: 62px; position: relative;
    transition: transform .5s var(--ease);
}
.tile-mark::after {
    content: ""; position: absolute; inset: -34%; z-index: -1; border-radius: 50%;
    background: radial-gradient(circle, var(--glow, transparent) 0%, transparent 68%);
    opacity: 0; transition: opacity .4s var(--ease);
}
.card-tile:hover .tile-mark { transform: translateY(-9px) scale(1.05); }
.card-tile:hover .tile-mark::after { opacity: 1; }
.tile-note {
    margin-top: 14px; font-family: var(--mono); font-size: .62rem;
    text-transform: none; letter-spacing: .01em; color: var(--ink-2);
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (hover: hover) {
    .tile-note { opacity: 0; transform: translateY(7px); transition: opacity .3s var(--ease), transform .35s var(--ease); }
    .card-tile:hover .tile-note, .card-tile:focus-within .tile-note { opacity: 1; transform: none; }
}
.card-tile.copied .tile-note { opacity: 1; transform: none; color: var(--ok); }

/* Languages */
.langs { display: flex; flex-direction: column; gap: 11px; }
.langs > div { display: flex; flex-direction: column; gap: 2px; }
.langs dt { font-family: var(--mono); font-size: .6rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); }
.langs dd { font-family: var(--round); font-weight: 600; font-size: .95rem; letter-spacing: -.015em; line-height: 1.3; }

/* Experience preview */
.mini-tl { list-style: none; display: flex; flex-direction: column; gap: 11px; margin: 14px 0 auto; }
.mini-tl li { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 10px; align-items: baseline; }
.mini-tl .yr { font-family: var(--mono); font-size: .66rem; color: var(--ink-3); }
.mini-tl .rl { font-family: var(--round); font-weight: 700; font-size: .92rem; letter-spacing: -.02em; }
.mini-tl .co { grid-column: 2; font-size: .76rem; color: var(--ink-2); }

/* ── MOBILE: centred nav, readable route ─────────────────── */
@media (max-width: 900px) {
    .nav-inner { grid-template-columns: minmax(0, 1fr) auto; row-gap: 9px; }
    .nav-actions { grid-column: 2; }
    .filters-row { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}
@media (max-width: 560px) {
    .nav-inner.compact { justify-content: space-between; }
}
@media (max-width: 600px) {
    .route { flex-direction: column; align-items: stretch; margin-top: 10px; }
    .route-stop {
        display: grid; grid-template-columns: 20px minmax(0, 1fr) auto;
        align-items: center; gap: 10px; padding: 0; min-height: 32px;
    }
    .route-stop::before { left: 3.5px; right: auto; top: 50%; width: 1px; height: 100%; }
    .route-stop:last-child::before { display: none; }
    .route-stop i { position: relative; top: auto; left: 0; }
    .route-stop b { font-size: .92rem; padding-right: 0; }
    .route-stop span { text-align: right; }
}


/* Photo cards need real height on a phone, and the face in frame */
@media (max-width: 600px) {
    .card.on-media { min-height: 230px; }
    .bento { grid-auto-rows: minmax(158px, auto); }
}
.card.on-media .card-media img { object-position: 50% 34%; }
.card-cv img { width: 60px; height: 60px; }

/* Links inside an answer should look like links */
.msg.ai .bubble a:not(.msg-act) { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Short label on narrow screens, where a wider fallback font could overflow the bar */
.on-narrow { display: none; }
@media (max-width: 430px) {
    .on-wide { display: none; }
    .on-narrow { display: inline; }
}


/* ── INTRO CARD: portrait beside the text, both centred ──── */
.card-intro {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(16px, 2.6vw, 28px);
}
.intro-avatar {
    width: clamp(104px, 15vw, 164px);
    aspect-ratio: 1;
    flex: none;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-2);
    box-shadow: 0 0 0 1px var(--line);
}
.intro-avatar picture, .intro-avatar img { display: block; width: 100%; height: 100%; }
.intro-avatar img { object-fit: cover; object-position: 50% 8%; }
.intro-copy { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.intro-copy .intro-text { margin-top: 4px; }

@media (max-width: 520px) {
    .card-intro { flex-direction: column; align-items: flex-start; gap: 14px; }
    .intro-avatar { width: 92px; }
}

/* Strava and WHOOP share one two-up tile, so they never drift apart.
   If only one of them has data, it simply takes the whole width. */
.pair {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    gap: var(--gap); min-width: 0;
}
@media (max-width: 600px) { .pair { grid-auto-flow: row; } }

/* ── INTERVIEW Q&A ───────────────────────────────────────── */
/* Two levels: pick a person, then pick a question. Heights are animated
   in app.js, because <details> does not transition on its own. */

.qa-person {
    margin: 22px 0;
    background: var(--card);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow .3s var(--ease);
}
.qa-person:hover { box-shadow: var(--shadow-lg); }

.qa-person > summary {
    display: flex;
    align-items: baseline;
    gap: 11px;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
}
.qa-person > summary::-webkit-details-marker { display: none; }
.qa-person > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }

.qa-name {
    flex: none;
    font-family: var(--round); font-weight: 700;
    font-size: 1.22rem; letter-spacing: -.03em;
    color: var(--accent);
}
.qa-role {
    flex: 1 1 auto; min-width: 0;
    font-size: .85rem; color: var(--ink-2);
}
.qa-chev {
    align-self: center;
    width: 32px; height: 32px; flex: none;
    display: grid; place-items: center;
    border-radius: 50%; background: var(--bg-2); color: var(--ink-2);
    transition: transform .35s var(--ease), background-color .25s var(--ease), color .25s var(--ease);
}
.qa-chev .ic { width: 14px; height: 14px; transform: rotate(90deg); }
.qa-person > summary:hover .qa-chev { background: var(--accent); color: #fff; }
.qa-person[open] > summary .qa-chev { transform: rotate(180deg); }

/* ── the questions ── */
.qa { padding: 0 18px 6px; }
.qa-item { border-top: 1px solid var(--line); }

.qa-item > summary {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 26px;
    align-items: baseline;
    gap: 12px;
    padding: 15px 0;
    cursor: pointer;
    list-style: none;
}
.qa-item > summary::-webkit-details-marker { display: none; }
.qa-item > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.qa-q {
    font-family: var(--round); font-weight: 600; font-size: .98rem; letter-spacing: -.015em;
    transition: color .2s var(--ease);
}
.qa-item > summary:hover .qa-q,
.qa-item[open] > summary .qa-q { color: var(--accent); }

.qa-item .qa-chev {
    width: 22px; height: 22px; align-self: center;
    background: none; color: var(--ink-3);
}
.qa-item .qa-chev .ic { width: 12px; height: 12px; }
.qa-item > summary:hover .qa-chev { background: none; color: var(--accent); }
.qa-item[open] > summary .qa-chev { transform: rotate(180deg); color: var(--accent); }

/* the answer, set off by a rule in the accent colour */
.qa-item > p {
    margin: 0 26px 16px 0;
    padding-left: 14px;
    border-left: 2px solid var(--accent);
    color: var(--ink-2); line-height: 1.6;
}

/* app.js measures these, so they must be able to be clipped */
.qa-person > .qa, .qa-item > p { overflow: hidden; }

@media (max-width: 520px) {
    .qa { padding: 0 14px 4px; }
    .qa-person > summary { padding: 14px; }
    .qa-item > summary { grid-template-columns: minmax(0, 1fr) 22px; gap: 10px; }
    .qa-item > p { margin-right: 0; }
}

/* Lists and galleries are not prose: let them use the panel's full width.
   The reading column stays narrow everywhere else. */
#sheet-clients .sheet-body,
#sheet-design .sheet-body { max-width: none; }

/* Voice input for ALEKSLM */
.ask-mic {
    width: 40px; height: 40px; flex: none; border-radius: 50%;
    display: grid; place-items: center; cursor: pointer;
    background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
    color: var(--ink-2);
    transition: color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.ask-mic:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-3); }
.ask-mic .ic { width: 16px; height: 16px; }
.ask-mic.listening {
    background: var(--accent); color: #fff; box-shadow: none;
    animation: micPulse 1.4s var(--ease) infinite;
}
@keyframes micPulse {
    0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
    70%  { box-shadow: 0 0 0 9px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

/* Small comparison table inside a case study */
.cmp { width: 100%; border-collapse: collapse; margin: 18px 0 20px; font-size: .92rem; }
.cmp th, .cmp td { text-align: left; padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp thead th {
    font-family: var(--mono); font-size: .64rem; text-transform: uppercase;
    letter-spacing: .07em; color: var(--ink-3); font-weight: 400;
    border-bottom-color: var(--ink-3);
}
.cmp tbody td:first-child { color: var(--ink-2); width: 40%; }
.cmp tbody td { font-family: var(--round); font-weight: 600; }
.cmp tbody td:first-child { font-family: var(--sans); font-weight: 400; }
@media (max-width: 520px) { .cmp { font-size: .84rem; } .cmp th, .cmp td { padding-right: 8px; } }
