/* Shared portfolio components; loaded after the selected visual variant. */
:root {
    --folio-ink: var(--ink, var(--text, #17191d));
    --folio-muted: var(--ink-2, var(--text-2, #525866));
    --folio-panel: var(--panel, var(--bg-card, #fff));
    --folio-line: var(--border, #dfe3e7);
}
.hero__role { color: var(--folio-muted); font-size: .78rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; margin: 0 0 1.25rem; }
.hero__actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 2rem; }
.hero__actions .btn { gap: .8rem; }
.hero__contact { color: var(--folio-ink); font-size: .85rem; padding: .75rem .4rem; text-underline-offset: 5px; }
.hero__contact:hover { text-decoration: underline; }

/* Pulse: clearer hierarchy and a quieter treatment of supporting information. */
html[data-style="pulse"] .hero__inner { grid-template-columns: minmax(0, 1.35fr) minmax(0, .8fr); gap: 3rem; }
html[data-style="pulse"] .hero h1 { font-size: clamp(2.5rem, 4.7vw, 4.75rem); line-height: 1.06; letter-spacing: -.055em; margin-bottom: .8rem; }
html[data-style="pulse"] .hero__greet { font-size: .78rem; margin-bottom: .65rem; letter-spacing: 0; }
html[data-style="pulse"] .hero__greet::before { content: ''; }
html[data-style="pulse"] .hero__about p:first-child { font-size: clamp(1.35rem, 2.15vw, 2rem); line-height: 1.22; letter-spacing: -.035em; max-width: 24ch; margin-bottom: 1rem; }
html[data-style="pulse"] .hero__about p { max-width: 49ch; line-height: 1.7; }
html[data-style="pulse"] .hero__about p:not(:first-child) strong { background: none; -webkit-text-fill-color: currentColor; color: var(--ink); font-weight: 600; }
html[data-style="pulse"] .hero__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 520px; border-top: 1px solid var(--border); padding-top: 1.25rem; gap: 1rem; }
html[data-style="pulse"] .hero__stats .stat-card { grid-column: auto; grid-row: auto; background: none; border: 0; border-radius: 0; padding: 0; text-align: left; box-shadow: none; }
html[data-style="pulse"] .hero__stats .stat-card::before,
html[data-style="pulse"] .hero__stats .stat-card::after { display: none; }
html[data-style="pulse"] .hero__stats .stat-card:nth-child(n) .stat-card__num { color: var(--ink); background: none; -webkit-text-fill-color: currentColor; font-size: 1.65rem; }
html[data-style="pulse"] .hero__stats .stat-card:nth-child(n) .stat-card__label { color: var(--ink-2); font-size: .6rem; line-height: 1.6; }
html[data-style="pulse"] .hero__actions .btn--primary { background: var(--ink); color: var(--bg); box-shadow: none; }
html[data-style="pulse"] .hero__actions .btn--primary::before { display: none; }
html[data-style="pulse"] .hero__photo { max-width: 350px; margin: auto; }
html[data-style="pulse"] .hero__shape--squiggle,
html[data-style="pulse"] .hero__shape--star { opacity: .4; }
html[data-style="pulse"] .site-nav a.active { box-shadow: none; }
html[data-style="pulse"] .section__header { margin-bottom: 1.25rem; }
html[data-style="pulse"] .section__desc { max-width: 65ch; }

.project-browser { min-width: 0; }
.project-browser__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; min-height: 42px; color: var(--folio-muted); }
.project-browser__hint { font-size: .75rem; letter-spacing: .02em; }
.project-browser__hint span { margin-left: .5rem; }
.project-browser__controls { display: flex; align-items: center; gap: .5rem; }
.project-browser__controls[hidden] { display: none; }
.project-browser__count { font-size: .75rem; font-variant-numeric: tabular-nums; margin-right: .65rem; }
.project-browser__controls button { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--folio-line); border-radius: 50%; background: var(--folio-panel); color: var(--folio-ink); font-size: 1.2rem; transition: background .15s; }
.project-browser__controls button:hover:not(:disabled) { background: var(--folio-ink); color: var(--folio-panel); }
.project-browser__controls button:disabled { opacity: .35; cursor: default; }
/* Native scrolling works with a mouse, keyboard, trackpad, touch, or no JS. */
html .projects-grid.folio-track {
    display: grid; grid-template-columns: none; grid-auto-flow: column;
    grid-auto-columns: clamp(310px, 30vw, 390px); grid-template-rows: auto;
    grid-auto-rows: auto; gap: 1.2rem; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; scroll-padding-inline: 2px;
    padding: 3px 3px 1rem; margin: -3px; max-width: 100%;
    scrollbar-width: thin; scrollbar-color: var(--folio-line) transparent;
    overscroll-behavior-x: contain; align-items: stretch;
}
html .projects-grid .folio-card {
    display: flex; flex-direction: column; padding: 0; margin: 0;
    grid-column: auto !important; grid-row: auto !important;
    min-width: 0; width: auto; height: auto; min-height: 0;
    border: 1px solid var(--folio-line); border-radius: 16px;
    background: var(--folio-panel); color: var(--folio-ink); overflow: hidden;
    scroll-snap-align: start; transition: border-color .2s, box-shadow .2s;
    box-shadow: 0 4px 20px rgb(0 0 0 / .025);
}
html .projects-grid .folio-card:hover { transform: none; border-color: var(--accent); box-shadow: 0 8px 24px rgb(0 0 0 / .06); }
html .projects-grid .folio-card::before,
html .projects-grid .folio-card::after { display: none; }
.folio-card__visual { height: 190px; flex: 0 0 auto; overflow: hidden; border-bottom: 1px solid var(--folio-line); }
.folio-card__visual > img { display: block; width: 100%; height: 100%; object-fit: cover; }
html .folio-card .folio-card__body { display: flex; flex: 1; flex-direction: column; padding: 1.3rem; }
html .folio-card .folio-card__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem .6rem; font-size: .61rem; letter-spacing: .04em; text-transform: uppercase; color: var(--folio-muted); margin-bottom: .75rem; line-height: 1.5; }
html .projects-grid .folio-card h3 { font-family: inherit; font-size: 1.22rem; line-height: 1.28; font-weight: 650; letter-spacing: -.03em; color: var(--folio-ink); margin: 0 0 .6rem; }
html .projects-grid .folio-card p { display: block; flex: 1; font-size: .85rem; line-height: 1.65; color: var(--folio-muted); overflow: visible; margin: 0 0 1rem; -webkit-line-clamp: unset; }
.folio-card__role { color: var(--folio-ink); font-size: .71rem; margin-bottom: .75rem; }
html .folio-card .skill-tags { margin: 0; gap: .3rem; }
html .folio-card .skill-tag { font-size: .6rem; padding: .3rem .5rem; }
.folio-card__footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; border-top: 1px solid var(--folio-line); margin-top: 1.1rem; padding-top: .8rem; }
.folio-card__read { font-size: .77rem; font-weight: 600; color: var(--folio-ink); }
.folio-card__read > span { margin-left: .4rem; }
.folio-card__private { font-size: .6rem; color: var(--folio-muted); }
html .folio-card .project-card__link { width: 34px; height: 34px; border: 1px solid var(--folio-line); background: var(--folio-panel); color: var(--folio-ink); border-radius: 50%; }
html .folio-card .project-card__link:hover { background: var(--folio-ink); color: var(--folio-panel); }
/* All card surfaces open the case study except its independent live-site link. */
.folio-card__visual, .folio-card__role, .folio-card__footer { position: relative; z-index: 2; pointer-events: none; }
.folio-card__placeholder { height: 100%; display: flex; flex-direction: column; justify-content: space-between; background: #152a30; color: #e7f4ed; padding: 1.7rem; }
.folio-card__placeholder span { font-size: .6rem; letter-spacing: .15em; }
.folio-card__placeholder strong { font-size: 1.8rem; font-weight: 500; }

/* Functional illustrations deliberately use an independent, accessible palette. */
.system-map { --map-bg: #eaf3ed; --map-ink: #184c38; --map-line: #b5cfbe; margin: 0; padding: 2rem; background: var(--map-bg); color: var(--map-ink); border-radius: 16px; }
.system-map--notifications { --map-bg: #edf0fb; --map-ink: #354580; --map-line: #c0c9e5; }
.system-map--crm { --map-bg: #eff1f4; --map-ink: #33475c; --map-line: #c3ced8; }
.system-map--commerce { --map-bg: #f6eee4; --map-ink: #77502d; --map-line: #dbc8ae; }
.system-map--education { --map-bg: #f4ebed; --map-ink: #754552; --map-line: #d9bbc3; }
.system-map--portfolio { --map-bg: #eae9e6; --map-ink: #494844; --map-line: #c4c2ba; }
.system-map__label { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-family: ui-monospace, monospace; font-size: .62rem; letter-spacing: .13em; margin-bottom: 1.6rem; }
.system-map__signal { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.system-map__nodes { display: flex; align-items: stretch; justify-content: center; gap: .65rem; }
.system-map__nodes span { border: 1px solid var(--map-line); border-radius: 5px; padding: .65rem 1rem; font-size: .8rem; background: rgb(255 255 255 / .5); text-align: center; }
.system-map__core { max-width: 480px; margin: auto; display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1rem; border: 1px solid var(--map-line); border-radius: 8px; background: #fff; box-shadow: 0 8px 20px rgb(0 0 0 / .035); }
.system-map__core strong { font-size: 1.1rem; font-weight: 600; letter-spacing: -.02em; }
.system-map__core > span { font-size: .72rem; }
.system-map__connector { height: 20px; width: 1px; background: var(--map-line); margin: auto; }
.system-map figcaption { font-size: .7rem; text-align: center; line-height: 1.5; margin-top: 1.5rem; }
.system-map--compact { border-radius: 0; padding: 1.15rem 1.3rem; height: 100%; }
.system-map--compact .system-map__label { font-size: .48rem; margin-bottom: .85rem; }
.system-map--compact .system-map__nodes { gap: .3rem; }
.system-map--compact .system-map__nodes span { font-size: .49rem; padding: .3rem .45rem; }
.system-map--compact .system-map__core { padding: .55rem; gap: .2rem; max-width: 220px; }
.system-map--compact .system-map__core strong { font-size: .82rem; }
.system-map--compact .system-map__core > span { font-size: .5rem; }
.system-map--compact .system-map__connector { height: 10px; }

/* Case studies: overview, ownership, a readable story, then supporting visuals. */
.cs__heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.25rem 2rem; }
html .cs .cs__heading .cs__title { flex: 1 1 24rem; min-width: 0; margin-bottom: 0; }
html .cs .cs__heading .cs__actions { flex: 0 1 auto; justify-content: flex-end; margin: 0; }
.cs__heading .cs__actions .btn { white-space: nowrap; }
html .cs .cs__title { font-size: clamp(2.1rem, 4.3vw, 4.3rem); line-height: 1.08; letter-spacing: -.045em; overflow-wrap: anywhere; }
.cs__summary { max-width: 65ch; font-size: 1.15rem; line-height: 1.7; color: var(--folio-muted); margin: 1.25rem 0; }
.cs__scope { color: var(--folio-muted); font-size: .8rem; line-height: 1.8; margin: -.5rem 0 1.5rem; }
html .cs .cs__blocks { gap: 1rem; margin: 2.5rem 0; }
html .cs .cs__block { background: var(--folio-panel); color: var(--folio-ink); border-color: var(--folio-line); padding: 1.5rem; }
html .cs .cs__block p { font-size: .9rem; line-height: 1.75; color: var(--folio-muted); }
@media (hover: hover) and (pointer: fine) {
    html .cs .cs__block:hover { border-color: var(--accent); box-shadow: 0 14px 32px rgb(0 0 0 / .08); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    html .cs .cs__block { transition: transform .24s cubic-bezier(.2, .7, .3, 1), box-shadow .24s ease, border-color .24s ease; }
    html .cs .cs__block:hover { transform: translateY(-5px); }
}
.case-story { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 2.5rem; padding: 2.5rem 0; border-top: 1px solid var(--folio-line); color: var(--folio-ink); }
.case-story__label { font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; color: var(--folio-muted); line-height: 1.8; padding-top: .45rem; }
.case-story__body { max-width: 70ch; line-height: 1.85; }
.case-story__body h2 { font-size: clamp(1.5rem, 2vw, 2rem); line-height: 1.2; letter-spacing: -.035em; margin: 0 0 1.25rem; }
.case-story__body h3 { font-size: 1.1rem; margin: 1.75rem 0 .65rem; }
.case-story__body p { color: var(--folio-muted); margin: 0 0 1rem; font-size: .96rem; }
.case-story__body ul, .case-story__body ol { padding-left: 1.25rem; list-style: revert; }
.case-story__body a { text-decoration: underline; text-underline-offset: 3px; }
.case-story__body pre { overflow-x: auto; }
.case-story__body img { height: auto; }
.case-overview { margin: 0 0 2.5rem; }
.case-overview h2 { font-size: 1rem; margin-bottom: 1rem; color: var(--folio-ink); }
.case-contact { padding: 1.75rem 0; border-top: 1px solid var(--folio-line); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; color: var(--folio-ink); }
.case-contact p { margin-top: .5rem; font-size: .85rem; color: var(--folio-muted); }
html .cs .cs__nav { margin-top: 1.5rem; gap: 1rem; }
html .cs .cs__nav a { max-width: 48%; white-space: normal; font-size: .8rem; }

@media (max-width: 1100px) and (min-width: 769px) {
    html[data-style="pulse"] .hero__inner { gap: 1.5rem; grid-template-columns: minmax(0, 1.5fr) minmax(0, .65fr); }
    html[data-style="pulse"] .hero__photo-caption { position: relative; left: auto; right: auto; bottom: auto; margin-top: .5rem; transform: none; }
}
@media (max-width: 768px) {
    .cs__heading { flex-direction: column; align-items: stretch; }
    html .cs .cs__heading .cs__title { flex-basis: auto; }
    html .cs .cs__heading .cs__actions { justify-content: flex-start; }
    html[data-style="pulse"] .hero__inner { grid-template-columns: 1fr; gap: 2.5rem; }
    html[data-style="pulse"] .hero__visual { order: -1; }
    html[data-style="pulse"] .hero__content { order: 0; }
    html[data-style="pulse"] .hero h1 { font-size: clamp(2.5rem, 10.5vw, 3.7rem); }
    html[data-style="pulse"] .hero__about p:first-child { font-size: 1.65rem; }
    html[data-style="pulse"] .hero__photo { max-width: 250px; }
    html[data-style="pulse"] .hero__role { font-size: .66rem; }
    .hero__actions { gap: .65rem; margin-bottom: 1.5rem; }
    .hero__actions .btn { padding: .8rem 1rem; font-size: .8rem; }
    html .projects-grid.folio-track { grid-auto-columns: min(85vw, 350px); gap: .8rem; }
    .project-browser__hint { font-size: .67rem; }
    .project-browser__count { font-size: .65rem; margin-right: .1rem; }
    html .folio-card .folio-card__body { padding: 1.1rem; }
    .case-story { grid-template-columns: 1fr; gap: .75rem; padding: 1.75rem 0; }
    .system-map:not(.system-map--compact) { padding: 1.25rem .8rem; }
    .system-map__nodes { gap: .3rem; }
    .system-map__nodes span { font-size: .65rem; padding: .5rem; }
}
@media print {
    html[data-style] body, html[data-style] main, html[data-style] .home main { height: auto; overflow: visible; position: static; margin: 0; }
    html[data-style] .site-header, .sidebar-avatar, .project-browser__controls, .hero__visual { display: none !important; }
    html[data-style] .home :is(.hero, .section) { display: block !important; position: static; height: auto; overflow: visible; padding: 1rem 0; }
    html .projects-grid.folio-track { display: grid; grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); overflow: visible; }
    .folio-card { break-inside: avoid; }
}

/* Long case studies use normal document scrolling beside the fixed sidebar. */
html[data-style="pulse"] body.single-ld_project { height: auto; min-height: 100vh; overflow-y: auto; }
html[data-style="pulse"] .single-ld_project main { position: relative; inset: auto; margin: 2rem 0 0 calc(var(--stage-offset) + var(--sidebar-w) + var(--gap)); height: auto; overflow: visible; }
html[data-style="pulse"] .single-ld_project .cs { position: relative; inset: auto; overflow: visible; height: auto; padding-top: 1rem; }
@media (max-width: 768px) {
    html[data-style="pulse"] .single-ld_project main { margin: 76px 0 0; width: 100%; max-width: 100%; }
    html[data-style="pulse"] .single-ld_project .cs { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
    html[data-style="pulse"] .single-ld_project .cs-wrap { padding: 0 1rem; }
}

/* Keep the mobile tab bar focused; native disclosure also works without JS. */
.site-nav__more { display: none; }
@media (max-width: 768px) {
    /* Floating controls without a full-width header surface. */
    html[data-style="pulse"][data-mobile-nav="bottom_bar"] .site-header,
    html[data-style="pulse"][data-mobile-nav="bottom_bar"][data-theme="dark"] .site-header {
        background: transparent;
        border: 0;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        pointer-events: none;
    }
    html[data-style="pulse"][data-mobile-nav="bottom_bar"] .site-nav {
        height: calc(64px + env(safe-area-inset-bottom, 0px));
    }
    html[data-style="pulse"][data-mobile-nav="bottom_bar"] .site-nav > .site-nav__secondary { display: none; }
    html[data-style="pulse"][data-mobile-nav="bottom_bar"] .site-nav__more {
        display: block;
        position: relative;
        flex: 1 1 0;
        min-width: 0;
        color: var(--ink-3);
    }
    html[data-style="pulse"][data-mobile-nav="bottom_bar"] .site-nav__more summary {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        height: 100%;
        min-height: 44px;
        cursor: pointer;
        list-style: none;
        position: relative;
    }
    .site-nav__more summary::-webkit-details-marker { display: none; }
    .site-nav__more summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 8px; }
    .site-nav__more[open] summary,
    .site-nav__more:has(a.active) summary { color: var(--accent); }
    .site-nav__more:has(a.active) summary::before {
        content: '';
        position: absolute;
        top: 0;
        width: 30px;
        height: 3px;
        border-radius: 0 0 3px 3px;
        background: var(--grad);
    }
    html[data-style="pulse"][data-mobile-nav="bottom_bar"] .site-nav__more-links {
        position: absolute;
        bottom: calc(100% + 12px);
        right: 8px;
        width: 190px;
        padding: 8px;
        background: var(--folio-panel);
        border: 1px solid var(--folio-line);
        border-radius: 16px;
        box-shadow: 0 8px 32px rgb(0 0 0 / .14);
    }
    html[data-style="pulse"][data-mobile-nav="bottom_bar"] .site-nav__more-links a {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        width: 100%;
        min-height: 48px;
        height: auto;
        padding: 14px;
        border-radius: 9px;
        font-size: .9rem;
        font-weight: 500;
        line-height: 1.4;
        text-transform: none;
        letter-spacing: 0;
        color: var(--folio-ink);
    }
    html[data-style="pulse"][data-mobile-nav="bottom_bar"] .site-nav__more-links .ld-icon { width: 20px; height: 20px; flex-shrink: 0; }
    html[data-style="pulse"][data-mobile-nav="bottom_bar"] .site-nav__more-links a:is(:hover, :focus-visible, .active) {
        color: var(--accent);
        background: var(--bg-2) !important;
    }
    html[data-style="pulse"][data-mobile-nav="bottom_bar"] .site-nav__more-links a::before { display: none; }
    /* The no-script fallback places navigation at the top of the document. */
    html[data-style="pulse"][data-mobile-nav="bottom_bar"]:not(.ld-enhanced) .site-nav__more-links {
        top: calc(100% + 12px);
        bottom: auto;
    }
}

/* Mobile tabs share one viewport; only the longer sections scroll vertically. */
@media (max-width: 768px) {
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .home {
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .home main {
        position: fixed;
        inset: 0 12px calc(72px + env(safe-area-inset-bottom, 0px));
        width: auto;
        height: auto;
        margin: 0;
        padding: 0 !important;
        overflow: hidden;
    }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .home :is(.hero, .section) {
        height: 100%;
        min-height: 0;
        padding: 76px 0 8px;
        overflow: hidden;
    }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .home :is(#experience, #skills, #services) {
        overflow-y: auto;
        overscroll-behavior-y: contain;
        scrollbar-width: thin;
        padding-right: 4px;
    }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .home #contact {
        justify-content: center;
    }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .home .hero > .container {
        margin: auto 0;
        width: 100%;
    }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .hero__inner { gap: 14px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .hero__photo {
        width: clamp(90px, 19dvh, 180px);
        margin: 0 auto;
    }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .hero__photo-caption,
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .hero__photo-chip { display: none; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .hero__greet { margin-bottom: 4px; font-size: .7rem; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .hero h1 { font-size: clamp(1.8rem, 8vw, 2.7rem); margin-bottom: 8px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .hero__role { margin-bottom: 12px; font-size: .62rem; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .hero__about { margin-bottom: 0; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .hero__about p { font-size: .8rem; line-height: 1.5; margin-bottom: 8px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .hero__about p:first-child { font-size: 1.3rem; line-height: 1.2; max-width: 28ch; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .hero__actions { margin: 12px 0; gap: 8px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .hero__actions .btn { min-height: 44px; padding: 10px 12px; font-size: .75rem; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .hero__contact { display: none; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .hero__stats { padding-top: 10px; gap: 8px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .hero__stats .stat-card:nth-child(n) .stat-card__num { font-size: 1.2rem; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .hero__stats .stat-card:nth-child(n) .stat-card__label { font-size: .55rem; }

    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] #projects > .container {
        display: flex;
        flex-direction: column;
        height: 100%;
        min-height: 0;
    }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] #projects .section__header { flex-shrink: 0; margin-bottom: 10px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] #projects .label { margin-bottom: 8px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] #projects h2 { font-size: clamp(1.5rem, 6.5vw, 2rem); margin-bottom: 6px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] #projects .section__desc { font-size: .8rem; line-height: 1.4; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .project-browser { display: flex; flex-direction: column; flex: 1; min-height: 0; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .project-browser__toolbar { flex-shrink: 0; margin-bottom: 8px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .folio-track {
        flex: 0 1 auto;
        min-height: 0;
        align-items: start;
        margin: auto 0;
        padding: 3px max(0px, calc((100% - min(85vw, 350px)) / 2)) 8px;
        scroll-padding-inline: 0;
        grid-auto-columns: min(85vw, 350px);
    }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .folio-card { height: 420px; min-height: 0; scroll-snap-align: center; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .folio-card__visual { flex: 0 0 auto; height: 160px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .folio-card__body { flex: 1; padding: 12px; min-height: 0; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .system-map--compact { padding: 8px 12px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .system-map--compact .system-map__label { margin-bottom: 6px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .system-map--compact .system-map__nodes span { padding: 2px 5px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .system-map--compact .system-map__core { padding: 5px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .system-map--compact .system-map__connector { height: 5px; }

    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .folio-card__meta { font-size: .55rem; margin-bottom: 6px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .folio-card h3 { font-size: 1.05rem; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .folio-card p { flex: 0 0 auto; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: .78rem; line-height: 1.4; margin-bottom: 8px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .folio-card__role { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: .67rem; margin-bottom: 8px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .folio-card__footer { margin-top: auto; padding-top: 8px; flex-shrink: 0; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .folio-card .skill-tags { margin: 0 0 8px; }
}
@media (max-width: 768px) and (min-height: 741px) {
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .folio-card__visual > img { object-fit: contain; background: var(--folio-panel); }

}
@media (max-width: 768px) and (max-height: 740px) {
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .hero__stats { display: none; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .hero__photo { width: 110px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] #projects .section__desc { display: none; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .folio-card { height: 350px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .folio-card__visual { height: 110px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .folio-card .skill-tags { display: none; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .contact-card { padding: 20px 12px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .contact-card__intro { font-size: .85rem; margin-bottom: 16px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .contact-link { padding: 10px 12px; min-height: 44px; font-size: .75rem; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .contact-cta { margin-top: 14px; }
}
@media (max-width: 768px) and (max-height: 640px) {
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .hero__about p:not(:first-child) { display: none; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .folio-card { height: 260px; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .folio-card__visual { display: none; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .folio-card p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
}

/* Preserve access when a landscape viewport or browser zoom leaves very little height. */
@media (max-width: 768px) and (max-height: 480px) {
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .home :is(#home, #projects, #contact) { overflow-y: auto; justify-content: flex-start; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .home .hero > .container { margin: 0; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] #projects > .container { height: auto; }
    html.ld-enhanced[data-style="pulse"][data-mobile-nav="bottom_bar"] .folio-track { flex: none; }
}
